Commit f9f34c7d authored by 王果's avatar 王果

维修告知bug修改

parent 3881da1e
......@@ -78,8 +78,9 @@ public class JgMaintainByWorkFlowController {
// TODO 受理维修告知流程
LinkedHashMap model1 = (LinkedHashMap) model.get("model");
LinkedHashMap maintainInfo = (LinkedHashMap) model1.get(TABLE_PAGE_ID);
String opinion = model.get("opinion").toString();
JgMaintainNoticeDto jgMaintainNoticeDto = JSON.parseObject(JSON.toJSONString(maintainInfo), JgMaintainNoticeDto.class);
jgMaintainNoticeServiceImpl.accept(jgMaintainNoticeDto, op);
jgMaintainNoticeServiceImpl.accept(jgMaintainNoticeDto, op,opinion);
return ResponseHelper.buildResponse(null);
}
}
......@@ -170,7 +170,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
JgMaintainNotice notice = new JgMaintainNotice();
BeanUtils.copyProperties(noticeDto, notice);
boolean submit = submit(notice, op);
op = "已提交";
boolean submit = submit(notice, op, null);
if (submit) {
// 查询下节点任务
getNext(roleListSecond, notice.getInstanceId(), taskName);
......@@ -303,7 +304,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
placeholders.put("produceUnitName", getValue.apply("produceUnitName"));
placeholders.put("produceLicenseNum", getValue.apply("produceLicenseNum"));
placeholders.put("fullAddress", getValue.apply("provinceName") + getValue.apply("cityName") +
getValue.apply("countyName") + getValue.apply("streetName")+ getValue.apply("address"));
getValue.apply("countyName") + getValue.apply("streetName") + getValue.apply("address"));
placeholders.put("installStartDate", getValue.apply("installStartDate"));
placeholders.put("installType", "维修"); // TODO: 施工类别
placeholders.put("installLicenseNo", "");
......@@ -311,12 +312,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
placeholders.put("installLeaderName", getValue.apply("installLeaderName"));// 施工负责人
placeholders.put("installLeaderPhone", getValue.apply("installLeaderPhone"));// 施工负责人手机
placeholders.put("installUnitAddress", getValue.apply("provinceName") + getValue.apply("cityName") +
getValue.apply("countyName")+ getValue.apply("streetName") + getValue.apply("address")); // TODO: 施工单位地址
getValue.apply("countyName") + getValue.apply("streetName") + getValue.apply("address")); // TODO: 施工单位地址
placeholders.put("useUnitName", getValue.apply("useUnitName"));
placeholders.put("useUnitLeaderName", getValue.apply("safetyManager"));
placeholders.put("useUnitLeaderPhone", getValue.apply("safetyManagerPhone"));
placeholders.put("useUnitLeaderAddress", getValue.apply("useUnitProvinceName") + getValue.apply("useUnitCityName") +
getValue.apply("useUnitCountyName") + getValue.apply("streetName")+ getValue.apply("useUnitAddress"));
getValue.apply("useUnitCountyName") + getValue.apply("streetName") + getValue.apply("useUnitAddress"));
// 生成二维码
String qrCode = ImageUtils.generateQRCode(getValue.apply("applyNo"), 300, 300);
placeholders.put("qrCode", qrCode);
......@@ -347,7 +348,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
// 获取告知单号
// List<String> applyNoList = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.WXGZ.getCode(), deviceList.size());
ResponseModel<List<String>> applyNoResult =tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.GZBG.getCode(), deviceList.size());
ResponseModel<List<String>> applyNoResult = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.GZBG.getCode(), deviceList.size());
if (CollectionUtils.isEmpty(applyNoResult.getResult())) {
log.error(" 获取告知单号失败");
......@@ -552,7 +553,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
public boolean submit(JgMaintainNotice notice, String op) {
public boolean submit(JgMaintainNotice notice, String op, String opinion) {
AjaxResult ajaxResult = Workflow.taskClient.getTask(notice.getInstanceId());
JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
String taskId = dataObject.getString("id");
......@@ -560,7 +561,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
TaskResultDTO dto = new TaskResultDTO();
dto.setResultCode("approvalStatus");
dto.setTaskId(taskId);
// dto.setComment("提交流程");
if (!StringUtils.isEmpty(opinion)) {
dto.setComment(opinion);
}
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", op);
dto.setVariable(map);
......@@ -595,7 +598,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
@Transactional
public void accept(JgMaintainNoticeDto dto, String op) {
public void accept(JgMaintainNoticeDto dto, String op, String opinion) {
String[] taskName = new String[]{"流程结束"};
String userId = RequestContext.getExeUserId();
JgMaintainNotice jgMaintainNotice = this.jgMaintainNoticeMapper.selectById(dto.getSequenceNbr());
......@@ -608,7 +611,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
log.error("日期转换失败:{}", e);
}
ArrayList<String> roleList = new ArrayList<>();
boolean submit = submit(jgMaintainNotice, op);
boolean submit = submit(jgMaintainNotice, op, opinion);
if (submit) {
getNext(roleList, dto.getInstanceId(), taskName);
jgMaintainNotice.setStatus(taskName[0]);
......
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