From 1fad55d44ef9215985ea473566257791b1b435ee Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 22 Aug 2024 13:44:10 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E9=80=80=E6=96=99=E6=8A=A5=E5=BA=9F?= =?UTF-8?q?=E8=BD=AC=E5=88=B0=E7=BB=B4=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/app/service/BackReceiveService.java | 6 +++ .../service/impl/BackReceiveServiceImpl.java | 6 +-- .../impl/ScrapApplyDetailsServiceImpl.java | 53 ++++++++++--------- 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/BackReceiveService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/BackReceiveService.java index fcef2b9..5fc3e4f 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/BackReceiveService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/BackReceiveService.java @@ -99,4 +99,10 @@ public interface BackReceiveService { List backReceiveRecordWeb(BackApplyInfo record); List backReceiveRecordWebPt(BackApplyInfo record); + + int insertRad(int taskId, List wxList); + + int insertTt(List hgList, Integer taskType, String createBy); + + int insertTta(int taskId, List list); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java index 49d16ef..1caf9e0 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java @@ -392,7 +392,7 @@ public class BackReceiveServiceImpl implements BackReceiveService { return backApplyInfoList; } - private int insertRad(int taskId, List wxList) { + public int insertRad(int taskId, List wxList) { int result = 0; if (wxList != null) { for (BackApplyInfo wx : wxList) { @@ -414,14 +414,14 @@ public class BackReceiveServiceImpl implements BackReceiveService { return result; } - private int insertTta(int taskId, List list) { + public int insertTta(int taskId, List list) { int res; String agreementId = String.valueOf(list.get(0).getAgreementId()); res = backReceiveMapper.insertTta(taskId, agreementId); return res; } - private int insertTt(List hgList, Integer taskType, String createBy) { + public int insertTt(List hgList, Integer taskType, String createBy) { int newTask; //生成单号 String code = genCodeRule(taskType); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java index b209505..ffb5d33 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java @@ -8,6 +8,8 @@ import java.util.List; import java.util.stream.Collectors; import cn.hutool.core.bean.BeanUtil; +import com.bonus.sgzb.app.mapper.BackReceiveMapper; +import com.bonus.sgzb.app.service.BackReceiveService; import com.bonus.sgzb.base.api.domain.BackApplyInfo; import com.bonus.sgzb.common.core.constant.TaskTypeConstants; import com.bonus.sgzb.common.core.enums.ReviewStatusEnum; @@ -56,6 +58,9 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService { @Resource private ScrapAuditorSetMapper scrapAuditorSetMapper; + @Resource + BackReceiveService backReceiveService; + /** * 查询报废任务详细scrap_apply_details * @@ -490,11 +495,11 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService { if (notScrapList.size() == scrapApplyDetailsList.size()) { task.setTaskStatus(59); } - } else - { + } else { status = "2"; List backList = new ArrayList<>(); List repairList = new ArrayList<>(); + List wxList = new ArrayList<>(); if (scrapApplyDetailsList.size() > 0) { for (ScrapApplyDetails bean : scrapApplyDetailsList) { if ("1".equals(bean.getScrapSource())) { @@ -502,33 +507,29 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService { } else if ("2".equals(bean.getScrapSource())) { repairList.add(bean); } + BackApplyInfo backApplyInfo = new BackApplyInfo(); + backApplyInfo.setAgreementId(tmTaskAgreement.getAgreementId().intValue()); + backApplyInfo.setMaId(bean.getMaId().intValue()); + backApplyInfo.setTypeId(String.valueOf(bean.getTypeId())); + backApplyInfo.setCompanyId(String.valueOf(bean.getCompanyId())); + backApplyInfo.setBackNum(bean.getScrapNum().intValue()); + backApplyInfo.setId(bean.getParentId()); + backApplyInfo.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + backApplyInfo.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + wxList.add(backApplyInfo); } } - if (backList.size() > 0) { - if (backList.get(0).getCompanyId() != null) { - companyId = Math.toIntExact(backList.get(0).getCompanyId()); - } - if (backList.get(0).getParentId() != null) { - parentId = Math.toIntExact(backList.get(0).getParentId()); - } - taskCode = purchaseCodeRule("T", 36); - taskStatus = 38; - taskType = 36; - long backTaskId = genTask(taskCode, taskType, taskStatus, tmTaskAgreement, companyId); - BackApplyInfo backApplyInfo = scrapApplyDetailsMapper.getBackApplyInfo(parentId); - backApplyInfo.setCode(taskCode); - backApplyInfo.setTaskId((int) backTaskId); - backApplyInfo.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); - backApplyInfo.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); - scrapApplyDetailsMapper.addBackInfo(backApplyInfo); - for (ScrapApplyDetails bean : backList) { - bean.setParentId(backApplyInfo.getId()); - bean.setStatus("1"); - bean.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); - bean.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); - scrapApplyDetailsMapper.addBackDetails(bean); - } + + //维修的创建维修任务,插入任务协议表 + if (wxList != null && wxList.size() > 0) { + //插入任务表tm_task + int newTaskId = backReceiveService.insertTt(wxList, TaskTypeEnum.MAINTENANCE_TASK.getCode(), SecurityUtils.getLoginUser().getUsername()); + //插入协议任务表tm_task_agreement + backReceiveService.insertTta(newTaskId, wxList); + //插入维修记录表repair_apply_details + backReceiveService.insertRad(newTaskId, wxList); } + if (repairList.size() > 0) { if (repairList.get(0).getCompanyId() != null) { companyId = Math.toIntExact(repairList.get(0).getCompanyId()); From cab68ff11bf34421f51cbe79cae0b8f42777af1c Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 22 Aug 2024 15:51:06 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=A2=86=E9=80=80=E6=96=99=E7=BB=BC?= =?UTF-8?q?=E5=90=88=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/material/BackRecordMapper.xml | 4 ++-- .../src/main/resources/mapper/material/LeaseRecordMapper.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml index 571a53d..4d46af2 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml @@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" baif.`code`, mm.ma_code AS maCode, bcd.back_num AS backNum, - su.nick_name AS backPerson, + baif.back_person AS backPerson, bcd.create_time AS createTime, bpl.lot_name AS proName, bui.unit_name AS unitName @@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id - LEFT JOIN sys_user su ON su.user_id = baif.back_person +-- LEFT JOIN sys_user su ON su.user_id = baif.back_person where 1 = 1 and (baif.`code` like concat('%',#{keyWord},'%') or diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml index 2b269f4..35886d6 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml @@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mm.ma_code as maCode, mt.unit_name as unit, lod.out_num as preNum, - su.nick_name as leasePerson, + lai.lease_person as leasePerson, lod.create_time as createTime, bpl.lot_name as proName, bui.unit_name as unitName @@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt on mt.type_id = lod.type_id LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id - LEFT JOIN sys_user su on su.user_id = lai.lease_person +-- LEFT JOIN sys_user su on su.user_id = lai.lease_person where 1 = 1 and (bai.agreement_code like concat('%',#{keyWord},'%') or From b3cc2cb0c653f46b4831be57d447941b7e920646 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 23 Aug 2024 09:25:46 +0800 Subject: [PATCH 3/8] add profile --- .../resources/bootstrap-sgzb_cloud_dev.yml | 4 ++ .../resources/bootstrap-sgzb_cloud_local.yml | 4 ++ .../main/resources/bootstrap-sgzb_nw_dev.yml | 41 +++++++++++++++++++ .../resources/bootstrap-sgzb_nw_local.yml | 41 +++++++++++++++++++ .../src/main/resources/bootstrap.yml | 4 -- 5 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml create mode 100644 sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_dev.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_dev.yml index e250a64..70297e7 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_dev.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_dev.yml @@ -1,3 +1,7 @@ +# Tomcat +server: + port: 39302 + # Spring spring: cloud: diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_local.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_local.yml index af03a82..f3326a0 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_local.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cloud_local.yml @@ -1,3 +1,7 @@ +# Tomcat +server: + port: 39302 + # Spring spring: cloud: diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml new file mode 100644 index 0000000..d48619f --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml @@ -0,0 +1,41 @@ +# Tomcat +server: + port: 49302 + +# Spring +spring: + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.0.62:8848 + namespace: sgzb_cloud_dev_nw + config: + # 配置中心地址 + server-addr: 192.168.0.62:8848 + namespace: sgzb_cloud_dev_nw + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +# 禁用Actuator端点的未经身份验证的访问 +management: + endpoint: + env: + enabled: false + +sgzb: + site: nw + job: + settlementJobDay: 1 + settlementJobCron: "0 0 1 1 * ?" + diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml new file mode 100644 index 0000000..d0474fe --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml @@ -0,0 +1,41 @@ +# Tomcat +server: + port: 49302 + +# Spring +spring: + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cloud_dev_nw + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cloud_dev_nw + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +# 禁用Actuator端点的未经身份验证的访问 +management: + endpoint: + env: + enabled: false + +sgzb: + site: nw + job: + settlementJobDay: 1 + settlementJobCron: "0 0 1 1 * ?" + diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml index 095266e..d0a0f1e 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml @@ -1,7 +1,3 @@ -# Tomcat -server: - port: 39302 - # Spring spring: application: From 583f632c39a672fabba44a617f0a79da4f349e07 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 23 Aug 2024 09:39:47 +0800 Subject: [PATCH 4/8] add profile --- .../src/main/resources/bootstrap-sgzb_nw_dev.yml | 4 ++-- .../src/main/resources/bootstrap-sgzb_nw_local.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml index d48619f..6916ce5 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_dev.yml @@ -16,11 +16,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.62:8848 - namespace: sgzb_cloud_dev_nw + namespace: sgzb_nwjj config: # 配置中心地址 server-addr: 192.168.0.62:8848 - namespace: sgzb_cloud_dev_nw + namespace: sgzb_nwjj # 配置文件格式 file-extension: yml # 共享配置 diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml index d0474fe..2c378f0 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml @@ -16,11 +16,11 @@ spring: discovery: # 服务注册地址 server-addr: 127.0.0.1:8848 - namespace: sgzb_cloud_dev_nw + namespace: sgzb_nwjj config: # 配置中心地址 server-addr: 127.0.0.1:8848 - namespace: sgzb_cloud_dev_nw + namespace: sgzb_nwjj # 配置文件格式 file-extension: yml # 共享配置 From c3c32505af4b228743a8b67e637598829a4676d8 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 23 Aug 2024 09:56:31 +0800 Subject: [PATCH 5/8] add profile --- .../main/resources/bootstrap-sgzb_cq_dev.yml | 34 +++++++++++++ .../resources/bootstrap-sgzb_cq_local.yml | 34 +++++++++++++ .../main/resources/bootstrap-sgzb_cq_dev.yml | 50 +++++++++++++++++++ .../resources/bootstrap-sgzb_cq_local.yml | 50 +++++++++++++++++++ .../main/resources/bootstrap-sgzb_cq_dev.yml | 35 +++++++++++++ .../resources/bootstrap-sgzb_cq_local.yml | 35 +++++++++++++ .../main/resources/bootstrap-sgzb_cq_dev.yml | 46 +++++++++++++++++ .../resources/bootstrap-sgzb_cq_local.yml | 45 +++++++++++++++++ 8 files changed, 329 insertions(+) create mode 100644 sgzb-auth/src/main/resources/bootstrap-sgzb_cq_dev.yml create mode 100644 sgzb-auth/src/main/resources/bootstrap-sgzb_cq_local.yml create mode 100644 sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_dev.yml create mode 100644 sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_local.yml create mode 100644 sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_dev.yml create mode 100644 sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_local.yml create mode 100644 sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_dev.yml create mode 100644 sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_local.yml diff --git a/sgzb-auth/src/main/resources/bootstrap-sgzb_cq_dev.yml b/sgzb-auth/src/main/resources/bootstrap-sgzb_cq_dev.yml new file mode 100644 index 0000000..10c3cfc --- /dev/null +++ b/sgzb-auth/src/main/resources/bootstrap-sgzb_cq_dev.yml @@ -0,0 +1,34 @@ +# Spring +spring: + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +onlineApprove: /lbcloud-oauth/oauth/token +wechatAppId: crhmaxnE +wechatAppsecret: 3893e6ed90d325f00e34583dd970a56580c05549 +getNowPersonDetailData: /lbcloud-user/user/queryLoginUserInfo +baseUrl: https://test-sso.csgmall.com.cn +appAppsecret: d8e6db9fa9bb09da0e270fa739233c823bf9c5f0 +personEasyList: /lbcloud-user/api/user/queryAndPaging/basicInfo +h5Appsecret: 3c4a67b7f6a268b4202a5328e6a1726979d5903b +h5AppId: G3NksDH2 +appsecret: 596e4863c8d112842ce820c130b236001297ea73 +appId: akvVFYgy +appAppId: u8LLfynf +getPersonDetailData: /lbcloud-user/api/user/queryById +registerPhone: /lbcloud-user/api/user/registrationByPhone +userBindUrl: /lbcloud-authority/api/RoleClient/bindDefaultSystemRole +verifyPhoneCode: /lbcloud-mbroker/api/broker/simpleVerificationCode \ No newline at end of file diff --git a/sgzb-auth/src/main/resources/bootstrap-sgzb_cq_local.yml b/sgzb-auth/src/main/resources/bootstrap-sgzb_cq_local.yml new file mode 100644 index 0000000..cee9f5f --- /dev/null +++ b/sgzb-auth/src/main/resources/bootstrap-sgzb_cq_local.yml @@ -0,0 +1,34 @@ +# Spring +spring: + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +onlineApprove: /lbcloud-oauth/oauth/token +wechatAppId: crhmaxnE +wechatAppsecret: 3893e6ed90d325f00e34583dd970a56580c05549 +getNowPersonDetailData: /lbcloud-user/user/queryLoginUserInfo +baseUrl: https://test-sso.csgmall.com.cn +appAppsecret: d8e6db9fa9bb09da0e270fa739233c823bf9c5f0 +personEasyList: /lbcloud-user/api/user/queryAndPaging/basicInfo +h5Appsecret: 3c4a67b7f6a268b4202a5328e6a1726979d5903b +h5AppId: G3NksDH2 +appsecret: 596e4863c8d112842ce820c130b236001297ea73 +appId: akvVFYgy +appAppId: u8LLfynf +getPersonDetailData: /lbcloud-user/api/user/queryById +registerPhone: /lbcloud-user/api/user/registrationByPhone +userBindUrl: /lbcloud-authority/api/RoleClient/bindDefaultSystemRole +verifyPhoneCode: /lbcloud-mbroker/api/broker/simpleVerificationCode \ No newline at end of file diff --git a/sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_dev.yml b/sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_dev.yml new file mode 100644 index 0000000..e0e986b --- /dev/null +++ b/sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_dev.yml @@ -0,0 +1,50 @@ +# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问 +management: + endpoint: + env: + enabled: false + +# Spring +spring: + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + sentinel: + # 取消控制台懒加载 + eager: true + transport: + # 控制台地址 + dashboard: 127.0.0.1:8718 + # nacos配置持久化 + datasource: + ds1: + nacos: + server-addr: 192.168.0.56:8848 + dataId: sentinel-sgzb-gateway + groupId: DEFAULT_GROUP + data-type: json + rule-type: gw-flow + +#加密组件 +jasypt: + encryptor: + password: Encrypt diff --git a/sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_local.yml b/sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_local.yml new file mode 100644 index 0000000..fa5b108 --- /dev/null +++ b/sgzb-gateway/src/main/resources/bootstrap-sgzb_cq_local.yml @@ -0,0 +1,50 @@ +# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问 +management: + endpoint: + env: + enabled: false + +# Spring +spring: + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + sentinel: + # 取消控制台懒加载 + eager: true + transport: + # 控制台地址 + dashboard: 127.0.0.1:8718 + # nacos配置持久化 + datasource: + ds1: + nacos: + server-addr: 127.0.0.1:8848 + dataId: sentinel-sgzb-gateway + groupId: DEFAULT_GROUP + data-type: json + rule-type: gw-flow + +#加密组件 +jasypt: + encryptor: + password: Encrypt diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_dev.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_dev.yml new file mode 100644 index 0000000..d1d05df --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_dev.yml @@ -0,0 +1,35 @@ +# Tomcat +server: + port: 39302 + +# Spring +spring: + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +# 多站点特殊配置 +sgzb: + site: cq + job: + settlementJobDay: 21 + settlementJobCron: "0 0 1 21 * ?" \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_local.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_local.yml new file mode 100644 index 0000000..dc5cd6f --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_cq_local.yml @@ -0,0 +1,35 @@ +# Tomcat +server: + port: 39302 + +# Spring +spring: + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +# 多站点特殊配置 +sgzb: + site: cq + job: + settlementJobDay: 21 + settlementJobCron: "0 0 1 21 * ?" \ No newline at end of file diff --git a/sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_dev.yml b/sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_dev.yml new file mode 100644 index 0000000..b28d1b0 --- /dev/null +++ b/sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_dev.yml @@ -0,0 +1,46 @@ +# Spring +spring: + servlet: + multipart: + max-request-size: 50MB + max-file-size: 30MB + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 192.168.0.56:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +#腾讯云sms +tencent: + sms: + #api秘钥标识 + accessKeyId: AKIDrreCVaRKDtMcgfU5QW9iEfv67tMfldJn + #api秘钥 + accessKeySecret: OXUgeMo0yhBRTGo6sVu3yiFX4rQtAzc3 + #请求域名 + endpoint: sms.tencentcloudapi.com + #所属区域 + region: ap-guangzhou + #腾讯云申请应用id + sdkAppId: 1400494336 + #签名 + smsSign: 南方电网互联网 + #云平台模板id 2116937-验收通知 2115503-登录验证 + templateId: 2116937,2115503 + diff --git a/sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_local.yml b/sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_local.yml new file mode 100644 index 0000000..4d4bd4f --- /dev/null +++ b/sgzb-modules/sgzb-system/src/main/resources/bootstrap-sgzb_cq_local.yml @@ -0,0 +1,45 @@ +# Spring +spring: + servlet: + multipart: + max-request-size: 50MB + max-file-size: 30MB + cloud: + loadbalancer: + # 关闭Ribbon的负载均衡器 + ribbon: + enabled: false + # 开启Nacos的负载均衡器 + nacos: + enabled: true + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + namespace: sgzb_cqjj + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +#腾讯云sms +tencent: + sms: + #api秘钥标识 + accessKeyId: AKIDrreCVaRKDtMcgfU5QW9iEfv67tMfldJn + #api秘钥 + accessKeySecret: OXUgeMo0yhBRTGo6sVu3yiFX4rQtAzc3 + #请求域名 + endpoint: sms.tencentcloudapi.com + #所属区域 + region: ap-guangzhou + #腾讯云申请应用id + sdkAppId: 1400494336 + #签名 + smsSign: 南方电网互联网 + #云平台模板id 2116937-验收通知 2115503-登录验证 + templateId: 2116937,2115503 From 15ccee2af1b62aba96feec91707e39a443f92e08 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 23 Aug 2024 10:01:55 +0800 Subject: [PATCH 6/8] add profile --- scripts/pipeline.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pipeline.sh b/scripts/pipeline.sh index cfb8ab3..69da07b 100644 --- a/scripts/pipeline.sh +++ b/scripts/pipeline.sh @@ -5,7 +5,7 @@ pipeline { JAVA_HOME = '/usr/lib/jvm/jdk1.8.0_381' JOBNAME="${JOB_NAME}" JENKINS_NODE_COOKIE = "dontKillMe" - SPRING_PROFILES_ACTIVE = "sgzb_cloud_dev" + SPRING_PROFILES_ACTIVE = "sgzb_cq_dev" } stages { stage('Check out') { From 9b67c44fe4e6c22da06e97392df68b65b6a3b061 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 23 Aug 2024 12:01:41 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=B7=A5=E5=9C=B0=E7=9B=B4=E8=BD=AC?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/material/mapper/WorkSiteDirectManageMapper.java | 2 +- .../material/service/impl/WorkSiteDirectManageImpl.java | 9 ++++----- .../mapper/material/WorkSiteDirectManageMapper.xml | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/WorkSiteDirectManageMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/WorkSiteDirectManageMapper.java index 1b6f6ab..fc72833 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/WorkSiteDirectManageMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/WorkSiteDirectManageMapper.java @@ -44,7 +44,7 @@ public interface WorkSiteDirectManageMapper { int batchDel(@Param("ids") ArrayList ids); - String getMachineStatus(LeaseOutDetails leaseOutDetails); + DirectApplyInfo getMachineStatus(LeaseOutDetails leaseOutDetails); int updateLeaseApplyDetailsOutNum(@Param("record")LeaseOutDetails leaseOutDetails); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java index 0d03f25..379471c 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java @@ -13,7 +13,6 @@ import com.bonus.sgzb.material.service.*; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - import javax.annotation.Resource; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -179,7 +178,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService { @Transactional(rollbackFor = Exception.class) public int insertLeaseOutDetail(List leaseOutDetails, TmTask lTask) { int res = 0; - String maStatus = "15"; + String maStatus = "16"; double outNum = 0.1; if (StringUtils.isNull(leaseOutDetails)) { log.info("领料出库失败,请检查参数是否填写完整!"); @@ -187,9 +186,9 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService { } for (LeaseOutDetails leaseOutDetail : leaseOutDetails) { if (!(Objects.equals(Integer.valueOf(0), leaseOutDetail.getMaId()) || leaseOutDetail.getMaId() == null)) { - String status = workSiteDirectManageMapper.getMachineStatus(leaseOutDetail); - if (!maStatus.equals(status)) { - log.info("领料出库失败,该设备不是在库状态!"); + DirectApplyInfo directApplyInfo = workSiteDirectManageMapper.getMachineStatus(leaseOutDetail); + if (!maStatus.equals(directApplyInfo.getStatus())) { + log.info("领料出库失败,该设备不是再用状态!"); return res; } } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml index e9e9686..ab00e53 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml @@ -431,8 +431,8 @@ - + select ma_status as status from ma_machine where ma_id = #{maId} From a88b68293947055723f7212cb33a7c2048070e5b Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 23 Aug 2024 13:00:41 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E9=80=80=E6=96=99=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=8F=AA=E6=98=BE=E7=A4=BA=E9=A2=86=E6=96=99=E7=9A=84=E6=9C=BA?= =?UTF-8?q?=E5=85=B7=E7=B1=BB=E5=9E=8B=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/material/mapper/BackApplyMapper.java | 6 ++ .../service/impl/BackApplyServiceImpl.java | 14 +++- .../mapper/material/BackApplyMapper.xml | 76 +++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletion(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java index 02555a5..69b857f 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java @@ -120,6 +120,12 @@ public interface BackApplyMapper { */ List getUseTypeTree(BackApplyInfo bean); + List getUseTypeTreeL4(BackApplyInfo bean); + + List getUseTypeTreeL3(List list); + + List getUseTypeTreeL21(List list); + /** * 退料申请导出 * @param bean diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java index 66e71d9..e9eb008 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java @@ -19,6 +19,7 @@ import org.springframework.stereotype.Service; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; /** * @author hay @@ -364,8 +365,19 @@ public class BackApplyServiceImpl implements BackApplyService { public AjaxResult getUseTypeTree(BackApplyInfo bean) { List groupList = new ArrayList<>(); List list = new ArrayList<>(); + List listL4 = new ArrayList<>(); + List listL3 = new ArrayList<>(); + List listL21 = new ArrayList<>(); try { - list = backApplyMapper.getUseTypeTree(bean); + //list = backApplyMapper.getUseTypeTree(bean); + listL4 = backApplyMapper.getUseTypeTreeL4(bean); + List list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList()); + listL3 = backApplyMapper.getUseTypeTreeL3(list4ParentIds); + List list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList()); + listL21 = backApplyMapper.getUseTypeTreeL21(list3ParentIds); + list.addAll(listL4); + list.addAll(listL3); + list.addAll(listL21); if (CollectionUtils.isNotEmpty(list)) { // 创建树形结构(数据集合作为参数) TypeTreeBuild treeBuild = new TypeTreeBuild(list); diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml index e0a9c7c..238721d 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml @@ -690,6 +690,82 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEVEL ASC, type_id; + + + + + +