Commit d824e2bb authored by yangyang's avatar yangyang

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

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