Commit a679e742 authored by 王果's avatar 王果

维修告知接口调整

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