From e1e8626a3105f213746deed07e2d500808672ac5 Mon Sep 17 00:00:00 2001 From: tyty Date: Wed, 12 Apr 2023 10:34:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=80=BC=E7=8F=AD=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=9A=84=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../duty/controller/ImsDutyRecController.java | 4 +++- .../duty/service/impl/ImsAnalyseExampleServiceImpl.java | 17 +++++++++++++++-- .../duty/service/impl/ImsDutyRecServiceImpl.java | 10 +++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java index c9866b4..bc36ed1 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java @@ -268,6 +268,7 @@ public class ImsDutyRecController extends BladeController { public R queryAnalyseExampleData( AnalyzeDataCondition analyzeDataCondition) { return iImsAnalyseExampleService.queryAnalyseExampleData(analyzeDataCondition); } + /** * 查询:分析实例模板 */ @@ -301,9 +302,10 @@ public class ImsDutyRecController extends BladeController { @PostMapping("/updateAnalyzeExample") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增分析实例", notes = "传入analyseExample") - public R updateAnalyzeExample(AnalyseExample analyseExample) { + public R updateAnalyzeExample(@RequestBody AnalyseExample analyseExample) { return iImsAnalyseExampleService.updateAnalyseExample(analyseExample); } + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java index bd42885..02d69f8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java @@ -57,8 +57,7 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl> analyzeDataByAnalyzeCode = searchClient.getAnalyzeDataByAnalyzeCode(analyzeDataCondition); - - return R.data(analyzeDataByAnalyzeCode); + return analyzeDataByAnalyzeCode; } /** @@ -105,6 +104,17 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper(); + if (StringUtils.isNotEmpty(analyseExample.getEquipmentId())){ + queryWrapper.lambda().eq(AnalyseExample::getEquipmentId, analyseExample.getEquipmentId()); + } + if (ObjectUtils.isNotEmpty(analyseExample.getSiteId())){ + queryWrapper.lambda().eq(AnalyseExample::getSiteId, analyseExample.getSiteId()); + } + AnalyseExample res = baseMapper.selectOne(queryWrapper.lambda().last("limit 1;")); + if (ObjectUtils.isNotEmpty(res)){ + analyseExample.setId(res.getId()); + } this.saveOrUpdate(analyseExample); return R.success("保存成功"); } @@ -115,6 +125,9 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl() {{ + eq(ImsDutyMainPersonEntity::getDutyMainId, entity.getId()); + eq(ImsDutyMainPersonEntity::getDutyChargePerson, AuthUtil.getUserId()); + }}); + if (ObjectUtil.isEmpty(groupEntity)&&ObjectUtil.isEmpty(personEntity)) { return R.success("您不是该班组负责人,不可交班!"); }