Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 2 years ago
parent
commit
f0f699e3b5
  1. 2
      hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageClient.java
  2. 5
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SafetyToolEntity.java
  3. 46
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java
  4. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenancePlanServiceImpl.java
  5. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java
  6. 54
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/template/abstracts/TemplateAbstractService.java
  7. 24
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/template/service/TemplateService.java
  8. 42
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/template/serviceimpl/MaintenanceTempleServiceImpl.java
  9. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java
  10. 42
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolServiceImpl.java
  11. 54
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/abstracts/TemplateAbstractService.java
  12. 24
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/service/TemplateService.java
  13. 55
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java
  14. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
  15. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

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

@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
/**
* @author hx
*/

5
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SafetyToolEntity.java

@ -68,4 +68,9 @@ public class SafetyToolEntity extends TenantEntity {
@ApiModelProperty(value = "通知用户")
private String noticeUsers;
@ApiModelProperty(value = "模板Id")
private Long messageTemplateId;
}

46
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java

@ -7,6 +7,7 @@ import com.google.common.collect.Lists;
import com.hnac.hzims.equipment.feign.IEmInfoClient;
import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.dto.MessagePushRecordDto;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.entity.config.MessageTemplateEntity;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.message.req.PushExtrasReq;
@ -18,6 +19,7 @@ import com.hnac.hzims.operational.maintenance.entity.OperMaintenancePlanEntity;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.operational.maintenance.mapper.OperMaintenancePlanMapper;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService;
import com.hnac.hzims.operational.maintenance.template.service.TemplateService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
@ -64,6 +66,9 @@ public class MaintenanceTaskCreateTask {
private final IMessageClient messageClient;
private final BladeLogger logger;
private final List<TemplateService> templateService;
@Value("${hzims.operation.task.templateCode.maintenance.taskDispose}")
private String maintenanceTaskKey;
@ -195,24 +200,41 @@ public class MaintenanceTaskCreateTask {
* @return void
**/
private void pushTaskMessage(OperMaintenanceTaskEntity taskEntity) {
XxlJobLogger.log("开始保存{}的日常维护消息推送记录",taskEntity.getDisposer());
R<MessageTemplateEntity> templateR = messageClient.getMsgTemplateById(taskEntity.getMessageTemplateId());
if(templateR.isSuccess() && ObjectUtil.isNotEmpty(templateR.getData())) {
Func.toLongList("",taskEntity.getDisposer()).forEach(userId -> {
MessagePushRecordDto recordDto = BeanUtil.copy(templateR.getData(),MessagePushRecordDto.class);
recordDto.setTypes(Arrays.asList(Func.split(recordDto.getType(),",")));
recordDto.setDeptId(taskEntity.getCreateDept());
recordDto.setCreateUser(taskEntity.getCreateUser());
recordDto.setCreateDept(taskEntity.getCreateDept());
// MessagePushRecordDto recordDto = BeanUtil.copy(templateR.getData(),MessagePushRecordDto.class);
// recordDto.setTypes(Arrays.asList(Func.split(recordDto.getType(),",")));
// recordDto.setDeptId(taskEntity.getCreateDept());
// recordDto.setCreateUser(taskEntity.getCreateUser());
// recordDto.setCreateDept(taskEntity.getCreateDept());
// ZoneId zoneId = ZoneId.systemDefault();
// recordDto.setPlanTime(LocalDateTime.ofInstant(taskEntity.getDisposeTime().toInstant(),zoneId));
// recordDto.setPushType(MessageConstants.PLAN);
// recordDto.setPusher(userId.toString());
// recordDto.setPusherName(UserCache.getUser(userId).getName());
// recordDto.setAccount(recordDto.getPusher());
// recordDto.setContent("距离任务执行时间已不满一小时,请及时处理");
//推送消息
ZoneId zoneId = ZoneId.systemDefault();
recordDto.setPlanTime(LocalDateTime.ofInstant(taskEntity.getDisposeTime().toInstant(),zoneId));
recordDto.setPushType(MessageConstants.PLAN);
recordDto.setPusher(userId.toString());
recordDto.setPusherName(UserCache.getUser(userId).getName());
recordDto.setAccount(recordDto.getPusher());
recordDto.setContent("距离任务执行时间已不满一小时,请及时处理");
PlanMsgRecordDto planMsgRecordDto = new PlanMsgRecordDto();
planMsgRecordDto.setTemplateId(taskEntity.getMessageTemplateId());
planMsgRecordDto.setCreateUser(taskEntity.getCreateUser());
planMsgRecordDto.setPlanTime(LocalDateTime.ofInstant(taskEntity.getDisposeTime().toInstant(),zoneId));
planMsgRecordDto.setTaskId(taskEntity.getId());
planMsgRecordDto.setDeptId(taskEntity.getCreateDept());
planMsgRecordDto.setReceiver(userId);
TemplateService templateService1 = templateService.stream().filter(item -> item.isTemplateStatus(1)).findFirst().orElse(null);
templateService1.execute(planMsgRecordDto);
XxlJobLogger.log("推送内容体为:{}", JSON.toJSONString(taskEntity.getDisposer()));
messageClient.sendMessage(recordDto);
//messageClient.sendMessage(recordDto);
});
}
}

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenancePlanServiceImpl.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.common.utils.DateUtil;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyClassService;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenancePlanDTO;
@ -14,6 +15,7 @@ import com.hnac.hzims.operational.maintenance.mapper.OperMaintenancePlanMapper;
import com.hnac.hzims.operational.maintenance.scheduled.MaintenancePlanCreateTask;
import com.hnac.hzims.operational.maintenance.scheduled.MaintenanceTaskCreateTask;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenancePlanService;
import com.hnac.hzims.operational.maintenance.template.service.TemplateService;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenancePlanVO;
import com.hnac.hzims.operational.maintenance.wrapper.OperMaintenancePlanWrapper;
import com.hnac.hzims.safeproduct.feign.IDangerSourceClient;
@ -52,6 +54,9 @@ public class OperMaintenancePlanServiceImpl extends BaseServiceImpl<OperMaintena
private final IDangerSourceClient dangerSourceClient;
private final List<TemplateService> templateService;
@Override
public R<OperMaintenancePlanVO> detail(Long id) {
OperMaintenancePlanVO detail = OperMaintenancePlanWrapper.build().entityVO(super.getById(id));
@ -107,12 +112,17 @@ public class OperMaintenancePlanServiceImpl extends BaseServiceImpl<OperMaintena
//更新任务派发时间
this.update(new LambdaUpdateWrapper<OperMaintenancePlanEntity>().set(OperMaintenancePlanEntity::getCreateTaskTime,new Date())
.eq(OperMaintenancePlanEntity::getId,planEntity.getId()));
}
catch(Exception e) {
BladeLogger logger = SpringUtil.getBean(BladeLogger.class);
logger.error("maintenance:generateTask",e.getMessage());
}
});
return R.success("操作成功");
}

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java

@ -360,6 +360,7 @@ public class OperMaintenanceTaskServiceImpl extends BaseServiceImpl<OperMaintena
//区域编号必传
queryWrapper.eq("CREATE_DEPT", areaMonthlyVo.getAreaId());
queryWrapper.eq(areaMonthlyVo.getYearMonth() != null, "date_format(create_time,'%Y-%m')", areaMonthlyVo.getYearMonth());
//queryWrapper.lambda().eq(OperMaintenanceTaskEntity::getStatus,5);
Page<OperMaintenanceTaskEntity> operMaintenanceTaskEntityPage = baseMapper.selectPage(pageParam, queryWrapper);
//数据转换
if (CollectionUtil.isNotEmpty(operMaintenanceTaskEntityPage.getRecords())) {

54
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/template/abstracts/TemplateAbstractService.java

@ -0,0 +1,54 @@
package com.hnac.hzims.operational.maintenance.template.abstracts;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.operational.maintenance.template.service.TemplateService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/14 14:27
*/
@Slf4j
public abstract class TemplateAbstractService implements TemplateService {
@Resource
private IMessageClient messageClient;
/**
* 具体业务
*
* @param planMsgRecord
*/
@Override
public void execute(PlanMsgRecordDto planMsgRecord) {
//1.具体的业务逻辑
PlanMsgRecordDto list = executeTemplateMessage(planMsgRecord);
//2.保存数据
saveData(list);
}
/**
* 推送的数据
*
* @param list
*/
private void saveData(PlanMsgRecordDto list) {
log.info("正在保存推送的数据");
messageClient.planSendMessage(list);
}
/**
* 执行具体的业务场景,推送消息
*
* @return
*/
public abstract PlanMsgRecordDto executeTemplateMessage(PlanMsgRecordDto planMsgRecord);
}

24
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/template/service/TemplateService.java

@ -0,0 +1,24 @@
package com.hnac.hzims.operational.maintenance.template.service;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/14 14:25
*/
public interface TemplateService {
/**
* 模板状态
*/
Boolean isTemplateStatus(int status);
/**
* 具体业务
*/
void execute(PlanMsgRecordDto planMsgRecord);
}

42
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/template/serviceimpl/MaintenanceTempleServiceImpl.java

@ -0,0 +1,42 @@
package com.hnac.hzims.operational.maintenance.template.serviceimpl;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.operational.maintenance.template.abstracts.TemplateAbstractService;
import com.hnac.hzims.operational.maintenance.template.service.TemplateService;
import org.springframework.stereotype.Service;
import java.util.Objects;
/**
* 日常维护计划
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/14 14:48
*/
@Service
public class MaintenanceTempleServiceImpl extends TemplateAbstractService {
/**
* 执行具体的业务场景,推送消息
*
* @return
*/
@Override
public PlanMsgRecordDto executeTemplateMessage(PlanMsgRecordDto planMsgRecord) {
planMsgRecord.setContent("距离任务执行时间已不满一小时,请及时处理");
return planMsgRecord;
}
/**
* 模板状态
* @param status
*/
@Override
public Boolean isTemplateStatus(int status) {
return Objects.equals(status,1);
}
}

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -80,8 +80,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
if (Func.isEmpty(req.getId())) {
lwq = Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getCode, req.getCode()).or().eq(StationEntity::getName, req.getName());
}
else {
} else {
lwq = Wrappers.<StationEntity>lambdaQuery().ne(StationEntity::getId, req.getId())
.and(wrapper -> wrapper.eq(StationEntity::getCode, req.getCode()).or().eq(StationEntity::getName, req.getName()));
}
@ -143,8 +142,6 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
}
// 删除智能诊断站点
questionClient.deleteStationInfo(stationEntity.getCode());
//删除所属机构信息
deptClient.deleteDeptById(stationEntity.getRefDept());
}
return saveFlag;
}
@ -597,6 +594,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
/**
* 通过站点编辑所属机构
*
* @param stationEntity 站点信息
* @return
*/
@ -627,6 +625,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
/**
* 查询下拉列表站点
*
* @param type
* @param serveType
* @return
@ -668,6 +667,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
/**
* 删除新建站点时绑定的数据项目智能诊断站点
*
* @param idList id集合
*/
private void deleteStation(List<Long> idList) {

42
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolServiceImpl.java

@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.zxing.BarcodeFormat;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.safeproduct.dto.SafetyToolBatchRecheckDTO;
import com.hnac.hzims.safeproduct.dto.SafetyToolDTO;
import com.hnac.hzims.safeproduct.entity.SafeProductPdf;
@ -20,6 +21,7 @@ import com.hnac.hzims.safeproduct.mapper.SafetyToolMapper;
import com.hnac.hzims.safeproduct.mapper.SafetyToolRecheckMapper;
import com.hnac.hzims.safeproduct.mapper.SafetyToolTypeMapper;
import com.hnac.hzims.safeproduct.service.ISafetyToolService;
import com.hnac.hzims.safeproduct.template.service.TemplateService;
import com.hnac.hzims.safeproduct.utils.ExcelToolListener;
import com.hnac.hzims.safeproduct.utils.HtmlModule;
import com.hnac.hzims.safeproduct.utils.HtmltoPdf;
@ -53,10 +55,7 @@ import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.*;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@ -79,6 +78,8 @@ public class SafetyToolServiceImpl extends BaseServiceImpl<SafetyToolMapper, Saf
private final RedisTemplate redisTemplate;
private final IUserClient userClient;
private final List<TemplateService> templateService;
@Value("${hzims.safeProduct.safeTool.sadeToolKey}")
private String sadeToolKey;
@Value("${hzims.tenantId}")
@ -133,6 +134,27 @@ public class SafetyToolServiceImpl extends BaseServiceImpl<SafetyToolMapper, Saf
for (SafetyToolEntity item : safetyTools) {
item.setLastCheckTime(currentTime);
item.setNextCheckTime(DateUtil.plusDays(currentTime, Long.valueOf(item.getSafeTime().toString())));
String noticeUsers = item.getNoticeUsers();
if (!StringUtils.isEmpty(noticeUsers)) {
String[] split = noticeUsers.split(",");
for (String s : split) {
PlanMsgRecordDto planMsgRecordDtoDto = new PlanMsgRecordDto();
planMsgRecordDtoDto.setTemplateId(item.getMessageTemplateId());
planMsgRecordDtoDto.setTaskId(item.getId());
planMsgRecordDtoDto.setDeptId(item.getCurSts());
planMsgRecordDtoDto.setCreateUser(item.getCreateUser());
planMsgRecordDtoDto.setReceiver(Long.valueOf(s));
ZoneId zoneId = ZoneId.systemDefault();
Date nextCheckTime = item.getNextCheckTime();
planMsgRecordDtoDto.setPlanTime(nextCheckTime.toInstant().atZone(zoneId).toLocalDateTime());
TemplateService templateService1 =
templateService.stream().filter(item1 -> item1.isTemplateStatus(1)).findFirst().orElse(null);
templateService1.execute(planMsgRecordDtoDto);
}
}
}
if (!super.updateBatchById(safetyTools)) {
throw new RuntimeException("数据库update操作失败!");
@ -152,6 +174,8 @@ public class SafetyToolServiceImpl extends BaseServiceImpl<SafetyToolMapper, Saf
if (safetyToolRecheckMapper.insertBatch(safetyToolRechecks) == 0) {
throw new RuntimeException("数据库insert操作失败!");
}
}
@Override
@ -222,6 +246,7 @@ public class SafetyToolServiceImpl extends BaseServiceImpl<SafetyToolMapper, Saf
/**
* 安全工器具二维码导出
*
* @param idList
* @return 文件路径
*/
@ -233,8 +258,7 @@ public class SafetyToolServiceImpl extends BaseServiceImpl<SafetyToolMapper, Saf
in(SafetyToolEntity::getId, idList);
orderByDesc(SafetyToolEntity::getCreateTime);
}});
}
else{
} else {
entityList = page(Condition.getPage(new Query()), new LambdaQueryWrapper<SafetyToolEntity>()).getRecords();
}
if (CollectionUtil.isNotEmpty(entityList)) {
@ -261,12 +285,10 @@ public class SafetyToolServiceImpl extends BaseServiceImpl<SafetyToolMapper, Saf
String html = HtmlModule.buildHtml(pdfList, modulePath);
HtmltoPdf.htmlToPdf(html, pdfPath);
return pdfPath;
}
catch (Exception e){
} catch (Exception e) {
throw new ServiceException("导出pdf发生异常:" + e.getMessage());
}
}
else{
} else {
return null;
}
}

54
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/abstracts/TemplateAbstractService.java

@ -0,0 +1,54 @@
package com.hnac.hzims.safeproduct.template.abstracts;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.safeproduct.template.service.TemplateService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/14 14:27
*/
@Slf4j
public abstract class TemplateAbstractService implements TemplateService {
@Resource
private IMessageClient messageClient;
/**
* 具体业务
*
* @param planMsgRecord
*/
@Override
public void execute(PlanMsgRecordDto planMsgRecord) {
//1.具体的业务逻辑
PlanMsgRecordDto list = executeTemplateMessage(planMsgRecord);
//2.保存数据
saveData(list);
}
/**
* 推送的数据
*
* @param list
*/
private void saveData(PlanMsgRecordDto list) {
log.info("正在保存推送的数据");
messageClient.planSendMessage(list);
}
/**
* 执行具体的业务场景,推送消息
*
* @return
*/
public abstract PlanMsgRecordDto executeTemplateMessage(PlanMsgRecordDto planMsgRecord);
}

24
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/service/TemplateService.java

@ -0,0 +1,24 @@
package com.hnac.hzims.safeproduct.template.service;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/14 14:25
*/
public interface TemplateService {
/**
* 模板状态
*/
Boolean isTemplateStatus(int status);
/**
* 具体业务
*/
void execute(PlanMsgRecordDto planMsgRecord);
}

55
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java

@ -0,0 +1,55 @@
package com.hnac.hzims.safeproduct.template.serviceimpl;
import com.alibaba.fastjson.JSON;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.safeproduct.template.abstracts.TemplateAbstractService;
import com.qiniu.util.Json;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
/**
* 日常维护计划
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/14 14:48
*/
@Service
public class MaintenanceTempleServiceImpl extends TemplateAbstractService {
/**
* 执行具体的业务场景,推送消息
*
* @return
*/
@Override
public PlanMsgRecordDto executeTemplateMessage(PlanMsgRecordDto planMsgRecord) {
Map<String,Object> map = new HashMap<>();
map.put("one",
Optional.ofNullable(UserCache.getUser(planMsgRecord.getReceiver())).map(User::getName).orElse(""));
map.put("two", planMsgRecord.getPlanTime());
planMsgRecord.setContent(JSON.toJSONString(map));
return planMsgRecord;
}
/**
* 模板状态
* @param status
*/
@Override
public Boolean isTemplateStatus(int status) {
return Objects.equals(status,1);
}
}

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java

@ -348,7 +348,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
queryWrapper.eq("sti.CREATE_DEPT", areaVo.getAreaId());
queryWrapper.eq(areaVo.getYearMonth() != null,
"date_format(sti.create_time,'%Y-%m')", areaVo.getYearMonth());
queryWrapper.eq("tie.status",1);
// queryWrapper.eq("tie.status",1);
Page<StandardTicketInfoEntity> standardTicketInfoEntityPage = baseMapper.selectPages(searchPage, queryWrapper);
//数据转换StandardTicketInfoEntity ==> StandardTicketVo

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

@ -902,7 +902,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
queryWrapper.eq(areaVo.getYearMonth() != null, "date_format(sti.create_time,'%Y-%m')",
areaVo.getYearMonth());
//如果为1为合格
queryWrapper.eq("tie.status",1);
// queryWrapper.eq("tie.status",1);
Page<WorkTicketInfoEntity> workTicketInfoEntityPage = baseMapper.selectPages(pageEntity, queryWrapper);
//数据转换
List<StandardWorkVo> standardWorkList = new ArrayList<>();

Loading…
Cancel
Save