Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 7 months ago
parent
commit
634a9664db
  1. 53
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyLogController.java
  2. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java
  4. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java
  5. 14
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
  6. 12
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java
  7. 12
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClient.java
  8. BIN
      hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx
  9. BIN
      hzims-service/ticket/src/main/resources/template/电气操作票.docx
  10. BIN
      hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx

53
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyLogController.java

@ -0,0 +1,53 @@
package com.hnac.hzims.operational.duty.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.duty.entity.ImsDutyLogEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.api.R;
import org.springblade.system.feign.ISysClient;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* 控制器
*
* @author Chill
*/
@RestController
@AllArgsConstructor
@RequestMapping("/imsDutyLog")
@Api(value = "值班日志", tags = "值班日志")
public class ImsDutyLogController extends BladeController {
private final IImsDutyLogService imsDutyLogService;
private final ISysClient sysClient;
/**
* 新增或修改 代码自定义代号
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入imsDutyMain")
public R submit(@Valid @RequestBody ImsDutyLogEntity imsDutyLogEntity) {
boolean b = imsDutyLogService.saveOrUpdate(imsDutyLogEntity);
if(b){
return R.success("保存成功");
}else {
return R.fail("保存失败");
}
}
}

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml

@ -64,7 +64,8 @@
DM.PRE_DUTY_ID AS preDutyId,
DM.status ,
DM.DUTY_DATE AS dutyDate,
CONCAT(CASE WHEN DM.`CLASS_ID` = 0 THEN '休息' ELSE DC.CLASS_NAME END, '-', DG.GROUP_NAME) AS name,
CONCAT(CASE WHEN DM.`CLASS_ID` = 0 THEN '休息' ELSE DC.CLASS_NAME END, '-',
CASE WHEN DG.GROUP_NAME is null THEN '临时班组' ELSE DG.GROUP_NAME END) AS name,
DC.START_TIME AS startTime,
DC.END_TIME AS endTime,
DM.CREATE_USER,

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

@ -1585,6 +1585,8 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
dutyLogEntity.setWorkCancel(String.valueOf(invalidList.size()));
//工作票未执行数量
List<WorkTicketInfoEntity> unExecutedList = ticketInfoData.stream()
.filter(item -> !"结束".equals(item.getFlowTaskName()))
.filter(item -> !"废票".equals(item.getFlowTaskName()))
.filter(item -> "0".equals(item.getImplementStatus()))
.collect(Collectors.toList());
dutyLogEntity.setWorkUnFinish(String.valueOf(unExecutedList.size()));

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java

@ -136,9 +136,9 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
}else{
int number = Integer.parseInt(max.getNumber()) + 1;
String code = "";
if(number > 100){
if(number >= 100){
code += number;
}else if(number > 10){
}else if(number >= 10){
code = code + "0" + number;
}else{
code = code + "00" + number;

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

@ -122,6 +122,13 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
req.setTicketId(id);
List<StandardTicketMeasureVO> measureVOList = standardTicketMeasureService.list(req);
standardTicketInfoVO.setStandardTicketMeasureVOList(measureVOList);
List<StandardTicketMeasureVO> collect = measureVOList.stream().filter(s -> Func.isNotEmpty(s.getExecuteTime())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)){
standardTicketInfoVO.setStartTime(collect.stream().map(StandardTicketMeasureVO::getExecuteTime)
.min(Comparator.comparing(LocalDateTime::toString))
.orElse(null));
}
standardTicketInfoVO.setEndTime(standardTicketInfoVO.getPrincipalTime());
return R.data(standardTicketInfoVO);
}
@ -906,6 +913,11 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
StandardTicketInfoVO detail = this.detail(ticketId).getData();
Map<String, Object> params = com.hnac.hzims.ticket.utils.ObjectUtils.obj2Map(detail);
params.put("measureMapList", this.convert(detail.getStandardTicketMeasureVOList()));
//操作票的开始时间取安全措施完成明细中最早的时间-2024.04.26
LocalDateTime startTime = detail.getStandardTicketMeasureVOList()
.stream().map(StandardTicketMeasureVO::getExecuteTime).min(Comparator.comparing(LocalDateTime::toString))
.orElse(null);
params.put("measureTimeLast", startTime.format(DateUtil.DATETIME_FORMATTER));
XWPFDocument xwpfDocument = null;
String fileName = "template/电气操作票.docx";
try {
@ -942,7 +954,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
if ("linux".equals(os)) {
return pdfSavePath;
} else {
return "E://template/";
return "D://template/";
}
}

12
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java

@ -50,12 +50,12 @@ public class ObjectUtils {
result.put(field.getName(),DateUtil.format(time,DateUtil.PATTERN_DATETIME));
}
else {
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"year",time.getYear());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"month",time.getMonth());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"day",time.getDay());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"hour",time.getHours());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"minuter",time.getMinutes());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"second",time.getSeconds());
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"year",String.format("%02d", time.getYear()));
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"month",String.format("%02d", time.getMonth()));
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"day",String.format("%02d", time.getDay()));
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"hour",String.format("%02d", time.getHours()));
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"minuter",String.format("%02d",time.getMinutes()));
result.put(dateTimeToMap.prefix()+dateTimeToMap.split()+"second",String.format("%02d", time.getSeconds()));
}
}
else {

12
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClient.java

@ -192,14 +192,15 @@ public class TicketInfoClient implements ITicketInfoClient {
List<Long> deptList = (List<Long>) params.get("deptList");
log.info("查询工作票");
List<WorkTicketInfoEntity> infoList = infoService.list(new LambdaQueryWrapper<WorkTicketInfoEntity>() {{
ge(WorkTicketInfoEntity::getPlanStartTime, startDate);
le(WorkTicketInfoEntity::getPlanStartTime, endDate);
ge(WorkTicketInfoEntity::getUpdateTime, startDate);
le(WorkTicketInfoEntity::getUpdateTime, endDate);
in(WorkTicketInfoEntity::getCreateDept, deptList);
eq(WorkTicketInfoEntity::getIsDeleted,0);
}});
return R.data(infoList);
}
/**
* 获取首页操作票统计结果
* 根据时间和机构获取对应操作票
*
* @param params
* @return
@ -211,8 +212,9 @@ public class TicketInfoClient implements ITicketInfoClient {
String endDate = (String) params.get("endDate");
List<Long> deptList = (List<Long>) params.get("deptList");
List<StandardTicketInfoEntity> standardTicketList = standardService.list(new LambdaQueryWrapper<StandardTicketInfoEntity>() {{
ge(StandardTicketInfoEntity::getStartTime, startDate);
le(StandardTicketInfoEntity::getStartTime, endDate);
ge(StandardTicketInfoEntity::getUpdateTime, startDate);
le(StandardTicketInfoEntity::getUpdateTime, endDate);
eq(StandardTicketInfoEntity::getIsDeleted,0);
in(StandardTicketInfoEntity::getCreateDept, deptList);
}});
return R.data(standardTicketList);

BIN
hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/电气操作票.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx

Binary file not shown.
Loading…
Cancel
Save