diff --git a/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java b/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java index 605701e..ad59de1 100644 --- a/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java +++ b/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartRequest; import java.text.DecimalFormat; import java.util.*; @@ -140,12 +141,18 @@ public class AppHotworkController extends BaseController { @RequestMapping("/nextStep") @ResponseBody @LogAnno(menuType= "手机",menuServer= "动火作业",instructionsOperate = "动火作业",instructionsType = "通过") - public Object nextStep(@RequestParam(value="files",required=false) MultipartFile[] files) throws Exception { + public Object nextStep(MultipartRequest request) throws Exception { Map map = new HashMap<>(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - hotworkService.nextStep(pd, files); + List fileList = new ArrayList(); + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + + for (int i = 0; i < SIGNTIME.length; i++) { + fileList.add(request.getFile("file" + i)); + } + hotworkService.nextStep(pd, fileList.toArray(new MultipartFile[fileList.size()])); map.put("result",errInfo); return map; } diff --git a/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java index 19d8084..cfdbd48 100644 --- a/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java +++ b/src/main/java/com/zcloud/service/eightwork/impl/HotworkServiceImpl.java @@ -121,7 +121,7 @@ public class HotworkServiceImpl implements HotworkService { sign.put(primary_key, pd.get(primary_key)); sign.put("STEP_ID", pd.get("STEP_ID")); sign.put("SIGN_USER_ID", pd.get("USER_ID")); - sign.put("SIGN_TIME", DateUtil.date2Str(new Date())); + sign.put("SIGN_TIME", pd.getString("SIGNTIME")); sign.put("SIGN_PATH", String.join(",",filePaths)); sign.put("DESCR", pd.get("DESCR")); @@ -134,7 +134,7 @@ public class HotworkServiceImpl implements HotworkService { List unsignedList = hotworkSignMapper.checkUnsigned(sign);//当前步骤未签名人列表 if(unsignedList == null || unsignedList.size() == 0){//如果没有未签人 则跳转下一步 - hotworkMapper.edit(pd); + hotworkMapper.editStep(pd); if (pd.get("PREPARERS") != null && !pd.get("PREPARERS").equals("")) { //如果是设置安全措施确认人步骤 savePreparers(pd,flow); @@ -142,7 +142,8 @@ public class HotworkServiceImpl implements HotworkService { //保存日志 saveLog(pd,pd.getString(flow.get("ACTOR_FIELD")),"1"); - saveNextSigner(pd,flow); + PageData currentflow = getStep(pd.get("TASK_ID"), pd.get("STEP_ID")); + saveNextSigner(pd,currentflow); } }