Commit 2872fef0 authored by chenzhao's avatar chenzhao

修改办理时间赋值错误 修改无报检设备不可提交

parent b008bb61
......@@ -95,8 +95,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
public JyjcInspectionApplicationModel save(@RequestBody JSONObject obj) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
//开启报检流程工作流
//接口通用 部分页面按钮无法分开配置类型 所以根据业务情况 将带有工作流实例id的数据 接口类型设置为2 走编辑逻辑
JyjcInspectionApplicationModel model = JSONObject.parseObject(JSON.toJSONString(obj), JyjcInspectionApplicationModel.class);
if (CharSequenceUtil.isNotEmpty(model.getProcessInstanceId()) && model.getOperationType().equals("0")){
model.setOperationType("2");
......@@ -105,10 +104,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
if (!model.getOperationType().equals("2")) {
if (model.getOperationType().equals("0")) {
if(null == model.getEquip() ||model.getEquip().size() < 1 ){
throw new BadRequest("未选择报检设备时不可提交");
}
ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
dto.setProcessDefinitionKey( model.getProcessKey());
dto.setBusinessKey(buildOrderNo());
try {
//开启报检流程工作流
FeignClientResult ajaxResult = Workflow.taskV2Client.startByVariable(dto);
String id = ((Map) ajaxResult.getResult()).get("id").toString();
model.setProcessInstanceId(id);
......@@ -505,10 +509,13 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
entity.setWorkflowRole(role);
}
entity.setStatus(status);
entity.setAcceptDate(new Date());
this.updateById(entity);
//此处自己撤销也赋予了办理日期 存在问题 与驳回 通过区分处理
if (rollBack) {
this.getBaseMapper().updatePromoter(entity.getSequenceNbr());
}else {
entity.setAcceptDate(new Date());
}
this.updateById(entity);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment