diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/DutyClassTypeTree.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/DutyClassTypeTree.java new file mode 100644 index 0000000..ce95232 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/DutyClassTypeTree.java @@ -0,0 +1,29 @@ +package com.hnac.hzims.operational.duty.vo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.hnac.hzims.common.pojo.Tree; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +@ApiModel(value = "机构-值班班次类型-班次树",description = "机构-值班班次类型-班次树") +public class DutyClassTypeTree implements Tree { + @ApiModelProperty("树ID") + private Long id; + + @ApiModelProperty("父节点树ID") + @JsonIgnore + private Long parentId; + + @ApiModelProperty("节点名称") + private String name; + + @ApiModelProperty("子节点") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/OtherEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/OtherEntity.java index 0e77a08..2c80179 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/OtherEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/fill/entity/OtherEntity.java @@ -6,13 +6,19 @@ import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; +/** + * @author ysj + */ +@EqualsAndHashCode(callSuper = true) @Data @TableName("hzims_fill_other") @ApiModel(value="OverOtherEntity对象", description="其他填报") @@ -37,7 +43,7 @@ public class OtherEntity extends TenantEntity implements Serializable { private Date endDate; @ApiModelProperty("FA_投入条数") - private Integer faQuantity; + private Long faQuantity; @ApiModelProperty("设备在线率") private String onlineRate; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java index 71054f0..fdd0378 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java @@ -132,4 +132,6 @@ public class OperMaintenanceLibraryEntity extends TenantEntity { @QueryField(condition = SqlCondition.LIKE) private Long createDept; + @ApiModelProperty("班次树,机构-班次类型-班次") + private String dutyClassTree; } diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SystemFileEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SystemFileEntity.java index f88a16e..757a635 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SystemFileEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SystemFileEntity.java @@ -50,4 +50,7 @@ public class SystemFileEntity extends TenantEntity { @ApiModelProperty(value = "工作流ID") private String flowId; + @ApiModelProperty("创建人") + private Long createUser; + } 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 dbcd506..a11c587 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 @@ -186,6 +186,6 @@ public class AlarmQueryServiceImpl extends BaseServiceImpl> getDutyClassTree(@RequestParam(required = false) @ApiParam(value = "机构id") Long deptId) { + return R.data(imsDutyClassService.getDutyClassTree(deptId)); + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.java index 5a5771a..fc302a5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.java @@ -1,5 +1,7 @@ package com.hnac.hzims.operational.duty.mapper; +import com.hnac.hzims.common.pojo.Tree; +import com.hnac.hzims.operational.duty.vo.DutyClassTypeTree; import org.apache.ibatis.annotations.Param; import org.springblade.core.datascope.annotation.UserDataAuth; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; @@ -32,4 +34,10 @@ public interface ImsDutyClassMapper extends UserDataScopeBaseMapper getDutyClassTree(@Param("deptId")Long deptId); + + List getDutyClassByType(@Param("class_type_id") Long classTypeId); + + List getDutyClassTypeByDept(@Param("create_dept") Long deptId); + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.xml index a264c2a..8a6e138 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyClassMapper.xml @@ -17,6 +17,23 @@ + + + + + + + + + + + + + + + + + ID, TENANT_ID,CLASS_TYPE_ID,CLASS_NAME, START_TIME, END_TIME, CREATE_TIME, UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_DELETED,STATUS,CREATE_DEPT @@ -75,4 +92,29 @@ and CLASS_TYPE_ID <> #{classTypeId} + + + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyClassService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyClassService.java index 76c7d53..9a502aa 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyClassService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyClassService.java @@ -1,6 +1,8 @@ package com.hnac.hzims.operational.duty.service; +import com.hnac.hzims.common.pojo.Tree; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; +import com.hnac.hzims.operational.duty.vo.DutyClassTypeTree; import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; @@ -32,6 +34,6 @@ public interface IImsDutyClassService extends BaseService { R typeRemove(Long classTypeId); - + List getDutyClassTree(Long deptId); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java index cb31c38..4f6e03f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java @@ -1,19 +1,25 @@ package com.hnac.hzims.operational.duty.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.hnac.hzims.common.pojo.Tree; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.mapper.ImsDutyClassMapper; import com.hnac.hzims.operational.duty.mapper.ImsDutyMainMapper; import com.hnac.hzims.operational.duty.service.IImsDutyClassService; +import com.hnac.hzims.operational.duty.vo.DutyClassTypeTree; import org.apache.commons.lang3.StringUtils; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; +import org.springblade.core.tool.utils.Func; +import org.springblade.system.feign.ISysClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Comparator; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; /** @@ -25,7 +31,9 @@ import java.util.stream.Collectors; public class ImsDutyClassServiceImpl extends BaseServiceImpl implements IImsDutyClassService { @Autowired - private ImsDutyMainMapper imsDutyMainMapper; + private ImsDutyMainMapper imsDutyMainMapper; + @Autowired + private ISysClient sysClient; @Override public R saveOrUpdateImsDutyClass(ImsDutyClassEntity imsDutyClass) { if (null == imsDutyClass.getClassTypeId()) { @@ -104,4 +112,13 @@ public class ImsDutyClassServiceImpl extends BaseServiceImpl getDutyClassTree(Long deptId) { + List dutyClassTrees = this.baseMapper.getDutyClassTree(deptId); + List result = dutyClassTrees.stream().peek(node -> node.setName(Optional.ofNullable(sysClient.getDeptName(node.getId())).map(R::getData).orElse(null))) + .filter(t -> Func.isNotEmpty(t.getName())) + .sorted(Comparator.comparing(DutyClassTypeTree::getName)).collect(Collectors.toList()); + return result; + } + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java index 3463168..f83a10c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java @@ -284,20 +284,16 @@ public class GenerateServiceImpl extends BaseServiceImpl days(Date date) { List list = new ArrayList<>(); - // 结束日期 - Calendar endCal = Calendar.getInstance(); - endCal.setTime(new Date()); - endCal.add(Calendar.MONTH, -endCal.get(Calendar.MONTH) + 1); - endCal.add(Calendar.DATE, -endCal.get(Calendar.DATE) + 1); - - // 开始日期 - Calendar startCal = Calendar.getInstance(); - startCal.setTime(new Date()); - startCal.add(Calendar.DATE, -startCal.get(Calendar.DATE) + 1); - // 获取日期之间的月份 - while (endCal.after(startCal)) { - list.add(DateUtil.format(startCal.getTime(),DateUtil.PATTERN_DATE)); - startCal.add(Calendar.DAY_OF_MONTH, 1); + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.MONTH, 1); + calendar.add(Calendar.DAY_OF_MONTH, -calendar.get(Calendar.DAY_OF_MONTH) + 1); + Date end = calendar.getTime(); + calendar.add(Calendar.MONTH, -1); + Date start = calendar.getTime(); + while (start.compareTo(end) < 0){ + list.add(DateUtil.format(start,DateUtil.PATTERN_DATE)); + calendar.add(Calendar.DAY_OF_MONTH, 1); + start = calendar.getTime(); } return list; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java index d845d0f..8bc2c87 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java @@ -3,6 +3,7 @@ package com.hnac.hzims.operational.maintenance.controller; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.service.MaintenanceService; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; @@ -25,6 +26,7 @@ import java.util.List; @RequiredArgsConstructor @RestController @RequestMapping("/maintenance") +@Api(value = "日常维护管理",tags = "日常维护管理") public class MaintenanceController { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java index 55fd3cb..25fb744 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java @@ -144,10 +144,10 @@ public class OperMaintenanceTaskServiceImpl extends BaseServiceImpl - + + + + + @@ -38,16 +41,16 @@ - - + + - - + + - - + + @@ -55,4 +58,4 @@ - + \ No newline at end of file diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java index 31ac092..b0aade8 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java @@ -258,7 +258,7 @@ public class WorkTicketInfoController { } /** - * 获取工作票台账 + * 获取工作票台账、 */ @ApiLog @GetMapping("/getWorkTicketBill")