Commit c42a9f16 authored by tianyiming's avatar tianyiming

维修告知列表添加筛选条件

parent 03bbf1e7
...@@ -323,6 +323,9 @@ public class JgMaintainNotice extends BaseEntity { ...@@ -323,6 +323,9 @@ public class JgMaintainNotice extends BaseEntity {
@TableField(value = "create_user_company_name") @TableField(value = "create_user_company_name")
private String createUserCompanyName; private String createUserCompanyName;
@TableField(value = "transfer_to_user_ids")
private String transferToUserIds;
@TableField("next_task_id") @TableField("next_task_id")
private String nextTaskId; private String nextTaskId;
......
...@@ -24,7 +24,11 @@ public interface JgMaintainNoticeMapper extends CustomBaseMapper<JgMaintainNotic ...@@ -24,7 +24,11 @@ public interface JgMaintainNoticeMapper extends CustomBaseMapper<JgMaintainNotic
* @param type 类型:enterprise-企业端、supervision-监管端 * @param type 类型:enterprise-企业端、supervision-监管端
* @return 维修告知列表 * @return 维修告知列表
*/ */
Page<JgMaintainNotice> queryForPage(Page<JgMaintainNotice> page, @Param("param") JgMaintainNoticeDto model, @Param("type") String type, @Param("orgCode") String orgCode); Page<JgMaintainNotice> queryForPage(Page<JgMaintainNotice> page,
@Param("param") JgMaintainNoticeDto model,
@Param("type") String type,
@Param("userId") String userId,
@Param("orgCode") String orgCode);
/** /**
* 根据维修告知编号查询设备、设计、制造等信息 * 根据维修告知编号查询设备、设计、制造等信息
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
LEFT JOIN idx_biz_jg_other_info ibjoi on isneq.equ_id = ibjoi.RECORD LEFT JOIN idx_biz_jg_other_info ibjoi on isneq.equ_id = ibjoi.RECORD
<where> <where>
isn.is_delete = 0 isn.is_delete = 0
and isn.transfer_to_user_ids like concat('%',#{userId},'%'))
<if test="param != null "> <if test="param != null ">
<if test="param.applyNo != null and param.applyNo != ''"> <if test="param.applyNo != null and param.applyNo != ''">
AND isn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%') AND isn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
......
...@@ -280,8 +280,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -280,8 +280,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
public Page<JgMaintainNoticeDto> queryForJgMaintainNoticePage(Page<JgMaintainNotice> page, JgMaintainNoticeDto model, ReginParams reginParams) { public Page<JgMaintainNoticeDto> queryForJgMaintainNoticePage(Page<JgMaintainNotice> page, JgMaintainNoticeDto model, ReginParams reginParams) {
String orgCode = reginParams.getCompany().getCompanyCode(); String orgCode = reginParams.getCompany().getCompanyCode();
String type = reginParams.getCompany().getLevel(); String type = reginParams.getCompany().getLevel();
String userId = reginParams.getUserModel().getUserId();
List<DataDictionary> dictionaries = dataDictionaryService.getByType("WXLX"); List<DataDictionary> dictionaries = dataDictionaryService.getByType("WXLX");
Page<JgMaintainNotice> noticePage = jgMaintainNoticeMapper.queryForPage(page, model, type, orgCode); Page<JgMaintainNotice> noticePage = jgMaintainNoticeMapper.queryForPage(page, model, type, orgCode,userId);
Page<JgMaintainNoticeDto> noticeDtoPage = new Page<>(); Page<JgMaintainNoticeDto> noticeDtoPage = new Page<>();
BeanUtils.copyProperties(noticePage, noticeDtoPage, "records"); BeanUtils.copyProperties(noticePage, noticeDtoPage, "records");
List<JgMaintainNoticeDto> records = noticePage.getRecords().stream().map(notice -> { List<JgMaintainNoticeDto> records = noticePage.getRecords().stream().map(notice -> {
...@@ -505,6 +506,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -505,6 +506,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
//行数据 //行数据
TaskMessageDto taskMessageDto = new TaskMessageDto(); TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtils.copyProperties(obj, taskMessageDto); BeanUtils.copyProperties(obj, taskMessageDto);
taskMessageDto.setNextTaskId(obj.getNextTaskId());
dto.setModel(taskMessageDto); dto.setModel(taskMessageDto);
//摘要 按原有规则组装 //摘要 按原有规则组装
dto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", obj.getEquList(), obj.getSupervisoryCode(), obj.getApplyNo())); dto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", obj.getEquList(), obj.getSupervisoryCode(), obj.getApplyNo()));
...@@ -532,7 +534,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -532,7 +534,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskModelDto.setTaskCode(item.getApplyNo()); taskModelDto.setTaskCode(item.getApplyNo());
taskModelDto.setTaskType(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getCode()); taskModelDto.setTaskType(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getCode());
taskModelDto.setTaskTypeLabel(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getName()); taskModelDto.setTaskTypeLabel(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getName());
taskModelDto.setRelationId(workflowResultDto.getInstanceId()); String instanceId = workflowResultList.stream().filter(e -> e.getInstanceId().equals(item.getInstanceId())).findFirst().orElse(null).getInstanceId();
taskModelDto.setRelationId(instanceId);
taskModelDto.setExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); // 工作流API返回 taskModelDto.setExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); // 工作流API返回
taskModelDto.setTaskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName()); taskModelDto.setTaskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName());
taskModelDto.setFlowStatus(commonService.getDictionaryCodeByName(FlowStatusEnum.TO_BE_PROCESSED.getName())); // 流程状态枚举 taskModelDto.setFlowStatus(commonService.getDictionaryCodeByName(FlowStatusEnum.TO_BE_PROCESSED.getName())); // 流程状态枚举
...@@ -544,6 +547,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -544,6 +547,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskModelDto.setStartDate(item.getCreateDate()); taskModelDto.setStartDate(item.getCreateDate());
TaskMessageDto taskMessageDto = new TaskMessageDto(); TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtils.copyProperties(item, taskMessageDto); BeanUtils.copyProperties(item, taskMessageDto);
taskMessageDto.setNextTaskId(item.getNextTaskId());
taskModelDto.setModel(taskMessageDto); taskModelDto.setModel(taskMessageDto);
taskModelDto.setNextExecuteUser(item.getNextExecuteIds()); taskModelDto.setNextExecuteUser(item.getNextExecuteIds());
taskModelDto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", item.getEquList(), item.getSupervisoryCode(), item.getApplyNo())); taskModelDto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", item.getEquList(), item.getSupervisoryCode(), item.getApplyNo()));
......
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