Commit a679e742 authored by 王果's avatar 王果

维修告知接口调整

parent e60b949a
......@@ -177,4 +177,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty(value = "告知单PDF URL")
private String noticeReportUrl;
@ApiModelProperty(value = "节点执行人")
private String promoter;
}
......@@ -288,7 +288,7 @@ public class JgMaintainNotice extends BaseEntity {
private String noticeReportUrl;
/**
* 告知单PDF URL
* 节点执行人
*/
@TableField(value = "promoter")
private String promoter;
......
......@@ -158,9 +158,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
* @param noticeDto 维修告知
*/
@SuppressWarnings({"rawtypes", "Duplicates"})
@Transactional
public JgMaintainNoticeDto updateMaintainNotice(String submitType, JgMaintainNoticeDto noticeDto, String op) {
if (Objects.isNull(noticeDto) || StringUtils.isEmpty(submitType))
throw new IllegalArgumentException("参数不能为空");
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(
RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 字段转换
this.convertField(noticeDto);
if (SUBMIT_TYPE_FLOW.equals(submitType)) {
......@@ -176,6 +179,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
noticeDto.setInstanceId(instanceId);
} catch (Exception e) {
log.error("JgMaintainNoticeServiceImpl.updateMaintainNotice启动失败:{}", e);
throw new RuntimeException(e);
}
}
ajaxResult = Workflow.taskClient.getTask(noticeDto.getInstanceId());
......@@ -197,10 +201,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
noticeDto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
JgMaintainNotice bean = new JgMaintainNotice();
BeanUtils.copyProperties(noticeDto, bean);
bean.setPromoter(reginParams.getUserModel().getUserId());
jgMaintainNoticeMapper.updateById(bean);
}
} catch (Exception e) {
log.error("JgMaintainNoticeServiceImpl.updateMaintainNotice执行失败:{}", e);
throw new RuntimeException(e);
}
} else {
JgMaintainNotice bean = new JgMaintainNotice();
......@@ -419,12 +425,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
dto.setNoticeDate(new Date());
dto.setInstallUnitName(reginParams.getCompany().getCompanyName());
dto.setInstallUnitCreditCode(reginParams.getCompany().getCompanyCode());
dto.setPromoter(reginParams.getUserModel().getUserId());
jgRelationEquip.setEquId(String.valueOf(obj.get("SEQUENCE_NBR")));
jgRelationEquip.setEquipTransferId(applyNo);
if (!CollectionUtils.isEmpty(instanceIdList)) {
dto.setInstanceId(instanceIdList.get(i));
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
dto.setPromoter(reginParams.getUserModel().getUserId());
} else {
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
}
......
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