Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
Jone 8 months ago
parent
commit
4411799ee1
  1. 6
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/dto/OperDefectRepeatRatioDTO.java
  2. 6
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java
  3. 7
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.java
  4. 5
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java
  5. 3
      hzims-service/equipment/src/main/resources/db/2.0.0.sql.1
  6. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml
  7. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/wrapper/HandleWrapper.java
  8. 8
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DutyServiceImpl.java
  9. 4
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/wrapper/OfflineRecordWrapper.java
  10. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/entity/InspectionTaskSMS.java
  11. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java
  12. 2
      hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java
  13. 4
      hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgPushRecordWrapper.java
  14. 4
      hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgSmsRecordWrapper.java
  15. 4
      hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgWsRecordHistoryWrapper.java
  16. 4
      hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgWsRecordWrapper.java
  17. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/excel/BaseExport.java
  18. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java
  19. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessTaskV4ServiceImpl.java
  20. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessStatisticsServiceImpl.java
  21. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java
  22. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/wrapper/AreaMapWrapper.java
  23. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/constants/RedisKeyConstants.java
  24. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java
  25. 76
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectServiceImpl.java
  26. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperDefectWrapper.java
  27. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperFaultWrapper.java
  28. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperPhenomenonWrapper.java
  29. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/feign/DutyGroupClient.java
  30. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyChangeServiceImpl.java
  31. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyEmergencyServiceImpl.java
  32. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java
  33. 28
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java
  34. 22
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java
  35. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverConfigController.java
  36. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverConfigService.java
  37. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverDetailsService.java
  38. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverConfigServiceImpl.java
  39. 15
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverDetailsServiceImpl.java
  40. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/GenerateWrapper.java
  41. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OtherWrapper.java
  42. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OverConfigWrapper.java
  43. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OverDetailsWrapper.java
  44. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OverWrapper.java
  45. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/PowerWrapper.java
  46. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/RainfallWrapper.java
  47. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/SolveWrapper.java
  48. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/StorageWrapper.java
  49. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/UseWrapper.java
  50. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/WindWrapper.java
  51. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java
  52. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java
  53. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenancePlanController.java
  54. 9
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java
  55. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskSchedule.java
  56. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceServiceImpl.java
  57. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/schedule/OperPersonalCreateMonthReport.java
  58. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java
  59. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/impl/DistributeWorkOrderServiceImpl.java
  60. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/scheduled/SafeToolTypePushUserTask.java
  61. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/wrapper/ImsMonAlarmInfoWrapper.java
  62. 10
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  63. 12
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  64. 18
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

6
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/dto/OperDefectRepeatRatioDTO.java

@ -27,9 +27,13 @@ public class OperDefectRepeatRatioDTO {
// @ApiModelProperty(value = "缺陷等级名称") // @ApiModelProperty(value = "缺陷等级名称")
// private String defectLevelName; // private String defectLevelName;
@ApiModelProperty(value = "发生数量") @ApiModelProperty(value = "重复缺陷发生数量")
private Long happenNum = 0L; private Long happenNum = 0L;
@ApiModelProperty(value = "缺陷发生总数")
private Long happenSumNum = 0L;
@ApiModelProperty(value = "占总缺陷的比率") @ApiModelProperty(value = "占总缺陷的比率")
private Double happenRatio = 0.0; private Double happenRatio = 0.0;

6
hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java

@ -11,7 +11,6 @@ import com.hnac.hzims.spare.entity.SpWarehouseOutEntity;
import com.hnac.hzims.spare.service.ISpWarehouseOutService; import com.hnac.hzims.spare.service.ISpWarehouseOutService;
import com.hnac.hzims.spare.vo.SpWarehouseExportVO; import com.hnac.hzims.spare.vo.SpWarehouseExportVO;
import com.hnac.hzims.spare.vo.SpWarehouseOutVO; import com.hnac.hzims.spare.vo.SpWarehouseOutVO;
import com.hnac.hzims.vo.VoteChartVo;
import com.hnac.hzinfo.log.annotation.Business; import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate; import com.hnac.hzinfo.log.annotation.Operate;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -39,7 +38,6 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* 控制器 * 控制器
* *
@ -81,6 +79,7 @@ public class SpWarehouseOutController extends BladeController {
IPage<SpWarehouseOutVO> pages = sp_warehouse_outService.selectPageList(Condition.getPage(query),warehouseOutVO); IPage<SpWarehouseOutVO> pages = sp_warehouse_outService.selectPageList(Condition.getPage(query),warehouseOutVO);
return R.data(pages); return R.data(pages);
} }
/** /**
* 分页 代码自定义代号 * 分页 代码自定义代号
*/ */
@ -120,6 +119,7 @@ public class SpWarehouseOutController extends BladeController {
e.printStackTrace(); e.printStackTrace();
} }
} }
/** /**
* 工单预警 * 工单预警
*/ */
@ -165,7 +165,6 @@ public class SpWarehouseOutController extends BladeController {
return R.status(sp_warehouse_outService.saveOrUpdate(sp_warehouse_out)); return R.status(sp_warehouse_outService.saveOrUpdate(sp_warehouse_out));
} }
/** /**
* 删除 代码自定义代号 * 删除 代码自定义代号
*/ */
@ -176,6 +175,7 @@ public class SpWarehouseOutController extends BladeController {
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(sp_warehouse_outService.deleteLogic(Func.toLongList(ids))); return R.status(sp_warehouse_outService.deleteLogic(Func.toLongList(ids)));
} }
/** /**
* 完成流程 修改状态 * 完成流程 修改状态
*/ */

7
hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.java

@ -1,10 +1,8 @@
package com.hnac.hzims.spare.mapper; package com.hnac.hzims.spare.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.spare.entity.SpWarehouseOutEntity; import com.hnac.hzims.spare.entity.SpWarehouseOutEntity;
import com.hnac.hzims.spare.vo.SpWarehouseOutVO; import com.hnac.hzims.spare.vo.SpWarehouseOutVO;
import feign.Param;
import org.springblade.core.datascope.annotation.UserDataAuth; import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
@ -19,6 +17,7 @@ import java.util.Map;
public interface SpWarehouseOutMapper extends UserDataScopeBaseMapper<SpWarehouseOutEntity> { public interface SpWarehouseOutMapper extends UserDataScopeBaseMapper<SpWarehouseOutEntity> {
String selectMaxCode(Map<String,Object> params); String selectMaxCode(Map<String,Object> params);
/** /**
* 分页列表 * 分页列表
* @param page * @param page
@ -27,8 +26,10 @@ public interface SpWarehouseOutMapper extends UserDataScopeBaseMapper<SpWarehous
*/ */
@UserDataAuth @UserDataAuth
List<SpWarehouseOutVO> selectPageList(IPage<SpWarehouseOutVO> page, Map<String,Object> params); List<SpWarehouseOutVO> selectPageList(IPage<SpWarehouseOutVO> page, Map<String,Object> params);
// @UserDataAuth
@UserDataAuth
List<SpWarehouseOutVO> selectListByCondition( Map<String,Object> params); List<SpWarehouseOutVO> selectListByCondition( Map<String,Object> params);
/** /**
* 根据工单ID查询出库单编码 * 根据工单ID查询出库单编码
* @param ticketId * @param ticketId

5
hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java

@ -17,15 +17,12 @@ import com.hnac.hzims.spare.vo.WtSpBasicVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springblade.core.launch.constant.FlowConstant;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.entity.Dept; import org.springblade.system.entity.Dept;
import org.springblade.system.feign.IDictBizClient; import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
@ -34,13 +31,11 @@ import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* 服务实现类 * 服务实现类

3
hzims-service/equipment/src/main/resources/db/2.0.0.sql.1

@ -33,3 +33,6 @@ update equipment.hzims_em_definition set type = '2' where type = '0';
update bladex.blade_dict set dict_key = '2' where id = 1675699613977288706; update bladex.blade_dict set dict_key = '2' where id = 1675699613977288706;
update equipment.hzims_em_definition set type = '2' where type = '0'; update equipment.hzims_em_definition set type = '2' where type = '0';
-- 修改故障诊断任务表的字符集
ALTER TABLE hzims_fdp_task CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

3
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml

@ -4,9 +4,10 @@
<select id="selectHandlePage" resultType="com.hnac.hzims.alarm.config.vo.AlarmHandleVo"> <select id="selectHandlePage" resultType="com.hnac.hzims.alarm.config.vo.AlarmHandleVo">
SELECT H.*,S.NAME AS STATION_NAME SELECT H.*,S.NAME AS STATION_NAME,F.PROCESS_INSTANCE_ID
FROM HZIMS_ALARM_HANDLE H FROM HZIMS_ALARM_HANDLE H
LEFT JOIN HZIMS_OPERATION.HZIMS_STATION S ON H.STATION_CODE = S.CODE LEFT JOIN HZIMS_OPERATION.HZIMS_STATION S ON H.STATION_CODE = S.CODE
LEFT JOIN HZIMS_ALARM_HANDLE_FLOW F ON H.ALARM_ID = F.ALARM_ID
<where> <where>
H.IS_DELETED = 0 H.IS_DELETED = 0
<if test="param.stationCode != null"> <if test="param.stationCode != null">

3
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/wrapper/HandleWrapper.java

@ -21,8 +21,7 @@ public class HandleWrapper extends BaseEntityWrapper<AlarmHandleVo,AlarmHandleVo
if(ObjectUtil.isEmpty(createUser)){ if(ObjectUtil.isEmpty(createUser)){
return entity; return entity;
} }
assert entity != null; entity.setUserName(createUser.getRealName());
entity.setUserName(Optional.ofNullable(createUser.getName()).orElse(null));
return entity; return entity;
} }
} }

8
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DutyServiceImpl.java

@ -63,7 +63,7 @@ public class DutyServiceImpl extends BaseServiceImpl<DutyMapper, ImsDutyMainEnti
// 负责人 // 负责人
User user = UserCache.getUser(Long.valueOf(item.getManagerId())); User user = UserCache.getUser(Long.valueOf(item.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
item.setManagerName(user.getName()); item.setManagerName(user.getRealName());
item.setManagerPhone(user.getPhone()); item.setManagerPhone(user.getPhone());
} }
// FIXME 上网 // FIXME 上网
@ -117,7 +117,7 @@ public class DutyServiceImpl extends BaseServiceImpl<DutyMapper, ImsDutyMainEnti
// 负责人 // 负责人
User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId())); User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
dutyInfoVo.setManagerName(user.getName()); dutyInfoVo.setManagerName(user.getRealName());
dutyInfoVo.setManagerPhone(user.getPhone()); dutyInfoVo.setManagerPhone(user.getPhone());
} }
// 发电量 // 发电量
@ -143,7 +143,7 @@ public class DutyServiceImpl extends BaseServiceImpl<DutyMapper, ImsDutyMainEnti
// 负责人 // 负责人
User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId())); User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
dutyInfoVo.setManagerName(user.getName()); dutyInfoVo.setManagerName(user.getRealName());
dutyInfoVo.setManagerPhone(user.getPhone()); dutyInfoVo.setManagerPhone(user.getPhone());
} }
dutyInfoVo.setGeneratingCapacity(0); dutyInfoVo.setGeneratingCapacity(0);
@ -183,7 +183,7 @@ public class DutyServiceImpl extends BaseServiceImpl<DutyMapper, ImsDutyMainEnti
// 负责人 // 负责人
User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId())); User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
dutyMainInfoVo.setManagerName(user.getName()); dutyMainInfoVo.setManagerName(user.getRealName());
dutyMainInfoVo.setManagerPhone(user.getPhone()); dutyMainInfoVo.setManagerPhone(user.getPhone());
} }
return dutyMainInfoVo; return dutyMainInfoVo;

4
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/wrapper/OfflineRecordWrapper.java

@ -24,8 +24,8 @@ public class OfflineRecordWrapper extends BaseEntityWrapper<OfflineRecordEntity,
OfflineRecordVO vo = BeanUtil.copy(entity, OfflineRecordVO.class); OfflineRecordVO vo = BeanUtil.copy(entity, OfflineRecordVO.class);
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setCreateUserName(createUser.getName()); vo.setCreateUserName(createUser.getRealName());
vo.setUpdateUserName(updateUser.getName()); vo.setUpdateUserName(updateUser.getRealName());
return vo; return vo;
} }

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/entity/InspectionTaskSMS.java

@ -31,7 +31,7 @@ public class InspectionTaskSMS extends TaskEntity {
*/ */
public void setSmsDetail(){ public void setSmsDetail(){
User user = UserCache.getUser(this.getUserId()); User user = UserCache.getUser(this.getUserId());
this.setCnName(user.getName()); this.setCnName(user.getRealName());
this.setPhone(user.getPhone()); this.setPhone(user.getPhone());
this.setLoginName(user.getAccount()); this.setLoginName(user.getAccount());
} }

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java

@ -364,7 +364,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> imp
taskReportVO.setCompleteSituation(finishSituation); taskReportVO.setCompleteSituation(finishSituation);
taskReportVO.setIncompleteNum(list.stream().filter(taskCountVO -> Func.isNotEmpty(taskCountVO.getUndoneTask())).collect(Collectors.summingInt(TaskCountVO::getUndoneTask))); taskReportVO.setIncompleteNum(list.stream().filter(taskCountVO -> Func.isNotEmpty(taskCountVO.getUndoneTask())).collect(Collectors.summingInt(TaskCountVO::getUndoneTask)));
taskReportVO.setIncompleteSituation(undoSituation); taskReportVO.setIncompleteSituation(undoSituation);
taskReportVO.setUserName(user.getName()); taskReportVO.setUserName(user.getRealName());
result.add(taskReportVO); result.add(taskReportVO);
} }
}); });

2
hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java

@ -187,7 +187,7 @@ public class MessageClient extends BladeController implements IMessageClient{
if (ObjectUtil.isEmpty(user)||ObjectUtil.isEmpty(user.getPhone())){ if (ObjectUtil.isEmpty(user)||ObjectUtil.isEmpty(user.getPhone())){
continue; continue;
} }
record.setPusherName(user.getName()); record.setPusherName(user.getRealName());
record.setPusher(pushId.toString()); record.setPusher(pushId.toString());
record.setPushType(MessageConstants.IMMEDIATELY); record.setPushType(MessageConstants.IMMEDIATELY);
record.setDeptName(Func.isNotEmpty(record.getDeptName()) ? record.getDeptName() : this.getDeptNameById(record.getDeptId())); record.setDeptName(Func.isNotEmpty(record.getDeptName()) ? record.getDeptName() : this.getDeptNameById(record.getDeptId()));

4
hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgPushRecordWrapper.java

@ -24,8 +24,8 @@ public class MsgPushRecordWrapper extends BaseEntityWrapper<MsgPushRecordEntity,
MsgPushRecordVO vo = BeanUtil.copy(entity, MsgPushRecordVO.class); MsgPushRecordVO vo = BeanUtil.copy(entity, MsgPushRecordVO.class);
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setCreateUserName(createUser.getName()); vo.setCreateUserName(createUser.getRealName());
vo.setUpdateUserName(updateUser.getName()); vo.setUpdateUserName(updateUser.getRealName());
return vo; return vo;
} }

4
hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgSmsRecordWrapper.java

@ -25,8 +25,8 @@ public class MsgSmsRecordWrapper extends BaseEntityWrapper<MsgSmsRecordEntity, M
MsgSmsRecordVO vo = BeanUtil.copy(entity, MsgSmsRecordVO.class); MsgSmsRecordVO vo = BeanUtil.copy(entity, MsgSmsRecordVO.class);
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setCreateUserName(createUser.getName()); vo.setCreateUserName(createUser.getRealName());
vo.setUpdateUserName(updateUser.getName()); vo.setUpdateUserName(updateUser.getRealName());
return vo; return vo;
} }

4
hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgWsRecordHistoryWrapper.java

@ -24,8 +24,8 @@ public class MsgWsRecordHistoryWrapper extends BaseEntityWrapper<MsgWsRecordHist
MsgWsRecordHistoryVO vo = BeanUtil.copy(entity, MsgWsRecordHistoryVO.class); MsgWsRecordHistoryVO vo = BeanUtil.copy(entity, MsgWsRecordHistoryVO.class);
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setCreateUserName(createUser.getName()); vo.setCreateUserName(createUser.getRealName());
vo.setUpdateUserName(updateUser.getName()); vo.setUpdateUserName(updateUser.getRealName());
return vo; return vo;
} }

4
hzims-service/message/src/main/java/com/hnac/hzims/message/wrapper/MsgWsRecordWrapper.java

@ -25,9 +25,9 @@ public class MsgWsRecordWrapper extends BaseEntityWrapper<MsgWsRecordEntity, Msg
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
if(null != entity.getUpdateUser()) { if(null != entity.getUpdateUser()) {
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setUpdateUserName(updateUser.getName()); vo.setUpdateUserName(updateUser.getRealName());
} }
vo.setCreateUserName(createUser.getName()); vo.setCreateUserName(createUser.getRealName());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/excel/BaseExport.java

@ -12,6 +12,6 @@ public abstract class BaseExport {
protected String getUserName(Long uid) { protected String getUserName(Long uid) {
User user = UserCache.getUser(uid); User user = UserCache.getUser(uid);
return user != null ? user.getName() : uid != null ? uid.toString() : StringUtils.EMPTY; return user != null ? user.getRealName() : uid != null ? uid.toString() : StringUtils.EMPTY;
} }
} }

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java

@ -126,20 +126,20 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service{
entity.setActStartTime(new Date()); entity.setActStartTime(new Date());
if (ObjectUtil.isNotEmpty(entity.getTechLead())){ if (ObjectUtil.isNotEmpty(entity.getTechLead())){
User user = UserCache.getUser(entity.getTechLead()); User user = UserCache.getUser(entity.getTechLead());
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getRealName())){
entity.setTechLeadName(user.getName()); entity.setTechLeadName(user.getRealName());
} }
} }
if (ObjectUtil.isNotEmpty(entity.getManager())){ if (ObjectUtil.isNotEmpty(entity.getManager())){
User user = UserCache.getUser(entity.getManager()); User user = UserCache.getUser(entity.getManager());
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getRealName())){
entity.setManagerName(user.getName()); entity.setManagerName(user.getRealName());
} }
} }
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getUserName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getUserName())){
entity.setCreateUserName(user.getUserName()); entity.setCreateUserName(user.getNickName());
entity.setUpdateUserName(user.getUserName()); entity.setUpdateUserName(user.getNickName());
} }
planService.save(entity); planService.save(entity);
} }

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessTaskV4ServiceImpl.java

@ -128,10 +128,10 @@ public class AccessTaskV4ServiceImpl implements AccessTaskV4Service {
List<OperAccessMaterialEntity> materialEntityList = JSONObject.parseArray(JSON.toJSONString(entity.getAccessMaterials()), OperAccessMaterialEntity.class); List<OperAccessMaterialEntity> materialEntityList = JSONObject.parseArray(JSON.toJSONString(entity.getAccessMaterials()), OperAccessMaterialEntity.class);
if (ObjectUtil.isNotEmpty(entity.getHandler())){ if (ObjectUtil.isNotEmpty(entity.getHandler())){
User user = UserCache.getUser(entity.getHandler()); User user = UserCache.getUser(entity.getHandler());
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getRealName())){
entity.setHandlerName(user.getName()); entity.setHandlerName(user.getRealName());
entity.setCreateUserName(user.getName()); entity.setCreateUserName(user.getRealName());
entity.setUpdateUserName(user.getName()); entity.setUpdateUserName(user.getRealName());
} }
} }
taskService.save(entity); taskService.save(entity);

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessStatisticsServiceImpl.java

@ -46,14 +46,14 @@ public class OperAccessStatisticsServiceImpl extends BaseServiceImpl<OperAccessS
public R doSave(OperAccessStatisticsDTO req) { public R doSave(OperAccessStatisticsDTO req) {
if (ObjectUtil.isNotEmpty(req.getManager())){ if (ObjectUtil.isNotEmpty(req.getManager())){
User user = UserCache.getUser(req.getManager()); User user = UserCache.getUser(req.getManager());
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getRealName())){
req.setManagerName(user.getName()); req.setManagerName(user.getRealName());
} }
} }
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getUserName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getNickName())){
req.setCreateUserName(user.getUserName()); req.setCreateUserName(user.getNickName());
req.setUpdateUserName(user.getUserName()); req.setUpdateUserName(user.getNickName());
} }
boolean save = super.save(req); boolean save = super.save(req);
return R.status(save); return R.status(save);

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java

@ -111,14 +111,14 @@ public class OperAccessTaskServiceImpl extends BaseServiceImpl<OperAccessTaskMap
req.setCode("TASK" + DateUtil.format(DateUtil.now(), DateUtil.PATTERN_DATETIME_MINI) + new DecimalFormat("###").format(RandomUtils.nextInt(0, 999))); req.setCode("TASK" + DateUtil.format(DateUtil.now(), DateUtil.PATTERN_DATETIME_MINI) + new DecimalFormat("###").format(RandomUtils.nextInt(0, 999)));
if (ObjectUtil.isNotEmpty(req.getHandler())){ if (ObjectUtil.isNotEmpty(req.getHandler())){
User user = UserCache.getUser(req.getHandler()); User user = UserCache.getUser(req.getHandler());
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getRealName())){
req.setHandlerName(user.getName()); req.setHandlerName(user.getRealName());
} }
} }
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getUserName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getNickName())){
req.setCreateUserName(user.getUserName()); req.setCreateUserName(user.getNickName());
req.setUpdateUserName(user.getUserName()); req.setUpdateUserName(user.getNickName());
} }
List<OperAccessMaterialEntity> materialEntityList = JSONObject.parseArray(JSON.toJSONString(req.getAccessMaterials()), OperAccessMaterialEntity.class); List<OperAccessMaterialEntity> materialEntityList = JSONObject.parseArray(JSON.toJSONString(req.getAccessMaterials()), OperAccessMaterialEntity.class);
if (super.save(req)) { if (super.save(req)) {

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/wrapper/AreaMapWrapper.java

@ -26,7 +26,7 @@ public class AreaMapWrapper extends BaseEntityWrapper<AreaMapEntity, AreaMapVo>
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(createUser.getName()); vo.setUserName(createUser.getRealName());
return vo; return vo;
} }
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/constants/RedisKeyConstants.java

@ -11,8 +11,8 @@ import org.springframework.stereotype.Component;
@Data @Data
public class RedisKeyConstants { public class RedisKeyConstants {
public static String MAINTENANCE_TASK_DELAY_LIST = "hzims:operation:maintenance:end:delay:tasks"; public static String MAINTENANCE_TASK_DELAY_LIST = "hzims:operation:maintenance:delay:tasks";
public static String REMIND_TASK_END_LIST = "hzims:operation:maintenance:end:delay:tasks"; public static String REMIND_TASK_END_LIST = "hzims:operation:maintenance:end:tasks";
/**根据realId获取实时数据**/ /**根据realId获取实时数据**/
@Value("${hzims.operation.realIdKey}") @Value("${hzims.operation.realIdKey}")

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java

@ -101,8 +101,8 @@ public class DefectCheckServiceImpl extends BaseServiceImpl<OperPhenomenonMapper
} }
if (ObjectUtil.isNotEmpty(entity.getFinder())&&StringUtils.isBlank(entity.getFinderName())){ if (ObjectUtil.isNotEmpty(entity.getFinder())&&StringUtils.isBlank(entity.getFinderName())){
User user = UserCache.getUser(entity.getFinder()); User user = UserCache.getUser(entity.getFinder());
if (ObjectUtil.isNotEmpty(user)&&StringUtils.isNotBlank(user.getName())) { if (ObjectUtil.isNotEmpty(user)&&StringUtils.isNotBlank(user.getRealName())) {
entity.setFinderName(user.getName()); entity.setFinderName(user.getRealName());
} }
} }
if (StringUtils.isNotBlank(AuthUtil.getUserName())){ if (StringUtils.isNotBlank(AuthUtil.getUserName())){

76
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectServiceImpl.java

@ -730,26 +730,29 @@ public class OperDefectServiceImpl extends BaseServiceImpl<OperDefectMapper, Ope
sheet.addMergedRegion(repeat_religon); sheet.addMergedRegion(repeat_religon);
currentRow++; currentRow++;
//表头2
CellRangeAddress repeat_head2_cell_religon = new CellRangeAddress(currentRow, currentRow, (short) 0, (short) 2);
sheet.addMergedRegion(repeat_head2_cell_religon);
HSSFRow repeat_head2 = sheet.createRow(currentRow); HSSFRow repeat_head2 = sheet.createRow(currentRow);
this.setFullHeadCell(wb, repeat_head2, (short) 9, 0); this.setFullHeadCell(wb, repeat_head2, (short) 9, 0);
HSSFCell repeat_head2_cell1 = repeat_head2.getCell(3); HSSFCell repeat_head2_cell1 = repeat_head2.getCell(1);
CellRangeAddress repeat_head2_cell1_religon = new CellRangeAddress(currentRow, currentRow, (short) 3, (short) 4); CellRangeAddress repeat_head2_cell1_religon = new CellRangeAddress(currentRow, currentRow, (short) 1, (short) 2);
sheet.addMergedRegion(repeat_head2_cell1_religon); sheet.addMergedRegion(repeat_head2_cell1_religon);
repeat_head2_cell1.setCellValue("发生数量"); repeat_head2_cell1.setCellValue("重复发生数量");
HSSFCell repeat_head2_cell2 = repeat_head2.getCell(5); HSSFCell repeat_head2_cell2 = repeat_head2.getCell(3);
CellRangeAddress repeat_head2_cell2_religon = new CellRangeAddress(currentRow, currentRow, (short) 5, (short) 6); CellRangeAddress repeat_head2_cell2_religon = new CellRangeAddress(currentRow, currentRow, (short) 3, (short) 4);
sheet.addMergedRegion(repeat_head2_cell2_religon); sheet.addMergedRegion(repeat_head2_cell2_religon);
repeat_head2_cell2.setCellValue("占重复缺陷总数的比率(%)"); repeat_head2_cell2.setCellValue("占重复缺陷总数的比率(%)");
HSSFCell repeat_head2_cell3 = repeat_head2.getCell(7);
CellRangeAddress repeat_head2_cell3_religon = new CellRangeAddress(currentRow, currentRow, (short) 7, (short) 8); HSSFCell repeat_head2_cell3 = repeat_head2.getCell(5);
CellRangeAddress repeat_head2_cell3_religon = new CellRangeAddress(currentRow, currentRow, (short) 5, (short) 6);
sheet.addMergedRegion(repeat_head2_cell3_religon); sheet.addMergedRegion(repeat_head2_cell3_religon);
repeat_head2_cell3.setCellValue("占总缺陷的比率(%)"); repeat_head2_cell3.setCellValue("总发生数量");
HSSFCell repeat_head2_cell4 = repeat_head2.getCell(7);
CellRangeAddress repeat_head2_cell4_religon = new CellRangeAddress(currentRow, currentRow, (short) 7, (short) 8);
sheet.addMergedRegion(repeat_head2_cell4_religon);
repeat_head2_cell4.setCellValue("占总缺陷的比率(%)");
currentRow++; currentRow++;
@ -759,8 +762,6 @@ public class OperDefectServiceImpl extends BaseServiceImpl<OperDefectMapper, Ope
this.setFullHeadCell(wb, repeat_row, (short) 9, 1); this.setFullHeadCell(wb, repeat_row, (short) 9, 1);
//第一列 //第一列
HSSFCell repeat_cell1 = repeat_row.getCell(0); HSSFCell repeat_cell1 = repeat_row.getCell(0);
CellRangeAddress repeat_content_religon = new CellRangeAddress(currentRow, currentRow, (short) 0, (short) 2);
sheet.addMergedRegion(repeat_content_religon);
if ("1".equals(repeat.get(i).getDefectLevel())) { if ("1".equals(repeat.get(i).getDefectLevel())) {
repeat_cell1.setCellValue("一类缺陷"); repeat_cell1.setCellValue("一类缺陷");
} else if ("2".equals(repeat.get(i).getDefectLevel())) { } else if ("2".equals(repeat.get(i).getDefectLevel())) {
@ -771,22 +772,28 @@ public class OperDefectServiceImpl extends BaseServiceImpl<OperDefectMapper, Ope
repeat_cell1.setCellValue(repeat.get(i).getDefectLevel()); repeat_cell1.setCellValue(repeat.get(i).getDefectLevel());
} }
//第二列 //第二列
HSSFCell repeat_cell2 = repeat_row.getCell(3); HSSFCell repeat_cell2 = repeat_row.getCell(1);
CellRangeAddress repeat_content_religon1 = new CellRangeAddress(currentRow, currentRow, (short) 3, (short) 4); CellRangeAddress repeat_content_religon1 = new CellRangeAddress(currentRow, currentRow, (short) 1, (short) 2);
sheet.addMergedRegion(repeat_content_religon1); sheet.addMergedRegion(repeat_content_religon1);
repeat_cell2.setCellValue(repeat.get(i).getHappenNum()); repeat_cell2.setCellValue(repeat.get(i).getHappenNum());
//第三列 //第三列
HSSFCell repeat_cell3 = repeat_row.getCell(5); HSSFCell repeat_cell3 = repeat_row.getCell(3);
CellRangeAddress repeat_content_religon2 = new CellRangeAddress(currentRow, currentRow, (short) 5, (short) 6); CellRangeAddress repeat_content_religon2 = new CellRangeAddress(currentRow, currentRow, (short) 3, (short) 4);
sheet.addMergedRegion(repeat_content_religon2); sheet.addMergedRegion(repeat_content_religon2);
repeat_cell3.setCellValue(this.dealDouble(repeat.get(i).getRepeatRatio())); repeat_cell3.setCellValue(this.dealDouble(repeat.get(i).getRepeatRatio()));
//第四列 //第四列
HSSFCell repeat_cell4 = repeat_row.getCell(7); HSSFCell repeat_cell4 = repeat_row.getCell(5);
CellRangeAddress repeat_content_religon3 = new CellRangeAddress(currentRow, currentRow, (short) 7, (short) 8); CellRangeAddress repeat_content_religon3 = new CellRangeAddress(currentRow, currentRow, (short) 5, (short) 6);
sheet.addMergedRegion(repeat_content_religon3); sheet.addMergedRegion(repeat_content_religon3);
repeat_cell4.setCellValue(this.dealDouble(repeat.get(i).getHappenRatio())); repeat_cell4.setCellValue(repeat.get(i).getHappenSumNum());
//第五列
HSSFCell repeat_cell5 = repeat_row.getCell(7);
CellRangeAddress repeat_content_religon4 = new CellRangeAddress(currentRow, currentRow, (short) 7, (short) 8);
sheet.addMergedRegion(repeat_content_religon4);
repeat_cell5.setCellValue(this.dealDouble(repeat.get(i).getHappenRatio()));
currentRow++; currentRow++;
} }
return currentRow; return currentRow;
@ -944,7 +951,7 @@ public class OperDefectServiceImpl extends BaseServiceImpl<OperDefectMapper, Ope
List<String> deptList ; List<String> deptList ;
R<List<Dept>> res = sysClient.getDeptByCurrentUser(); R<List<Dept>> res = sysClient.getDeptByCurrentUser();
if (res.isSuccess() && CollectionUtil.isNotEmpty(res.getData())) { if (res.isSuccess() && CollectionUtil.isNotEmpty(res.getData())) {
deptList = res.getData().stream().map(Dept::getId).map(s -> s.toString()).collect(Collectors.toList()); deptList = res.getData().stream().map(Dept::getId).map(Object::toString).collect(Collectors.toList());
} else { } else {
throw new WebServiceException("该用户没有此权限"); throw new WebServiceException("该用户没有此权限");
} }
@ -961,35 +968,46 @@ public class OperDefectServiceImpl extends BaseServiceImpl<OperDefectMapper, Ope
//总缺陷数 //总缺陷数
int total = repetStatistics.stream().mapToInt(OperDefectStatisticsCodeDTO::getDefectNum).sum(); int total = repetStatistics.stream().mapToInt(OperDefectStatisticsCodeDTO::getDefectNum).sum();
//总重复缺陷数 //总重复缺陷数
int totalRepeat = repetStatistics.stream().filter(s -> s.getDefectNum() > 1 && s.getDefectLevel() != null).collect(Collectors.summingInt(OperDefectStatisticsCodeDTO::getDefectNum)); int totalRepeat = repetStatistics.stream().filter(s -> s.getDefectNum() > 1 && s.getDefectLevel() != null).mapToInt(OperDefectStatisticsCodeDTO::getDefectNum).sum();
//等级重复统计 //等级重复统计
Map<String, IntSummaryStatistics> repeatList = repetStatistics.stream().filter(s -> s.getDefectNum() > 1 && s.getDefectLevel() != null).collect(Collectors.groupingBy(OperDefectStatisticsCodeDTO::getDefectLevel, Collectors.summarizingInt(OperDefectStatisticsCodeDTO::getDefectNum))); Map<String, IntSummaryStatistics> repeatList = repetStatistics.stream().filter(s -> s.getDefectNum() > 1 && s.getDefectLevel() != null).collect(Collectors.groupingBy(OperDefectStatisticsCodeDTO::getDefectLevel, Collectors.summarizingInt(OperDefectStatisticsCodeDTO::getDefectNum)));
//缺陷等级分类总数统计
Map<String, IntSummaryStatistics> sums = repetStatistics.stream().collect(Collectors.groupingBy(OperDefectStatisticsCodeDTO::getDefectLevel, Collectors.summarizingInt(OperDefectStatisticsCodeDTO::getDefectNum)));
OperDefectRepeatRatioDTO one = new OperDefectRepeatRatioDTO(); OperDefectRepeatRatioDTO one = new OperDefectRepeatRatioDTO();
one.setDefectLevel(DefectConstant.DefectLevelEnum.ONE.getStatus()); one.setDefectLevel(DefectConstant.DefectLevelEnum.ONE.getStatus());
if (repeatList.get(one.getDefectLevel()) != null) { if (repeatList.get(one.getDefectLevel()) != null) {
one.setHappenNum(repeatList.get(one.getDefectLevel()).getSum()); one.setHappenNum(repeatList.get(one.getDefectLevel()).getSum());
one.setHappenRatio(one.getHappenNum() / Double.valueOf(total)); one.setRepeatRatio(one.getHappenNum() / (double) totalRepeat);
one.setRepeatRatio(one.getHappenNum() / Double.valueOf(totalRepeat)); }
if(sums.containsKey(one.getDefectLevel())){
one.setHappenSumNum(sums.get(one.getDefectLevel()).getSum());
one.setHappenRatio(one.getHappenSumNum() / (double) total);
} }
OperDefectRepeatRatioDTO two = new OperDefectRepeatRatioDTO(); OperDefectRepeatRatioDTO two = new OperDefectRepeatRatioDTO();
two.setDefectLevel(DefectConstant.DefectLevelEnum.TWO.getStatus()); two.setDefectLevel(DefectConstant.DefectLevelEnum.TWO.getStatus());
if (repeatList.get(two.getDefectLevel()) != null) { if (repeatList.get(two.getDefectLevel()) != null) {
two.setHappenNum(repeatList.get(two.getDefectLevel()).getSum()); two.setHappenNum(repeatList.get(two.getDefectLevel()).getSum());
two.setHappenRatio(two.getHappenNum() / Double.valueOf(total)); two.setRepeatRatio(two.getHappenNum() / (double) totalRepeat);
two.setRepeatRatio(two.getHappenNum() / Double.valueOf(totalRepeat)); }
if(sums.containsKey(two.getDefectLevel())){
two.setHappenSumNum(sums.get(two.getDefectLevel()).getSum());
two.setHappenRatio(two.getHappenSumNum() / (double) total);
} }
OperDefectRepeatRatioDTO three = new OperDefectRepeatRatioDTO(); OperDefectRepeatRatioDTO three = new OperDefectRepeatRatioDTO();
three.setDefectLevel(DefectConstant.DefectLevelEnum.THREE.getStatus()); three.setDefectLevel(DefectConstant.DefectLevelEnum.THREE.getStatus());
if (repeatList.get(three.getDefectLevel()) != null) { if (repeatList.get(three.getDefectLevel()) != null) {
three.setHappenNum(repeatList.get(three.getDefectLevel()).getSum()); three.setHappenNum(repeatList.get(three.getDefectLevel()).getSum());
three.setHappenRatio(three.getHappenNum() / Double.valueOf(total)); three.setRepeatRatio(three.getHappenNum() / (double) totalRepeat);
three.setRepeatRatio(three.getHappenNum() / Double.valueOf(totalRepeat)); }
if(sums.containsKey(three.getDefectLevel())){
three.setHappenSumNum(sums.get(three.getDefectLevel()).getSum());
three.setHappenRatio(three.getHappenSumNum() / (double) total);
} }
OperDefectRepeatRatioDTO addUp = OperDefectRepeatRatioDTO.builder().defectLevel("合计").happenNum(one.getHappenNum() + two.getHappenNum() + three.getHappenNum()).happenRatio(one.getHappenRatio() + two.getHappenRatio() + three.getHappenRatio()).repeatRatio(1.00).build(); OperDefectRepeatRatioDTO addUp = OperDefectRepeatRatioDTO.builder().defectLevel("合计").happenNum(one.getHappenNum() + two.getHappenNum() + three.getHappenNum()).happenSumNum(one.getHappenSumNum() + two.getHappenSumNum() + three.getHappenSumNum()).happenRatio(1.0).repeatRatio(1.00).build();
if (addUp.getHappenNum().equals(0L)) { if (addUp.getHappenNum().equals(0L)) {
addUp.setRepeatRatio(0.0); addUp.setRepeatRatio(0.0);
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperDefectWrapper.java

@ -35,8 +35,8 @@ public class OperDefectWrapper extends BaseEntityWrapper<OperDefectEntity, OperD
OperDefectVO vo = BeanUtil.copy(entity, OperDefectVO.class); OperDefectVO vo = BeanUtil.copy(entity, OperDefectVO.class);
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setCreateUserName(createUser == null ? "" : createUser.getName()); vo.setCreateUserName(createUser == null ? "" : createUser.getRealName());
vo.setUpdateUserName(updateUser == null ? "" : updateUser.getName()); vo.setUpdateUserName(updateUser == null ? "" : updateUser.getRealName());
OperPhenomenonEntity phenomenonEntity = phenomenonService.getOne(Wrappers.<OperPhenomenonEntity>lambdaUpdate() OperPhenomenonEntity phenomenonEntity = phenomenonService.getOne(Wrappers.<OperPhenomenonEntity>lambdaUpdate()
.eq(OperPhenomenonEntity::getDefectCode,entity.getDefectCode()).last("limit 1")); .eq(OperPhenomenonEntity::getDefectCode,entity.getDefectCode()).last("limit 1"));
if(Func.isNotEmpty(phenomenonEntity)){ if(Func.isNotEmpty(phenomenonEntity)){

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperFaultWrapper.java

@ -40,8 +40,8 @@ public class OperFaultWrapper extends BaseEntityWrapper<OperFaultEntity, OperFau
OperFaultVO vo = BeanUtil.copy(entity, OperFaultVO.class); OperFaultVO vo = BeanUtil.copy(entity, OperFaultVO.class);
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setCreateUserName(createUser == null ? "" : createUser.getName()); vo.setCreateUserName(createUser == null ? "" : createUser.getRealName());
vo.setUpdateUserName(updateUser == null ? "" : updateUser.getName()); vo.setUpdateUserName(updateUser == null ? "" : updateUser.getRealName());
if(Func.isNotEmpty(entity.getSafeInfos())){ if(Func.isNotEmpty(entity.getSafeInfos())){
vo.setDangerSources(sourceClient.details(entity.getSafeInfos().split(","))); vo.setDangerSources(sourceClient.details(entity.getSafeInfos().split(",")));
} }

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/wrapper/OperPhenomenonWrapper.java

@ -56,20 +56,20 @@ public class OperPhenomenonWrapper extends BaseEntityWrapper<OperPhenomenonEntit
OperPhenomenonVO vo = BeanUtil.copy(entity, OperPhenomenonVO.class); OperPhenomenonVO vo = BeanUtil.copy(entity, OperPhenomenonVO.class);
User createUser = UserCache.getUser(entity.getCreateUser()); User createUser = UserCache.getUser(entity.getCreateUser());
User updateUser = UserCache.getUser(entity.getUpdateUser()); User updateUser = UserCache.getUser(entity.getUpdateUser());
vo.setCreateUserName(createUser == null ? "" : createUser.getName()); vo.setCreateUserName(createUser == null ? "" : createUser.getRealName());
vo.setUpdateUserName(updateUser == null ? "" : updateUser.getName()); vo.setUpdateUserName(updateUser == null ? "" : updateUser.getRealName());
User userC = UserCache.getUser(entity.getConclusionPeople()); User userC = UserCache.getUser(entity.getConclusionPeople());
vo.setConclusionPeopleName(userC == null ? "" : userC.getName()); vo.setConclusionPeopleName(userC == null ? "" : userC.getRealName());
User userF = UserCache.getUser(entity.getFinder()); User userF = UserCache.getUser(entity.getFinder());
vo.setFinderName(userF == null ? "" : userF.getName()); vo.setFinderName(userF == null ? "" : userF.getRealName());
User userD = UserCache.getUser(entity.getDiscriminator()); User userD = UserCache.getUser(entity.getDiscriminator());
vo.setDiscriminatorName(userD == null ? "" : userD.getName()); vo.setDiscriminatorName(userD == null ? "" : userD.getRealName());
User userHn = UserCache.getUser(entity.getHandler()); User userHn = UserCache.getUser(entity.getHandler());
vo.setHandlerName(userHn == null ? "" : userHn.getName()); vo.setHandlerName(userHn == null ? "" : userHn.getRealName());
if(Func.isNotEmpty(entity.getSafeInfos())){ if(Func.isNotEmpty(entity.getSafeInfos())){
vo.setDangerSources(sourceClient.details(entity.getSafeInfos().split(","))); vo.setDangerSources(sourceClient.details(entity.getSafeInfos().split(",")));
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/feign/DutyGroupClient.java

@ -47,7 +47,7 @@ public class DutyGroupClient implements IDutyGroupClient {
if(CollectionUtil.isEmpty(persons)){ if(CollectionUtil.isEmpty(persons)){
return group; return group;
} }
List<String> personNames = persons.stream().filter(o-> !charge.equals(o.getPersonId())).map(o-> UserCache.getUser(o.getPersonId()).getName()).collect(Collectors.toList()); List<String> personNames = persons.stream().filter(o-> !charge.equals(o.getPersonId())).map(o-> UserCache.getUser(o.getPersonId()).getRealName()).collect(Collectors.toList());
if(CollectionUtil.isEmpty(personNames)){ if(CollectionUtil.isEmpty(personNames)){
group.setRepairPersonnelSum(0); group.setRepairPersonnelSum(0);
return group; return group;

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyChangeServiceImpl.java

@ -120,10 +120,10 @@ public class ImsDutyChangeServiceImpl extends BaseServiceImpl<ImsDutyChangeMappe
ImsDutyChangeVO vo = ImsDutyChangeWrapper.build().entityVO(detail); ImsDutyChangeVO vo = ImsDutyChangeWrapper.build().entityVO(detail);
try { try {
log.info(detail.getCreateUser() + ".............."); log.info(detail.getCreateUser() + "..............");
vo.setCreateUserName(UserCache.getUser(detail.getCreateUser()).getName()); vo.setCreateUserName(UserCache.getUser(detail.getCreateUser()).getRealName());
vo.setUpdateUserName(UserCache.getUser(detail.getUpdateUser()).getName()); vo.setUpdateUserName(UserCache.getUser(detail.getUpdateUser()).getRealName());
vo.setAcceptPersonName(UserCache.getUser(detail.getAcceptPersonId()).getName()); vo.setAcceptPersonName(UserCache.getUser(detail.getAcceptPersonId()).getRealName());
vo.setApplyPersonName(UserCache.getUser(detail.getApplyPersonId()).getName()); vo.setApplyPersonName(UserCache.getUser(detail.getApplyPersonId()).getRealName());
ImsSchedulingVo imsSchedulingVo1 = dutyMainService.getByIdOneV2(detail.getAcceptDutyId()); ImsSchedulingVo imsSchedulingVo1 = dutyMainService.getByIdOneV2(detail.getAcceptDutyId());
vo.setAcceptDutyMainVo(imsSchedulingVo1); vo.setAcceptDutyMainVo(imsSchedulingVo1);
ImsSchedulingVo imsSchedulingVo = dutyMainService.getByIdOneV2(detail.getApplyDutyId()); ImsSchedulingVo imsSchedulingVo = dutyMainService.getByIdOneV2(detail.getApplyDutyId());

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyEmergencyServiceImpl.java

@ -81,11 +81,11 @@ public class ImsDutyEmergencyServiceImpl extends BaseServiceImpl<ImsDutyEmergenc
collect= records.stream().map(sig -> { collect= records.stream().map(sig -> {
R<User> user = userClient.userInfoById(sig.getRegistrant()); R<User> user = userClient.userInfoById(sig.getRegistrant());
if (user.isSuccess()&&ObjectUtils.isNotEmpty(user.getData())){ if (user.isSuccess()&&ObjectUtils.isNotEmpty(user.getData())){
sig.setRegistrantName(user.getData().getName()); sig.setRegistrantName(user.getData().getRealName());
} }
R<User> userR = userClient.userInfoById(sig.getChargePerson()); R<User> userR = userClient.userInfoById(sig.getChargePerson());
if (userR.isSuccess()&&ObjectUtils.isNotEmpty(userR.getData())){ if (userR.isSuccess()&&ObjectUtils.isNotEmpty(userR.getData())){
sig.setChargePersonName(userR.getData().getName()); sig.setChargePersonName(userR.getData().getRealName());
} }
ImsDutyClassEntity classEntity = imsDutyClassService.getById(sig.getDutyClass()); ImsDutyClassEntity classEntity = imsDutyClassService.getById(sig.getDutyClass());
sig.setDutyClassName(classEntity.getClassName()); sig.setDutyClassName(classEntity.getClassName());

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java

@ -166,8 +166,8 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl<ImsDutyGroupMapper,
imsDutyGroupVO.setId(entity.getId()); imsDutyGroupVO.setId(entity.getId());
imsDutyGroupVO.setManagerId(entity.getManagerId()); imsDutyGroupVO.setManagerId(entity.getManagerId());
User user = UserCache.getUser(entity.getManagerId()); User user = UserCache.getUser(entity.getManagerId());
if (ObjectUtil.isNotEmpty(user)&&StringUtils.isNotBlank(user.getName())){ if (ObjectUtil.isNotEmpty(user)&&StringUtils.isNotBlank(user.getRealName())){
imsDutyGroupVO.setManagerName(user.getName()); imsDutyGroupVO.setManagerName(user.getRealName());
} }
List<ImsDutyGroupPVO> imsDutyGroupPVOS = imsDutyGroupPService.listByGroupId(entity.getId()); List<ImsDutyGroupPVO> imsDutyGroupPVOS = imsDutyGroupPService.listByGroupId(entity.getId());
if (CollectionUtil.isNotEmpty(imsDutyGroupPVOS)){ if (CollectionUtil.isNotEmpty(imsDutyGroupPVOS)){
@ -176,7 +176,7 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl<ImsDutyGroupMapper,
String name=""; String name="";
for (int i1 = 0; i1 < userIds.size(); i1++) { for (int i1 = 0; i1 < userIds.size(); i1++) {
if(ObjectUtil.isNotEmpty(entity.getManagerId())&&!entity.getManagerId().equals(userIds.get(i1))){ if(ObjectUtil.isNotEmpty(entity.getManagerId())&&!entity.getManagerId().equals(userIds.get(i1))){
name = name + UserCache.getUser(userIds.get(i1)).getName(); name = name + UserCache.getUser(userIds.get(i1)).getRealName();
if (i1 != userIds.size() - 1) { if (i1 != userIds.size() - 1) {
name = name + ","; name = name + ",";
} }
@ -244,8 +244,8 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl<ImsDutyGroupMapper,
for (ImsDutyGroupPVO imsDutyGroupPVo : imsDutyGroupPEntities) { for (ImsDutyGroupPVO imsDutyGroupPVo : imsDutyGroupPEntities) {
imsDutyGroupPVo.setSignage(false); imsDutyGroupPVo.setSignage(false);
User user = UserCache.getUser(imsDutyGroupPVo.getPersonId()); User user = UserCache.getUser(imsDutyGroupPVo.getPersonId());
if (ObjectUtil.isNotEmpty(user) && Func.isNotBlank(user.getName())) { if (ObjectUtil.isNotEmpty(user) && Func.isNotBlank(user.getRealName())) {
imsDutyGroupPVo.setGroupName(user.getName()); imsDutyGroupPVo.setGroupName(user.getRealName());
} else { } else {
groupIds.add(imsDutyGroupPVo.getId().toString()); groupIds.add(imsDutyGroupPVo.getId().toString());
this.baseMapper.updateManagerIdById(imsDutyGroupPVo.getGroupId()); this.baseMapper.updateManagerIdById(imsDutyGroupPVo.getGroupId());

28
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java

@ -809,9 +809,9 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
User user = UserCache.getUser(Long.valueOf(split[j])); User user = UserCache.getUser(Long.valueOf(split[j]));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
if (j == split.length - 1) { if (j == split.length - 1) {
s.setName(s.getName() + user.getName()); s.setName(s.getName() + user.getRealName());
} else { } else {
s.setName(s.getName() + user.getName() + "、"); s.setName(s.getName() + user.getRealName() + "、");
} }
} }
} }
@ -868,7 +868,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
vo.setUserId(s); vo.setUserId(s);
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
vo.setUserName(user.getName()); vo.setUserName(user.getRealName());
} }
vo.setId(id); vo.setId(id);
list.add(vo); list.add(vo);
@ -894,8 +894,8 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
R<User> user = userClient.userInfoById(Long.valueOf(s)); R<User> user = userClient.userInfoById(Long.valueOf(s));
if (user.isSuccess() && ObjectUtil.isNotEmpty(user.getData())) { if (user.isSuccess() && ObjectUtil.isNotEmpty(user.getData())) {
vo.setUserId(s); vo.setUserId(s);
if (ObjectUtil.isNotEmpty(user.getData().getName())) { if (ObjectUtil.isNotEmpty(user.getData().getRealName())) {
vo.setUserName(user.getData().getName()); vo.setUserName(user.getData().getRealName());
} }
vo.setId(id); vo.setId(id);
list.add(vo); list.add(vo);
@ -1083,7 +1083,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
dutyReportVO.setGroupName(imsDutyGroupEntity.getGroupName()); dutyReportVO.setGroupName(imsDutyGroupEntity.getGroupName());
User user = UserCache.getUser(imsDutyGroupEntity.getManagerId()); User user = UserCache.getUser(imsDutyGroupEntity.getManagerId());
if (ObjectUtil.isNotEmpty(user)){ if (ObjectUtil.isNotEmpty(user)){
dutyReportVO.setManagerName(user.getName()); dutyReportVO.setManagerName(user.getRealName());
} }
dutyReportVO.setDutyNum(v.size()); dutyReportVO.setDutyNum(v.size());
//获取值班ID //获取值班ID
@ -1264,7 +1264,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
} }
User managerUser = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId())); User managerUser = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(managerUser)) { if (ObjectUtil.isNotEmpty(managerUser)) {
dutyMainInfoVo.setManagerName(managerUser.getName()); dutyMainInfoVo.setManagerName(managerUser.getRealName());
dutyMainInfoVo.setManagerPhone(managerUser.getPhone()); dutyMainInfoVo.setManagerPhone(managerUser.getPhone());
} }
@ -1294,7 +1294,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
vo.setCorryInfo(corryVo); vo.setCorryInfo(corryVo);
User carryManagerUser = UserCache.getUser(Long.valueOf(corryVo.getManagerId())); User carryManagerUser = UserCache.getUser(Long.valueOf(corryVo.getManagerId()));
if (ObjectUtil.isNotEmpty(carryManagerUser)) { if (ObjectUtil.isNotEmpty(carryManagerUser)) {
corryVo.setManagerName(carryManagerUser.getName()); corryVo.setManagerName(carryManagerUser.getRealName());
corryVo.setManagerPhone(carryManagerUser.getPhone()); corryVo.setManagerPhone(carryManagerUser.getPhone());
} }
} }
@ -1359,7 +1359,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
// 负责人 // 负责人
User user = UserCache.getUser(Long.valueOf(item.getManagerId())); User user = UserCache.getUser(Long.valueOf(item.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
item.setManagerName(user.getName()); item.setManagerName(user.getRealName());
item.setManagerPhone(user.getPhone()); item.setManagerPhone(user.getPhone());
} }
// FIXME 上网 // FIXME 上网
@ -1657,9 +1657,9 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
User user = restUserList.get(j); User user = restUserList.get(j);
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
if (j == restUserList.size() - 1) { if (j == restUserList.size() - 1) {
personNames += user.getName(); personNames += user.getRealName();
} else { } else {
personNames += user.getName() + "、"; personNames += user.getRealName() + "、";
} }
} }
} }
@ -1732,7 +1732,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
// 负责人 // 负责人
User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId())); User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
dutyInfoVo.setManagerName(user.getName()); dutyInfoVo.setManagerName(user.getRealName());
dutyInfoVo.setManagerPhone(user.getPhone()); dutyInfoVo.setManagerPhone(user.getPhone());
} }
// 发电量 // 发电量
@ -1758,7 +1758,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
// 负责人 // 负责人
User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId())); User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
dutyInfoVo.setManagerName(user.getName()); dutyInfoVo.setManagerName(user.getRealName());
dutyInfoVo.setManagerPhone(user.getPhone()); dutyInfoVo.setManagerPhone(user.getPhone());
} }
dutyInfoVo.setGeneratingCapacity(0); dutyInfoVo.setGeneratingCapacity(0);
@ -1771,7 +1771,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
if (ObjectUtil.isNotEmpty(user)) { if (ObjectUtil.isNotEmpty(user)) {
AuditVo auditVo = new AuditVo(); AuditVo auditVo = new AuditVo();
auditVo.setPersonId(personId); auditVo.setPersonId(personId);
auditVo.setPersonName(user.getName()); auditVo.setPersonName(user.getRealName());
auditVo.setPhone(user.getPhone()); auditVo.setPhone(user.getPhone());
return auditVo; return auditVo;
} }

22
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

@ -342,8 +342,8 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
String userName = ""; String userName = "";
PushExtrasReq req = new PushExtrasReq(); PushExtrasReq req = new PushExtrasReq();
log.info("--------------------------req:" + req, groupEntityManagerId, userName, date); log.info("--------------------------req:" + req, groupEntityManagerId, userName, date);
if (ObjectUtil.isNotEmpty(userR.getData()) && StringUtil.isNotBlank(userR.getData().getName())) { if (ObjectUtil.isNotEmpty(userR.getData()) && StringUtil.isNotBlank(userR.getData().getRealName())) {
userName = userR.getData().getName(); userName = userR.getData().getRealName();
log.info("--------------------------req2:" + req, groupEntityManagerId, userName, date); log.info("--------------------------req2:" + req, groupEntityManagerId, userName, date);
} }
String format = DateUtil.format(date, PATTERN_DATETIME); String format = DateUtil.format(date, PATTERN_DATETIME);
@ -552,11 +552,11 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
} }
ImsSchedulingVo imsSchedulingVo = imsDutyMainServiceImpl.getByIdOneV2(entity.getId(), null);//交班人 ImsSchedulingVo imsSchedulingVo = imsDutyMainServiceImpl.getByIdOneV2(entity.getId(), null);//交班人
if (ObjectUtil.isNotEmpty(imsSchedulingVo)&&null != imsSchedulingVo.getManagerId()) { if (ObjectUtil.isNotEmpty(imsSchedulingVo)&&null != imsSchedulingVo.getManagerId()) {
imsSchedulingVo.setUserName(userClient.userInfoById(imsSchedulingVo.getManagerId()).getData().getName()); imsSchedulingVo.setUserName(userClient.userInfoById(imsSchedulingVo.getManagerId()).getData().getRealName());
} }
ImsSchedulingVo imsSchedulingVo1 = imsDutyMainServiceImpl.getByIdOneV2(null, entity.getId()); ImsSchedulingVo imsSchedulingVo1 = imsDutyMainServiceImpl.getByIdOneV2(null, entity.getId());
if (ObjectUtil.isNotEmpty(imsSchedulingVo1)&&null != imsSchedulingVo1.getManagerId()) { if (ObjectUtil.isNotEmpty(imsSchedulingVo1)&&null != imsSchedulingVo1.getManagerId()) {
imsSchedulingVo1.setUserName(userClient.userInfoById(imsSchedulingVo1.getManagerId()).getData().getName()); imsSchedulingVo1.setUserName(userClient.userInfoById(imsSchedulingVo1.getManagerId()).getData().getRealName());
}else { }else {
throw new ServiceException("没有找到接班对象值班信息,请联系管理人员,尽快进行排班!!!!"); throw new ServiceException("没有找到接班对象值班信息,请联系管理人员,尽快进行排班!!!!");
} }
@ -773,7 +773,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
if (ObjectUtil.isNotEmpty(groupEntityManagerId) && ObjectUtil.isNotEmpty(classEntity)) { if (ObjectUtil.isNotEmpty(groupEntityManagerId) && ObjectUtil.isNotEmpty(classEntity)) {
String userName = ""; String userName = "";
if (null != groupEntityManagerId) { if (null != groupEntityManagerId) {
userName = userClient.userInfoById(groupEntityManagerId).getData().getName(); userName = userClient.userInfoById(groupEntityManagerId).getData().getRealName();
} }
PushExtrasReq req = new PushExtrasReq(); PushExtrasReq req = new PushExtrasReq();
if (null != entity.getPreDutyId()) { if (null != entity.getPreDutyId()) {
@ -834,7 +834,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
} }
} }
} }
remondingCarryV2(carryMainentity.getDutyDate(),2, carryManagerId, user.getData().getName(), classEntity, null, carryTenantId, carryCreateDept, carryMainentity.getId(), carryMainentity.getCreateUser());//提醒接班人 remondingCarryV2(carryMainentity.getDutyDate(),2, carryManagerId, user.getData().getRealName(), classEntity, null, carryTenantId, carryCreateDept, carryMainentity.getId(), carryMainentity.getCreateUser());//提醒接班人
} }
} }
} }
@ -1157,7 +1157,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
messagePushRecordDto.setTaskId(taskId); messagePushRecordDto.setTaskId(taskId);
messagePushRecordDto.setTenantId(tenantId); messagePushRecordDto.setTenantId(tenantId);
messagePushRecordDto.setPusher(admin.getId().toString()); messagePushRecordDto.setPusher(admin.getId().toString());
messagePushRecordDto.setPusherName(admin.getName()); messagePushRecordDto.setPusherName(admin.getRealName());
messagePushRecordDto.setAccount(admin.getId().toString()); messagePushRecordDto.setAccount(admin.getId().toString());
messagePushRecordDto.setContent(" 负责人"+userName + datyTime+ "("+classEntity.getStartTime() messagePushRecordDto.setContent(" 负责人"+userName + datyTime+ "("+classEntity.getStartTime()
+ "-" + classEntity.getEndTime()+")"+" 的值班,目前已交班延迟,请尽快联系该负责人进行交班工作!"); + "-" + classEntity.getEndTime()+")"+" 的值班,目前已交班延迟,请尽快联系该负责人进行交班工作!");
@ -1620,7 +1620,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
ImsDutyGroupEntity groupEntity = imsDutyGroupService.getById(dutyGroupId); ImsDutyGroupEntity groupEntity = imsDutyGroupService.getById(dutyGroupId);
User manager = UserCache.getUser(groupEntity.getManagerId()); User manager = UserCache.getUser(groupEntity.getManagerId());
if (cn.hutool.core.util.ObjectUtil.isNotEmpty(manager)){ if (cn.hutool.core.util.ObjectUtil.isNotEmpty(manager)){
managerName=manager.getName(); managerName=manager.getRealName();
} }
}else { }else {
ImsDutyMainPersonEntity dutyMainPerson = imsDutyMainPersonService.getOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{ ImsDutyMainPersonEntity dutyMainPerson = imsDutyMainPersonService.getOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{
@ -1629,7 +1629,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
}}); }});
User manager = UserCache.getUser(dutyMainPerson.getDutyChargePerson()); User manager = UserCache.getUser(dutyMainPerson.getDutyChargePerson());
if (cn.hutool.core.util.ObjectUtil.isNotEmpty(manager)){ if (cn.hutool.core.util.ObjectUtil.isNotEmpty(manager)){
managerName=manager.getName(); managerName=manager.getRealName();
} }
} }
return managerName; return managerName;
@ -1643,9 +1643,9 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
User user = UserCache.getUser(Long.valueOf(split[j])); User user = UserCache.getUser(Long.valueOf(split[j]));
if (org.springblade.core.tool.utils.ObjectUtil.isNotEmpty(user)) { if (org.springblade.core.tool.utils.ObjectUtil.isNotEmpty(user)) {
if (j == split.length - 1) { if (j == split.length - 1) {
handNumber= handNumber + user.getName(); handNumber= handNumber + user.getRealName();
} else { } else {
handNumber= handNumber + user.getName()+ "、"; handNumber= handNumber + user.getRealName()+ "、";
} }
} }
} }

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverConfigController.java

@ -7,6 +7,7 @@ import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.fill.entity.OverConfigEntity; import com.hnac.hzims.operational.fill.entity.OverConfigEntity;
import com.hnac.hzims.operational.fill.service.OverConfigService; import com.hnac.hzims.operational.fill.service.OverConfigService;
import com.hnac.hzims.operational.fill.service.OverDetailsService;
import com.hnac.hzims.operational.fill.vo.OverConfigVo; import com.hnac.hzims.operational.fill.vo.OverConfigVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -30,6 +31,8 @@ public class OverConfigController extends BladeController {
private final OverConfigService service; private final OverConfigService service;
private final OverDetailsService detailsService;
/** /**
* 新增 * 新增
*/ */
@ -47,7 +50,7 @@ public class OverConfigController extends BladeController {
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(detailsService.clear(Func.toLongList(ids)));
} }
/** /**

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverConfigService.java

@ -8,6 +8,8 @@ import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import java.util.List;
/** /**
* 检修配置接口 * 检修配置接口
*/ */
@ -18,4 +20,5 @@ public interface OverConfigService extends BaseService<OverConfigEntity> {
int getSort(); int getSort();
boolean checkOverName(String overName); boolean checkOverName(String overName);
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverDetailsService.java

@ -16,4 +16,6 @@ import java.util.List;
public interface OverDetailsService extends BaseService<OverDetailsEntity> { public interface OverDetailsService extends BaseService<OverDetailsEntity> {
R<IPage<OverDetailsVo>> pageCondition(OverDetailsVo vo, Query query); R<IPage<OverDetailsVo>> pageCondition(OverDetailsVo vo, Query query);
boolean clear(List<Long> longList);
} }

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverConfigServiceImpl.java

@ -6,7 +6,6 @@ import com.hnac.hzims.operational.fill.entity.OverConfigEntity;
import com.hnac.hzims.operational.fill.mapper.OverConfigMapper; import com.hnac.hzims.operational.fill.mapper.OverConfigMapper;
import com.hnac.hzims.operational.fill.service.OverConfigService; import com.hnac.hzims.operational.fill.service.OverConfigService;
import com.hnac.hzims.operational.fill.vo.OverConfigVo; import com.hnac.hzims.operational.fill.vo.OverConfigVo;
import com.hnac.hzims.operational.fill.wrapper.OtherWrapper;
import com.hnac.hzims.operational.fill.wrapper.OverConfigWrapper; import com.hnac.hzims.operational.fill.wrapper.OverConfigWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

15
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverDetailsServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.operational.fill.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.operational.fill.entity.OverConfigEntity; import com.hnac.hzims.operational.fill.entity.OverConfigEntity;
import com.hnac.hzims.operational.fill.entity.OverDetailsEntity; import com.hnac.hzims.operational.fill.entity.OverDetailsEntity;
import com.hnac.hzims.operational.fill.mapper.OverDetailsMapper; import com.hnac.hzims.operational.fill.mapper.OverDetailsMapper;
@ -11,10 +12,12 @@ import com.hnac.hzims.operational.fill.vo.OverDetailsVo;
import com.hnac.hzims.operational.fill.wrapper.OverDetailsWrapper; import com.hnac.hzims.operational.fill.wrapper.OverDetailsWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -56,4 +59,16 @@ public class OverDetailsServiceImpl extends BaseServiceImpl<OverDetailsMapper, O
return R.data(pages.setRecords(list)); return R.data(pages.setRecords(list));
} }
@Override
public boolean clear(List<Long> ids) {
List<OverDetailsEntity> details = this.list(Wrappers.<OverDetailsEntity>lambdaQuery()
.in(OverDetailsEntity::getOverConfigId,ids)
.eq(OverDetailsEntity::getIsDeleted,0)
);
if(CollectionUtil.isNotEmpty(details)){
throw new ServiceException("该检修卡分类已在检修填报数据中引用,无法删除!");
}
return this.configService.deleteLogic(ids);
}
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/GenerateWrapper.java

@ -29,7 +29,7 @@ public class GenerateWrapper extends BaseEntityWrapper<GenerateEntity, GenerateV
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OtherWrapper.java

@ -25,7 +25,7 @@ public class OtherWrapper extends BaseEntityWrapper<OtherEntity, OtherVo> {
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
vo.setAscriptionUser(entity.getCreateUser()); vo.setAscriptionUser(entity.getCreateUser());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OverConfigWrapper.java

@ -25,7 +25,7 @@ public class OverConfigWrapper extends BaseEntityWrapper<OverConfigEntity, OverC
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(createUser.getName()); vo.setUserName(createUser.getRealName());
vo.setAscriptionUser(entity.getCreateUser()); vo.setAscriptionUser(entity.getCreateUser());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OverDetailsWrapper.java

@ -25,7 +25,7 @@ public class OverDetailsWrapper extends BaseEntityWrapper<OverDetailsEntity, Ove
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
vo.setAscriptionUser(entity.getCreateUser()); vo.setAscriptionUser(entity.getCreateUser());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/OverWrapper.java

@ -25,7 +25,7 @@ public class OverWrapper extends BaseEntityWrapper<OverEntity, OverVo> {
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
vo.setAscriptionUser(entity.getCreateUser()); vo.setAscriptionUser(entity.getCreateUser());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/PowerWrapper.java

@ -25,7 +25,7 @@ public class PowerWrapper extends BaseEntityWrapper<PowerEntity, PowerVo> {
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
vo.setAscriptionUser(entity.getCreateUser()); vo.setAscriptionUser(entity.getCreateUser());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/RainfallWrapper.java

@ -29,7 +29,7 @@ public class RainfallWrapper extends BaseEntityWrapper<RainfallEntity, RainfallV
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/SolveWrapper.java

@ -25,7 +25,7 @@ public class SolveWrapper extends BaseEntityWrapper<SolveEntity, SolveVo> {
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
vo.setAscriptionUser(entity.getCreateUser()); vo.setAscriptionUser(entity.getCreateUser());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/StorageWrapper.java

@ -29,7 +29,7 @@ public class StorageWrapper extends BaseEntityWrapper<StorageEntity, StorageVo>
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/UseWrapper.java

@ -29,7 +29,7 @@ public class UseWrapper extends BaseEntityWrapper<UseEntity, UseVo> {
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); vo.setUserName(createUser.getRealName());
return vo; return vo;
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/wrapper/WindWrapper.java

@ -25,7 +25,7 @@ public class WindWrapper extends BaseEntityWrapper<WindEntity, WindVo> {
return vo; return vo;
} }
assert vo != null; assert vo != null;
vo.setUserName(createUser.getName()); vo.setUserName(createUser.getRealName());
return vo; return vo;
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java

@ -1860,7 +1860,7 @@ public class HydropowerServiceImpl implements HydropowerService {
if (ObjectUtil.isEmpty(user)) { if (ObjectUtil.isEmpty(user)) {
return ""; return "";
} }
return user.getName(); return user.getRealName();
} }
/** /**
@ -1883,7 +1883,7 @@ public class HydropowerServiceImpl implements HydropowerService {
if (ObjectUtil.isEmpty(user)) { if (ObjectUtil.isEmpty(user)) {
continue; continue;
} }
builder.append(user.getName()).append(","); builder.append(user.getRealName()).append(",");
} }
if(builder.length() <= 0){ if(builder.length() <= 0){
return ""; return "";

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java

@ -721,7 +721,7 @@ public class WindHomeServiceImpl implements WindHomeService {
if (ObjectUtil.isEmpty(user)) { if (ObjectUtil.isEmpty(user)) {
return ""; return "";
} }
return user.getName(); return user.getRealName();
} }
/** /**
@ -744,7 +744,7 @@ public class WindHomeServiceImpl implements WindHomeService {
if (ObjectUtil.isEmpty(user)) { if (ObjectUtil.isEmpty(user)) {
continue; continue;
} }
builder.append(user.getName()).append(","); builder.append(user.getRealName()).append(",");
} }
if(builder.length() <= 0){ if(builder.length() <= 0){
return ""; return "";

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenancePlanController.java

@ -67,14 +67,14 @@ public class OperMaintenancePlanController extends BladeController {
req.setTaskType("1"); req.setTaskType("1");
if (ObjectUtil.isNotEmpty(req.getDisposer())){ if (ObjectUtil.isNotEmpty(req.getDisposer())){
User user = UserCache.getUser(req.getDisposer()); User user = UserCache.getUser(req.getDisposer());
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getRealName())){
req.setDisposerName(user.getName()); req.setDisposerName(user.getRealName());
} }
} }
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getUserName())){ if (ObjectUtil.isNotEmpty(user)&& StringUtils.isNotEmpty(user.getNickName())){
req.setCreateUserName(user.getUserName()); req.setCreateUserName(user.getNickName());
req.setUpdateUserName(user.getUserName()); req.setUpdateUserName(user.getNickName());
} }
planService.save(req); planService.save(req);
return R.data(req); return R.data(req);

9
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java

@ -1,6 +1,5 @@
package com.hnac.hzims.operational.maintenance.scheduled; package com.hnac.hzims.operational.maintenance.scheduled;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.hnac.hzims.common.constant.CommonConstant; import com.hnac.hzims.common.constant.CommonConstant;
import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.MessageConstants;
@ -17,7 +16,6 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*; import org.springblade.core.tool.utils.*;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient; import org.springblade.system.user.feign.IUserClient;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
@ -31,6 +29,7 @@ import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.hnac.hzims.operational.maintenance.constants.ScheduledConstant.REMIND_MAINTENANCE_BECOME_TASK; import static com.hnac.hzims.operational.maintenance.constants.ScheduledConstant.REMIND_MAINTENANCE_BECOME_TASK;
@Component @Component
@Slf4j @Slf4j
@AllArgsConstructor @AllArgsConstructor
@ -56,7 +55,7 @@ public class MaintenanceTaskRemindHandler {
else if(Lists.newArrayList("待领用","待执行").contains(taskEntity.getFlowTaskName())) { else if(Lists.newArrayList("待领用","待执行").contains(taskEntity.getFlowTaskName())) {
XxlJobLogger.log("开始执行id为{}的任务", Optional.ofNullable(operMaintenanceTaskEntity.getId()).orElse(0L)); XxlJobLogger.log("开始执行id为{}的任务", Optional.ofNullable(operMaintenanceTaskEntity.getId()).orElse(0L));
//日常维护任务到期消息提醒,提醒对象:执行人、项目经理角色 取出 //日常维护任务到期消息提醒,提醒对象:执行人、项目经理角色 取出
//this.sendMessage(taskEntity); this.sendMessage(taskEntity);
redisTemplate.opsForZSet().remove(RedisKeyConstants.MAINTENANCE_TASK_DELAY_LIST,operMaintenanceTaskEntity); redisTemplate.opsForZSet().remove(RedisKeyConstants.MAINTENANCE_TASK_DELAY_LIST,operMaintenanceTaskEntity);
} }
}); });
@ -84,7 +83,7 @@ public class MaintenanceTaskRemindHandler {
request.setCreateUser(taskEntity.getCreateUser()); request.setCreateUser(taskEntity.getCreateUser());
request.setTenantId(CommonConstant.TENANT_ID); request.setTenantId(CommonConstant.TENANT_ID);
R<Boolean> sendFlag = messageClient.sendAppAndWsMsgByUsers(request); R<Boolean> sendFlag = messageClient.sendAppAndWsMsgByUsers(request);
if(!(sendFlag.isSuccess() && sendFlag.getData())) { if(!sendFlag.isSuccess() || sendFlag.getData() == null) {
XxlJobLogger.log(taskEntity.getId() +"执行人消息推送失败!"); XxlJobLogger.log(taskEntity.getId() +"执行人消息推送失败!");
} }
// 任务执行人发送短信 // 任务执行人发送短信
@ -93,7 +92,7 @@ public class MaintenanceTaskRemindHandler {
request.setUserIds(listR.getData().stream().map(User::getId).map(String::valueOf).collect(Collectors.joining(","))); request.setUserIds(listR.getData().stream().map(User::getId).map(String::valueOf).collect(Collectors.joining(",")));
request.setContent("有一条待执行的日常维护任务【"+taskEntity.getTitle()+"】即将于"+ DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME) +"过期,请确认。"); request.setContent("有一条待执行的日常维护任务【"+taskEntity.getTitle()+"】即将于"+ DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME) +"过期,请确认。");
R<Boolean> result = messageClient.sendAppAndWsMsgByUsers(request); R<Boolean> result = messageClient.sendAppAndWsMsgByUsers(request);
if(!(result.isSuccess() && result.getData())) { if(!result.isSuccess() || result.getData() == null) {
XxlJobLogger.log(taskEntity.getId() +"执行人消息推送失败!"); XxlJobLogger.log(taskEntity.getId() +"执行人消息推送失败!");
} }
} }

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskSchedule.java

@ -61,10 +61,12 @@ public class MaintenanceTaskSchedule {
@XxlJob(GENERATE_MAINTENANCE_TASK_SCHEDULE) @XxlJob(GENERATE_MAINTENANCE_TASK_SCHEDULE)
public ReturnT<String> execute(String param) throws Exception { public ReturnT<String> execute(String param) throws Exception {
Date startDate = StringUtil.isNotBlank(param) ? DateUtil.parse(param, DateUtil.PATTERN_DATE) : DateUtil.parse(DateUtil.formatDate(DateUtil.now()), DateUtil.PATTERN_DATE); String startDate = DateUtil.format(DateUtil.now(), DateUtil.PATTERN_DATE) + " 00:00:00";
Date endDate = DateUtil.parse(DateUtil.formatDate(DateUtil.plusDays(startDate, 1)), DateUtil.PATTERN_DATE); String endDate = DateUtil.format(DateUtil.plusDays(DateUtil.now(), 1), DateUtil.PATTERN_DATE) + " 00:00:00";
LambdaQueryWrapper<OperMaintenancePlanEntity> planQW = Wrappers.<OperMaintenancePlanEntity>lambdaQuery().isNull(OperMaintenancePlanEntity::getCreateTaskTime) LambdaQueryWrapper<OperMaintenancePlanEntity> planQW = Wrappers.<OperMaintenancePlanEntity>lambdaQuery()
.ge(OperMaintenancePlanEntity::getDisposeTime, startDate).lt(OperMaintenancePlanEntity::getDisposeTime, endDate); .isNull(OperMaintenancePlanEntity::getCreateTaskTime)
.ge(OperMaintenancePlanEntity::getDisposeTime, startDate)
.lt(OperMaintenancePlanEntity::getDisposeTime, endDate);
List<OperMaintenancePlanEntity> planList = planService.list(planQW); List<OperMaintenancePlanEntity> planList = planService.list(planQW);
XxlJobLogger.log("日常维护任务生成开始!计划ID为:"+planList.stream().map(OperMaintenancePlanEntity::getId).map(String::valueOf).collect(Collectors.joining(","))); XxlJobLogger.log("日常维护任务生成开始!计划ID为:"+planList.stream().map(OperMaintenancePlanEntity::getId).map(String::valueOf).collect(Collectors.joining(",")));
//分页插入日常维护计划 //分页插入日常维护计划

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceServiceImpl.java

@ -348,8 +348,8 @@ public class MaintenanceServiceImpl implements MaintenanceService {
String disposerName=""; String disposerName="";
for (int i = 0; i < split.length; i++) { for (int i = 0; i < split.length; i++) {
User user = UserCache.getUser(Long.valueOf(split[i])); User user = UserCache.getUser(Long.valueOf(split[i]));
if (ObjectUtil.isNotEmpty(user)&&StringUtils.isNotBlank(user.getName())){ if (ObjectUtil.isNotEmpty(user)&&StringUtils.isNotBlank(user.getRealName())){
disposerName=disposerName+user.getName(); disposerName=disposerName+user.getRealName();
} }
} }
taskEntity.setDisposer(userId.replaceAll("\\^", ",")); taskEntity.setDisposer(userId.replaceAll("\\^", ","));

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/schedule/OperPersonalCreateMonthReport.java

@ -75,7 +75,7 @@ public class OperPersonalCreateMonthReport {
} }
} }
else{ else{
log.info("{}已生成月报",user.getName()); log.info("{}已生成月报",user.getRealName());
} }
} }
}); });

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java

@ -554,7 +554,7 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
List<User> userListByRoleAlias = userClient.relationUserListByRoleAlias("200000", deptId, PROJECT_MANAGER).getData(); List<User> userListByRoleAlias = userClient.relationUserListByRoleAlias("200000", deptId, PROJECT_MANAGER).getData();
if (CollectionUtil.isNotEmpty(userListByRoleAlias)){ if (CollectionUtil.isNotEmpty(userListByRoleAlias)){
User user = userListByRoleAlias.get(0); User user = userListByRoleAlias.get(0);
map.put("manager", user.getName()); map.put("manager", user.getRealName());
}else { }else {
map.put("manager",""); map.put("manager","");
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/impl/DistributeWorkOrderServiceImpl.java

@ -82,7 +82,7 @@ public class DistributeWorkOrderServiceImpl implements IDistributeWorkOrderServi
publisher.setContactAddress("123123"); publisher.setContactAddress("123123");
publisher.setContactName("123123"); publisher.setContactName("123123");
publisher.setContactPhone(user.getPhone()); publisher.setContactPhone(user.getPhone());
publisher.setPublisher(user.getName()); publisher.setPublisher(user.getRealName());
publisher.setPublisherScale("123123"); publisher.setPublisherScale("123123");
orderPackageDto.setPublisher(publisher); orderPackageDto.setPublisher(publisher);
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/scheduled/SafeToolTypePushUserTask.java

@ -129,7 +129,7 @@ public class SafeToolTypePushUserTask {
else { else {
typeNames = typeEntityList.stream().map(SafetyToolTypeEntity::getTypeName).collect(Collectors.joining("、")); typeNames = typeEntityList.stream().map(SafetyToolTypeEntity::getTypeName).collect(Collectors.joining("、"));
} }
XxlJobLogger.log("开始推送,推送人:{}",JSONObject.toJSONString(noticeUser.getName())); XxlJobLogger.log("开始推送,推送人:{}",JSONObject.toJSONString(noticeUser.getRealName()));
if(sendType == APP_PUSH && Func.isNotEmpty(noticeUser.getPhone())){ if(sendType == APP_PUSH && Func.isNotEmpty(noticeUser.getPhone())){
//短信推送 //短信推送
String code = "safeTool"; String code = "safeTool";

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/wrapper/ImsMonAlarmInfoWrapper.java

@ -28,7 +28,7 @@ public class ImsMonAlarmInfoWrapper extends BaseEntityWrapper<ImsMonAlarmInfoEnt
if(entity != null){ if(entity != null){
ImsMonAlarmInfoVO vo = BeanUtil.copy(entity, ImsMonAlarmInfoVO.class); ImsMonAlarmInfoVO vo = BeanUtil.copy(entity, ImsMonAlarmInfoVO.class);
vo.setCameraName(cameraInfoService.getById(vo.getCameraId()).getName()); vo.setCameraName(cameraInfoService.getById(vo.getCameraId()).getName());
vo.setAcceptUserName(UserCache.getUser(entity.getCreateUser()).getName()); vo.setAcceptUserName(UserCache.getUser(entity.getCreateUser()).getRealName());
return vo; return vo;
} else { } else {
return null; return null;

10
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

@ -201,8 +201,8 @@ public class OperationTicketServiceImpl implements OperationTicketService {
//填充许可人 //填充许可人
if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getPrincipal())) { if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getPrincipal())) {
User principal = UserCache.getUser(standardTicketInfoVo.getPrincipal()); User principal = UserCache.getUser(standardTicketInfoVo.getPrincipal());
if (ObjectUtil.isNotEmpty(principal)&&StringUtils.isNotBlank(principal.getName())){ if (ObjectUtil.isNotEmpty(principal)&&StringUtils.isNotBlank(principal.getRealName())){
newStandardTicketInfoEntity.setIssueOrderPersonName(principal.getName()); newStandardTicketInfoEntity.setIssueOrderPersonName(principal.getRealName());
} }
} }
standardTicketInfoService.updateById(newStandardTicketInfoEntity); standardTicketInfoService.updateById(newStandardTicketInfoEntity);
@ -415,20 +415,20 @@ public class OperationTicketServiceImpl implements OperationTicketService {
if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getIssueOrderPerson())) { if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getIssueOrderPerson())) {
User issueOrderPerson = UserCache.getUser(standardTicketInfoVo.getIssueOrderPerson()); User issueOrderPerson = UserCache.getUser(standardTicketInfoVo.getIssueOrderPerson());
if (ObjectUtil.isNotEmpty(issueOrderPerson)){ if (ObjectUtil.isNotEmpty(issueOrderPerson)){
standardTicketInfo.setIssueOrderPersonName(issueOrderPerson.getName()); standardTicketInfo.setIssueOrderPersonName(issueOrderPerson.getRealName());
} }
} }
if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getAccessOrderPerson())) { if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getAccessOrderPerson())) {
User accessOrderPerson = UserCache.getUser(standardTicketInfoVo.getAccessOrderPerson()); User accessOrderPerson = UserCache.getUser(standardTicketInfoVo.getAccessOrderPerson());
if (ObjectUtil.isNotEmpty(accessOrderPerson)){ if (ObjectUtil.isNotEmpty(accessOrderPerson)){
standardTicketInfo.setAccessOrderPersonName(accessOrderPerson.getName()); standardTicketInfo.setAccessOrderPersonName(accessOrderPerson.getRealName());
} }
} }
if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getGuardian())) { if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getGuardian())) {
User guardian = UserCache.getUser(standardTicketInfoVo.getGuardian()); User guardian = UserCache.getUser(standardTicketInfoVo.getGuardian());
if (ObjectUtil.isNotEmpty(guardian)){ if (ObjectUtil.isNotEmpty(guardian)){
standardTicketInfo.setGuardianName(guardian.getName()); standardTicketInfo.setGuardianName(guardian.getRealName());
} }
} }

12
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -411,9 +411,9 @@ public class TicketProcessServiceImpl implements TicketProcessService {
log.info("工作票负责人更新变更"); log.info("工作票负责人更新变更");
workTicketPrincipalChangeService.updateByTicketId(workTicketPrincipalChange); workTicketPrincipalChangeService.updateByTicketId(workTicketPrincipalChange);
} }
log.info("工作负责人变更 原来的负责人 {},变更为 {}", user.getName(), newUser.getName()); log.info("工作负责人变更 原来的负责人 {},变更为 {}", user.getRealName(), newUser.getRealName());
workTicket.setPrincipal(workTicketPrincipalChange.getChangePrincipal()); workTicket.setPrincipal(workTicketPrincipalChange.getChangePrincipal());
workTicket.setPrincipalName(newUser.getName()); workTicket.setPrincipalName(newUser.getRealName());
//更新工作票 //更新工作票
workTicketInfoService.updateById(workTicket); workTicketInfoService.updateById(workTicket);
} }
@ -591,8 +591,8 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//下一个审批人 //下一个审批人
User stepUser = UserCache.getUser(taskUser); User stepUser = UserCache.getUser(taskUser);
if (stepUser != null) { if (stepUser != null) {
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(stepUser.getName()).concat("审批"); flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(stepUser.getRealName()).concat("审批");
workTicket.setNextStepOperator(stepUser.getName()); workTicket.setNextStepOperator(stepUser.getRealName());
} }
} else { } else {
workTicket.setNextStepOperator(null); workTicket.setNextStepOperator(null);
@ -855,7 +855,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
Long principal = workTicket.getPrincipal(); Long principal = workTicket.getPrincipal();
if (ObjectUtils.isNotEmpty(principal)) { if (ObjectUtils.isNotEmpty(principal)) {
User user = UserCache.getUser(principal); User user = UserCache.getUser(principal);
return user == null ? null : user.getName(); return user == null ? null : user.getRealName();
} }
return workTicket.getPrincipalManual(); return workTicket.getPrincipalManual();
} }
@ -872,7 +872,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
String[] splits = classGroupMembers.split(","); String[] splits = classGroupMembers.split(",");
for (String split : splits) { for (String split : splits) {
User user = UserCache.getUser(Long.valueOf(split)); User user = UserCache.getUser(Long.valueOf(split));
stringJoiner.add(user != null ? user.getName() : ""); stringJoiner.add(user != null ? user.getRealName() : "");
} }
} }
String classGroupMembersManual = workTicket.getClassGroupMembersManual(); String classGroupMembersManual = workTicket.getClassGroupMembersManual();

18
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

@ -275,7 +275,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
workTicketInfoVOIPage.getRecords().forEach(item -> { workTicketInfoVOIPage.getRecords().forEach(item -> {
User user = UserCache.getUser(item.getCreateUser()); User user = UserCache.getUser(item.getCreateUser());
if (user != null) { if (user != null) {
item.setCreateUserName(user.getName()); item.setCreateUserName(user.getRealName());
} }
}); });
@ -978,23 +978,23 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
//赋值签发人 //赋值签发人
if (workTicketInfo.getSigner() != null) { if (workTicketInfo.getSigner() != null) {
User user = UserCache.getUser(workTicketInfo.getSigner()); User user = UserCache.getUser(workTicketInfo.getSigner());
workTicketInfo.setSignerName(user == null ? null : user.getName()); workTicketInfo.setSignerName(user == null ? null : user.getRealName());
} }
if (workTicketInfo.getSigner() != null && workTicketInfo.getSignerName() == null) { if (workTicketInfo.getSigner() != null && workTicketInfo.getSignerName() == null) {
User user = UserCache.getUser(workTicketInfo.getSigner()); User user = UserCache.getUser(workTicketInfo.getSigner());
workTicketInfo.setSignerName(user == null ? null : user.getName()); workTicketInfo.setSignerName(user == null ? null : user.getRealName());
} }
//赋值许可人名称 //赋值许可人名称
if (workTicketInfo.getLicensor() != null) { if (workTicketInfo.getLicensor() != null) {
User user = UserCache.getUser(workTicketInfo.getLicensor()); User user = UserCache.getUser(workTicketInfo.getLicensor());
workTicketInfo.setLicensorName(user == null ? null : user.getName()); workTicketInfo.setLicensorName(user == null ? null : user.getRealName());
} }
if (workTicketInfo.getLicensor() != null && workTicketInfo.getLicensorName() == null) { if (workTicketInfo.getLicensor() != null && workTicketInfo.getLicensorName() == null) {
User user = UserCache.getUser(workTicketInfo.getLicensor()); User user = UserCache.getUser(workTicketInfo.getLicensor());
workTicketInfo.setLicensorName(user == null ? null : user.getName()); workTicketInfo.setLicensorName(user == null ? null : user.getRealName());
} }
// 工作负责人名称 // 工作负责人名称
workTicketInfo.setPrincipalName(Optional.ofNullable(workTicketInfo.getPrincipalManual()).filter(StringUtil::isNotBlank).orElse(workTicketInfo.getPrincipalName())); workTicketInfo.setPrincipalName(Optional.ofNullable(workTicketInfo.getPrincipalManual()).filter(StringUtil::isNotBlank).orElse(workTicketInfo.getPrincipalName()));
@ -1002,12 +1002,12 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
// 负责值班负责人 // 负责值班负责人
if (workTicketInfo.getWatchPrincipal() != null) { if (workTicketInfo.getWatchPrincipal() != null) {
User user = UserCache.getUser(workTicketInfo.getWatchPrincipal()); User user = UserCache.getUser(workTicketInfo.getWatchPrincipal());
workTicketInfo.setWatchPrincipalName(user == null ? null : user.getName()); workTicketInfo.setWatchPrincipalName(user == null ? null : user.getRealName());
} }
if (workTicketInfo.getWatchPrincipal() != null && workTicketInfo.getWatchPrincipalName() == null) { if (workTicketInfo.getWatchPrincipal() != null && workTicketInfo.getWatchPrincipalName() == null) {
User user = UserCache.getUser(workTicketInfo.getWatchPrincipal()); User user = UserCache.getUser(workTicketInfo.getWatchPrincipal());
workTicketInfo.setWatchPrincipalName(user == null ? null : user.getName()); workTicketInfo.setWatchPrincipalName(user == null ? null : user.getRealName());
} }
@ -1022,7 +1022,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
boolean matches = classGroupMember.matches("[0-9]+"); boolean matches = classGroupMember.matches("[0-9]+");
if (matches) { if (matches) {
User user = UserCache.getUser(Long.valueOf(classGroupMember)); User user = UserCache.getUser(Long.valueOf(classGroupMember));
String name = user == null ? null : user.getName(); String name = user == null ? null : user.getRealName();
if (StringUtils.isNotBlank(name)) { if (StringUtils.isNotBlank(name)) {
sb.append(name).append(","); sb.append(name).append(",");
} }
@ -1042,7 +1042,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
//负责人名称 //负责人名称
if (workTicketInfo.getPrincipalName() == null && workTicketInfo.getPrincipal() != null) { if (workTicketInfo.getPrincipalName() == null && workTicketInfo.getPrincipal() != null) {
User user = UserCache.getUser(workTicketInfo.getPrincipal()); User user = UserCache.getUser(workTicketInfo.getPrincipal());
workTicketInfo.setPrincipalName(user == null ? "" : user.getName()); workTicketInfo.setPrincipalName(user == null ? "" : user.getRealName());
} }

Loading…
Cancel
Save