Commit d824e2bb authored by yangyang's avatar yangyang

fix(报检权限):1.统一业务状态(待提交、已提交、已完成);2.修复开通申请时间格式

parent 2b1b8540
...@@ -65,6 +65,7 @@ public class JyjcOpeningApplicationModel extends BaseModel { ...@@ -65,6 +65,7 @@ public class JyjcOpeningApplicationModel extends BaseModel {
private String remark; private String remark;
@ApiModelProperty (value = "申请时间") @ApiModelProperty (value = "申请时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date applyTime; private Date applyTime;
@ApiModelProperty (value = "工作流执行角色") @ApiModelProperty (value = "工作流执行角色")
......
...@@ -368,7 +368,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -368,7 +368,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
public Boolean doReject(Map<String, Object> params) { public Boolean doReject(Map<String, Object> params) {
execueFlow(params); execueFlow(params);
String instanceId = Optional.ofNullable(params.get("instanceId")).orElse("").toString(); String instanceId = Optional.ofNullable(params.get("instanceId")).orElse("").toString();
params.put("status", FlowStatusEnum.REJECTED.getCode() + ""); params.put("status", FlowStatusEnum.TO_BE_SUBMITTED.getCode() + "");
updateModelByInstanceId(instanceId, params); updateModelByInstanceId(instanceId, params);
return true; return true;
} }
...@@ -382,7 +382,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -382,7 +382,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String comments = params.get("comments").toString(); String comments = params.get("comments").toString();
try { try {
AjaxResult ajaxResult = Workflow.taskClient.getTaskNoAuth(instanceId); AjaxResult ajaxResult = Workflow.taskClient.getTaskNoAuth(instanceId);
log.info("getTaskNoAuth result => {}", ajaxResult);
JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data"))); JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
String taskId = dataObject.getString("id"); String taskId = dataObject.getString("id");
//组装信息 //组装信息
...@@ -417,10 +416,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -417,10 +416,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// 撤回流程 // 撤回流程
JSONObject jsonObject = workflowHelper.rollBack(inspectionApplicationModel.getProcessInstanceId()); JSONObject jsonObject = workflowHelper.rollBack(inspectionApplicationModel.getProcessInstanceId());
if (ObjectUtils.isEmpty(jsonObject) || 200 != jsonObject.getInteger("status")) { if (ObjectUtils.isEmpty(jsonObject) || 200 != jsonObject.getInteger("status")) {
// size = 6 log.error("撤回工作流错误, => {}", jsonObject);
throw new BaseException("撤回工作流错误"); return false;
} }
updateModelByInstanceId(inspectionApplicationModel.getProcessInstanceId(), MapBuilder.<String, Object>create().put("status", FlowStatusEnum.ROLLBACK.getCode() + "").build()); updateModelByInstanceId(inspectionApplicationModel.getProcessInstanceId(), MapBuilder.<String, Object>create().put("status", FlowStatusEnum.TO_BE_SUBMITTED.getCode() + "").build());
return true; return true;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
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