安全环保检查对接代码
parent
e42976afc5
commit
696c3eab44
|
@ -272,7 +272,7 @@ public class SafetyEnvironmentalController extends BaseController {
|
|||
@RequestMapping(value = "/add")
|
||||
@RequiresPermissions("safetyenvironmental:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -287,6 +287,7 @@ public class SafetyEnvironmentalController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("CORPINFO_ID", "1".equals(Jurisdiction.getUSER_ID()) ? "" : Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
pd.put("ACTION_USER", Jurisdiction.getName()); //操作人
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(pd.getString("CONFIRM_MESSAGE_SIGN"))) {
|
||||
MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("CONFIRM_MESSAGE_SIGN"));
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
|
@ -300,10 +301,12 @@ public class SafetyEnvironmentalController 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("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName);
|
||||
}
|
||||
List<PageData> hiddenList = safetyenvironmentalService.save(pd);
|
||||
pd.put("hiddenList", hiddenList);
|
||||
map.put("pd", pd);
|
||||
map.put("sendPicturesList",JSON.toJSONString(strings));
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
|
@ -100,7 +100,7 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("safetyenvironmentalexplain:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -116,6 +116,7 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
|||
pd.put("ACTION_USER", Jurisdiction.getName()); //操作人
|
||||
pd.put("VALID","1");
|
||||
pd.put("ISPASS","0");
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(pd.getString("INSPECTED_SITEUSER_SIGN_IMG"))) {
|
||||
MultipartFile img = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTED_SITEUSER_SIGN_IMG"));
|
||||
String suffixName = img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
|
@ -128,8 +129,8 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
|||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(img, 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);
|
||||
}
|
||||
if (null != file && !file.isEmpty()) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
|
@ -145,6 +146,7 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
|||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("INSPECTED_EXPLAIN_FILENAME", file.getOriginalFilename());
|
||||
pd.put("INSPECTED_EXPLAIN_FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
strings.add(pd.getString("INSPECTED_EXPLAIN_FILEPATH")+"@@"+fileName);
|
||||
}
|
||||
PageData logData = safetyenvironmentalexplainService.save(pd);
|
||||
pd.put("logData",JSON.toJSONString(logData));
|
||||
|
@ -152,6 +154,7 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
|||
noticeCorpUtil.SE_PleadingStepUtil(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("sendPicturesList",JSON.toJSONString(strings));
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
|||
@RequestMapping(value="/verify")
|
||||
@RequiresPermissions("safetyenvironmentalinspector:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object verify() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -97,7 +97,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
|||
uBean.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
uBean.put("INSPECTION_STATUS", pd.getString("INSPECTION_STATUS")); //检查进度状态
|
||||
uBean.put("ACTION_USER", Jurisdiction.getName()); //检查进度状态
|
||||
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(pd.getString("INSPECTION_USER_SIGN_IMG"))) {
|
||||
MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTION_USER_SIGN_IMG"));
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
|
@ -110,14 +110,15 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
|||
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);
|
||||
|
||||
uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
strings.add(uBean.getString("INSPECTION_USER_SIGN_IMG")+"@@"+fileName);
|
||||
}
|
||||
pd.put("uBean",JSON.toJSONString(uBean));
|
||||
PageData verify = safetyenvironmentalinspectorService.verify(uBean);
|
||||
pd.put("verify",JSON.toJSONString(verify));
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("sendPicturesList",JSON.toJSONString(strings));
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue