From f8e2765509aed55d0bfe838d0dcf81dcdf3bf9c0 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 5 Mar 2024 17:32:43 +0800 Subject: [PATCH 1/5] =?UTF-8?q?#=20=E6=9C=BA=E6=9E=84=E7=8F=AD=E6=AC=A1?= =?UTF-8?q?=E6=A0=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintenance/entity/OperMaintenanceLibraryEntity.java | 2 ++ .../java/com/hnac/hzims/operational/config/Swagger2Config.java | 4 ++-- .../config/controller/CentralMonitorController.java | 2 ++ .../operational/config/controller/StAlamRecordController.java | 2 +- .../config/controller/StFocusPropertiesController.java | 2 +- .../operational/duty/service/impl/ImsDutyClassServiceImpl.java | 10 ++++++---- .../maintenance/controller/MaintenanceController.java | 2 ++ hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 | 4 +++- 8 files changed, 19 insertions(+), 9 deletions(-) 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/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java index 18d9559..971515b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java @@ -20,8 +20,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; * @Serial 1.0 * @Date 2023/4/13 13:40 */ -@Configuration -@EnableSwagger2 +//@Configuration +//@EnableSwagger2 public class Swagger2Config implements WebMvcConfigurer { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java index afea65f..90a1dc8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java @@ -48,6 +48,8 @@ public class CentralMonitorController extends BladeController { * @return */ @GetMapping("/selectCommunication/{page}/{size}") + @ApiOperation("查询通讯告警的最后一小时的运行数据") + @ApiOperationSupport(order = 2) public R selectCommunication(@PathVariable Integer page, @PathVariable Integer size, String roleId, diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java index 545f561..48d89e4 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java @@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*; import java.util.Date; -@Api(tags = "告警记录") +@Api(value = "告警记录",tags = "告警记录") @RestController @RequestMapping("/stAlamRecord") public class StAlamRecordController { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java index d4324cd..5f4e853 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java @@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -@Api(tags = "重点关注属性") +@Api(value = "重点关注属性",tags = "重点关注属性") @RestController @RequestMapping("/stFocusProperties") public class StFocusPropertiesController { 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 a923cc2..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 @@ -12,10 +12,12 @@ 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; @@ -113,10 +115,10 @@ public class ImsDutyClassServiceImpl extends BaseServiceImpl getDutyClassTree(Long deptId) { List dutyClassTrees = this.baseMapper.getDutyClassTree(deptId); - dutyClassTrees.forEach(node -> { - node.setName(Optional.ofNullable(sysClient.getDeptName(node.getId())).map(R::getData).orElse(null)); - }); - return dutyClassTrees; + 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/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/resources/db/4.0.0 .sql.1 b/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 index 94cf96e..5ad9b92 100644 --- a/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 +++ b/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 @@ -30,4 +30,6 @@ CREATE TABLE `HZIMS_OPER_CONSTRUCTION` ( `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人', `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`ID`) USING BTREE -) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC; \ No newline at end of file +) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC; + +alter table `hzims_oper_maintenance_library` add column `duty_class_tree` VARCHAR(100) NULL COMMENT '班次树,机构/班次类型/班次'; \ No newline at end of file From 84115472a6e4cff9004a89739c4f7f7eaa986b67 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Tue, 5 Mar 2024 18:28:49 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=89=A9?= =?UTF-8?q?=E8=B5=84=E5=BA=93=E5=AD=98=E5=8F=B0=E8=B4=A6=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E7=A9=BA=E6=A8=A1=E6=9D=BF=E6=8A=A5=E9=94=99=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=EF=BC=9A=E5=87=BA=E5=BA=93=E5=8D=95=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/spare/vo/SpWarehouseExportVO.java | 61 ++++++++++++++++++++++ .../spare/controller/SpWarehouseOutController.java | 52 ++++++++++++++++++ .../hzims/spare/mapper/SpWarehouseOutMapper.java | 3 ++ .../hzims/spare/mapper/SpWarehouseOutMapper.xml | 47 +++++++++++++++++ .../spare/service/ISpWarehouseOutService.java | 8 +++ .../service/impl/SpWarehouseOutServiceImpl.java | 58 +++++++++++++++++++- .../spare/service/impl/WtSpBasicServiceImpl.java | 8 ++- 7 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/vo/SpWarehouseExportVO.java diff --git a/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/vo/SpWarehouseExportVO.java b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/vo/SpWarehouseExportVO.java new file mode 100644 index 0000000..b7df03d --- /dev/null +++ b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/vo/SpWarehouseExportVO.java @@ -0,0 +1,61 @@ +package com.hnac.hzims.spare.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.hnac.hzims.spare.entity.SpWarehouseOutEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; +import java.util.List; + +/** + * 模型VO + * + * @author Chill + */ +@Data +public class SpWarehouseExportVO { + + private static final long serialVersionUID = 1L; + /** + * 单据号 + */ + @ColumnWidth(25) + @ExcelProperty(value = "单据编码", index = 0) + @ApiModelProperty(value = "单据号") + private String code; + + /** + * 仓库名称 + */ + @ColumnWidth(20) + @ExcelProperty(value = "出库库房", index = 1) + @ApiModelProperty(value = "仓库名称") + private String warehouseName; + /** + * 出库类型名称 + */ + @ColumnWidth(20) + @ExcelProperty(value = "出库类型", index = 2) + @ApiModelProperty(value = "出库类型名称") + private String typeName; + /** + * 用户名称 + */ + @ColumnWidth(20) + @ExcelProperty(value = "领用人", index = 3) + @ApiModelProperty(value = "用户名称") + private String userName; + + @DateTimeFormat( + pattern = "yyyy-MM-dd HH:mm:ss" + ) + @ColumnWidth(20) + @ExcelProperty(value = "出库时间", index = 4) + @ApiModelProperty("创建时间") + private String createTime; + +} diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java index 8c61f78..aa98038 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java @@ -1,5 +1,6 @@ package com.hnac.hzims.spare.controller; +import com.alibaba.excel.EasyExcel; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; @@ -7,20 +8,33 @@ import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzims.spare.entity.SpWarehouseOutEntity; import com.hnac.hzims.spare.service.ISpWarehouseOutService; +import com.hnac.hzims.spare.vo.SpWarehouseExportVO; import com.hnac.hzims.spare.vo.SpWarehouseOutVO; +import com.hnac.hzims.vo.VoteChartVo; 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.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.ObjectUtil; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.io.IOException; +import java.net.URLEncoder; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; /** @@ -62,6 +76,44 @@ public class SpWarehouseOutController extends BladeController { return R.data(pages); } /** + * 分页 代码自定义代号 + */ + @ApiLog + @GetMapping("/exportList") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入sp_warehouse_out") + @OperationAnnotation(moduleName = "资产管理",title = "出库单",operatorType = OperatorType.MOBILE,businessType = + BusinessType.GENCODE, + action = "导出出库单列表") + public void exportList(HttpServletResponse response, SpWarehouseOutVO warehouseOutVO) { + if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){ + throw new ServiceException("暂无权限查看,请稍后重试"); + } + List outVOList=sp_warehouse_outService.exportList(warehouseOutVO); + List list = outVOList.stream().map(s -> { + SpWarehouseExportVO spWarehouseExportVO = new SpWarehouseExportVO(); + BeanUtil.copy(s, spWarehouseExportVO); + spWarehouseExportVO.setCreateTime(DateUtil.formatDateTime(s.getCreateTime())); + return spWarehouseExportVO; + }).collect(Collectors.toList()); + String nowTime = DateUtil.formatDateTime(new Date()); + // 下载导出 + String filename = nowTime +"出库单"; + // 设置头信息 + response.setCharacterEncoding("UTF-8"); + response.setContentType("application/vnd.ms-excel"); + try { + //设置xlsx格式 + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename + ".xlsx", "UTF-8")); + //创建一个输出流 + EasyExcel.write(response.getOutputStream(), SpWarehouseExportVO.class).autoCloseStream(Boolean.TRUE).sheet(1,"出库单") + .doWrite(list); + response.getOutputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + /** * 工单预警 */ @GetMapping("/warnList") diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.java index b43a9bc..78bb951 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.spare.entity.SpWarehouseOutEntity; import com.hnac.hzims.spare.vo.SpWarehouseOutVO; +import feign.Param; import org.springblade.core.datascope.annotation.UserDataAuth; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; @@ -26,6 +27,8 @@ public interface SpWarehouseOutMapper extends UserDataScopeBaseMapper selectPageList(IPage page, Map params); +// @UserDataAuth + List selectListByCondition( Map params); /** * 根据工单ID查询出库单编码 * @param ticketId diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml index d3349a8..8c384e0 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml @@ -76,6 +76,53 @@ order by wo.CREATE_TIME desc + + diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/ISpWarehouseOutService.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/ISpWarehouseOutService.java index ab86be7..3ac2520 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/ISpWarehouseOutService.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/ISpWarehouseOutService.java @@ -6,6 +6,8 @@ import com.hnac.hzims.spare.vo.SpWarehouseOutVO; import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.support.Query; +import java.util.List; + /** * 服务类 * @@ -43,6 +45,12 @@ public interface ISpWarehouseOutService extends BaseService selectPageList(IPage page, SpWarehouseOutVO warehouseOutVO) ; + /** + * 导出列表 + * @param warehouseOutVO + * @return + */ + List exportList( SpWarehouseOutVO warehouseOutVO) ; /** * 修改状态 diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java index 0639864..df050df 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java @@ -277,7 +277,6 @@ public class SpWarehouseOutServiceImpl extends BaseServiceImpl selectPageList(IPage page, SpWarehouseOutVO warehouseOutVO) { Map params = new HashMap<>(); @@ -328,6 +327,63 @@ public class SpWarehouseOutServiceImpl extends BaseServiceImpl exportList( SpWarehouseOutVO warehouseOutVO) { + Map params = new HashMap<>(); + if(null !=warehouseOutVO.getCode()){ + params.put("code",warehouseOutVO.getCode()); + } + if(null !=warehouseOutVO.getType()){ + params.put("type",warehouseOutVO.getType()); + } + if(null !=warehouseOutVO.getStatus()){ + params.put("status",warehouseOutVO.getStatus()); + } + if(null !=warehouseOutVO.getStartDate()){ + params.put("startDate",warehouseOutVO.getStartDate()); + } + if(null !=warehouseOutVO.getEndDate()){ + params.put("endDate",warehouseOutVO.getEndDate()); + } + List longList = new ArrayList<>(); + if(null!=warehouseOutVO.getDeptId()){ + R> deptList = sysClient.getDeptChild(warehouseOutVO.getDeptId()); + for (int i = 0; i < deptList.getData().size(); i++) { + longList.add(deptList.getData().get(i).getId()); + } + longList.add(warehouseOutVO.getDeptId()); + }else{ +// longList = personClient.getShuiChangId(AuthUtil.getDeptId()); + } + if(longList.size()>0){ + params.put("deptList",longList); + } + if(null!=warehouseOutVO.getStorageRoom()){ + params.put("warehouseId",warehouseOutVO.getStorageRoom()); + } + params.put("tenantId", AuthUtil.getTenantId()); + Query query = new Query(); + query.setCurrent(0); + query.setSize(100); + List list = baseMapper.selectListByCondition(params); + List result = new ArrayList<>(); + for (int i = 0; i < list.size(); i++) { + SpWarehouseOutVO entity = list.get(i); + if(null!=entity.getCreateUser()){ + R user = userClient.userInfoById(entity.getCreateUser()); + if(null!=user.getData()){ + entity.setUserName(user.getData().getName()); + } + } + if(null!=entity.getType()){ + WarehouseOutType typeName = WarehouseOutType.getTypeName(entity.getType().intValue()); + entity.setTypeName(typeName.getName()); + } + result.add(entity); + } + return result; + } + public synchronized boolean updateStatus(SpWarehouseOutEntity warehouseOutEntity) { warehouseOutEntity.setStatus(3); Map params = new HashMap<>(); diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java index 86f64bd..a166dff 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java @@ -59,6 +59,7 @@ import org.springframework.util.CollectionUtils; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceException; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -539,9 +540,9 @@ public class WtSpBasicServiceImpl extends BaseServiceImpl data = new ArrayList<>(); data = JSONArray.parseArray(JSON.toJSONString(entityList), WtSpBasicEntity.class).stream() .filter(entity -> Func.isNotEmpty(entity.getCode())).collect(Collectors.toList()); From 2423a317772a041ca7db37167593174c6985f790 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Tue, 5 Mar 2024 19:03:37 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml index 8c384e0..cbb373b 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/mapper/SpWarehouseOutMapper.xml @@ -118,7 +118,7 @@ - and wo.STORAGE_ROOM = #{params.warehouseId} + and wo.STORAGE_ROOM = #{warehouseId} order by wo.CREATE_TIME desc From be037095e67d7eafc323e809f95307a5d11b58b9 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 6 Mar 2024 09:15:44 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Afdp=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E8=AF=8A=E6=96=AD=E4=BC=98=E5=85=88=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hnac/hzims/fdp/scheduled/ThreadTask.java | 2 +- .../java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/scheduled/ThreadTask.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/scheduled/ThreadTask.java index f6fe355..28ab7a8 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/scheduled/ThreadTask.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/scheduled/ThreadTask.java @@ -209,7 +209,7 @@ public class ThreadTask { diagnoseFaultReq.setFaultId(req.getFaultId()); diagnoseFaultReq.setConfidence(1.0); diagnoseFaultReq.setLifeTime(24*3);//设置有效期3天 - diagnoseFaultReq.setPriority(-1); + diagnoseFaultReq.setPriority(0); diagnoseFaultReq.setTenantId(req.getStation()); diagnoseFaultReq.setCreateUser(ObjectUtil.isEmpty(AuthUtil.getUser()) ? "告警推送" : AuthUtil.getUser().getUserName()); faultAllReq.setManualData(diagnoseFaultReq); diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java index b1fabda..7ac1019 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java @@ -588,7 +588,7 @@ public class FdpMonitorServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); // wrapper.eq(FdpFaultEntity::getFdpId, diagnoseFaultReq.getFaultId()).last("limit 1"); From 76f418b47f8d2daba7b235e7b167ba6dd900ac04 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Wed, 6 Mar 2024 09:43:15 +0800 Subject: [PATCH 5/5] =?UTF-8?q?#=20=E8=A7=A3=E5=86=B3=E6=97=A5=E5=B8=B8?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E4=BB=BB=E5=8A=A1=E5=88=A0=E9=99=A4=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=B5=8B=E5=80=BC=E4=BB=BB=E5=8A=A1=E9=80=BE=E6=9C=9F?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintenance/scheduled/MaintenanceTaskRemindHandler.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java index 4ae4917..caf12ae 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java @@ -16,10 +16,7 @@ import com.xxl.job.core.log.XxlJobLogger; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.CollectionUtil; -import org.springblade.core.tool.utils.DateUtil; -import org.springblade.core.tool.utils.StringUtil; +import org.springblade.core.tool.utils.*; import org.springblade.system.feign.ISysClient; import org.springblade.system.user.entity.User; import org.springblade.system.user.feign.IUserClient; @@ -52,7 +49,7 @@ public class MaintenanceTaskRemindHandler { if(CollectionUtil.isNotEmpty(taskEntitySet)) { taskEntitySet.forEach(operMaintenanceTaskEntity -> { OperMaintenanceTaskEntity taskEntity = taskService.getById(operMaintenanceTaskEntity.getId()); - if(StringUtil.isBlank(taskEntity.getFlowTaskName())) { + if(ObjectUtil.isNotEmpty(taskEntity) || StringUtil.isBlank(taskEntity.getFlowTaskName())) { redisTemplate.opsForZSet().remove(RedisKeyConstants.REMIND_TASK_END_LIST,operMaintenanceTaskEntity); } //如果任务仍在待执行则自动结束