Browse Source

Merge remote-tracking branch 'origin/prod-5.1.3' into prod-5.1.3

zhongwei
haungxing 3 months ago
parent
commit
b13d713d2f
  1. 4
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/vo/TicketInfoStatisticVO.java
  2. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleServiceImpl.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java
  4. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/MonthReportServiceImpl.java
  5. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java
  6. BIN
      hzims-service/operational/src/main/resources/template/word/stationMonthReport.docx
  7. 12
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  8. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

4
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/vo/TicketInfoStatisticVO.java

@ -26,6 +26,10 @@ public class TicketInfoStatisticVO implements Serializable {
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double ticketInfoProportion;
@ApiModelProperty("本月票据合格率")
@JsonSerialize(nullsUsing = NullSerializer.class)
private String ticketInfoProportionName;
@ApiModelProperty("票据种类")
private String ticketInfoType;

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleServiceImpl.java

@ -137,7 +137,7 @@ public class AlarmHandleServiceImpl extends ServiceImpl<AlarmHandleMapper, Alarm
// throw new ServiceException("修改告警状态异常,请稍后重试!");
}
}
return JSONObject.toJSONString(alarmHandleEntity);
return JSONObject.toJSONString(param);
});
return res;
}

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

@ -1150,6 +1150,7 @@ public class ImsDutyMainServiceImpl extends ServiceImpl<ImsDutyMainMapper, ImsDu
}
List<ImsDutyMainEntity> handerCollect = imsDutyMainEntityList.stream().filter(s -> rec.getDutyId().equals(s.getPreDutyId())).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(handerCollect)){
if (ObjectUtil.isNotEmpty(handerCollect.get(0).getDutyGroupId())){
List<DutyRunReportVO> handerRunReportList = dutyReportVOList.stream().filter(s -> s.getGroupId().equals(handerCollect.get(0).getDutyGroupId().toString())).collect(Collectors.toList());
DutyRunReportVO handerRunRepor = handerRunReportList.get(0);
handerRunRepor.setDelayChangeShifts(handerRunRepor.getDelayChangeShifts()+1);
@ -1157,6 +1158,7 @@ public class ImsDutyMainServiceImpl extends ServiceImpl<ImsDutyMainMapper, ImsDu
}
}
}
}
if (CollectionUtil.isNotEmpty(exceptionList)) {
for (ImsDutyRecEntity rec : exceptionList) {
if (rec.getDelayStatus().equals(CARRY_DELAY_STATUS.getStatus())){

14
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/MonthReportServiceImpl.java

@ -26,7 +26,9 @@ import org.springblade.system.vo.DeptVO;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.List;
@Service
@ -65,7 +67,7 @@ public class MonthReportServiceImpl extends ServiceImpl<MonthReportMapper, OperM
e.printStackTrace();
}
//修改为每运行一次,保存一次
this.save(operMonthReportEntity);
this.save(saved);
}
}
//历史查询定时任务生成的数据
@ -88,7 +90,15 @@ public class MonthReportServiceImpl extends ServiceImpl<MonthReportMapper, OperM
eq(OperMonthReportEntity::getIsDeleted, 0);
last("limit 1;");
}});
if (ObjectUtil.isEmpty(operMonthReportEntityByMonth) || month.equals(YearMonth.now().toString())) {
LocalDate currentDate = LocalDate.now();
int dayNow = currentDate.getDayOfMonth();
boolean flag=(dayNow>2&&month.equals(YearMonth.now().toString()));
LocalDate localDatePlus = currentDate.plusMonths(1);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
String formattedDate = localDatePlus.format(formatter);
boolean flag2=(dayNow<2&&month.equals(formattedDate));
// 每个月月报的数据重新生成时间截至至下个月的2号
if (flag || flag2) {
if (ObjectUtil.isNotEmpty(operMonthReportEntityByMonth)) {
this.removeById(operMonthReportEntityByMonth.getId());
}

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

@ -455,6 +455,10 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
ticketStatisticDTO.setDeptIds(deptIds);
List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketReportStatistic(ticketStatisticDTO);
if (CollectionUtil.isNotEmpty(ticketVOS)){
ticketVOS = ticketVOS.stream().map(s -> {
s.setTicketInfoProportionName(s.getTicketInfoProportion() + "%");
return s;
}).collect(Collectors.toList());
stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS);
}
} finally {
@ -723,7 +727,7 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
temp.put("ticketInfoCompleteNum",ticketInfoStatisticVO.getTicketInfoCompleteNum().toString());
temp.put("ticketInfoInvalidatedNum",ticketInfoStatisticVO.getTicketInfoInvalidatedNum().toString());
temp.put("ticketInfoQualifiedNum",ticketInfoStatisticVO.getTicketInfoQualifiedNum().toString());
temp.put("ticketInfoProportion",ticketInfoStatisticVO.getTicketInfoProportion().toString());
temp.put("ticketInfoProportion",ticketInfoStatisticVO.getTicketInfoProportionName());
sumList.add(temp);
map.put("ticketInfoSum", sumList);
}

BIN
hzims-service/operational/src/main/resources/template/word/stationMonthReport.docx

Binary file not shown.

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

@ -265,8 +265,14 @@ public class OperationTicketServiceImpl implements OperationTicketService , Star
}
//1.查询操作票信息
Long id = NumberUtils.toLong(response.getBusinessKey());
StandardTicketInfoEntity standardTicketInfoEntity = standardTicketInfoService.getById(id);
// Long id = NumberUtils.toLong(response.getBusinessKey());
String businessKey = response.getBusinessKey();
String[] split =businessKey.split(":");
if (StringUtils.isBlank(split[1])){
log.error("异常消息转换失败,未找到BusinessKey:"+ businessKey);
return;
}
StandardTicketInfoEntity standardTicketInfoEntity = standardTicketInfoService.getById(split[1]);
if (ObjectUtils.isEmpty(standardTicketInfoEntity)) {
log.error("获取操作票不存在");
return;
@ -276,7 +282,7 @@ public class OperationTicketServiceImpl implements OperationTicketService , Star
StandardTicketInfoEntity newStandardTicketInfoEntity = new StandardTicketInfoEntity();
// BeanUtils.copyProperties(standardTicketInfoVo, newStandardTicketInfoEntity);
BeanUtil.copy(standardTicketInfoVo, newStandardTicketInfoEntity);
newStandardTicketInfoEntity.setId(id);
newStandardTicketInfoEntity.setId(Long.valueOf(split[1]));
newStandardTicketInfoEntity.setCreateUser(standardTicketInfoEntity.getCreateUser());
//填充操作票信息
saveStandardTicketInfoEntity(newStandardTicketInfoEntity, response);

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

@ -367,7 +367,12 @@ public class TicketProcessServiceImpl implements TicketProcessService, StartProc
workTicket.setIsNormal(true);
//2.流程处理
String businessKey = response.getBusinessKey();
WorkTicketInfoEntity workTicketInfo = ticketInfoService.getById(businessKey);
String[] split =businessKey.split(":");
if (StringUtils.isBlank(split[1])){
log.error("异常消息转换失败,未找到BusinessKey:"+ businessKey);
return;
}
WorkTicketInfoEntity workTicketInfo = ticketInfoService.getById(split[1]);
if (ObjectUtils.isEmpty(workTicketInfo)) {
log.error("获取工作票的数据为不存在");
return;

Loading…
Cancel
Save