申请动火时,动火操作人处增加上传照片功能。并在作业负责人单位后、所在单位前增加“项目部门”和“项目主管部门负责人”。
parent
a88e165a08
commit
9c2991ee8d
|
@ -9,6 +9,7 @@ import com.zcloud.dto.TenCorpDto;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.logs.LogAnno;
|
||||
import com.zcloud.service.bus.ImgFilesService;
|
||||
import com.zcloud.service.highriskwork.*;
|
||||
import com.zcloud.util.*;
|
||||
import com.zcloud.util.mq.MqSendUtil;
|
||||
|
@ -50,6 +51,8 @@ public class AppHotworkCfdController extends BaseController {
|
|||
private SendMessageUtil sendMessageUtil;
|
||||
@Resource
|
||||
private MqSendUtil mqSendUtil;
|
||||
@Autowired
|
||||
private ImgFilesService imgFilesService;
|
||||
|
||||
/**
|
||||
* 获取编码
|
||||
|
@ -59,7 +62,6 @@ public class AppHotworkCfdController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value = "/getCode")
|
||||
@ResponseBody
|
||||
// @LogAnno(menuType= "手机",menuServer= "动火作业",instructionsOperate = "动火作业",instructionsType = "获取编码")
|
||||
public Object getCode() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -182,8 +184,32 @@ public class AppHotworkCfdController extends BaseController {
|
|||
if (!"succeed".equals(response.getResult()) || !"0".equals(response.getCode())) {
|
||||
throw new RuntimeException("系统异常");
|
||||
}
|
||||
System.out.println("amazing:!!!!!" + JSONObject.toJSONString(response));
|
||||
}
|
||||
map.put("HOTWORK_ID", pd.get("HOTWORK_ID"));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("uploadImg")
|
||||
@ResponseBody
|
||||
public Object uploadImg(@RequestParam(value="FFILE",required=false) MultipartFile[] files,@RequestParam(value="HOTWORK_ID",required=false) String ID) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (files != null && files.length > 0) {
|
||||
MultipartFile file = files[0];
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
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("IMGFILES_ID", this.get32UUID());
|
||||
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("TYPE", 115);
|
||||
pd.put("FOREIGN_KEY", ID);
|
||||
imgFilesService.save(pd);
|
||||
}
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -595,6 +621,23 @@ public class AppHotworkCfdController extends BaseController {
|
|||
}
|
||||
|
||||
switch (status) {
|
||||
// created by liu jun 2024-01-30 description: 作业负责人之前添加项目主管部门负责人签字,为什么状态码时1.5,因为前端代码有判断,小于1则不能提交所以这里写1.5
|
||||
case "1.5": {
|
||||
if (files != null && files.length > 0) {
|
||||
MultipartFile file = files[0];
|
||||
|
||||
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);
|
||||
|
||||
pd2.put("BELONGING_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("BELONGING_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
pd2.put("BELONGING_CONTENT", pd.get("CONTENT"));
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
hotworkCfdService.edit(pd2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "2"://确认
|
||||
if (files != null && files.length > 0) {
|
||||
MultipartFile file = files[0];
|
||||
|
@ -1329,7 +1372,6 @@ public class AppHotworkCfdController extends BaseController {
|
|||
return ;
|
||||
}
|
||||
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
|
@ -1400,7 +1442,6 @@ public class AppHotworkCfdController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value="/list")
|
||||
@ResponseBody
|
||||
// @LogAnno(menuType= "手机",menuServer= "动火作业",instructionsOperate = "动火作业",instructionsType = "列表")
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -1433,6 +1474,10 @@ public class AppHotworkCfdController extends BaseController {
|
|||
map.put("gasList", hotworkGasCfdService.listAll(pd));
|
||||
map.put("imgList", hotworkAcceptUserCfdService.findByIds(pd));
|
||||
map.put("imgList1", hotworkAcceptUserCfdService.findById(pd));
|
||||
PageData condition = new PageData();
|
||||
condition.put("TYPE","115");
|
||||
condition.put("FOREIGN_KEY",pd.getString("HOTWORK_ID"));
|
||||
map.put("imgList2",imgFilesService.listAll(condition));
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.zcloud.dto.TenCorpConst;
|
|||
import com.zcloud.dto.TenCorpDto;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.bus.ImgFilesService;
|
||||
import com.zcloud.service.gf.*;
|
||||
import com.zcloud.service.mq.SendMessageService;
|
||||
import com.zcloud.util.*;
|
||||
|
@ -51,6 +52,9 @@ public class AppGFHotworkController extends BaseController {
|
|||
@Resource
|
||||
private SendMessageService mqClient;
|
||||
|
||||
@Resource
|
||||
private ImgFilesService imgFilesService;
|
||||
|
||||
/**
|
||||
* 获取编码
|
||||
*
|
||||
|
|
|
@ -88,7 +88,12 @@
|
|||
f.ACCEPT_CONFESS_USER_ID,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
f.ANALYZE_TIME
|
||||
f.ANALYZE_TIME,
|
||||
f.BELONGING_DEPARTMENT_ID,
|
||||
f.BELONGING_USER_ID,
|
||||
f.BELONGING_USER_SIGNER_PATH,
|
||||
f.BELONGING_USER_SIGNER_TIME,
|
||||
f.BELONGING_CONTENT
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
|
@ -167,7 +172,12 @@
|
|||
ACCEPT_CONFESS_USER_ID,
|
||||
ACCEPT_CONFESS_USER_SIGNER_PATH,
|
||||
ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
ANALYZE_TIME
|
||||
ANALYZE_TIME,
|
||||
BELONGING_DEPARTMENT_ID,
|
||||
BELONGING_USER_ID,
|
||||
BELONGING_USER_SIGNER_PATH,
|
||||
BELONGING_USER_SIGNER_TIME,
|
||||
BELONGING_CONTENT
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -246,7 +256,12 @@
|
|||
#{ACCEPT_CONFESS_USER_ID},
|
||||
#{ACCEPT_CONFESS_USER_SIGNER_PATH},
|
||||
#{ACCEPT_CONFESS_USER_SIGNER_TIME},
|
||||
#{ANALYZE_TIME}
|
||||
#{ANALYZE_TIME},
|
||||
#{BELONGING_DEPARTMENT_ID},
|
||||
#{BELONGING_USER_ID},
|
||||
#{BELONGING_USER_SIGNER_PATH},
|
||||
#{BELONGING_USER_SIGNER_TIME},
|
||||
#{BELONGING_CONTENT}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
|
@ -355,6 +370,11 @@
|
|||
ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID},
|
||||
ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH},
|
||||
ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME},
|
||||
BELONGING_DEPARTMENT_ID = #{BELONGING_DEPARTMENT_ID},
|
||||
BELONGING_USER_ID = #{BELONGING_USER_ID},
|
||||
BELONGING_USER_SIGNER_PATH = #{BELONGING_USER_SIGNER_PATH},
|
||||
BELONGING_USER_SIGNER_TIME = #{BELONGING_USER_SIGNER_TIME},
|
||||
BELONGING_CONTENT = #{BELONGING_CONTENT},
|
||||
HOTWORK_ID = HOTWORK_ID
|
||||
where
|
||||
HOTWORK_ID = #{HOTWORK_ID}
|
||||
|
@ -573,7 +593,14 @@
|
|||
aacu.NAME as ACCEPT_CONFESS_USER_NAME,
|
||||
|
||||
anad.NAME as ANALYZE_DEPARTMENT_NAME,
|
||||
anau.NAME as ANALYZE_USER_NAME
|
||||
anau.NAME as ANALYZE_USER_NAME,
|
||||
f.BELONGING_DEPARTMENT_ID,
|
||||
belong.NAME as BELONGING_DEPARTMENT_NAME,
|
||||
f.BELONGING_USER_ID,
|
||||
belongU.NAME as BELONGING_USER_NAME,
|
||||
f.BELONGING_USER_SIGNER_PATH,
|
||||
f.BELONGING_USER_SIGNER_TIME,
|
||||
f.BELONGING_CONTENT
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join OA_DEPARTMENT ad on ad.DEPARTMENT_ID = f.APPLY_DEPARTMENT_ID
|
||||
|
@ -608,6 +635,9 @@
|
|||
|
||||
left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID
|
||||
left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID
|
||||
|
||||
left join OA_DEPARTMENT belong on belong.DEPARTMENT_ID = f.BELONGING_DEPARTMENT_ID
|
||||
left join SYS_USER belongU on belongU.USER_ID = f.BELONGING_USER_ID
|
||||
where
|
||||
f.HOTWORK_ID = #{HOTWORK_ID}
|
||||
</select>
|
||||
|
@ -828,6 +858,9 @@
|
|||
<if test="pd.ANALYZE_USER_ID != null and pd.ANALYZE_USER_ID != ''">
|
||||
and f.ANALYZE_USER_ID = #{pd.ANALYZE_USER_ID}
|
||||
</if>
|
||||
<if test="pd.BELONGING_USER_ID != null and pd.BELONGING_USER_ID != ''">
|
||||
and f.BELONGING_USER_ID = #{pd.BELONGING_USER_ID}
|
||||
</if>
|
||||
<choose>
|
||||
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
|
||||
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
|
||||
|
|
Loading…
Reference in New Issue