Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java
#	src/main/java/com/zcloud/service/eightwork/HotworkService.java
#	src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java
#	src/main/resources/mybatis/datasource/eightwork/HighWorkMapper.xml
pull/4/head
fangjiakai 2024-01-19 10:26:55 +08:00
commit 8c5051aaaf
8 changed files with 160 additions and 0 deletions

View File

@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.servlet.ModelAndView;
import java.util.*;

View File

@ -0,0 +1,52 @@
package com.zcloud.controller.eightwork;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.PageData;
import com.zcloud.util.*;
import org.apache.fop.util.DataURLUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/app/eightwork")
public class AppEightWorkController extends BaseController {
@Autowired
private Smb smb;
@RequestMapping("/saveFile")
@ResponseBody
public Object saveFile(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
Map<String,Object> map = new HashMap<>();
String errorInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
if (null != file && !file.isEmpty()) {
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd.put("FILE_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
}
map.put("result",errorInfo);
map.put("pd",pd);
return map;
}
@RequestMapping("/deleteFile")
@ResponseBody
public Object deleteFile() throws Exception{
Map<String,Object> map = new HashMap<>();
String errorInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
smb.deleteFile(pd.getString("CORPINFO_ID"));
map.put("result",errorInfo);
return map;
}
}

View File

@ -90,4 +90,18 @@ public class AppHotworkController extends BaseController {
map.put("result", errInfo);
return map;
}
@RequestMapping("/findById")
@ResponseBody
public Object findById() throws Exception {
Map<String,Object> map = new HashMap<>();
String errorInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = hotworkService.findById(pd);
map.put("result",errorInfo);
map.put("page",pd);
return map;
}
}

View File

@ -11,6 +11,7 @@ import java.util.List;
*/
public interface HotworkMapper {
PageData getCode(PageData pd);
PageData findById(PageData pd);
void save(PageData pd);
void delete(PageData pd);
void edit(PageData pd);

View File

@ -5,6 +5,7 @@ import com.zcloud.entity.PageData;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import net.sf.ehcache.constructs.nonstop.store.ExceptionOnTimeoutStore;
/**
* @author fangjiakai
@ -21,4 +22,6 @@ public interface HotworkService {
void accept(PageData pd)throws Exception;
void cancel(PageData pd)throws Exception;
PageData findById(PageData pd) throws Exception;
}

View File

@ -194,6 +194,12 @@ public class HotworkServiceImpl implements HotworkService {
saveLog(pd,pd.getString(flow.get("ACTOR_FIELD")),"-1");
}
@Override
public PageData findById(PageData pd) throws Exception {
PageData pageData = hotworkMapper.findById(pd);
return pageData;
}
private PageData getStep(Object TASK_ID, Object STEP_ID) throws Exception {
PageData flow = new PageData();
flow.put("TASK_ID", TASK_ID);

View File

@ -141,5 +141,6 @@ public interface DepartmentService{
* @return
*/
public int getWorkedDepCount(PageData pd)throws Exception;
}

View File

@ -221,6 +221,87 @@
HIGHWORK_ID = #{HIGHWORK_ID}
</update>
<select id="findById" parameterType="pd" resultType="pd">
SELECT
f.HOTWORK_ID,
f.CORPINFO_ID,
f.TASK_ID,
f.STEP_ID,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.WORK_CONTENT,
f.WORK_PLACE,
appo.`NAME` as APPLY_DEPARTMENT_NAME,
appu.`NAME` as APPLY_USER_NAME,
f.WORK_LEVEL,
f.WORK_FUNCTION,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.WORK_USER,
f.SPECIAL_WORK,
f.RISK_IDENTIFICATION,
anao.`NAME` as ANALYZE_DEPARTMENT_NAME,
anau.`NAME` as ANALYZE_USER_NAME,
cono.`NAME` as CONFESS_DEPARTMENT_NAME,
conu.`NAME` as CONFESS_USER_NAME,
acco.`NAME` as ACCEPT_CONFESS_DEPARTMENT_NAME,
accu.`NAME` as ACCEPT_CONFESS_USER_NAME,
guao.`NAME` as GUARDIAN_DEPARTMENT_NAME,
guau.`NAME` as GUARDIAN_USER_NAME,
confo.`NAME` as CONFIRM_DEPARTMENT_NAME,
confu.`NAME` as CONFIRM_USER_NAME,
leao.`NAME` as LEADER_DEPARTMENT_NAME,
leau.`NAME` as LEADER_USER_NAME,
audo.`NAME` as AUDIT_DEPARTMENT_NAME,
audu.`NAME` as AUDIT_USER_NAME,
appro.`NAME` as APPROVE_DEPARTMENT_NAME,
appru.`NAME` as APPROVE_USER_NAME,
mono.`NAME` as MONITOR_DEPARTMENT_NAME,
monu.`NAME` as MONITOR_USER_NAME,
acceo.`NAME` as ACCEPT_DEPARTMENT_NAME,
acceu.`NAME` as ACCEPT_USER_NAME,
f.ANALYZE_TIME
FROM
bus_hotwork AS f
left join oa_department as appo on f.APPLY_DEPARTMENT_ID = appo.DEPARTMENT_ID
left join sys_user as appu on f.APPLY_USER_ID = appu.USER_ID
left join oa_department as anao on f.ANALYZE_DEPARTMENT_ID = anao.DEPARTMENT_ID
left join sys_user as anau on f.ANALYZE_USER_ID = anau.USER_ID
left join oa_department as cono on f.CONFESS_DEPARTMENT_ID = cono.DEPARTMENT_ID
left join sys_user as conu on f.CONFESS_USER_ID = conu.USER_ID
left join oa_department as acco on f.ACCEPT_CONFESS_DEPARTMENT_ID = acco.DEPARTMENT_ID
left join sys_user as accu on f.ACCEPT_CONFESS_USER_ID = accu.USER_ID
left join oa_department as guao on f.GUARDIAN_DEPARTMENT_ID = guao.DEPARTMENT_ID
left join sys_user as guau on f.GUARDIAN_USER_ID = guau.USER_ID
left join oa_department as confo on f.CONFIRM_DEPARTMENT_ID = confo.DEPARTMENT_ID
left join sys_user as confu on f.CONFIRM_USER_ID = confu.USER_ID
left join oa_department as leao on f.LEADER_DEPARTMENT_ID = leao.DEPARTMENT_ID
left join sys_user as leau on f.LEADER_USER_ID = leau.USER_ID
left join oa_department as audo on f.AUDIT_DEPARTMENT_ID = audo.DEPARTMENT_ID
left join sys_user as audu on f.AUDIT_USER_ID = audu.USER_ID
left join oa_department as appro on f.APPROVE_DEPARTMENT_ID = appro.DEPARTMENT_ID
left join sys_user as appru on f.APPROVE_USER_ID = appru.USER_ID
left join oa_department as mono on f.MONITOR_DEPARTMENT_ID = mono.DEPARTMENT_ID
left join sys_user as monu on f.MONITOR_USER_ID = monu.USER_ID
left join oa_department as acceo on f.ACCEPT_DEPARTMENT_ID = acceo.DEPARTMENT_ID
left join sys_user as acceu on f.ACCEPT_USER_ID = acceu.USER_ID
WHERE f.HOTWORK_ID = #{HOTWORK_ID}
</select>
<!-- 修改 -->
<update id="editStep" parameterType="pd">
update