From 197d3df0fbdb1930a6e16d2b79f081d663a83a8d Mon Sep 17 00:00:00 2001 From: hzj <826100833@qq.com> Date: Thu, 20 Jun 2024 11:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E5=8A=9F=E8=83=BD=E5=90=84?= =?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91=E5=BC=95=E8=B5=B7?= =?UTF-8?q?=E7=9A=84=E6=9F=A5=E8=AF=A2bug=EF=BC=8C=E9=A2=84=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E5=8D=95=E6=96=B0=E5=A2=9E=E6=95=B4=E6=94=B9=E6=84=8F?= =?UTF-8?q?=E8=A7=81=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/param/leaflet/WarningAddParam.java | 26 +++++++++++++++++++ .../pojo/vo/leaflet/WarningLeafletVO.java | 5 ++++ .../SupervisionUserComplaintController.java | 7 ++--- .../survey/SurveyTestController.java | 14 ++++------ .../leaflet/mapping/WarningLeafletMapper.xml | 2 ++ .../device/impl/LineWarningServiceImpl.java | 5 ++-- .../SupervisionTempLineReportServiceImpl.java | 12 ++++++--- .../leaflet/IWarningLeafletService.java | 3 ++- .../impl/WarningLeafletServiceImpl.java | 4 ++- .../SupervisionUserComplaintPOService.java | 3 ++- ...SupervisionUserComplaintPOServiceImpl.java | 15 +++++------ .../service/survey/ISurveyTestService.java | 3 ++- .../survey/impl/SurveyPlanServiceImpl.java | 23 +++++++++------- .../survey/impl/SurveyTestServiceImpl.java | 12 +++++---- .../user/impl/UserReportPOServiceImpl.java | 5 ++-- 15 files changed, 92 insertions(+), 47 deletions(-) create mode 100644 pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/leaflet/WarningAddParam.java diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/leaflet/WarningAddParam.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/leaflet/WarningAddParam.java new file mode 100644 index 000000000..a9ac74081 --- /dev/null +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/leaflet/WarningAddParam.java @@ -0,0 +1,26 @@ +package com.njcn.supervision.pojo.param.leaflet; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * Description: + * Date: 2024/6/20 9:37【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class WarningAddParam { + @ApiModelProperty(value = "对应问题源ID,用于查询详细信息") + private String id; + /** + * 整改意见 + */ + @ApiModelProperty(value = "整改意见") + private String reformAdvice; +} diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java index 96ea4311b..390ebf1a2 100644 --- a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java @@ -101,6 +101,11 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{ */ private String issueDetail; + /** + * 整改意见 + */ + private String reformAdvice; + private String createBy; /** diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/problem/SupervisionUserComplaintController.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/problem/SupervisionUserComplaintController.java index 5175829c5..e4fdc16fb 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/problem/SupervisionUserComplaintController.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/problem/SupervisionUserComplaintController.java @@ -7,6 +7,7 @@ import com.njcn.common.pojo.enums.common.LogEnum; import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; +import com.njcn.supervision.pojo.param.leaflet.WarningAddParam; import com.njcn.supervision.pojo.param.problem.SupervisionUserComplaintParam; import com.njcn.supervision.pojo.vo.problem.SupervisionUserComplaintVO; import com.njcn.supervision.service.problem.SupervisionUserComplaintPOService; @@ -47,11 +48,11 @@ public class SupervisionUserComplaintController extends BaseController { } @OperateInfo(info = LogEnum.BUSINESS_COMMON) - @GetMapping("/initiateWarningLeaflet") + @PostMapping("/initiateWarningLeaflet") @ApiOperation("针对用户投诉发起告警单") - public HttpResult initiateWarningLeaflet(@RequestParam("id") String id){ + public HttpResult initiateWarningLeaflet(@RequestBody WarningAddParam warningAddParam){ String methodDescribe = getMethodDescribe("initiateWarningLeaflet"); - supervisionUserComplaintService.initiateWarningLeaflet(id); + supervisionUserComplaintService.initiateWarningLeaflet(warningAddParam); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Boolean.TRUE, methodDescribe); } diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/survey/SurveyTestController.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/survey/SurveyTestController.java index a76e76c7f..efa7ccd60 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/survey/SurveyTestController.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/survey/SurveyTestController.java @@ -9,23 +9,19 @@ import com.njcn.common.pojo.enums.common.LogEnum; import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; -import com.njcn.supervision.pojo.param.survey.SupervisionGeneralSurveyPlanParm; +import com.njcn.supervision.pojo.param.leaflet.WarningAddParam; import com.njcn.supervision.pojo.param.survey.SurveyTestParam; -import com.njcn.supervision.pojo.vo.survey.SupervisionGeneralSurveyPlanDetailVO; -import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO; import com.njcn.supervision.pojo.vo.survey.SurveyTestVO; import com.njcn.supervision.service.survey.ISurveyTestService; +import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; -import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import com.njcn.web.controller.BaseController; - /** *

* 普测测试的管理表 前端控制器 @@ -114,11 +110,11 @@ public class SurveyTestController extends BaseController { @OperateInfo(info = LogEnum.BUSINESS_COMMON) - @GetMapping("/initiateWarningLeaflet") + @PostMapping("/initiateWarningLeaflet") @ApiOperation("针对有问题的现场测试发起告警单") - public HttpResult initiateWarningLeaflet(@RequestParam("id") String id){ + public HttpResult initiateWarningLeaflet(@RequestBody WarningAddParam warningAddParam){ String methodDescribe = getMethodDescribe("initiateWarningLeaflet"); - surveyTestService.initiateWarningLeaflet(id); + surveyTestService.initiateWarningLeaflet(warningAddParam); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Boolean.TRUE, methodDescribe); } } diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml index a2a054037..57aec79df 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml @@ -15,6 +15,7 @@ supervision_warning_leaflet.STATUS, supervision_warning_leaflet.process_instance_id, supervision_warning_leaflet.history_instance_id, + supervision_warning_leaflet.reform_advice, supervision_warning_leaflet.issue_detail, supervision_warning_leaflet.take_step, supervision_warning_leaflet.report_path, @@ -40,6 +41,7 @@ supervision_warning_leaflet.process_instance_id, supervision_warning_leaflet.history_instance_id, supervision_warning_leaflet.issue_detail, + supervision_warning_leaflet.reform_advice, supervision_warning_leaflet.take_step, supervision_warning_leaflet.report_path, supervision_warning_leaflet.state, diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java index a4bf13192..98eef71ba 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java @@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; -import com.alibaba.nacos.common.utils.UuidUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.jeffreyning.mybatisplus.service.MppServiceImpl; @@ -141,8 +140,8 @@ public class LineWarningServiceImpl extends MppServiceImpl { * problemType:问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,参考枚举:ProblemTypeEnum * leaflet:单子类型:1:预警单;2:告警单 * issueDetail:问题详细描述 + * reformAdvice:整改意见 */ - void createLeaflet(String name, String deptId, String code, String id, Integer problemType, Integer leaflet, String issueDetail); + void createLeaflet(String name, String deptId, String code, String id, Integer problemType, Integer leaflet, String issueDetail,String reformAdvice); Page alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam); diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java index 6e468507e..79e98c9b9 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java @@ -82,7 +82,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl getSupervisionUserComplaint(SupervisionUserComplaintParam.SupervisionUserComplaintQueryParam supervisionUserComplaintQueryParam); - void initiateWarningLeaflet(String id); + void initiateWarningLeaflet(WarningAddParam warningAddParam); } diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/problem/impl/SupervisionUserComplaintPOServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/problem/impl/SupervisionUserComplaintPOServiceImpl.java index 82c8a7a3b..1c8bf8948 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/problem/impl/SupervisionUserComplaintPOServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/problem/impl/SupervisionUserComplaintPOServiceImpl.java @@ -14,9 +14,9 @@ import com.njcn.common.pojo.enums.common.DataStateEnum; import com.njcn.supervision.enums.LeafletTypeEnum; import com.njcn.supervision.enums.ProblemTypeEnum; import com.njcn.supervision.mapper.problem.SupervisionUserComplaintPOMapper; +import com.njcn.supervision.pojo.param.leaflet.WarningAddParam; import com.njcn.supervision.pojo.param.problem.SupervisionUserComplaintParam; import com.njcn.supervision.pojo.po.problem.SupervisionUserComplaintPO; -import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO; import com.njcn.supervision.pojo.vo.problem.SupervisionUserComplaintVO; import com.njcn.supervision.service.leaflet.IWarningLeafletService; import com.njcn.supervision.service.problem.SupervisionUserComplaintPOService; @@ -24,12 +24,10 @@ import com.njcn.user.api.DeptFeignClient; import com.njcn.user.api.UserFeignClient; import com.njcn.user.pojo.po.Dept; import com.njcn.web.factory.PageFactory; -import com.njcn.web.utils.RequestUtil; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; import java.util.List; import java.util.Map; import java.util.Objects; @@ -99,8 +97,8 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl { SurveyTestVO getVOById(String id); - void initiateWarningLeaflet(String id); + void initiateWarningLeaflet(WarningAddParam warningAddParam); } diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/survey/impl/SurveyPlanServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/survey/impl/SurveyPlanServiceImpl.java index f24dc7272..6c0464a4b 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/survey/impl/SurveyPlanServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/survey/impl/SurveyPlanServiceImpl.java @@ -78,9 +78,9 @@ public class SurveyPlanServiceImpl extends ServiceImpl surveyPlanVOQueryWrapper = new QueryWrapper<>(); if (Objects.nonNull(surveyPlanQueryParam)) { //添加上时间范围 - surveyPlanVOQueryWrapper.between("supervision_survey_plan.plan_start_time", + surveyPlanVOQueryWrapper.and(x->x.between("supervision_survey_plan.plan_start_time", DateUtil.beginOfDay(DateUtil.parse(surveyPlanQueryParam.getSearchBeginTime())), - DateUtil.endOfDay(DateUtil.parse(surveyPlanQueryParam.getSearchEndTime()))); + DateUtil.endOfDay(DateUtil.parse(surveyPlanQueryParam.getSearchEndTime()))).or().isNull("supervision_survey_plan.plan_start_time")); //根据工程名称模糊搜索 if (StrUtil.isNotBlank(surveyPlanQueryParam.getSearchValue())) { surveyPlanVOQueryWrapper.like("supervision_survey_plan.plan_name", surveyPlanQueryParam.getSearchValue()); @@ -279,14 +279,17 @@ public class SurveyPlanServiceImpl extends ServiceImplx.between("supervision_user_report.expected_production_date", DateUtil.beginOfDay(DateUtil.parse(userReportQueryParam.getSearchBeginTime())), - DateUtil.endOfDay(DateUtil.parse(userReportQueryParam.getSearchEndTime()))); + DateUtil.endOfDay(DateUtil.parse(userReportQueryParam.getSearchEndTime()))).or().isNull("supervision_user_report.expected_production_date")); } userReportVOQueryWrapper.orderByDesc("supervision_user_report.Update_Time"); }