补充对接提交

czks1.0^2
zhaoyu 2024-01-21 18:24:28 +08:00
parent dd2f6b3f1e
commit a83b5b3fde
9 changed files with 65 additions and 9 deletions

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.app.inspection;
import com.alibaba.fastjson.JSON;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -85,6 +87,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
*/
@RequestMapping(value="/add")
@ResponseBody
@DockAnnotation(hasAnnex = true)
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
@ -100,6 +103,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
String ffile = DateUtil.getDays();
ArrayList<String> strings = new ArrayList<>();
if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
@ -113,11 +117,17 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd.put("CONFIRM_MESSAGE",pd.getString("INSPECTION_USER_OPINION"));
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName);
}
List<PageData> hiddenList = safetyenvironmentalService.save(pd);
if (pd.get("CORPINFO_ID")!=null){
pd.put("operatingCorpId", pd.get("CORPINFO_ID"));
}
pd.put("hiddenList", hiddenList);
map.put("sendPicturesList",JSON.toJSONString(strings));
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}
@ -163,6 +173,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
*/
@RequestMapping(value="/edit")
@ResponseBody
@DockAnnotation(hasAnnex = true)
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
@ -173,6 +184,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
String ffile = DateUtil.getDays();
ArrayList<String> strings = new ArrayList<>();
if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
@ -186,11 +198,17 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd.put("CONFIRM_MESSAGE",pd.getString("INSPECTION_USER_OPINION"));
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName);
}
List<PageData> hiddenList = safetyenvironmentalService.edit(pd);
if (pd.get("CORPINFO_ID")!=null){
pd.put("operatingCorpId", pd.get("CORPINFO_ID"));
}
map.put("sendPicturesList",JSON.toJSONString(strings));
pd.put("hiddenList", hiddenList);
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}
@ -201,11 +219,13 @@ public class AppSafetyEnvironmentalController extends BaseController {
@RequestMapping(value="/explain")
//@RequiresPermissions("safetyenvironmental:edit")
@ResponseBody
@DockAnnotation(hasAnnex = true)
public Object explain(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
ArrayList<String> strings = new ArrayList<>();
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
@ -221,12 +241,21 @@ public class AppSafetyEnvironmentalController extends BaseController {
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd.put("INSPECTION_ORIGINATOR_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
strings.add(pd.getString("INSPECTION_ORIGINATOR_SIGN_IMG")+"@@"+fileName);
}
safetyenvironmentalService.explain(pd);
if (pd.get("CORPINFO_ID")!=null){
pd.put("operatingCorpId", pd.get("CORPINFO_ID"));
}
PageData log = safetyenvironmentalService.explain(pd);
pd.put("inspector",pd.getString("OPERATOR"));
noticeCorpUtil.FailPleadind(pd);
pd.put("operatingCorpId",log.getString("CORPINFO_ID"));
map.put("pd", pd);
map.put("result", errInfo);
pd.put("log",JSON.toJSONString(log));
map.put("dockData",JSON.toJSONString(pd));
map.put("sendPicturesList",JSON.toJSONString(strings));
return map;
}

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.app.inspection;
import com.alibaba.fastjson.JSON;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -78,6 +80,7 @@ public class AppSafetyEnvironmentalExplainController extends BaseController {
*/
@RequestMapping(value = "/add")
@ResponseBody
@DockAnnotation(hasAnnex = true)
public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -91,6 +94,7 @@ public class AppSafetyEnvironmentalExplainController extends BaseController {
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("VALID","1");
pd.put("ISPASS","0");
ArrayList<String> strings = new ArrayList<>();
if (null != file && !file.isEmpty()) {
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
@ -103,11 +107,16 @@ public class AppSafetyEnvironmentalExplainController extends BaseController {
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd.put("INSPECTED_SITEUSER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
strings.add(pd.getString("INSPECTED_SITEUSER_SIGN_IMG")+"@@"+fileName);
}
safetyenvironmentalexplainService.save(pd);
PageData log = safetyenvironmentalexplainService.save(pd);
pd.put("operatingCorpId",log.getString("CORPINFO_ID"));
noticeCorpUtil.SE_PleadingStepUtil(pd);
map.put("pd", pd);
map.put("result", errInfo);
pd.put("log", JSON.toJSONString(log));
map.put("dockData",JSON.toJSONString(pd));
map.put("sendPicturesList",JSON.toJSONString(strings));
return map;
}

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.app.inspection;
import com.alibaba.fastjson.JSON;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -63,6 +65,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController {
*/
@RequestMapping(value = "/verify")
@ResponseBody
@DockAnnotation(hasAnnex = true)
public Object verify(@RequestParam(value = "FFILE", required = false) MultipartFile[] files) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -75,6 +78,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController {
uBean.put("OPERATOR", pd.getString("OPERATOR")); //修改人
uBean.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
uBean.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
ArrayList<String> strings = new ArrayList<>();
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
@ -90,8 +94,16 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController {
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
strings.add(uBean.getString("INSPECTION_USER_SIGN_IMG")+"@@"+fileName);
}
safetyenvironmentalinspectorService.verify(uBean);
PageData pageData = safetyenvironmentalinspectorService.verify(uBean);
pd.put("uBean", JSON.toJSONString(uBean));
if (uBean.get("CORPINFO_ID")!=null){
pd.put("operatingCorpId", uBean.get("CORPINFO_ID"));
}
pd.put("verify",JSON.toJSONString(pageData));
map.put("sendPicturesList",JSON.toJSONString(strings));
map.put("dockData", JSON.toJSONString(pd));
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -17,7 +17,7 @@ public interface SafetyEnvironmentalExplainService{
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
public PageData save(PageData pd)throws Exception;
/**
* @param pd

View File

@ -71,7 +71,7 @@ public interface SafetyEnvironmentalInspectorService{
*
* @param pd
*/
void verify(PageData pd)throws Exception;
PageData verify(PageData pd)throws Exception;
/**ID
* @param pd

View File

@ -93,7 +93,7 @@ public interface SafetyEnvironmentalService{
* @param pd
* @throws Exception
*/
void explain(PageData pd)throws Exception;
PageData explain(PageData pd)throws Exception;
/**
*

View File

@ -42,7 +42,7 @@ public class SafetyEnvironmentalExplainServiceImpl implements SafetyEnvironmenta
* @throws Exception
*/
@Transactional
public void save(PageData pd)throws Exception{
public PageData save(PageData pd)throws Exception{
PageData inspection = safetyEnvironmentalService.findById(pd);
inspection.put("INSPECTED_EXPLAIN", pd.getString("INSPECTED_EXPLAIN"));
if (Tools.notEmpty(pd.getString("INSPECTED_EXPLAIN_FILENAME"))) {
@ -80,7 +80,10 @@ public class SafetyEnvironmentalExplainServiceImpl implements SafetyEnvironmenta
log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名
safetyenvironmentallogService.save(log);
safetyenvironmentalexplainMapper.save(pd);
log.put("CORPINFO_ID",inspection.getString("CORPINFO_ID"));
return log;
}
/**

View File

@ -35,7 +35,7 @@ public class SafetyEnvironmentalInspectorServiceImpl implements SafetyEnvironmen
private NoticeCorpUtil util;
@Override
public void verify(PageData pd) throws Exception {
public PageData verify(PageData pd) throws Exception {
if ("1".equals(pd.getString("INSPECTION_STATUS"))) { //检查进度状态 1.部分检查人员已核实
List<PageData> list = safetyenvironmentalinspectorMapper.listOtherNotVerify(pd);
if (list.size() == 0) {
@ -58,6 +58,7 @@ public class SafetyEnvironmentalInspectorServiceImpl implements SafetyEnvironmen
log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名
safetyenvironmentallogService.save(log);
safetyenvironmentalinspectorMapper.edit(pd);
return log;
}
/**

View File

@ -566,7 +566,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
}
@Override
public void explain(PageData pd) throws Exception {
public PageData explain(PageData pd) throws Exception {
PageData data = safetyenvironmentalMapper.findById(pd);
pd.put("STATE", "101"); // 101.检查已归档,待指派
pd.put("INSPECTION_SOURCE",data.getString("INSPECTION_SOURCE"));
@ -600,6 +600,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
explain.put("OPERATTIME",DateUtil.date2Str(new Date()));
safetyEnvironmentalExplainService.edit(explain);
}
log.put("CORPINFO_ID",data.getString("CORPINFO_ID"));
return log;
}
@Override