From 0ed455631799bb89e40eab4d3729fe65bcd29167 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Tue, 21 Nov 2023 11:57:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E4=BF=AE-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/op/device/domain/EquTeamUser.java | 12 ++++++++++++ .../op/device/mapper/EquRepairOrderMapper.java | 2 ++ .../device/service/impl/DevicePDAServiceImpl.java | 10 ++++++++++ .../device/service/impl/EquOrderServiceImpl.java | 11 +++++++++++ .../device/service/impl/EquTeamServiceImpl.java | 4 ++-- .../mapper/device/EquOrderStandardMapper.xml | 2 +- .../mapper/device/EquRepairOrderMapper.xml | 15 ++++++++++++++- 7 files changed, 52 insertions(+), 4 deletions(-) diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquTeamUser.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquTeamUser.java index dd1c8e92..389d814d 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquTeamUser.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquTeamUser.java @@ -41,6 +41,10 @@ public class EquTeamUser extends BaseEntity { @Excel(name = "人员拼接名字") private String teamUserName; + /** 手机号 */ + @Excel(name = "手机号") + private String phonenumber; + public void setId(String id) { this.id = id; } @@ -90,6 +94,14 @@ public class EquTeamUser extends BaseEntity { this.teamUserName = teamUserName; } + public void setPhonenumber(String phonenumber) { + this.phonenumber = phonenumber; + } + + public String getPhonenumber() { + return phonenumber; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java index ea564636..35a8bda8 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquRepairOrderMapper.java @@ -103,4 +103,6 @@ public interface EquRepairOrderMapper { */ public List getBaseFileBatch(String orderId); + //联系方式 + EquTeamUser getRepairPhoneNumber(EquTeamUser equTeamUser); } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java index e6bc1f49..0defe8c2 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java @@ -259,6 +259,16 @@ public class DevicePDAServiceImpl implements IDevicePDAService { equRepairOrder.setOrderId(IdUtils.fastSimpleUUID()); equRepairOrder.setCreateTime(DateUtils.getNowDate()); equRepairOrder.setCreateBy(SecurityUtils.getUsername()); + //报修人编码、故障时间、设备编码、报修时间、联系人联系方式-自动报修 + equRepairOrder.setOrderBreakdownTime(DateUtils.getNowDate()); + equRepairOrder.setOrderRepairmanCode(SecurityUtils.getUsername()); + equRepairOrder.setEquipmentCode(equipmentCode); + equRepairOrder.setOrderTime(DateUtils.getNowDate()); + EquTeamUser equTeamUser = new EquTeamUser(); + equTeamUser.setUserName(SecurityUtils.getUsername()); + EquTeamUser equTeamUserList = equRepairOrderMapper.getRepairPhoneNumber(equTeamUser); + equRepairOrder.setOrderConnection(equTeamUserList.getPhonenumber()); + // 报修来源 if (equOrder.getPlanType().equals("inspection")){ equRepairOrder.setOrderSource("巡检"); diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java index f7f47d42..59ddc291 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquOrderServiceImpl.java @@ -278,6 +278,17 @@ public class EquOrderServiceImpl implements IEquOrderService { equRepairOrder.setOrderId(IdUtils.fastSimpleUUID()); equRepairOrder.setCreateTime(DateUtils.getNowDate()); equRepairOrder.setCreateBy(SecurityUtils.getUsername()); + + //报修人编码、故障时间、设备编码、报修时间、联系人联系方式-自动报修 + equRepairOrder.setOrderBreakdownTime(DateUtils.getNowDate()); + equRepairOrder.setOrderRepairmanCode(SecurityUtils.getUsername()); + equRepairOrder.setEquipmentCode(equipmentCode); + equRepairOrder.setOrderTime(DateUtils.getNowDate()); + EquTeamUser equTeamUser = new EquTeamUser(); + equTeamUser.setUserName(SecurityUtils.getUsername()); + EquTeamUser equTeamUserList = equRepairOrderMapper.getRepairPhoneNumber(equTeamUser); + equRepairOrder.setOrderConnection(equTeamUserList.getPhonenumber()); + // 报修来源 if (equOrder.getPlanType().equals("inspection")) { equRepairOrder.setOrderSource("巡检"); diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquTeamServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquTeamServiceImpl.java index f27fa2eb..8941946b 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquTeamServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquTeamServiceImpl.java @@ -136,8 +136,8 @@ public class EquTeamServiceImpl implements IEquTeamService { list = equTeam.getRightData(); String userId = list.get(i); equTeamUser.setUserId(userId); - String userName = equTeamUserMapper.selectUserName(equTeamUser); - equTeamUser.setUserName(userName); +// String userName = equTeamUserMapper.selectUserName(equTeamUser); +// equTeamUser.setUserName(userName); equTeamUserMapper.insertEquTeamUser(equTeamUser); } return success("修改设备班组成功!"); diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquOrderStandardMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquOrderStandardMapper.xml index 5c46c507..5eff47db 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquOrderStandardMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquOrderStandardMapper.xml @@ -238,7 +238,7 @@ and eo.order_code = #{orderCode} and eo.del_flag = '0' - and eos.error_flag = '1' + and eos.detail_reach = '0' diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquRepairOrderMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquRepairOrderMapper.xml index 26c3564d..c79ff78a 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquRepairOrderMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquRepairOrderMapper.xml @@ -273,7 +273,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" user_id AS userId, user_name AS userName, nick_name AS nickName, - CONCAT(nick_name,user_name) AS teamUserName + CONCAT(nick_name,user_name) AS teamUserName, + phonenumber AS phonenumber from sys_user and user_name like concat('%', #{userName}, '%') @@ -282,6 +283,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + +