forked from integrated_whb/integrated_whb
动火下一步状态变更
parent
c120c0b55b
commit
0650dffac0
|
@ -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<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
hotworkService.nextStep(pd, files);
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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<PageData> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue