diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/DevModelFeignClient.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/DevModelFeignClient.java index 1896efdc7..12d2496f6 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/DevModelFeignClient.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/DevModelFeignClient.java @@ -11,8 +11,6 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; -import java.util.List; - /** * @author xy */ @@ -23,6 +21,6 @@ public interface DevModelFeignClient { @PostMapping("/addDevModel") HttpResult addDevModel(@RequestBody @Validated CsDevModelAddParm csDevModelAddParm); - @PostMapping("/queryEquipmentByProject") - HttpResult> queryEquipmentByProject(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm); + @PostMapping("/queryDevModelOne") + HttpResult queryDevModelOne(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm); } diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/fallback/DevModelFeignClientFallbackFactory.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/fallback/DevModelFeignClientFallbackFactory.java index 09cd656d0..d3e24b9c1 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/fallback/DevModelFeignClientFallbackFactory.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/fallback/DevModelFeignClientFallbackFactory.java @@ -1,16 +1,14 @@ package com.njcn.algorithm.api.fallback; import com.njcn.algorithm.api.DevModelFeignClient; -import com.njcn.algorithm.api.EquipmentFeignClient; import com.njcn.algorithm.pojo.param.CsDevModelAddParm; import com.njcn.algorithm.pojo.param.CsDevModelQueryListParm; import com.njcn.algorithm.pojo.vo.CsDevModelPageVO; -import com.njcn.algorithm.pojo.vo.CsEquipmentDeliveryVO; import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.response.HttpResult; +import feign.hystrix.FallbackFactory; import lombok.extern.slf4j.Slf4j; -import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; import java.util.List; @@ -43,7 +41,7 @@ public class DevModelFeignClientFallbackFactory implements FallbackFactory> queryEquipmentByProject(CsDevModelQueryListParm csDevModelQueryListParm) { + public HttpResult queryDevModelOne(CsDevModelQueryListParm csDevModelQueryListParm) { log.error("{}异常,降级处理,异常为:{}","查询模板版本信息",cause.toString()); throw new BusinessException(finalExceptionEnum); } diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java index ecb2bcf46..000e18cba 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java @@ -27,6 +27,10 @@ public class CsDevModelAddParm { @ApiModelProperty(value = "装置型号") private String devType; + + @ApiModelProperty(value = "模板名称") + private String name; + /** * 版本号 */ @@ -37,8 +41,8 @@ public class CsDevModelAddParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java index e7a83e28d..f85358e39 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java @@ -28,7 +28,8 @@ public class CsDevModelAuditParm { */ @ApiModelProperty(value = "装置型号") private String devType; - + @ApiModelProperty(value = "模板名称") + private String name; /** * 版本号 */ @@ -39,8 +40,8 @@ public class CsDevModelAuditParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java index a61300a9e..64d0c377d 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java @@ -23,22 +23,33 @@ public class CsDevModelQueryListParm { /** * 装置型号(字典数据) */ - @ApiModelProperty(value = "装置型号") + @ApiModelProperty(value = "装置模板型号") private String devType; + + @ApiModelProperty(value = "装置模板型号名称") + private String devName; + @ApiModelProperty(value = "模板名称") + private String name; + @ApiModelProperty(value = "版本号") private String versionNo; - /** - * 版本日期 - */ - @ApiModelProperty(value = "版本日期") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @DateTimeFormat(pattern="yyyy-MM-dd") - private String versionStartDate; +// /** +// * 版本日期 +// */ +// @ApiModelProperty(value = "版本日期") +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// private String versionStartDate; +// +// @ApiModelProperty(value = "版本日期") +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") +// private String versionEndDate; - @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - private String versionendDate; + @ApiModelProperty(value = "版本准确日期") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private String versionDate; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java index cc535e912..20a97734e 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java @@ -33,24 +33,25 @@ public class CsDevModelQueryParm { /** * 装置型号(字典数据) */ - @ApiModelProperty(value = "装置型号") + @ApiModelProperty(value = "装置模板型号") private String devType; - @ApiModelProperty(value = "装置名称") + @ApiModelProperty(value = "装置模板型号名称") private String devName; - + @ApiModelProperty(value = "模板名称") + private String name; /** * 版本日期 */ @ApiModelProperty(value = "版本日期") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @DateTimeFormat(pattern="yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private String versionStartDate; @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - private String versionendDate; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private String versionEndDate; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java index 1207b04b7..78f5f7aca 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java @@ -41,4 +41,5 @@ public class CsDictAddParm { @ApiModelProperty(value = "sort") private Integer sort; + } \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java index 46f01eecb..db4cfaea8 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java @@ -50,8 +50,8 @@ public class CsEdDataAddParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java index 4a722abe3..ee922c83b 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java @@ -47,8 +47,8 @@ public class CsEdDataAuditParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private LocalDate versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java index 739b19580..b2fda15c1 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java @@ -43,13 +43,13 @@ public class CsEdDataQueryParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @DateTimeFormat(pattern="yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private String versionStartDate; @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private String versionendDate; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEngineeringQueryPageParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEngineeringQueryPageParm.java new file mode 100644 index 000000000..e061bacd3 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEngineeringQueryPageParm.java @@ -0,0 +1,49 @@ +package com.njcn.algorithm.pojo.param; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +/** + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/10 19:47【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEngineeringQueryPageParm { + + @NotNull(message="当前页不能为空!") + @Min(value = 1, message = "当前页不能为0") + @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true) + private Integer currentPage; + /**显示条数*/ + @NotNull(message="显示条数不能为空!") + @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true) + private Integer pageSize; + @ApiModelProperty(value = "工程名称") + private String name; + + /** + * 用户id + */ + @ApiModelProperty(value = "用户id") + private String userId; + + /** + * 省 + */ + @ApiModelProperty(value = "省") + private String province; + + /** + * 市 + */ + @ApiModelProperty(value = "市") + private String city; + +} diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsDevModelPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsDevModelPO.java index 7f68f925c..c6a190ffd 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsDevModelPO.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsDevModelPO.java @@ -36,6 +36,12 @@ public class CsDevModelPO extends BaseEntity { @TableField(value = "dev_type") private String devType; + /** + * 模板名称 + */ + @TableField(value = "模板名称") + private String name; + /** * 版本号 */ diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsDevModelPageVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsDevModelPageVO.java index 36af3db85..97f7c5b72 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsDevModelPageVO.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsDevModelPageVO.java @@ -1,6 +1,5 @@ package com.njcn.algorithm.pojo.vo; -import com.baomidou.mybatisplus.annotation.TableField; import com.njcn.db.bo.BaseEntity; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -29,11 +28,12 @@ public class CsDevModelPageVO extends BaseEntity { /** * 设备型号(字典数据) */ - @ApiModelProperty(value = "设备型号") + @ApiModelProperty(value = "设备模板型号id") private String devType; - @ApiModelProperty(value = "设备名称") + @ApiModelProperty(value = "设备模板型号id名称") private String devName; - + @ApiModelProperty(value = "模板名称") + private String name; /** * 版本号 @@ -51,13 +51,13 @@ public class CsDevModelPageVO extends BaseEntity { /** * 装置模板文件路径 */ - @TableField(value = "file_path") + @ApiModelProperty(value = "file_path") private String filePath; /** * 状态(0:删除 1:正常) */ - @TableField(value = "status") + @ApiModelProperty(value = "status") private String status; } \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java index 21925d84f..c54484e1d 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java @@ -45,12 +45,18 @@ public class CsEngineeringVO extends BaseEntity { @ApiModelProperty(value = "省") private String province; + @ApiModelProperty(value = "省名称") + private String provinceName; + /** * 市 */ @ApiModelProperty(value = "市") private String city; + @ApiModelProperty(value = "市名称") + private String cityName; + /** * 描述 */ diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java index cfa439bd0..c618518b6 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java @@ -17,6 +17,17 @@ import lombok.Data; @Data public class ProjectEquipmentVO { + /** + * id + */ + @ApiModelProperty(value = "工程id") + private String engineeringid; + + /** + * 工程名称 + */ + @ApiModelProperty(value = "工程名称") + private String engineeringName; @ApiModelProperty(value = "项目id") private String projectId; diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java index ebac5a6fe..231454acb 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java @@ -24,8 +24,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import java.util.List; - /** * Description: * 接口文档访问地址:http://serverIP:port/swagger-ui.html @@ -80,14 +78,14 @@ public class DevModelController extends BaseController { } @OperateInfo(info = LogEnum.BUSINESS_COMMON) - @PostMapping("/queryEquipmentByProject") - @ApiOperation("通过项目查询出厂设备") - @ApiImplicitParam(name = "csDevModelQueryListParm", value = "项目信息", required = true) - public HttpResult> queryEquipmentByProject(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){ - String methodDescribe = getMethodDescribe("queryEquipmentByProject"); + @PostMapping("/queryDevModelOne") + @ApiOperation("设备模板列表查询") + @ApiImplicitParam(name = "csDevModelQueryListParm", value = "信息", required = true) + public HttpResult queryDevModelOne(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){ + String methodDescribe = getMethodDescribe("queryDevModelOne"); - List list = csDevModelService.queryList(csDevModelQueryListParm); - return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + CsDevModelPageVO csDevModelPageVO = csDevModelService.queryDevModelOne(csDevModelQueryListParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csDevModelPageVO, methodDescribe); } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java index 2aac52f41..80ce57f75 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java @@ -1,7 +1,9 @@ package com.njcn.algorithm.controller.project; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.njcn.algorithm.pojo.param.CsEngineeringAddParm; import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm; +import com.njcn.algorithm.pojo.param.CsEngineeringQueryPageParm; import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm; import com.njcn.algorithm.pojo.vo.CsEngineeringVO; import com.njcn.algorithm.service.CsEngineeringService; @@ -74,4 +76,15 @@ public class EngineeringController extends BaseController { List csEngineeringVOList = csEngineeringService.queryEngineering(csEngineeringQueryParm); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEngineeringVOList, methodDescribe); } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryEngineeringPage") + @ApiOperation("分页查询工程列表") + @ApiImplicitParam(name = "csEngineeringQueryPageParm", value = "修改项目参数", required = true) + public HttpResult> queryEngineeringPage(@Validated @RequestBody CsEngineeringQueryPageParm csEngineeringQueryPageParm){ + String methodDescribe = getMethodDescribe("queryEngineeringPage"); + + IPage page = csEngineeringService.queryEngineeringPage(csEngineeringQueryPageParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe); + } } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsDevModelMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsDevModelMapper.java index 72782f51e..54350e376 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsDevModelMapper.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsDevModelMapper.java @@ -8,8 +8,6 @@ import com.njcn.algorithm.pojo.po.CsDevModelPO; import com.njcn.algorithm.pojo.vo.CsDevModelPageVO; import org.apache.ibatis.annotations.Param; -import java.util.List; - /** * * Description: @@ -22,5 +20,5 @@ import java.util.List; public interface CsDevModelMapper extends BaseMapper { Page getPage(Page returnpage,@Param("csDevModelQueryParm") CsDevModelQueryParm csDevModelQueryParm); - List queryList(@Param("csDevModelQueryListParm")CsDevModelQueryListParm csDevModelQueryListParm); + CsDevModelPageVO queryOne(@Param("csDevModelQueryListParm")CsDevModelQueryListParm csDevModelQueryListParm); } \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml index 61a53632b..32c28537e 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml @@ -29,8 +29,8 @@ AND a.version_date >= #{csDevModelQueryParm.versionStartDate } - - AND a.version_date <= #{csDevModelQueryParm.versionendDate } + + AND a.version_date <= #{csDevModelQueryParm.versionEndDate } @@ -39,18 +39,25 @@ AND a.dev_type = #{csDevModelQueryParm.devType} - \ No newline at end of file diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml index ad4ba21eb..5d082d682 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml @@ -32,15 +32,19 @@ + select + dev_index AS devId, + online_min AS onlinemin, + offline_min AS offlinemin + from r_stat_onlinerate_d + + + AND dev_index IN + + #{item} + + + + AND time_id >= #{startTime} + + + AND time_id <= #{endTime} + + + + diff --git a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/AreaLineServiceImpl.java b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/AreaLineServiceImpl.java index 877336a72..9f55f3c64 100644 --- a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/AreaLineServiceImpl.java +++ b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/AreaLineServiceImpl.java @@ -13,8 +13,8 @@ import com.njcn.device.pq.pojo.param.DeviceInfoParam; import com.njcn.device.pq.pojo.vo.AreaLineInfoVO; import com.njcn.device.pq.pojo.vo.LineDeviceStateVO; import com.njcn.device.pq.pojo.vo.SubstationDetailVO; -import com.njcn.event.influxdb.PqsOnlinerateQuery; import com.njcn.event.mapper.majornetwork.PqDeviceMapper; +import com.njcn.event.mapper.majornetwork.RStatOnlinerateDMapper; import com.njcn.event.pojo.po.PqDevice; import com.njcn.event.pojo.po.PqsOnlinerate; import com.njcn.event.pojo.po.RmpEventDetailPO; @@ -63,7 +63,9 @@ public class AreaLineServiceImpl implements AreaLineService { private final InfluxDbUtils influxDbUtils; - private final PqsOnlinerateQuery pqsOnlinerateQuery; + // private final PqsOnlinerateQuery pqsOnlinerateQuery; + + private final RStatOnlinerateDMapper rStatOnlinerateDMapper; private final PqDeviceMapper pqDeviceMapper; private final EventDetailService eventDetailService; @@ -149,7 +151,7 @@ public class AreaLineServiceImpl implements AreaLineService { substationDetailVOList.addAll(substationDetailVOS); if (lineIndexs.size() > 0) { areaLineVO.setSubstationDetailVOList(substationDetailVOList); - objectList.add(generalDeviceDTO.getName() + "\n(" + tail + ")"); + objectList.add(generalDeviceDTO.getName()); objectList.add(tail); objectList.add(stateZc); objectList.add(stateZd); @@ -296,9 +298,10 @@ public class AreaLineServiceImpl implements AreaLineService { return TerminalRunningVO.empty(); } - List pqsOnlinerateList = pqsOnlinerateQuery.selectList(Arrays.asList("dev_id", "offlinemin", "onlinemin"), - devIdOr(deviceIndexList), - timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime()))); +// List pqsOnlinerateList = pqsOnlinerateQuery.selectList(Arrays.asList("dev_id", "offlinemin", "onlinemin"), +// devIdOr(deviceIndexList), +// timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime()))); + List pqsOnlinerateList = rStatOnlinerateDMapper.getOnlineRateByDevIds(deviceIndexList,beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime())); List pqDeviceList = pqDeviceMapper.queryRunFlagByDeviceIndexs(deviceIndexList); diff --git a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/RStatLimitRateDMapper.java b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/RStatLimitRateDMapper.java index 943e9424f..2ba594935 100644 --- a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/RStatLimitRateDMapper.java +++ b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/RStatLimitRateDMapper.java @@ -1,6 +1,7 @@ package com.njcn.harmonic.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO; import com.njcn.harmonic.pojo.vo.MonitorOverLimitVO; import com.njcn.harmonic.pojo.vo.RStatLimitRateDVO; @@ -28,4 +29,9 @@ public interface RStatLimitRateDMapper extends BaseMapper { @Param("ids") List lineIndexes, @Param("statTime") String searchBeginTime, @Param("endTime") String searchEndTime); + + Page getSumLimitRatePage(Page p, + @Param("ids") List lineIndexes, + @Param("statTime") String searchBeginTime, + @Param("endTime") String searchEndTime); } diff --git a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/mapping/RStatLimitRateDMapper.xml b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/mapping/RStatLimitRateDMapper.xml index 0c7875077..885ea675a 100644 --- a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/mapping/RStatLimitRateDMapper.xml +++ b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/mapper/mapping/RStatLimitRateDMapper.xml @@ -107,4 +107,80 @@ GROUP BY my_index + diff --git a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/AnalyzeServiceImpl.java b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/AnalyzeServiceImpl.java index e9a015151..3f5462ae1 100644 --- a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/AnalyzeServiceImpl.java +++ b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/AnalyzeServiceImpl.java @@ -38,14 +38,12 @@ import com.njcn.poi.excel.ExcelUtil; import com.njcn.web.utils.RequestUtil; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.beanutils.BeanUtils; import org.influxdb.dto.QueryResult; import org.influxdb.impl.InfluxDBResultMapper; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.io.File; -import java.lang.reflect.Array; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.Instant; @@ -296,45 +294,59 @@ public class AnalyzeServiceImpl implements IAnalyzeService { p.setSize(param.getPageSize()); p.setCurrent(param.getPageNum()); if (CollectionUtil.isNotEmpty(lineList)) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("r_stat_limit_rate_d.my_index",lineList) - .between("r_stat_limit_rate_d.time_id", - DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())), - DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime()))); - Page rateDPOPage = rateDMapper.selectPage(p,queryWrapper); - List records = rateDPOPage.getRecords(); - Map> lineMap = records.stream().collect(Collectors.groupingBy(RStatLimitRateDPO::getLineId)); + Page sumLimitRatePage = rateDMapper.getSumLimitRatePage(p, lineList, param.getSearchBeginTime(), param.getSearchEndTime()); + List pageRecords = sumLimitRatePage.getRecords(); + Map> monMap = pageRecords.stream().collect(Collectors.groupingBy(MonitorOverLimitVO::getId)); ArrayList list = new ArrayList<>(); - list.addAll(lineMap.keySet()); + list.addAll(monMap.keySet()); PollutionParamDTO pollutionParamDTO = new PollutionParamDTO(); pollutionParamDTO.setLineList(list); +// List data = lineFeignClient.getBaseLineAreaInfo(list).getData(); List overLimitLineList = lineFeignClient.getOverLimitLineInfo(pollutionParamDTO).getData(); - List groupList = rateDMapper.getSumLimitRateByLineIndexes(list, param.getSearchBeginTime(), param.getSearchEndTime()); - Map> groupMap = groupList.stream().collect(Collectors.groupingBy(MonitorOverLimitVO::getId)); + List rStatLimitRateDPOS = rateDMapper.selectList(new QueryWrapper() + .in("r_stat_limit_rate_d.my_index", list) + .between("r_stat_limit_rate_d.time_id", + DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())), + DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime()))) + ); + Map> rsMap = rStatLimitRateDPOS.stream().collect(Collectors.groupingBy(RStatLimitRateDPO::getLineId)); for (OverLimitLineDTO vo : overLimitLineList) { MonitorOverLimitVO monitorOverLimitVO = new MonitorOverLimitVO(); BeanUtil.copyProperties(vo,monitorOverLimitVO); - List limitRateDPOS = lineMap.get(vo.getId()); - MonitorOverLimitVO overLimitVO = groupMap.get(vo.getId()).get(0); - BeanUtil.copyProperties(overLimitVO,monitorOverLimitVO); - - System.out.println(monitorOverLimitVO); - - - // 超标天数 -// long allTimeCount = limitRateDPOS.stream().filter(t -> t.getAllTime() != 0).count(); - // 频率偏差超标天数 -// long freqDevOverCount = limitRateDPOS.stream().filter(t -> t.getFreqDevOvertime() != 0).count(); - // 电压偏差超标天数 -// long voltageDevOverCount = limitRateDPOS.stream().filter(t -> t.getVoltageDevOvertime() != 0).count(); - // 电压谐波畸变率越限次数 -// long UaberranceOverCount = limitRateDPOS.stream().filter(t -> t.getUaberranceOvertime() != 0).count(); + MonitorOverLimitVO source = monMap.get(vo.getId()).get(0); + monitorOverLimitVO.setOverDay(source.getOverDay()); + monitorOverLimitVO.setVolDevOverDay(source.getVolDevOverDay()); + monitorOverLimitVO.setFreqOverDay(source.getFreqOverDay()); + monitorOverLimitVO.setFlickerOverDay(source.getFlickerOverDay()); + monitorOverLimitVO.setNegativeOverDay(source.getNegativeOverDay()); + monitorOverLimitVO.setThreeUnbalance(source.getThreeUnbalance()); + monitorOverLimitVO.setVolDisOverDay(source.getVolDisOverDay()); + monitorOverLimitVO.setOverVolThreeTimes(source.getOverVolThreeTimes()); + monitorOverLimitVO.setOverVolFiveTimes(source.getOverVolFiveTimes()); + monitorOverLimitVO.setOverVolSevenTimes(source.getOverVolSevenTimes()); + monitorOverLimitVO.setOverVolElevenTimes(source.getOverVolElevenTimes()); + monitorOverLimitVO.setOverVolThirteenTimes(source.getOverVolThirteenTimes()); + monitorOverLimitVO.setOverVolTwentyThreeTimes(source.getOverVolTwentyThreeTimes()); + monitorOverLimitVO.setOverVolTwentyFiveTimes(source.getOverVolTwentyFiveTimes()); + monitorOverLimitVO.setOverVolOtherTimes(source.getOverVolOtherTimes()); + monitorOverLimitVO.setOverCurThreeTimes(source.getOverCurThreeTimes()); + monitorOverLimitVO.setOverCurFiveTimes(source.getOverCurFiveTimes()); + monitorOverLimitVO.setOverCurSevenTimes(source.getOverCurSevenTimes()); + monitorOverLimitVO.setOverCurElevenTimes(source.getOverCurElevenTimes()); + monitorOverLimitVO.setOverCurThirteenTimes(source.getOverCurThirteenTimes()); + monitorOverLimitVO.setOverCurTwentyThreeTimes(source.getOverCurTwentyThreeTimes()); + monitorOverLimitVO.setOverCurTwentyFiveTimes(source.getOverCurTwentyFiveTimes()); + monitorOverLimitVO.setOverCurOtherTimes(source.getOverCurOtherTimes()); + List limitRateDPOS = rsMap.get(vo.getId()); // 谐波电压含有率超标天数 - long volContainOverDay = limitRateDPOS.stream().filter(t -> FilterNotQualifiedUharmData(t)).count(); + long volContainOverDay = limitRateDPOS.stream().filter(t -> filterNotQualifiedUharmData(t)).count(); // 谐波电流超标天数 - long harmCurOverDay = limitRateDPOS.stream().filter(t -> FilterNotQualifiedIharmData(t)).count(); + long harmCurOverDay = limitRateDPOS.stream().filter(t -> filterNotQualifiedIharmData(t)).count(); // 间谐波电压含有率超标天数 - long intHarmOverDay = limitRateDPOS.stream().filter(t -> FilterNotQualifiedInuharmData(t)).count(); + long intHarmOverDay = limitRateDPOS.stream().filter(t -> filterNotQualifiedInuharmData(t)).count(); + // 谐波电压超标天数 + long harmVolOverDay = limitRateDPOS.stream().filter(t -> filterNotQualifiedHarmVolData(t)).count(); + monitorOverLimitVO.setHarmVolOverDay((int) harmVolOverDay); monitorOverLimitVO.setVolContainOverDay((int) volContainOverDay); monitorOverLimitVO.setHarmCurOverDay((int) harmCurOverDay); monitorOverLimitVO.setIntHarmOverDay((int) intHarmOverDay); @@ -350,41 +362,6 @@ public class AnalyzeServiceImpl implements IAnalyzeService { return page; } return page; -// if (CollectionUtil.isNotEmpty (lineList)) { -// page.setTotal(lineList.size()); -// int pages = (int)Math.ceil(lineList.size()*1.0/param.getPageSize()); -// page.setPages(pages); -// List> pageList = Lists.partition(lineList,param.getPageSize()); -// List temList = pageList.get(param.getPageNum()-1); -// List list = rateDMapper.getSumLimitRateByLineIndexes(lineList, param.getSearchBeginTime(), param.getSearchEndTime()); -// Map> mapperMap = list.stream().collect(Collectors.groupingBy(MonitorOverLimitVO::getId)); -// PollutionParamDTO pollutionParamDTO = new PollutionParamDTO(); -// pollutionParamDTO.setLineList(temList); -// List overLimitLineList = lineFeignClient.getOverLimitLineInfo(pollutionParamDTO).getData(); -// for (OverLimitLineDTO overLimitLineDTO : overLimitLineList) { -// MonitorOverLimitVO vo = mapperMap.get(overLimitLineDTO.getId()).get(0); -// if (Objects.isNull(vo)) { -// continue; -// } -// vo.setProvinceCompany(overLimitLineDTO.getProvinceCompany()); -// vo.setCityCompany(overLimitLineDTO.getCityCompany()); -// vo.setLineName(overLimitLineDTO.getLineName()); -// vo.setLoadType(overLimitLineDTO.getLoadType()); -// vo.setLineObjectName(overLimitLineDTO.getLineObjectName()); -// vo.setLineScale(overLimitLineDTO.getLineScale()); -// vo.setSubName(overLimitLineDTO.getSubName()); -// vo.setSubScale(overLimitLineDTO.getSubScale()); -// result.add(vo); -// } -// } -// if (!CollectionUtils.isEmpty(result)){ -// List recordList = new ArrayList<>(); -// //默认 根据在线监测点个数 倒叙排序 -// recordList = result.stream().sorted(Comparator.comparing(MonitorOverLimitVO::getOverDay).reversed()).collect(Collectors.toList()); -// page.setRecords(recordList); -// return page; -// } -// return page; // if (!CollectionUtils.isEmpty(lineList)){ // page.setTotal(lineList.size()); // int pages = (int)Math.ceil(lineList.size()*1.0/param.getPageSize()); @@ -528,7 +505,16 @@ public class AnalyzeServiceImpl implements IAnalyzeService { // return page; } - private boolean FilterNotQualifiedInuharmData(RStatLimitRateDPO t) { + private boolean filterNotQualifiedHarmVolData(RStatLimitRateDPO t) { + // 电压畸变率+谐波电压含有率(2-25次) + int i = t.getUaberranceOvertime() + t.getUharm2Overtime() + t.getUharm3Overtime() + t.getUharm4Overtime() + t.getUharm5Overtime() + t.getUharm6Overtime() + t.getUharm7Overtime() + t.getUharm8Overtime() + t.getUharm9Overtime() + t.getUharm10Overtime() + t.getUharm11Overtime() + t.getUharm12Overtime() + t.getUharm13Overtime() + t.getUharm14Overtime() + t.getUharm15Overtime() + t.getUharm16Overtime() + t.getUharm17Overtime() + t.getUharm18Overtime() + t.getUharm19Overtime() + t.getUharm20Overtime() + t.getUharm21Overtime() + t.getUharm22Overtime() + t.getUharm23Overtime() + t.getUharm24Overtime() + t.getUharm25Overtime(); + if (i>0){ + return true; + } + return false; + } + + private boolean filterNotQualifiedInuharmData(RStatLimitRateDPO t) { int i =t.getInuharm1Overtime()+ t.getInuharm2Overtime() + t.getInuharm3Overtime() + t.getInuharm4Overtime() + t.getInuharm5Overtime() + t.getInuharm6Overtime() + t.getInuharm7Overtime() + t.getInuharm8Overtime() + t.getInuharm9Overtime() + t.getInuharm10Overtime() + t.getInuharm11Overtime() + t.getInuharm12Overtime() + t.getInuharm13Overtime() + t.getInuharm14Overtime() + t.getInuharm15Overtime() + t.getInuharm16Overtime(); if (i>0){ return true; @@ -536,7 +522,7 @@ public class AnalyzeServiceImpl implements IAnalyzeService { return false; } - private boolean FilterNotQualifiedIharmData(RStatLimitRateDPO t) { + private boolean filterNotQualifiedIharmData(RStatLimitRateDPO t) { int i = t.getIharm2Overtime() + t.getIharm3Overtime() + t.getIharm4Overtime() + t.getIharm5Overtime() + t.getIharm6Overtime() + t.getIharm7Overtime() + t.getIharm8Overtime() + t.getIharm9Overtime() + t.getIharm10Overtime() + t.getIharm11Overtime() + t.getIharm12Overtime() + t.getIharm13Overtime() + t.getIharm14Overtime() + t.getIharm15Overtime() + t.getIharm16Overtime() + t.getIharm17Overtime() + t.getIharm18Overtime() + t.getIharm19Overtime() + t.getIharm20Overtime() + t.getIharm21Overtime() + t.getIharm22Overtime() + t.getIharm23Overtime() + t.getIharm24Overtime() + t.getIharm25Overtime(); if (i>0){ return true; @@ -544,7 +530,7 @@ public class AnalyzeServiceImpl implements IAnalyzeService { return false; } - private boolean FilterNotQualifiedUharmData(RStatLimitRateDPO t) { + private boolean filterNotQualifiedUharmData(RStatLimitRateDPO t) { int i = t.getUharm2Overtime() + t.getUharm3Overtime() + t.getUharm4Overtime() + t.getUharm5Overtime() + t.getUharm6Overtime() + t.getUharm7Overtime() + t.getUharm8Overtime() + t.getUharm9Overtime() + t.getUharm10Overtime() + t.getUharm11Overtime() + t.getUharm12Overtime() + t.getUharm13Overtime() + t.getUharm14Overtime() + t.getUharm15Overtime() + t.getUharm16Overtime() + t.getUharm17Overtime() + t.getUharm18Overtime() + t.getUharm19Overtime() + t.getUharm20Overtime() + t.getUharm21Overtime() + t.getUharm22Overtime() + t.getUharm23Overtime() + t.getUharm24Overtime() + t.getUharm25Overtime(); if (i>0){ diff --git a/pqs-job/job-executor/src/main/resources/bootstrap.yml b/pqs-job/job-executor/src/main/resources/bootstrap.yml index f96beec5a..36c48ef4d 100644 --- a/pqs-job/job-executor/src/main/resources/bootstrap.yml +++ b/pqs-job/job-executor/src/main/resources/bootstrap.yml @@ -52,7 +52,7 @@ xxl: accessToken: executor: #执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册 - appname: executor + appname: xuyang #执行器注册 [选填]:优先使用该配置作为注册地址,为空时使用内嵌服务 ”IP:PORT“ 作为注册地址。从而更灵活的支持容器类型执行器动态IP和动态映射端口问题。 address: #执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务"; diff --git a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/ThsSuperviseServiceImpl.java b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/ThsSuperviseServiceImpl.java index 326b2dc9b..ccc831a8a 100644 --- a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/ThsSuperviseServiceImpl.java +++ b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/Impl/line/ThsSuperviseServiceImpl.java @@ -221,9 +221,16 @@ public class ThsSuperviseServiceImpl extends ServiceImpl mapParam = new HashMap<>(); - flowableDefineFeignClient.start("flow_yzep99kb:1:c0ff8a75-da73-11ed-829f-b07b253cdad9",thsSupervise.getSupIndex(),mapParam).getData(); + String proInId =""; + if(thsSupervise.getType() == 0){ + proInId = "flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9"; + }else { + proInId = "flow_yzep99kb:2:6358e099-dcba-11ed-8026-b07b253cdad9"; + } + flowableDefineFeignClient.start(proInId,thsSupervise.getSupIndex(),mapParam); for (ThsOverRunLog thsOverRunLog : overRunLogList) { thsOverRunLogMapper.insert(thsOverRunLog); diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/flowable/FlowDefinitionController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/flowable/FlowDefinitionController.java index 7443f4a19..acbd4b434 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/flowable/FlowDefinitionController.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/flowable/FlowDefinitionController.java @@ -59,12 +59,12 @@ public class FlowDefinitionController extends BaseController { @ApiOperation(value = "工作流_部署流程") public void createDeployment() { Deployment deployment = repositoryService.createDeployment() - .addClasspathResource("aa.bpmn20.xml") - .name("技术监督预警流程").category("testCategory") + .addClasspathResource("gaojing.bpmn20.xml") + .name("技术监督告警流程").category("gaojing") .deploy(); ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult(); - repositoryService.setProcessDefinitionCategory(definition.getId(), "testCategory"); + repositoryService.setProcessDefinitionCategory(definition.getId(), "gaojing"); System.out.println(deployment.getId()); } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/ThsSuperviseServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/ThsSuperviseServiceImpl.java index 0f0d227ab..24e595357 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/ThsSuperviseServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/ThsSuperviseServiceImpl.java @@ -145,7 +145,14 @@ public class ThsSuperviseServiceImpl extends ServiceImpl mapParam = new HashMap<>(); - iFlowDefinitionService.startProcessInstanceById("flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9",thsSupervise.getSupIndex(),mapParam); + String proInId = ""; + if(thsSupervise.getType() == 0){ + proInId = "flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9"; + }else { + proInId = "flow_yzep99kb:2:6358e099-dcba-11ed-8026-b07b253cdad9"; + } + iFlowDefinitionService.startProcessInstanceById(proInId,thsSupervise.getSupIndex(),mapParam); + for (ThsOverRunLog thsOverRunLog : superviceRunLogVo.getOverRunLog()) { thsOverRunLog.setCreateTime(date); diff --git a/pqs-process/process-boot/src/main/resources/gaojing.bpmn20.xml b/pqs-process/process-boot/src/main/resources/gaojing.bpmn20.xml new file mode 100644 index 000000000..8335ef758 --- /dev/null +++ b/pqs-process/process-boot/src/main/resources/gaojing.bpmn20.xml @@ -0,0 +1,105 @@ + + + + + Flow_1wrqzmd + + + Flow_1wrqzmd + Flow_0q5q2pr + + + + Flow_0q5q2pr + Flow_17er5rz + + + + Flow_0nuy3gu + + + + Flow_17er5rz + Flow_01tmwhj + + + + Flow_01tmwhj + Flow_1olja2w + + + + Flow_1olja2w + Flow_0nuy3gu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +