From 691cbf33c5bb497d7adf6acb66ff6320a22a3b93 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Tue, 7 May 2024 18:03:06 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BC=98=E5=8C=96=20=E7=94=B5=E5=AD=90?= =?UTF-8?q?=E8=BF=90=E5=8D=95=20=E5=88=A0=E9=99=A4=E5=A7=94=E6=89=98?= =?UTF-8?q?=E6=96=B9=20=E7=A1=AE=E8=AE=A4=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TrafficDrivingCommitmentController.java | 7 +++- ...cSecurityCustomerManagementController.java | 4 ++ ...cSecurityLocationManagementController.java | 14 +++++++ ...SecurityWaybillRegistrationController.java | 37 ++----------------- ...fficSecurityWaybillRegistrationMapper.java | 2 + ...ficSecurityWaybillRegistrationService.java | 2 + ...ecurityWaybillRegistrationServiceImpl.java | 5 +++ .../TrafficSecurityCustomerContactMapper.xml | 2 +- ...rafficSecurityCustomerManagementMapper.xml | 4 +- ...rafficSecurityLocationManagementMapper.xml | 4 +- ...afficSecurityWaybillRegistrationMapper.xml | 13 +++++++ 11 files changed, 54 insertions(+), 40 deletions(-) diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java index bdb5852..195050f 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java @@ -6,7 +6,7 @@ import com.zcloud.entity.PageData; import com.zcloud.logs.LogAnno; import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService; import com.zcloud.util.*; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.apache.shiro.crypto.hash.SimpleHash; import org.springframework.beans.factory.annotation.Autowired; @@ -90,6 +90,11 @@ public class TrafficDrivingCommitmentController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); List varList = trafficDrivingCommitmentService.listForDrivingCommitment(page); + varList.stream().forEach(data -> { + if(StringUtils.equals(data.getString("INQUIRYCONCLUSION"), "正常")) { + data.put("INQUIRYCONCLUSION", "1"); + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java index f81fcc6..edef176 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java @@ -9,6 +9,7 @@ import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService; import com.zcloud.service.comprehensive.TrafficSecurityNoticeService; +import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService; import com.zcloud.util.Const; import com.zcloud.util.DateUtil; import com.zcloud.util.Jurisdiction; @@ -34,6 +35,9 @@ public class TrafficSecurityCustomerManagementController extends BaseController @Autowired private TrafficSecurityCustomerManagementService customerManagementService; + @Autowired + private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService; + //新增 @RequestMapping(value = "/add") diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityLocationManagementController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityLocationManagementController.java index 1b684ca..9bd15cd 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityLocationManagementController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityLocationManagementController.java @@ -8,6 +8,7 @@ import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService; import com.zcloud.service.comprehensive.TrafficSecurityLocationManagementService; +import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService; import com.zcloud.util.DateUtil; import com.zcloud.util.Jurisdiction; import com.zcloud.util.Tools; @@ -28,6 +29,9 @@ public class TrafficSecurityLocationManagementController extends BaseController @Autowired private TrafficSecurityLocationManagementService locationManagementService; + @Autowired + private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService; + //新增 @RequestMapping(value = "/add") @ResponseBody @@ -91,6 +95,16 @@ public class TrafficSecurityLocationManagementController extends BaseController pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名 pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + /*PageData locationInfo = locationManagementService.getTrafficLocationInfo(pd); + PageData pageData = new PageData(); + pageData.put("ORIGIN", locationInfo.getString("LOCATIONNAME_ID")); + pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + List pageDataList = trafficSecurityWaybillRegistrationService.getWaybillRegistrationInfo(pageData); + pageDataList.stream() + .forEach(data -> { + data.put("ORIGIN", ""); + trafficSecurityWaybillRegistrationService.edit(data); + });*/ locationManagementService.delete(pd); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java index 59cc637..b868051 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java @@ -186,7 +186,9 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController PageData pd = new PageData(); pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读 + pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读= + pd.put("ENTRUST_PERSON", pd.getString("CLIENTCONTACTPERSON")); + pd.put("CONFIRM_PERSON", pd.getString("CONFIRMINGPERSON")); List dispatchers = Arrays.stream(pd.getString("DISPATCHER").split(",")).collect(Collectors.toList()); List names = new ArrayList<>(); dispatchers.forEach(data -> { @@ -231,43 +233,10 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController Map map = new HashMap(); String errInfo = "success"; PageData pd = this.getPageData(); - pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 - - PageData pd2 = new PageData(); - pd2.put("CONTACT", pd.getString("ENTRUST_PERSON")); - PageData contactInfo = trafficSecurityCustomerManagementService.findByContactName(pd2); - if (!ObjectUtil.isEmpty(contactInfo)) { - pd.put("ENTRUST_PERSON", contactInfo.getString("CONTACT_ID")); - if (!contactInfo.getString("CONTACTPHONE").equals(pd.getString("CLIENTCONTACTPHONE"))) { - PageData entrust = new PageData(); - entrust.put("CONTACTPHONE", pd.getString("CLIENTCONTACTPHONE")); - entrust.put("CUSTOMERCONTACT_ID", contactInfo.getString("CUSTOMERCONTACT_ID")); - entrust.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id - entrust.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名 - entrust.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 - trafficSecurityCustomerManagementService.editContactPhone(entrust); - } - } - PageData pd3 = new PageData(); - pd3.put("CONTACT", pd.getString("CONFIRM_PERSON")); - PageData pageData = trafficSecurityCustomerManagementService.findByContactName(pd3); - if (!ObjectUtil.isEmpty(pageData)) { - pd.put("CONFIRM_PERSON", pageData.getString("CONTACT_ID")); - if (!pd.getString("CONFIRMINGPHONE").equals(pageData.getString("CONTACTPHONE"))) { - PageData entrust = new PageData(); - entrust.put("CONTACTPHONE", pd.getString("CONFIRMINGPHONE")); - entrust.put("CUSTOMERCONTACT_ID", pageData.getString("CUSTOMERCONTACT_ID")); - entrust.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id - entrust.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名 - entrust.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 - trafficSecurityCustomerManagementService.editContactPhone(entrust); - } - } trafficSecurityWaybillRegistrationService.edit(pd); - map.put("result", errInfo); map.put("pd", pd); return map; diff --git a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java index c6ae7c1..edd67b0 100644 --- a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.java @@ -29,4 +29,6 @@ public interface TrafficSecurityWaybillRegistrationMapper { PageData findById(PageData pd); void edit(PageData pd); + + List getWaybillRegistrationInfo(PageData pd); } diff --git a/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java b/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java index 80f7adf..8ec2e86 100644 --- a/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java +++ b/src/main/java/com/zcloud/service/comprehensive/TrafficSecurityWaybillRegistrationService.java @@ -15,4 +15,6 @@ public interface TrafficSecurityWaybillRegistrationService { PageData findById(PageData pd); void edit(PageData pd); + + List getWaybillRegistrationInfo(PageData pd); } diff --git a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java index e99a51b..b8e993e 100644 --- a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java +++ b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSecurityWaybillRegistrationServiceImpl.java @@ -37,4 +37,9 @@ public class TrafficSecurityWaybillRegistrationServiceImpl implements TrafficSec public void edit(PageData pd) { TrafficSecurityWaybillRegistrationMapper.edit(pd); } + + @Override + public List getWaybillRegistrationInfo(PageData pd) { + return TrafficSecurityWaybillRegistrationMapper.getWaybillRegistrationInfo(pd); + } } diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerContactMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerContactMapper.xml index 8908fec..d03dea4 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerContactMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerContactMapper.xml @@ -162,7 +162,7 @@ where f.CONTACT = #{CONTACT} AND - f.ISDELETE = 0 + f.ISDELETE = '0' diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml index 6e951fb..cb8e8cb 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml @@ -277,6 +277,19 @@ f.CORPINFO_ID = #{CORPINFO_ID} +