diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperAccessTaskEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperAccessTaskEntity.java index 27345a2..eac70ff 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperAccessTaskEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperAccessTaskEntity.java @@ -139,4 +139,7 @@ public class OperAccessTaskEntity extends TenantEntity { @ApiModelProperty(value = "创建用户名称") private String updateUserName; + + @ApiModelProperty(value = "创建用户名称") + private Long constructionId; } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java index 8c138e0..deed5fb 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java @@ -1,5 +1,6 @@ package com.hnac.hzims.operational.access.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -80,4 +81,8 @@ public class OperConstructionEntity extends TenantEntity { @ApiModelProperty(value = "审核人名称") private String reviewerName; + @ApiModelProperty(value = "检修Id") + @TableField(exist = false) + private Long taskId; + } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java index ac7dd89..6fbd377 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java @@ -73,6 +73,9 @@ public interface MainConstants { // 开停机告警 String START_STOP_ALARM = "startStopAlarm"; + // 数据通讯中断 + String INTERRUPT_ALARM = "interruptAlarm"; + // realId获取 String REAL_ID_DATA = "realIdData"; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java index 2f9fa11..a06949a 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java @@ -141,6 +141,9 @@ public class OperMaintenanceTaskEntity extends TenantEntity { @JsonSerialize(nullsUsing = NullSerializer.class) private Long ticketId; + @ApiModelProperty(value = "票据名称") + private String ticketName; + @ApiModelProperty(value = "延期状态") @JsonSerialize(nullsUsing = NullSerializer.class) private Integer delayStatus; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarEntity.java index 706093a..5bc6403 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarEntity.java @@ -64,12 +64,10 @@ public class CarEntity extends BaseEntity { @ApiModelProperty("下期年检时间") private Date nextAnnualInspectionTime; - @NotNull @Size(max = 50, message = "年检状态长度不能超过50") @ApiModelProperty("年检状态") private String annualInspectionStatus; - @NotNull @Size(max = 50, message = "保险状态长度不能超过50") @ApiModelProperty("保险状态") private String insuranceStatus; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceInspectionEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceInspectionEntity.java index 697de96..b4ad10a 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceInspectionEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceInspectionEntity.java @@ -33,11 +33,9 @@ public class SpecialDeviceInspectionEntity extends BaseEntity { @ApiModelProperty("检验照片") private String imgPath; - @TableField(exist = false) @ApiModelProperty("下次检验时间") private Date nextInspectionTime; - @TableField(exist = false) @ApiModelProperty("上次检验时间") private Date lastInspectionTime; } diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java index 88110e8..f2c503f 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java @@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; +import java.util.List; /** * @author ysj @@ -38,10 +39,7 @@ public class WorkTaskPreviewVO extends WorkTaskEntity { private Integer groupCount; @ApiModelProperty(value = "工作地点") - private String location; - - @ApiModelProperty(value = "工作内容") - private String content; + private List contents; @ApiModelProperty(value = "计划工作时间") private String planTimeInterval; diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java index ebc35d5..2056c78 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java @@ -18,7 +18,7 @@ public class CensParamVo { @ApiModelProperty("结束时间: yyyy-MM-dd HH:mm:ss") private String endTime; - @ApiModelProperty("状态 : 0-全部 1-完成") + @ApiModelProperty("状态 : 0-未完成 1-完成") private Integer state; @ApiModelProperty("结束") diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java index 6f4721d..dc3f1ea 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Component; import java.util.Date; +import static com.hnac.hzims.operational.main.constant.MainConstants.INTERRUPT_ALARM; import static com.hnac.hzims.operational.main.constant.MainConstants.START_STOP_ALARM; @@ -39,4 +40,14 @@ public class AlarmScheduledTask { service.startStopAlarm(param); return new ReturnT<>("SUCCESS"); } + + @XxlJob(INTERRUPT_ALARM) + //@Scheduled(cron = "0/40 * * * * ? ") + public ReturnT interruptAlarm(String param) { + if (Func.isBlank(param)) { + param = DateUtil.format(new Date(), "yyyy-MM"); + } + service.interruptAlarm(param); + return new ReturnT<>("SUCCESS"); + } } \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java index ba64a08..c092e7b 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java @@ -29,8 +29,10 @@ public class MonitorScheduledTask { /** * realId刷新 */ - @XxlJob(REAL_ID_DATA) - public ReturnT loadRealId(String param) { + //@XxlJob(REAL_ID_DATA) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadRealId() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } @@ -42,9 +44,10 @@ public class MonitorScheduledTask { * 实时数据刷新 * @return ReturnT */ - @XxlJob(REAL_TIME_DATA) - //@Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadRealData( String param) { + //@XxlJob(REAL_TIME_DATA) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadRealData() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } @@ -56,9 +59,10 @@ public class MonitorScheduledTask { * 集中监控数据处理 * @return ReturnT */ - @XxlJob(CENTRALIZED_MONITORING) - //@Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadMonitoring(String param) { + //@XxlJob(CENTRALIZED_MONITORING) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadMonitoring() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java index 342847e..ed2e703 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java @@ -33,9 +33,10 @@ public class RealTargetScheduledTask { * @return * @throws Exception */ - @XxlJob(LOAD_EM_INFO) - //@Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadEmInfo(String param) { + //@XxlJob(LOAD_EM_INFO) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadEmInfo() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/AlarmQueryService.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/AlarmQueryService.java index 5b8f793..ff85d1c 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/AlarmQueryService.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/AlarmQueryService.java @@ -16,4 +16,6 @@ public interface AlarmQueryService extends BaseService { List bells(List codes); List aborts(List codes); + + void interruptAlarm(String param); } \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java index fd31272..a922504 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmQueryServiceImpl.java @@ -178,14 +178,23 @@ public class AlarmQueryServiceImpl extends BaseServiceImpl(); } - return alarms.stream().collect(Collectors.groupingBy(AlarmEntity::getStationId)).entrySet().stream().map(entry->{ + return alarms.stream().collect(Collectors.groupingBy(AlarmEntity::getStationId)).values().stream().map(alarmEntities -> { // 站点最近的一条数据中断、数据异常告警 - AlarmEntity alarm = entry.getValue().stream().sorted(Comparator.comparing(AlarmEntity::getCreateTime).reversed()).collect(Collectors.toList()).get(0); + AlarmEntity alarm = alarmEntities.stream().sorted(Comparator.comparing(AlarmEntity::getCreateTime).reversed()).collect(Collectors.toList()).get(0); // 状态为中断 - if(alarm.getAlarmStatus().equals(0)){ + if (alarm.getAlarmStatus().equals(0)) { return alarm.getStationId(); } return ""; }).filter(StringUtil::isBlank).distinct().collect(Collectors.toList()); } + + /** + * 数据中断告警 + * @param param + */ + @Override + public void interruptAlarm(String param) { + + } } \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java index 81b5dae..373edb3 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java @@ -862,7 +862,7 @@ public class ReportServiceImpl implements ReportService { List alarms = this.hz3000Alarm(code,start,end); // FIXME 设备实例:一级告警 // FDP智能预警 - // alarms.addAll(this.intelligentEarly(code,start,end)); + alarms.addAll(this.intelligentEarly(code,start,end)); return JSONObject.toJSONString(alarms); } @@ -904,7 +904,7 @@ public class ReportServiceImpl implements ReportService { StbAnalysisDTO param = new StbAnalysisDTO(); param.setStartTime(LocalDateTime.parse(start,DateUtil.DATETIME_FORMATTER)); param.setEndTime(LocalDateTime.parse(end, DateUtil.DATETIME_FORMATTER)); - param.setStation(code); + param.setStations(Collections.singletonList(code)); param.setPage(0); param.setPageSize(100000); Result> result = soeDataClient.pageStbAnalysis(param); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java index 1653362..d8f3950 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java @@ -5,31 +5,22 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; -import com.hnac.hzims.operational.access.dto.AccessPlanV4DTO; -import com.hnac.hzims.operational.access.dto.OperAccessPlanDTO; -import com.hnac.hzims.operational.access.dto.OperAccessPlanFlowDTO; -import com.hnac.hzims.operational.access.dto.OperAccessPlanListDTO; import com.hnac.hzims.operational.access.entity.OperConstructionEntity; -import com.hnac.hzims.operational.access.service.AccessPlanV4Service; import com.hnac.hzims.operational.access.service.ConstructionService; import com.hnac.hzims.operational.access.vo.ConstructionVo; -import com.hnac.hzims.operational.access.vo.OperAccessPlanVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import javax.validation.constraints.NotNull; -import java.util.Date; /** @@ -48,9 +39,7 @@ public class ConstructionController extends BladeController { @ApiOperationSupport(order = 1) @ApiOperation(value = "新增") public R save(@RequestBody OperConstructionEntity entity) { - entity.setCode("SGRZ" + DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME_MINI)); - entity.setConstructionTime(entity.getOverhaulTime()); - return R.status(service.save(entity)); + return R.status(service.accessSave(entity)); } @PostMapping("/remove") @@ -60,15 +49,22 @@ public class ConstructionController extends BladeController { return R.status(service.deleteLogic(Func.toLongList(ids))); } - @PostMapping("/update") + @GetMapping("/detail") @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情查询") + public R detail(@ApiParam(value = "主键Id", required = true) @RequestParam Long id) { + return R.data(service.getById(id)); + } + + @PostMapping("/update") + @ApiOperationSupport(order = 4) @ApiOperation(value = "修改") public R update(@Valid @RequestBody OperConstructionEntity entity) { return R.status(service.updateById(entity)); } @GetMapping("/list") - @ApiOperationSupport(order = 4) + @ApiOperationSupport(order = 5) @OperationAnnotation(moduleName = "施工日志",title = "施工日志",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, action = "分页查询施工日志") @@ -78,7 +74,7 @@ public class ConstructionController extends BladeController { } @GetMapping("/preview") - @ApiOperationSupport(order = 5) + @ApiOperationSupport(order = 6) @ApiOperation(value = "检修施工日志预览", notes = "检修施工日志预览") public void preview(@RequestParam @ApiParam("检修施工记录Id") @NotNull @Valid Long id) { service.preview(id); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java index a70cedc..575a60a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java @@ -12,6 +12,7 @@ import org.springblade.core.tool.api.R; */ public interface ConstructionService extends BaseService { + boolean accessSave(OperConstructionEntity entity); IPage pageCondition(IPage page, ConstructionVo construction); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java index 33ed9c8..b16da12 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java @@ -4,12 +4,14 @@ import cn.afterturn.easypoi.entity.ImageEntity; import cn.afterturn.easypoi.word.WordExportUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; import com.hnac.hzims.operational.access.entity.OperConstructionEntity; import com.hnac.hzims.operational.access.mapper.ConstructionMapper; import com.hnac.hzims.operational.access.service.ConstructionService; +import com.hnac.hzims.operational.access.service.IOperAccessTaskService; import com.hnac.hzims.operational.access.vo.ConstructionVo; import com.hnac.hzims.operational.util.PdfUtils; -import com.hnac.hzims.operational.util.WordUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; @@ -32,6 +34,7 @@ import java.io.*; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; +import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -43,6 +46,9 @@ import java.util.Map; @RequiredArgsConstructor public class ConstructionServiceImpl extends BaseServiceImpl implements ConstructionService { + + private final IOperAccessTaskService accessTaskService; + @Value("${hzims.operation.construction.save.img}") private String constructionSaveImgPath; @@ -55,6 +61,7 @@ public class ConstructionServiceImpl extends BaseServiceImpl pageCondition(IPage page, ConstructionVo construction) { QueryWrapper wrapper = Condition.getQueryWrapper(construction); + wrapper.orderByDesc("CREATE_TIME"); if(StringUtil.isNotBlank(construction.getStartTime())){ wrapper.ge("CREATE_TIME",construction.getStartTime()); } @@ -105,6 +112,23 @@ public class ConstructionServiceImpl extends BaseServiceImpllambdaUpdate() + .set(OperAccessTaskEntity::getConstructionId,entity.getId()) + .eq(OperAccessTaskEntity::getId,entity.getTaskId()) + ); + } + return true; + } + /** * 查询施工日志记录 * @param id diff --git a/hzims-service/operational/src/main/resources/db/1.0.1.sql b/hzims-service/operational/src/main/resources/db/1.0.1.sql index 962bc44..a981cd1 100644 --- a/hzims-service/operational/src/main/resources/db/1.0.1.sql +++ b/hzims-service/operational/src/main/resources/db/1.0.1.sql @@ -7,3 +7,5 @@ alter table `hzims_oper_maintenance_task` add column `update_user_name` varchar( alter table `hzims_oper_maintenance_plan` add column `disposer_name` varchar(255) comment '执行人姓名'; alter table `hzims_oper_maintenance_plan` add column `create_user_name` varchar(255) comment '创建人姓名'; alter table `hzims_oper_maintenance_plan` add column `update_user_name` varchar(255) comment '更新人姓名'; +-- 日常维护任务添加工作票名称 +alter table `hzims_oper_maintenance_task` add COLUMN `ticket_name` VARCHAR(255) comment '票据名称'; diff --git a/hzims-service/operational/src/main/resources/template/word/constructio_template.docx b/hzims-service/operational/src/main/resources/template/word/constructio_template.docx index c59be0b..5fdb700 100644 Binary files a/hzims-service/operational/src/main/resources/template/word/constructio_template.docx and b/hzims-service/operational/src/main/resources/template/word/constructio_template.docx differ diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarAnnualInspectionService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarAnnualInspectionService.java index 0ed28d1..a1f7099 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarAnnualInspectionService.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarAnnualInspectionService.java @@ -37,4 +37,12 @@ public interface ICarAnnualInspectionService extends IService getCarAnnualInspectionPage(Map param, Query query); + + /** + * 删除关联年检记录 + * @param carId 车辆id + * @return true-成功,false-失败 + */ + boolean removeRelativeCarAnnualInspection(Long carId); + } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarInsuranceService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarInsuranceService.java index d2be60e..4c8405a 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarInsuranceService.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ICarInsuranceService.java @@ -38,4 +38,11 @@ public interface ICarInsuranceService extends IService { * @return 车保记录数据 */ IPage getCarInsurancePage(Map param, Query query); + + /** + * 删除关联车保记录 + * @param carId 车辆id + * @return true-成功,false-失败 + */ + boolean removeRelativeCarInsurance(Long carId); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarAnnualInspectionServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarAnnualInspectionServiceImpl.java index 10be8b6..8f1e765 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarAnnualInspectionServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarAnnualInspectionServiceImpl.java @@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 年检记录服务实现类 @@ -93,6 +94,22 @@ public class CarAnnualInspectionServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(CarAnnualInspectionEntity::getCarId, carId); + List list = this.list(queryWrapper); + // 若无关联年检记录,返回true + if (CollectionUtils.isEmpty(list)) { + return true; + } + List ids = list.stream().map(CarAnnualInspectionEntity::getId).collect(Collectors.toList()); + return this.removeByIds(ids); + } + + /** * 查询是否存在同月编号 * @param currentMonth 当月 * @return 存在则返回上一编号,否则返回null diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarInsuranceServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarInsuranceServiceImpl.java index cd132ef..17ce3bc 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarInsuranceServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarInsuranceServiceImpl.java @@ -21,6 +21,7 @@ import org.springframework.stereotype.Service; import java.util.Date; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 车保记录服务实现类 @@ -55,7 +56,7 @@ public class CarInsuranceServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(CarInsuranceEntity::getCarId, carId); + List list = this.list(queryWrapper); + // 若无关联用车记录,返回true + if (CollectionUtils.isEmpty(list)) { + return true; + } + List ids = list.stream().map(CarInsuranceEntity::getId).collect(Collectors.toList()); + return this.removeByIds(ids); + } + + /** * 查询是否存在同月编号 * @param currentMonth 当月 * @return 存在则返回上一编号,否则返回null diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarServiceImpl.java index df4619c..88a67ed 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarServiceImpl.java @@ -12,12 +12,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hnac.hzims.common.logs.utils.StringUtils; import com.hnac.hzims.safeproduct.dto.CarMilesYearDTO; import com.hnac.hzims.safeproduct.entity.CarEntity; -import com.hnac.hzims.safeproduct.enums.CarMaintenanceStatusEnum; import com.hnac.hzims.safeproduct.mapper.CarMapper; -import com.hnac.hzims.safeproduct.service.ICarCheckRecordService; -import com.hnac.hzims.safeproduct.service.ICarMaintenanceService; -import com.hnac.hzims.safeproduct.service.ICarService; -import com.hnac.hzims.safeproduct.service.ICarUsedRecordService; +import com.hnac.hzims.safeproduct.service.*; import com.hnac.hzims.safeproduct.vo.CarMilesYearVO; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Query; @@ -55,6 +51,12 @@ public class CarServiceImpl extends ServiceImpl implements @Autowired ICarCheckRecordService carCheckRecordService; + @Autowired + ICarInsuranceService carInsuranceService; + + @Autowired + ICarAnnualInspectionService carAnnualInspectionService; + /** * 年度里程数页面 */ @@ -195,15 +197,29 @@ public class CarServiceImpl extends ServiceImpl implements // 删除关联维保记录 boolean removeCarMaintenance = carMaintenanceService.removeRelativeCarMaintenance(id); if (!removeCarMaintenance) { - return false; + throw new ServiceException("关联维保记录删除失败"); } // 删除关联用车记录 boolean removeCarUsedRecord = carUsedRecordService.removeRelativeCarUsedRecord(id); if (!removeCarUsedRecord) { - return false; + throw new ServiceException("关联用车记录删除失败"); } // 删除关联车检记录 - return carCheckRecordService.removeRelativeCarCheckRecord(id); + boolean removeCarCheckRecord = carCheckRecordService.removeRelativeCarCheckRecord(id); + if (!removeCarCheckRecord) { + throw new ServiceException("关联车检记录删除失败"); + } + // 删除关联年检记录 + boolean removeCarAnnualInspection = carAnnualInspectionService.removeRelativeCarAnnualInspection(id); + if (!removeCarAnnualInspection) { + throw new ServiceException("关联年检记录删除失败"); + } + // 删除关联车保记录 + boolean removeCarInsurance = carInsuranceService.removeRelativeCarInsurance(id); + if (!removeCarInsurance) { + throw new ServiceException("关联车保记录删除失败"); + } + return true; } return false; } diff --git a/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql b/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql index 29c9f3e..8d9b1b0 100644 --- a/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql +++ b/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql @@ -98,6 +98,7 @@ CREATE TABLE `hzims_test` ( `subject` varchar(50) NOT NULL COMMENT '考试科目', `proctor` varchar(20) NOT NULL COMMENT '监考人', `people_name` varchar(1000) DEFAULT '' COMMENT '参考人员', + `test_method` varchar(50) NOT NULL COMMENT '考试方式', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '考试图片', `file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '考试附件', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', @@ -208,6 +209,7 @@ CREATE TABLE `hzims_hygiene_record` ( `code` varchar(50) NOT NULL COMMENT '编号', `actual_start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际开始时间', `actual_end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际结束时间', + `check_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '检查时间', `check_user` varchar(20) NOT NULL DEFAULT '' COMMENT '检查人', `hygiene_zone_ids` varchar(1000) NOT NULL COMMENT '卫生自查区域id', `check_result` mediumtext NOT NULL COMMENT '检查结果', @@ -231,16 +233,16 @@ CREATE TABLE `hzims_car` ( `car_type` varchar(50) NOT NULL COMMENT '型号', `plate_number` varchar(50) NOT NULL COMMENT '车牌号', `registration_time` date NOT NULL COMMENT '上牌时间', - `insurance_pay_last_time` date NOT NULL COMMENT '上期缴车保时间', - `insurance_pay_next_time` date NOT NULL COMMENT '下期缴车保时间', - `insurance_status` varchar(50) NOT NULL COMMENT '保险状态', - `last_annual_inspection_time` date NOT NULL COMMENT '上期年检时间', - `next_annual_inspection_time` date NOT NULL COMMENT '下期年检时间', - `annual_inspection_status` varchar(50) NOT NULL COMMENT '年检状态', + `insurance_pay_last_time` date DEFAULT NULL COMMENT '上期缴车保时间', + `insurance_pay_next_time` date DEFAULT NULL COMMENT '下期缴车保时间', + `insurance_status` varchar(50) NOT NULL DEFAULT 'UNINSURED' COMMENT '保险状态', + `last_annual_inspection_time` date DEFAULT NULL COMMENT '上期年检时间', + `next_annual_inspection_time` date DEFAULT NULL COMMENT '下期年检时间', + `annual_inspection_status` varchar(50) NOT NULL DEFAULT 'UNFINISHED' COMMENT '年检状态', `maintenance_last_time` date DEFAULT NULL COMMENT '上期保养时间', `maintenance_next_time` date DEFAULT NULL COMMENT '下期保养时间', `maintenance_mileage` decimal(10, 2) DEFAULT NULL COMMENT '保养里程', - `maintenance_status` varchar(50) DEFAULT NULL COMMENT '保养状态', + `maintenance_status` varchar(50) NOT NULL DEFAULT 'UNMAINTAINED' COMMENT '保养状态', `manager_id` bigint(20) DEFAULT NULL COMMENT '车辆管理人id', `manager` varchar(50) NOT NULL COMMENT '车辆管理人', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '车辆图片', @@ -288,7 +290,7 @@ CREATE TABLE `hzims_car_used_record` ( `unit` varchar(50) NOT NULL COMMENT '用车单位', `used_location` varchar(255) NOT NULL COMMENT '使用地点', `user` varchar(20) NOT NULL COMMENT '使用人', - `remark` mediumtext DEFAULT NULL COMMENT '使用详情', + `remark` mediumtext COMMENT '使用详情', `start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '使用时间', `end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '收车时间', `start_miles` decimal(10, 2) NOT NULL COMMENT '出车公里数', @@ -346,9 +348,8 @@ CREATE TABLE `hzims_car_annual_inspection` ( `car_id` bigint(20) NOT NULL COMMENT '车辆id', `code` varchar(50) NOT NULL COMMENT '编号', `annual_inspection_time` date NOT NULL COMMENT '年检时间', + `next_annual_inspection_time` date NOT NULL COMMENT '下次年检时间', `location` varchar(255) NOT NULL DEFAULT '' COMMENT '年检地点', - `cost` bigint(20) NOT NULL COMMENT '年检费用', - `inspection_manager` varchar(50) NOT NULL DEFAULT '' COMMENT '年检负责人', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '年检图片', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', `create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门', @@ -365,9 +366,8 @@ CREATE TABLE `hzims_car_insurance` ( `car_id` bigint(20) NOT NULL COMMENT '车辆id', `code` varchar(50) NOT NULL COMMENT '编号', `insurance_time` date NOT NULL COMMENT '车保时间', + `next_insurance_time` date NOT NULL COMMENT '下次车保时间', `location` varchar(255) NOT NULL DEFAULT '' COMMENT '车保地点', - `cost` bigint(20) NOT NULL COMMENT '车保费用', - `insurance_manager` varchar(50) NOT NULL DEFAULT '' COMMENT '车保负责人', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '车保图片', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', `create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门', @@ -394,7 +394,25 @@ CREATE TABLE `hzims_device` ( `inspection_last_time` date DEFAULT NULL COMMENT '上次检验日期', `manager_id` bigint(20) DEFAULT NULL COMMENT '设备管理人id', `manager` varchar(50) NOT NULL DEFAULT '' COMMENT '设备管理人', - `device_status` varchar(20) NOT NULL DEFAULT 'NORMAL' COMMENT '设备状态', + `device_status` varchar(20) NOT NULL DEFAULT 'EXPIRED' COMMENT '设备状态', + `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', + `create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_user` bigint(20) DEFAULT '-1' COMMENT '更新人', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', + `status` int(2) NOT NULL DEFAULT '1' COMMENT '状态', + `is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='特种设备表' ROW_FORMAT=Dynamic; + +CREATE TABLE `hzims_device_inspection` ( + `id` bigint(20) NOT NULL COMMENT '主键id', + `device_id` bigint(20) NOT NULL COMMENT '设备id', + `inspection_time` date NOT NULL COMMENT '设备检验时间', + `last_inspection_time` date NOT NULL COMMENT '上次检验时间', + `next_inspection_time` date NOT NULL COMMENT '下次检验时间', + `location` varchar(255) NOT NULL DEFAULT '' COMMENT '设备检验地点', + `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '设备检验图片', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', `create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java index 90f1657..898d46f 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java @@ -36,8 +36,8 @@ public class WorkTaskController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 1) @ApiOperation(value = "分页") - public R> list(WorkTaskVO workTask, Query query) { - return R.data(workTaskService.workTaskService(Condition.getPage(query), workTask)); + public R> pageCondition(WorkTaskVO workTask, Query query) { + return R.data(workTaskService.pageCondition(Condition.getPage(query), workTask)); } @GetMapping("/detail") diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java index 119bdf0..6db49f1 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java @@ -19,7 +19,7 @@ public interface IWorkTaskService extends BaseService { boolean listener(ProcessWorkFlowResponse processWorkFlowResponse); - IPage workTaskService(IPage page, WorkTaskVO workTask); + IPage pageCondition(IPage page, WorkTaskVO workTask); void preview(Long id); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java index 9fb5eb9..d6ef6df 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java @@ -48,6 +48,7 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.*; +import java.util.stream.Collectors; /** * @author ysj @@ -165,22 +166,26 @@ public class WorkTaskServiceImpl extends BaseServiceImpl workTaskService(IPage page, WorkTaskVO workTask) { - QueryWrapper wrapper = Condition.getQueryWrapper(workTask); + public IPage pageCondition(IPage page, WorkTaskVO workTask) { + QueryWrapper wrapper = new QueryWrapper(); + wrapper.lambda().orderByDesc(WorkTaskEntity::getCreateTime); if(StringUtil.isNotBlank(workTask.getStartTime())){ - wrapper.ge("CREATE_TIME",workTask.getStartTime()); + wrapper.lambda().ge(WorkTaskEntity::getCreateTime,workTask.getStartTime()); } if(StringUtil.isNotBlank(workTask.getEndTime())){ - wrapper.le("CREATE_TIME",workTask.getEndTime()); + wrapper.lambda().le(WorkTaskEntity::getCreateTime,workTask.getEndTime()); } if(ObjectUtil.isNotEmpty(workTask.getGroupId())){ - wrapper.eq("GROUP_ID",workTask.getGroupId()); + wrapper.lambda().eq(WorkTaskEntity::getGroupId,workTask.getGroupId()); } - if(ObjectUtil.isNotEmpty(workTask.getGroupId())){ - wrapper.eq("CREATE_DEPT",workTask.getDeptId()); + if(ObjectUtil.isNotEmpty(workTask.getGroupName())){ + wrapper.lambda().like(WorkTaskEntity::getGroupName,workTask.getGroupName()); + } + if(ObjectUtil.isNotEmpty(workTask.getDeptId())){ + wrapper.lambda().eq(WorkTaskEntity::getCreateDept,workTask.getDeptId()); } if(ObjectUtil.isNotEmpty(workTask.getTaskName())){ - wrapper.eq("TASK_NAME",workTask.getTaskName()); + wrapper.lambda().eq(WorkTaskEntity::getTaskName,workTask.getTaskName()); } return super.page(page, wrapper); } @@ -246,13 +251,7 @@ public class WorkTaskServiceImpl extends BaseServiceImpl contents = JSONObject.parseObject(preview.getWorkTask(), new TypeReference>() {}); if(CollectionUtil.isNotEmpty(contents)){ - StringBuilder location = new StringBuilder(),content = new StringBuilder(); - for(WorkTaskContentVO item : contents){ - location.append(item.getLocation()).append("\n"); - content.append(item.getContent()).append("\n"); - } - preview.setLocation(location.substring(0,location.toString().length() - 1)); - preview.setContent(content.substring(0,location.toString().length() - 1)); + preview.setContents(contents); } } // 计划工作时间 diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java index b83958b..6dfc999 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java @@ -65,9 +65,6 @@ public class CensServiceImpl implements CensService { if(StringUtil.isEmpty(param.getEndTime())){ param.setStartTime(DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME)); } - if(!StringUtil.isEmpty(param.getState()) && param.getState().equals(1)){ - param.setFlowTaskName("结束"); - } // 获取权限区域机构 List depts; @@ -87,8 +84,12 @@ public class CensServiceImpl implements CensService { // 操作票查询 QueryWrapper wrapper = new QueryWrapper(); - if(!StringUtil.isEmpty(param.getFlowTaskName())){ - wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName()); + if(!StringUtil.isEmpty(param.getState())){ + if(param.getState().equals(1)){ + wrapper.eq("FLOW_TASK_NAME","结束"); + }else{ + wrapper.ne("FLOW_TASK_NAME","结束"); + } } if(!StringUtil.isEmpty(param.getStartTime())){ wrapper.ge("CREATE_TIME",param.getStartTime()); @@ -104,7 +105,6 @@ public class CensServiceImpl implements CensService { List operates = operateTicketService.list(wrapper); // 工作票查询 List works = workTicketInfoService.list(wrapper); - // 工作任务单 return depts.stream().map(dept->{ CensVo cens = new CensVo(); cens.setDeptId(dept.getId()); @@ -119,7 +119,6 @@ public class CensServiceImpl implements CensService { }else{ cens.setWorkCount(works.stream().filter(work->work.getCreateDept().equals(dept.getId())).count()); } - cens.setWorkTaskCount((long)new Random().nextInt(10)); return cens; }).collect(Collectors.toList()); } @@ -153,9 +152,6 @@ public class CensServiceImpl implements CensService { param.setEndTime(param.getYear() + "-12-31 23:59:59"); } - if(!StringUtil.isEmpty(param.getState()) && param.getState().equals(1)){ - param.setFlowTaskName("结束"); - } List depts; if(ObjectUtil.isEmpty(param.getDeptId())){ // 获取权限区域机构 @@ -173,8 +169,12 @@ public class CensServiceImpl implements CensService { // 操作票查询 QueryWrapper wrapper = new QueryWrapper(); - if(!StringUtil.isEmpty(param.getFlowTaskName())){ - wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName()); + if(!StringUtil.isEmpty(param.getState())){ + if(param.getState().equals(1)){ + wrapper.eq("FLOW_TASK_NAME","结束"); + }else{ + wrapper.ne("FLOW_TASK_NAME","结束"); + } } if(!StringUtil.isEmpty(param.getStartTime())){ wrapper.ge("CREATE_TIME",param.getStartTime()); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java index 61267e1..490b280 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java @@ -122,7 +122,7 @@ public class PdfUtils { } //若为list则不处理 if (value instanceof List) { - return; + value = ((List) value).stream().map(PdfUtils::objectToMap).collect(Collectors.toList()); } //若为时间格式则进行格式化 if (value instanceof LocalDateTime) { diff --git a/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx b/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx index 94a3714..c79f0f5 100644 Binary files a/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx and b/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx differ