forked from integrated_whb/integrated_whb
parent
2f1ef51627
commit
5d35ba69d8
|
@ -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.*;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -6,9 +6,11 @@ import com.zcloud.dto.Response;
|
|||
import com.zcloud.dto.TenCorpConst;
|
||||
import com.zcloud.dto.TenCorpDto;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Department;
|
||||
import com.zcloud.logs.LogAnno;
|
||||
import com.zcloud.service.eightwork.HotworkService;
|
||||
import com.zcloud.service.mq.SendMessageService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -29,6 +31,8 @@ public class AppHotworkController extends BaseController {
|
|||
@Autowired
|
||||
private HotworkService hotworkService;
|
||||
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
/**
|
||||
* 新增
|
||||
* @param
|
||||
|
@ -66,4 +70,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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.zcloud.entity.PageData;
|
|||
*/
|
||||
public interface HotworkMapper {
|
||||
PageData getCode(PageData pd);
|
||||
PageData findById(PageData pd);
|
||||
void save(PageData pd);
|
||||
void delete(PageData pd);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.service.eightwork;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import net.sf.ehcache.constructs.nonstop.store.ExceptionOnTimeoutStore;
|
||||
|
||||
/**
|
||||
* @author fangjiakai
|
||||
|
@ -12,4 +13,6 @@ public interface HotworkService {
|
|||
void delete(PageData pd)throws Exception;
|
||||
|
||||
void cancel(PageData pd)throws Exception;
|
||||
|
||||
PageData findById(PageData pd) throws Exception;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ import com.zcloud.mapper.datasource.eightwork.EightWorkFlowLogMapper;
|
|||
import com.zcloud.mapper.datasource.eightwork.EightWorkTaskFlowMapper;
|
||||
import com.zcloud.mapper.datasource.eightwork.HotworkMapper;
|
||||
import com.zcloud.mapper.datasource.eightwork.HotworkSignMapper;
|
||||
import com.zcloud.mapper.datasource.system.DepartmentMapper;
|
||||
import com.zcloud.mapper.datasource.system.UsersMapper;
|
||||
import com.zcloud.service.eightwork.HotworkService;
|
||||
import com.zcloud.service.mq.SendMessageService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
|
@ -38,6 +40,10 @@ public class HotworkServiceImpl implements HotworkService {
|
|||
private EightWorkFlowLogMapper eightWorkFlowLogMapper;
|
||||
@Autowired
|
||||
private HotworkSignMapper hotworkSignMapper;
|
||||
@Autowired
|
||||
private DepartmentMapper departmentMapper;
|
||||
@Autowired
|
||||
private UsersMapper usersMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
|
@ -97,6 +103,12 @@ public class HotworkServiceImpl implements HotworkService {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findById(PageData pd) throws Exception {
|
||||
PageData pageData = hotworkMapper.findById(pd);
|
||||
return pageData;
|
||||
}
|
||||
|
||||
private Object getStepId(Integer TASK_ID, String ACTOR_FIELD) throws Exception {
|
||||
PageData flow = new PageData();
|
||||
flow.put("TASK_ID", TASK_ID);
|
||||
|
|
|
@ -141,5 +141,6 @@ public interface DepartmentService{
|
|||
* @return
|
||||
*/
|
||||
public int getWorkedDepCount(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -220,4 +220,85 @@
|
|||
where
|
||||
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>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue