From dca0e3201c99027458014a1fdfa07a2d106e91fe Mon Sep 17 00:00:00 2001 From: lroyia Date: Thu, 24 Oct 2024 11:13:39 +0800 Subject: [PATCH] =?UTF-8?q?SQL=E4=BF=AE=E6=AD=A3=EF=BC=8C=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E6=9D=A5=E6=BA=90=E5=88=A4=E6=96=AD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/devops.pdma.json | 23 ++++++++++++++++-- .../service/impl/RepairServiceImpl.java | 24 +++++++++---------- src/main/resources/application-prod.yml | 2 +- .../mapper/repair/RepairHandleMapper.xml | 2 +- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/db/devops.pdma.json b/db/devops.pdma.json index 181c613..d9674b0 100644 --- a/db/devops.pdma.json +++ b/db/devops.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.9.2", "createdTime": "2023-5-19 09:47:50", - "updatedTime": "2024-10-24 09:58:53", + "updatedTime": "2024-10-24 10:11:23", "dbConns": [], "profile": { "default": { @@ -2616,6 +2616,24 @@ "extProps": {}, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098" }, + { + "defKey": "source", + "defName": "报账单来源", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "8006C938-FC64-477C-B26F-9A804E9420B2" + }, { "defKey": "create_by", "defName": "创建人", @@ -2699,7 +2717,8 @@ "type": "P", "sysProps": { "nameTemplate": "{defKey}[{defName}]" - } + }, + "notes": {} }, { "defKey": "engineer", diff --git a/src/main/java/com/chinaweal/youfool/devops/repair/service/impl/RepairServiceImpl.java b/src/main/java/com/chinaweal/youfool/devops/repair/service/impl/RepairServiceImpl.java index 55da53c..0ba4325 100644 --- a/src/main/java/com/chinaweal/youfool/devops/repair/service/impl/RepairServiceImpl.java +++ b/src/main/java/com/chinaweal/youfool/devops/repair/service/impl/RepairServiceImpl.java @@ -9,6 +9,7 @@ import com.alibaba.excel.write.metadata.fill.FillWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.chinaweal.youfool.devops.base.entity.Dict; import com.chinaweal.youfool.devops.base.service.IDictService; import com.chinaweal.youfool.devops.org.business.entity.BusinessUser; import com.chinaweal.youfool.devops.org.business.service.BusinessUserService; @@ -71,21 +72,12 @@ public class RepairServiceImpl extends ServiceImpl impleme @Override public RestResult saveRepair(Repair repair) { + if (StringUtils.isBlank(repair.getSource())) { + repair.setSource("1"); + } //判断来源 - if ("2".equals(repair.getSource())) { - repair.setOrgId("特设网办系统"); - repair.setOrg("特设网办系统"); - } else if ("3".equals(repair.getSource())) { - repair.setOrgId("佛山年报系统"); - repair.setOrg("佛山年报系统"); - } else if ("4".equals(repair.getSource())) { - repair.setOrgId("佛山行政执法办案平台"); - repair.setOrg("佛山行政执法办案平台"); - } else if ("5".equals(repair.getSource())) { - repair.setOrgId("佛山消保系统"); - repair.setOrg("佛山消保系统"); - } else { + if (StringUtils.equals(repair.getSource(), "1")) { //内网发起,查询业务系统的用户信息 BusinessUser user; if (StringUtils.isNotBlank(repair.getUserId())) { @@ -107,6 +99,12 @@ public class RepairServiceImpl extends ServiceImpl impleme repair.setPhone(user.getMobile()); } repair.setSource("1");//内网 + } else { + Dict source = iDictService.getByTypeAndCode("source", repair.getSource()); + if (source != null) { + repair.setOrg(source.getName()); + repair.setOrgId(source.getName()); + } } String oldRepairUUID = repair.getRepairId(); diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index bb4ce08..5489ceb 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -17,7 +17,7 @@ spring: password: ChinaWeal@2024 file: - devopsDir: ..\webapps\upload + devopsDir: D:\project\devops-gd\upload business: fsLoginUrl: http://121.8.152.130:9888/tzrysb/user/loginDevops diff --git a/src/main/resources/mybatis/mapper/repair/RepairHandleMapper.xml b/src/main/resources/mybatis/mapper/repair/RepairHandleMapper.xml index ef486e9..438846b 100644 --- a/src/main/resources/mybatis/mapper/repair/RepairHandleMapper.xml +++ b/src/main/resources/mybatis/mapper/repair/RepairHandleMapper.xml @@ -73,7 +73,7 @@ and count( case when rh.step = 'feedback' then 1 else null end ) >2 and count( case when rh.step = 'unresolved' then 1 else null end ) > 0 - ) + ) a