修复App安全环保检查申辩流程通过后的编辑操作中检查人确认图片丢失问题

0927cmt
songwenxuan 2024-02-27 11:58:45 +08:00
parent 54ffb49e8b
commit bb5b367886
1 changed files with 4 additions and 1 deletions

View File

@ -167,7 +167,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
*/ */
@RequestMapping(value="/edit") @RequestMapping(value="/edit")
@ResponseBody @ResponseBody
@DockAnnotation @DockAnnotation(hasAnnex = true)
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{ public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
Map<String,Object> map = new HashMap<String,Object>(); Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success"; String errInfo = "success";
@ -178,6 +178,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人 pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
String ffile = DateUtil.getDays(); String ffile = DateUtil.getDays();
ArrayList<String> strings = new ArrayList<>();
if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){ if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); 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)) { if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
@ -191,10 +192,12 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); 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",pd.getString("INSPECTION_USER_OPINION"));
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName);
} }
List<PageData> hiddenList = safetyenvironmentalService.edit(pd); List<PageData> hiddenList = safetyenvironmentalService.edit(pd);
pd.put("hiddenList", hiddenList); pd.put("hiddenList", hiddenList);
map.put("pd", pd); map.put("pd", pd);
map.put("sendPicturesList", JSON.toJSONString(strings));
map.put("result", errInfo); map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd)); map.put("dockData", JSON.toJSONString(pd));
return map; return map;