diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperAppearanceEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperAppearanceEntity.java index a1cd9d0..df8d584 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperAppearanceEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperAppearanceEntity.java @@ -50,6 +50,12 @@ public class OperAppearanceEntity extends TenantEntity { @ApiModelProperty(value = "问题发现人") private Long finder; /** + * 问题发现人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "问题发现人") + private String finderName; + /** * 问题类型: * */ @@ -104,6 +110,12 @@ public class OperAppearanceEntity extends TenantEntity { @ApiModelProperty(value = "甄别人") private Long discriminator; /** + * 甄别人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "甄别人") + private String discriminatorName; + /** * 甄别时间 */ @DateTimeFormat( @@ -151,4 +163,8 @@ public class OperAppearanceEntity extends TenantEntity { @JsonSerialize(nullsUsing = NullSerializer.class) @ApiModelProperty(value = "已有缺陷编码") private String existDefectId; + @ApiModelProperty("创建人名称") + private String createUserName; + @ApiModelProperty("机构名称") + private String deptName; } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectEntity.java index e2e40e4..aa99604 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectEntity.java @@ -103,12 +103,6 @@ public class OperDefectEntity extends TenantEntity { @ApiModelProperty(value = "缺陷创建时间-结束时间") private String endTime; -// 20230612弃用该字段,无地方引用 -// @TableField(exist = false) -// @ApiModelProperty(value = "机构编号集合") -// private List deptIds; - - /** * 区域Id */ @@ -128,12 +122,22 @@ public class OperDefectEntity extends TenantEntity { @ApiModelProperty(value = "消缺处理人") private String planHandler; /** + * 消缺处理人 + */ + + @ApiModelProperty(value = "消缺处理人") + private String planHandlerName; + /** * 检修任务处理人 */ @JsonSerialize(nullsUsing = NullSerializer.class) @ApiModelProperty(value = "检修任务处理人") private Long handler; - + /** + * 检修任务处理人 + */ + @ApiModelProperty(value = "检修任务处理人") + private String handlerName; /** * 发现人 */ @@ -141,6 +145,11 @@ public class OperDefectEntity extends TenantEntity { @ApiModelProperty(value = "发现人") private Long finder; /** + * 发现人 + */ + @ApiModelProperty(value = "发现人") + private String finderName; + /** * 缺陷等级 */ @JsonSerialize(nullsUsing = NullSerializer.class) @@ -184,6 +193,12 @@ public class OperDefectEntity extends TenantEntity { @ApiModelProperty(value = "定论人") private Long conclusionPeople; /** + * 定论人 + */ + @ApiModelProperty(value = "定论人") + private String conclusionPeopleName; + + /** * 定论时间 */ @DateTimeFormat( @@ -218,6 +233,11 @@ public class OperDefectEntity extends TenantEntity { @ApiModelProperty("操作票负责人") private Long principal; /** + * 操作票负责人 + */ + @ApiModelProperty(value = "操作票负责人") + private String principalName; + /** * 手填值班负责人 */ @ApiModelProperty(value = "手填操作票负责人") @@ -232,5 +252,9 @@ public class OperDefectEntity extends TenantEntity { */ @ApiModelProperty(value = "处理任务Id") private Long handleTaskId; + @ApiModelProperty("创建人名称") + private String createUserName; + @ApiModelProperty("机构名称") + private String deptName; } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectStatisticsEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectStatisticsEntity.java index cc38585..1e16f82 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectStatisticsEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectStatisticsEntity.java @@ -60,6 +60,13 @@ public class OperDefectStatisticsEntity extends TenantEntity { @QueryField(condition = SqlCondition.EQUAL) @ApiModelProperty(value = "缺陷发现人") private Long finder; + + /** + * 缺陷发现人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "缺陷发现人") + private String finderName; /** * 缺陷类型 */ @@ -112,6 +119,12 @@ public class OperDefectStatisticsEntity extends TenantEntity { @ApiModelProperty(value = "甄别人") private Long discriminator; /** + * 甄别人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "甄别人") + private String discriminatorName; + /** * 甄别时间 */ @DateTimeFormat( @@ -135,6 +148,12 @@ public class OperDefectStatisticsEntity extends TenantEntity { @ApiModelProperty(value = "检修任务处理人") private Long handler; /** + * 检修任务处理人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "检修任务处理人") + private String handlerName; + /** * 计划工时 */ @JsonSerialize(nullsUsing = NullSerializer.class) @@ -170,6 +189,12 @@ public class OperDefectStatisticsEntity extends TenantEntity { @ApiModelProperty(value = "处理人") private Long disposer; /** + * 处理人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "处理人") + private String disposerName; + /** * 处理描述 */ @ApiModelProperty(value = "处理描述") @@ -215,6 +240,12 @@ public class OperDefectStatisticsEntity extends TenantEntity { @ApiModelProperty(value = "定论人") private Long conclusionPeople; /** + * 定论人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "定论人") + private String conclusionPeopleName; + /** * 定论时间 */ @DateTimeFormat( @@ -238,6 +269,12 @@ public class OperDefectStatisticsEntity extends TenantEntity { @JsonSerialize(nullsUsing = NullSerializer.class) @ApiModelProperty(value = "消缺处理人") private String planHandler; + /** + * 消缺处理人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "消缺处理人") + private String planHandlerName; /** * 是否入库 @@ -288,6 +325,12 @@ public class OperDefectStatisticsEntity extends TenantEntity { @ApiModelProperty("操作票负责人") private Long principal; /** + * 操作票负责人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "操作票负责人") + private String principalName; + /** * 手填值班负责人 */ @ApiModelProperty(value = "手填操作票负责人") @@ -313,4 +356,11 @@ public class OperDefectStatisticsEntity extends TenantEntity { */ @ApiModelProperty(value = "处理任务Id") private Long handleTaskId; + + @ApiModelProperty("创建人名称") + private String createUserName; + + @ApiModelProperty("机构名称") + private String deptName; + } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperPhenomenonEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperPhenomenonEntity.java index 8fb64ee..1befff8 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperPhenomenonEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperPhenomenonEntity.java @@ -61,6 +61,12 @@ public class OperPhenomenonEntity extends TenantEntity { @ApiModelProperty(value = "问题发现人") private Long finder; /** + * 问题发现人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "问题发现人") + private String finderName; + /** * 问题类型:0-设备和1-非设备。 * */ @@ -141,6 +147,12 @@ public class OperPhenomenonEntity extends TenantEntity { @ApiModelProperty(value = "甄别人") private Long discriminator; /** + * 甄别人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "甄别人") + private String discriminatorName; + /** * 甄别时间 */ @DateTimeFormat( @@ -197,6 +209,12 @@ public class OperPhenomenonEntity extends TenantEntity { @JsonSerialize(nullsUsing = NullSerializer.class) @ApiModelProperty(value = "决策处理方案人,决策缺陷处理方案,key 必须是 handleProgramme") private Long handleProgramme; + /** + * 决策处理方案人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "决策处理方案人") + private String handleProgrammeName; /** * 决策处理方案类型 @@ -217,6 +235,13 @@ public class OperPhenomenonEntity extends TenantEntity { @ApiModelProperty(value = "检修任务处理人") private Long handler; /** + * 检修任务处理人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "检修任务处理人") + private String handlerName; + + /** * 处理状态:已处理1,未处理0,默认0 */ @QueryField(condition = SqlCondition.EQUAL) @@ -262,6 +287,12 @@ public class OperPhenomenonEntity extends TenantEntity { @ApiModelProperty(value = "定论人") private Long conclusionPeople; /** + * 定论人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "定论人") + private String conclusionPeopleName; + /** * 定论状态:已定论1,未定论0,默认0 */ @QueryField(condition = SqlCondition.EQUAL) @@ -291,6 +322,11 @@ public class OperPhenomenonEntity extends TenantEntity { @ApiModelProperty(value = "消缺处理人") private String planHandler; /** + * 消缺处理人 + */ + @ApiModelProperty(value = "消缺处理人") + private String planHandlerName; + /** * 实际开始时间 */ @DateTimeFormat( @@ -378,6 +414,12 @@ public class OperPhenomenonEntity extends TenantEntity { @ApiModelProperty("操作票负责人") private Long principal; /** + * 操作票负责人 + */ + @QueryField(condition = SqlCondition.LIKE) + @ApiModelProperty(value = "操作票负责人") + private String principalName; + /** * 手填操作票负责人 */ @ApiModelProperty(value = "手填操作票负责人") @@ -396,4 +438,9 @@ public class OperPhenomenonEntity extends TenantEntity { @TableField(exist = false) @ApiModelProperty(value = "处理人") private String flowHandler; + + @ApiModelProperty("创建人名称") + private String createUserName; + @ApiModelProperty("机构名称") + private String deptName; } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectStatisticsVO.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectStatisticsVO.java index bb1120c..f46a70e 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectStatisticsVO.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectStatisticsVO.java @@ -21,15 +21,10 @@ public class OperDefectStatisticsVO extends OperDefectStatisticsEntity { private static final long serialVersionUID = 8239436726489738763L; - @ApiModelProperty(value = "问题发现人名称") - private String finderName; + @ApiModelProperty(value = "现象Ids") private List defectCodeList; - @ApiModelProperty(value = "甄别人名称") - private String discriminatorName; - @ApiModelProperty(value = "处理人名称,处理工作流的第一个处理人") - private String handlerName; @ApiModelProperty(value = "消缺处理人名称") private String planHandlerName; @@ -37,8 +32,6 @@ public class OperDefectStatisticsVO extends OperDefectStatisticsEntity { @ApiModelProperty(value = "两票工作负责人名称") private String principalName; - @ApiModelProperty(value = "定论人名称") - private String conclusionPeopleName; @ApiModelProperty("创建人名称") private String createUserName; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectVO.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectVO.java index 401bc90..44885b5 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectVO.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectVO.java @@ -24,8 +24,7 @@ public class OperDefectVO extends OperDefectEntity { private static final long serialVersionUID = 330945650534291157L; - @ApiModelProperty("创建人名称") - private String createUserName; + @ApiModelProperty("修改人名称") private String updateUserName; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperPhenomenonVO.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperPhenomenonVO.java index 1765ac9..c27115d 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperPhenomenonVO.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperPhenomenonVO.java @@ -21,20 +21,6 @@ public class OperPhenomenonVO extends OperPhenomenonEntity { private static final long serialVersionUID = -8661188316092509183L; - @ApiModelProperty(value = "发现人") - private String finderName; - - @ApiModelProperty(value = "甄别人名称") - private String discriminatorName; - - @ApiModelProperty(value = "处理人名称,处理工作流的第一个处理人") - private String handlerName; - - @ApiModelProperty(value = "定论人名称") - private String conclusionPeopleName; - - @ApiModelProperty("创建人名称") - private String createUserName; @ApiModelProperty("修改人名称") private String updateUserName; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java index 84011b6..0c7528d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java @@ -26,6 +26,7 @@ import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.system.entity.Dept; @@ -89,15 +90,6 @@ public class OperDefectStatisticsController extends BladeController { LambdaQueryWrapper queryWrapper = statisticsService.getQueryWrapper(entity); IPage pages = statisticsService.page(Condition.getPage(query), queryWrapper); IPage vos = OperDefectStatisticsWrapper.build().pageVO(pages); - if(CollectionUtil.isNotEmpty(vos.getRecords())){ - vos.setRecords(vos.getRecords().stream().map(o->{ - R result = sysClient.getDept(o.getCreateDept()); - if(result.isSuccess() && ObjectUtil.isNotEmpty(result.getData())){ - o.setDeptName(result.getData().getDeptName()); - } - return o; - }).collect(Collectors.toList())); - } return R.data(vos); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java index 0b8f233..e186def 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java @@ -41,6 +41,8 @@ import org.springblade.flow.core.feign.IFlowClient; import org.springblade.flow.core.utils.FlowUtil; import org.springblade.system.cache.DictCache; import org.springblade.system.feign.ISysClient; +import org.springblade.system.user.cache.UserCache; +import org.springblade.system.user.entity.User; import org.springblade.system.user.feign.IUserClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; @@ -97,6 +99,15 @@ public class DefectCheckServiceImpl extends BaseServiceImpl variables = (Map) processWorkFlowResponse.getVariables(); //现象缺陷全表更新 @@ -294,6 +305,9 @@ public class DefectCheckServiceImpl extends BaseServiceImpl() {{ @@ -324,8 +338,7 @@ public class DefectCheckServiceImpl extends BaseServiceImpl finderUser = userClient.userInfoById(entity.getFinder()); -// if (finderUser.isSuccess() && ObjectUtils.isNotEmpty(finderUser.getData())) { -// operDefectStatisticsExportVO.setFinderName(finderUser.getData().getName()); -// } - } - if (StringUtils.isNotBlank(entity.getPlanHandler())) { - User user = UserCache.getUser(Long.valueOf(entity.getPlanHandler())); - if (ObjectUtils.isNotEmpty(user)) { - operDefectStatisticsExportVO.setPlanHandler(user.getName()); - } + operDefectStatisticsExportVO.setFinderName(entity.getFinderName()); + operDefectStatisticsExportVO.setPlanHandler(entity.getPlanHandlerName()); +// if (ObjectUtils.isNotEmpty(entity.getFinder())) { +// User user = UserCache.getUser(entity.getFinder()); +// if (ObjectUtils.isNotEmpty(user)) { +// operDefectStatisticsExportVO.setFinderName(user.getName()); +// } +//// R finderUser = userClient.userInfoById(entity.getFinder()); +//// if (finderUser.isSuccess() && ObjectUtils.isNotEmpty(finderUser.getData())) { +//// operDefectStatisticsExportVO.setFinderName(finderUser.getData().getName()); +//// } +// } + +// if (StringUtils.isNotBlank(entity.getPlanHandler())) { +// User user = UserCache.getUser(Long.valueOf(entity.getPlanHandler())); +// if (ObjectUtils.isNotEmpty(user)) { +// operDefectStatisticsExportVO.setPlanHandler(user.getName()); +// } // R planHandlerUser = userClient.userInfoById(Long.valueOf(entity.getPlanHandler())); // if (planHandlerUser.isSuccess() && ObjectUtils.isNotEmpty(planHandlerUser.getData())) { // operDefectStatisticsExportVO.setPlanHandler(planHandlerUser.getData().getName()); // } - } +// } if (ObjectUtils.isNotEmpty(entity.getFindTime())) { operDefectStatisticsExportVO.setFindTime(entity.getFindTime()); } @@ -207,7 +210,7 @@ public class OperDefectStatisticsServiceImpl extends BaseServiceImpl> workTicketInfoById = iTicketInfoClient.getWorkTicketInfoById(Arrays.asList(Long.valueOf(entity.getTicketId()))); - if (workTicketInfoById.isSuccess()&&CollectionUtil.isNotEmpty(workTicketInfoById.getData())) { + if (workTicketInfoById.isSuccess() && CollectionUtil.isNotEmpty(workTicketInfoById.getData())) { //获取工作票的编码Id operDefectStatisticsExportVO.setTicketId(workTicketInfoById.getData().get(0).getCode()); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperDefectStatisticsWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperDefectStatisticsWrapper.java index 5cac3e6..5058f37 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperDefectStatisticsWrapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperDefectStatisticsWrapper.java @@ -24,30 +24,30 @@ public class OperDefectStatisticsWrapper extends BaseEntityWrapper