From 3ddaa3b2c5902c9645d0ec244f1fae39c8d0a1c1 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Mon, 13 May 2024 18:00:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E8=BF=90=E8=BD=A6=E8=BE=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=90=8C=E6=AD=A5=E8=A1=8C=E8=BD=A6=E4=B8=89=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/beidou/BeidouController.java | 2 + ...SecurityWaybillRegistrationController.java | 4 ++ ...cSecurityCustomerManagementController.java | 1 + ...SecurityWaybillRegistrationController.java | 17 ++++++++ .../InspectAnnuallyController.java | 3 ++ .../OperatingVehiclesController.java | 3 ++ .../operations/OperationsController.java | 2 + .../TaxationManageController.java | 40 +++++++++++++++++++ .../impl/TrafficDrivingTypeServiceImpl.java | 1 + ...afficSecurityWaybillRegistrationMapper.xml | 8 +++- 10 files changed, 79 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zcloud/controller/beidou/BeidouController.java b/src/main/java/com/zcloud/controller/beidou/BeidouController.java index d768dcb..d33a155 100644 --- a/src/main/java/com/zcloud/controller/beidou/BeidouController.java +++ b/src/main/java/com/zcloud/controller/beidou/BeidouController.java @@ -234,6 +234,8 @@ public class BeidouController extends BaseController { data.put("ARCHIVES_TYPE", "1"); } else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) { data.put("ARCHIVES_TYPE", "2"); + }else { + data.put("ARCHIVES_TYPE", "0"); } return false; }); diff --git a/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityWaybillRegistrationController.java b/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityWaybillRegistrationController.java index 7d6f1b2..dfd070c 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityWaybillRegistrationController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/AppTrafficSecurityWaybillRegistrationController.java @@ -55,6 +55,10 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); page.setPd(pd); List varList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page); + varList.stream().forEach(data -> { + data.put("TRANSPORTVEHICLE", data.getString("PLATE_NUMBER")); + }); + System.out.println("varList = " + varList); map.put("varList", varList); map.put("page", page); diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java index f9c3ec5..0f4030b 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCustomerManagementController.java @@ -142,6 +142,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID List varList = customerManagementService.getTrafficCustomerSelectList(pd); + System.out.println("varList = " + varList); map.put("varList", varList); 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 08f12d8..ab879ee 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java @@ -6,6 +6,7 @@ import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.service.comprehensive.*; +import com.zcloud.service.operatingvehicles.OperatingVehiclesService; import com.zcloud.service.system.UsersService; import com.zcloud.util.*; import org.apache.commons.lang.ObjectUtils; @@ -39,6 +40,9 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController @Autowired private TrafficDrivingSignService trafficDrivingSignService; + @Autowired + private OperatingVehiclesService operatingVehiclesService; + @Autowired private UsersService usersService; @@ -53,6 +57,10 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); List varList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page); + varList.forEach(data -> { + data.put("TRANSPORTVEHICLE", data.getString("PLATE_NUMBER")); + }); + System.out.println("varList = " + varList); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); @@ -199,6 +207,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读 pd.put("ENTRUST_PERSON", pd.getString("CLIENTCONTACTPERSON")); pd.put("CONFIRM_PERSON", pd.getString("CONFIRMINGPERSON")); + pd.put("TRANSPORTVEHICLE", pd.getString("PLATE_NUMBER")); List dispatchers = Arrays.stream(pd.getString("DISPATCHER").split(",")).collect(Collectors.toList()); List names = new ArrayList<>(); dispatchers.forEach(data -> { @@ -269,7 +278,15 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController } } } + PageData pageData = new PageData(); + pageData.put("PLATE_NUMBER", pd.getString("TRANSPORTVEHICLE")); + pageData.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); + PageData vehicle = operatingVehiclesService.findByfindByPlateNumber(pageData); + if(!ObjectUtil.isEmpty(vehicle)) { + pd.put("TRANSPORTVEHICLE", vehicle.getString("OPERATING_ID")); + } trafficSecurityWaybillRegistrationService.edit(pd); + map.put("result", errInfo); map.put("pd", pd); return map; diff --git a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java index 47bf071..c88b087 100644 --- a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java +++ b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java @@ -180,11 +180,14 @@ public class InspectAnnuallyController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); List varList = inspectAnnuallyService.list(page); //列出年检列表 + System.out.println("varList = " + varList); varList.stream().anyMatch(data -> { if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) { data.put("ARCHIVES_TYPE", "2"); } else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) { data.put("ARCHIVES_TYPE", "1"); + }else{ + data.put("ARCHIVES_TYPE", "0"); } return false; }); diff --git a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java index 45aacfa..ed855e7 100644 --- a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java +++ b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java @@ -28,7 +28,10 @@ import org.springframework.web.servlet.ModelAndView; import java.io.File; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; +import java.util.stream.Stream; @Controller @RequestMapping("/operatingvehicles") diff --git a/src/main/java/com/zcloud/controller/operations/OperationsController.java b/src/main/java/com/zcloud/controller/operations/OperationsController.java index 4e25fa9..5e200fd 100644 --- a/src/main/java/com/zcloud/controller/operations/OperationsController.java +++ b/src/main/java/com/zcloud/controller/operations/OperationsController.java @@ -178,6 +178,8 @@ public class OperationsController extends BaseController { data.put("ARCHIVES_TYPE", "2"); } else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) { data.put("ARCHIVES_TYPE", "1"); + }else{ + data.put("ARCHIVES_TYPE", "0"); } return false; }); diff --git a/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java b/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java index d6657a9..4bb4358 100644 --- a/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java +++ b/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java @@ -2,6 +2,7 @@ package com.zcloud.controller.taxationManage; import cn.hutool.core.util.ObjectUtil; import com.alibaba.excel.util.DateUtils; +import com.aliyuncs.facebody.model.v20191230.PedestrianDetectAttributeResponse; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.*; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -168,6 +171,43 @@ public class TaxationManageController extends BaseController { } return false; }); + varList.forEach(data -> { + Date dueDate = DateUtil.fomatDate(data.getString("EXPIRE_DATE")); + Date reminderDate = DateUtil.fomatDate(data.getString("REMINDER_DATA")); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + String toDay = sdf.format(new Date()); + Date date = null; + try { + date = sdf.parse(toDay); + } catch (ParseException e) { + throw new RuntimeException(e); + } + // 已到期 + if(dueDate.before(date)) { + data.put("EXPIRE_STATUS", "0"); + try { + taxationManageService.edit(data); + } catch (Exception e) { + throw new RuntimeException(e); + } + // 即将到期 + } else if ((dueDate.after(date) || dueDate.equals(date)) && (reminderDate.before(date) || reminderDate.equals(date))) { + data.put("EXPIRE_STATUS", "2"); + try { + taxationManageService.edit(data); + } catch (Exception e) { + throw new RuntimeException(e); + } + // 未到期 + }else{ + data.put("EXPIRE_STATUS", "1"); + try { + taxationManageService.edit(data); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficDrivingTypeServiceImpl.java b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficDrivingTypeServiceImpl.java index e083778..fb8445c 100644 --- a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficDrivingTypeServiceImpl.java +++ b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficDrivingTypeServiceImpl.java @@ -77,6 +77,7 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService */ public PageData infoCategory(PageData pd)throws Exception{ PageData cpd = TrafficSecurityWaybillRegistrationMapper.findById(pd); // 根据ID读取 + cpd.put("TRANSPORTVEHICLE", cpd.getString("PLATE_NUMBER")); List varOList = trafficDrivingTypeMapper.findListbyDetail(pd); List vList = trafficDrivingTypeMapper.findCategory(pd); diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml index 32ac66a..cbeade6 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityWaybillRegistrationMapper.xml @@ -206,7 +206,8 @@ c.CUSTOMERNAME AS CLIENT_NAME, c2.CUSTOMERNAME AS CONFIRMER_NAME, t.OPERATTIME AS STARTTIME, - p.OPERATTIME AS STOPTIME + p.OPERATTIME AS STOPTIME, + bto.PLATE_NUMBER from f left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID @@ -217,6 +218,7 @@ left join bus_traffic_customer_management c2 on f.CONFIRMER = c2.CUSTOMERNAME_ID left join bus_traffic_driving_sign t on t.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and t.CHECKTYPE_ID = 'status001' left join bus_traffic_driving_sign p on p.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and p.CHECKTYPE_ID = 'status003' + left join bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.TRANSPORTVEHICLE where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.WAYBILLSTATUS = #{pd.WAYBILLSTATUS} @@ -260,7 +262,8 @@ b2.ADMINISTRATIVEREGIONS AS GOAL_ADDR, oa.NAME AS DEPARTMENTNAME, btcc.CONTACT AS ENTRUSTPERSON, - btcc2.CONTACT AS CONFIRMPERSON + btcc2.CONTACT AS CONFIRMPERSON, + bto.PLATE_NUMBER from f left join bus_traffic_operatingvehicle e on f.TRANSPORTVEHICLE = e.PLATE_NUMBER @@ -275,6 +278,7 @@ left join bus_traffic_customer_contact btcc on btcc.CONTACT_ID = f.CLIENTCONTACTPERSON left join bus_traffic_customer_contact btcc2 on btcc2.CONTACT_ID = f.CONFIRMINGPERSON left join oa_department oa on oa.DEPARTMENT_ID = f.DEPARTMENT_ID + left join bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.TRANSPORTVEHICLE where f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID} AND