From 357f0350c6e745dc1df685110c6fd6253121563a Mon Sep 17 00:00:00 2001 From: 15856 <15856818120@163.com> Date: Wed, 19 Jun 2024 09:52:03 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=86=85=E9=83=A8=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E4=BB=A5=E5=90=8E=E7=9F=AD=E4=BF=A1=E9=80=9A=E7=9F=A5=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BA=BA=E5=91=98=E8=BF=9B=E8=A1=8C=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/sgzb/app/mapper/TmTaskMapper.java | 10 ++---- .../app/service/impl/TmTaskServiceImpl.java | 32 +++++++++++++++++++ .../resources/mapper/app/TmTaskMapper.xml | 16 ++++++++++ 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java index 7d2cfedf..a1e663fa 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java @@ -1,20 +1,12 @@ package com.bonus.sgzb.app.mapper; import com.bonus.sgzb.app.domain.*; -import com.bonus.sgzb.base.domain.MaintenanceGang; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; -/** -* Description: -* @Author 阮世耀 -* @Create 2023/12/13 15:14 -* @Version 1.0 -*/ - @Mapper public interface TmTaskMapper { @@ -151,4 +143,6 @@ public interface TmTaskMapper { List getleaseDetailsStatus(TmTask task); + + List getUserByParenntId(TmTask tmTask); } \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 8385f738..62e1f355 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -17,6 +17,7 @@ import com.bonus.sgzb.common.core.utils.DateUtils; import com.bonus.sgzb.common.core.utils.StringUtils; import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.security.utils.SecurityUtils; +import com.bonus.sgzb.system.api.RemoteUserService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -68,6 +69,9 @@ public class TmTaskServiceImpl implements TmTaskService { @Resource private BmFlowRecordService bmFlowRecordService; + @Resource + private RemoteUserService remoteUserService; + private final static String STRING_ADMIN = "admin"; private final static String STRING_SGB = "sgb"; private final static String STRING_AJB = "sgb"; @@ -135,6 +139,12 @@ public class TmTaskServiceImpl implements TmTaskService { } } } + //短信通知人员进行出库 + for (LeaseApplyDetails details:leaseApplyDetails) { + //内部审核以后通知机具管理人进行出库 + smsNotification(details,record.getCode()); + } + } else if (record.getTaskStatus() == 32 && companyId != null) { // 再审核领料任务信息表 List leaseApplyInfoList = record.getLeaseApplyInfoList(); @@ -212,6 +222,28 @@ public class TmTaskServiceImpl implements TmTaskService { } + private void smsNotification(LeaseApplyDetails details,String code) { + TmTask tmTask = new TmTask(); + tmTask.setId(details.getParenntId().toString()); + //获取机具所属人员 + List leaseDetailByParent = tmTaskMapper.getUserByParenntId(tmTask); + for (TmTask tmTaskNew: leaseDetailByParent) { + //对手机号进行处理,因为存在一种类型的机具归属多个人的情况 + log.info("短信通知人为:{}",tmTaskNew.getUserName()); + if (tmTaskNew.getPhoneNumber()!=null){ + String[] phoneNumberList = tmTaskNew.getPhoneNumber().split(","); + String message ="尊敬的用户,宁夏智慧仓储管理系统提醒您:您有一个领料单号为:"+code+"的领料申请待处理,请及时查看"; + for (int i = 0; i < phoneNumberList.length; i++) { + try { + remoteUserService.send(phoneNumberList[i], message); + }catch (Exception e){ + log.info("手机号为:{}发送短信失败",phoneNumberList[i]); + } + } + } + } + } + @Override public int updateLeaseTaskAuditInfoCq(TmTask record) { int result = 0; diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml index 89a4678b..b55ee650 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml @@ -1249,4 +1249,20 @@ WHERE lai.id = #{id} + From 0616cc2bf05c4efa8c2b0b071c58a3144ec7022f Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 19 Jun 2024 10:12:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=8A=A8=E6=80=81=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E8=B7=B3=E8=BD=AC=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/utils/globalUrl.js | 9 ++++++++- sgzb-ui/src/views/dashboard.vue | 15 +++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sgzb-ui/src/utils/globalUrl.js b/sgzb-ui/src/utils/globalUrl.js index 114be562..f0887eff 100644 --- a/sgzb-ui/src/utils/globalUrl.js +++ b/sgzb-ui/src/utils/globalUrl.js @@ -4,7 +4,14 @@ // const qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode='; //宁夏 // const qrUrl = 'https://z.csgmall.com.cn/gl/qrCode/qrCodePage?qrCode='; //南网 -const qrUrl = process.env.NODE_ENV === 'production' ? 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode=' : 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode=' +// const qrUrl = process.env.NODE_ENV === 'production' ? 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode=' : 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode=' +let qrUrl = '' +const origin = window.location.origin +if (origin == 'http://112.29.103.165:21624') { + qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode=' +} else { + qrUrl = 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode=' +} export default { qrUrl, diff --git a/sgzb-ui/src/views/dashboard.vue b/sgzb-ui/src/views/dashboard.vue index 478d9106..f60c4a30 100644 --- a/sgzb-ui/src/views/dashboard.vue +++ b/sgzb-ui/src/views/dashboard.vue @@ -12,28 +12,23 @@ } }, created() { - if (process.env.NODE_ENV === 'production') { - this.jumpUrl = 'http://112.29.103.165:21624/' + const origin = window.location.origin + if (origin == 'http://112.29.103.165:21624') { + this.jumpUrl = origin } else { - this.jumpUrl = 'http://192.168.0.14:21624/' + this.jumpUrl = 'http://192.168.0.14:21624' } this.openNewWindow() this.$tab.closePage().then(() => {}) }, methods: { openNewWindow() { - // window.open( - // 'http://192.168.0.14:21624/index01.html?token=' + - // localStorage.getItem('token'), - // '_blank', - // ) window.open( - `${this.jumpUrl}index01.html?token=${localStorage.getItem( + `${this.jumpUrl}/index01.html?token=${localStorage.getItem( 'token', )}`, '_blank', ) - // window.open('http://112.29.103.165:21624/index01.html?token='+localStorage.getItem('token'), '_blank'); // 产线 }, }, } From 5c3c788d71945ffdaa8cb67bc0d87112733c19cc Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 19 Jun 2024 10:34:22 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=80=81=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8F=92=E6=A7=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/claimAndRefund/receive/receiveManageAdd.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgzb-ui/src/views/claimAndRefund/receive/receiveManageAdd.vue b/sgzb-ui/src/views/claimAndRefund/receive/receiveManageAdd.vue index fa1e76da..626921d6 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/receiveManageAdd.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/receiveManageAdd.vue @@ -98,7 +98,7 @@ -