From 17370942eee37ea6601758e64d74ab5ea2039842 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Tue, 21 May 2024 17:56:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...SecurityWaybillRegistrationController.java | 1 - .../InspectAnnuallyController.java | 1 - .../OperatingVehiclesController.java | 3 +++ .../operations/OperationsController.java | 3 +-- .../riskWarning/RiskWarningController.java | 11 ++++---- .../controller/system/UsersController.java | 25 +++++++++++++++++-- .../system/UserCorpReviewMapper.java | 2 ++ .../service/system/UserCorpReviewService.java | 2 ++ .../impl/UserCorpReviewServiceImpl.java | 4 +++ .../system/impl/UserCorpServiceImpl.java | 2 +- .../system/UserCorpReviewMapper.xml | 11 ++++++++ 11 files changed, 53 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java index ab879ee..45a5516 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java @@ -60,7 +60,6 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController 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); diff --git a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java index c88b087..aaca331 100644 --- a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java +++ b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java @@ -180,7 +180,6 @@ 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"); diff --git a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java index 33b488e..fa221a8 100644 --- a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java +++ b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java @@ -221,6 +221,9 @@ public class OperatingVehiclesController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); List varList = operatingVehiclesService.list(page); //列出Question列表 + + List dataInfo = new ArrayList<>(); + map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/operations/OperationsController.java b/src/main/java/com/zcloud/controller/operations/OperationsController.java index 603f9cb..155073b 100644 --- a/src/main/java/com/zcloud/controller/operations/OperationsController.java +++ b/src/main/java/com/zcloud/controller/operations/OperationsController.java @@ -307,8 +307,7 @@ public class OperationsController extends BaseController { map.put("list", varList); map.put("result", errInfo); return map; - } - if ("2".equals(pd.getString("TRAFFIC_TYPE"))) { + }else if ("2".equals(pd.getString("TRAFFIC_TYPE"))) { // 货运挂车 List freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID")); page.setPd(pd); diff --git a/src/main/java/com/zcloud/controller/riskWarning/RiskWarningController.java b/src/main/java/com/zcloud/controller/riskWarning/RiskWarningController.java index 5642366..bc36207 100644 --- a/src/main/java/com/zcloud/controller/riskWarning/RiskWarningController.java +++ b/src/main/java/com/zcloud/controller/riskWarning/RiskWarningController.java @@ -196,18 +196,19 @@ public class RiskWarningController extends BaseController { @ResponseBody @LogAnno(menuType= "双重预控",menuServer= "风险提示",instructionsOperate = "风险四色图",instructionsType = "下载") public void goDownload(HttpServletResponse response) throws Exception{ - - PageData pd = new PageData(); pd = this.getPageData(); - PageData pd2 = new PageData(); pd2.put("FOREIGN_KEY", pd.getString("RISKWARNING_ID")); //pd2.put("TYPE",pd.get("TYPE")); List imgs = imgfilesService.listAll(pd2);//营业执照图片 - pd = riskwarningService.findById(pd); - String zipName = pd.getString("NAME")+".zip"; + String zipName; + if(!pd.getString("NAME").toString().matches("[a-zA-Z]+")) { + zipName = new String(pd.getString("NAME").getBytes("GBK"),"ISO-8859-1") + ".zip"; + }else{ + zipName = pd.getString("NAME")+".zip"; + } try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ZipOutputStream zos = new ZipOutputStream(bos); diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index 6f4d2aa..bfdf01a 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.system; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.EmployeeData; @@ -17,6 +19,7 @@ import com.zcloud.service.system.*; import com.zcloud.util.*; import net.sf.json.JSONArray; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.crypto.hash.SimpleHash; @@ -84,6 +87,9 @@ public class UsersController extends BaseController { @Autowired private Smb smb; + @Autowired + private UserCorpReviewService userCorpReviewService; + /** * 根据卡号找人信息 * @@ -739,7 +745,7 @@ public class UsersController extends BaseController { pd = this.getPageData(); // pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd = userInfoService.getUserCardId(pd); - if (pd != null) { + if (pd != null && !StringUtils.isEmpty(pd.getString("ENTRY_DATE"))) { map.put("pd", pd); } map.put("result", errInfo); //返回结果 @@ -2532,7 +2538,7 @@ public class UsersController extends BaseController { } } } - c.put("ALLOW_QUALIFICATION", ALLOW_QUALIFICATION.length() < 1 ? "" : ALLOW_QUALIFICATION.substring(0, ALLOW_QUALIFICATION.length()-1)); + c.put("ALLOW_QUALIFICATION", (ALLOW_QUALIFICATION.length() < 1 ? "" : ALLOW_QUALIFICATION.substring(0, ALLOW_QUALIFICATION.length()-1))); } if (Tools.notEmpty(pd.getString("CORPINFO_ID"))) { PageData dept = new PageData(); @@ -2546,9 +2552,14 @@ public class UsersController extends BaseController { map.put("period", shiftDutyPeriod); map.put("periodStr", shiftDutyPeriod.getString("DURATION") + ',' + shiftDutyPeriod.getString("WORKSTATUS") + ',' + shiftDutyPeriod.getString("WORKPERIOD")); } + PageData data = new PageData(); + data.put("USER_ID", pd.getString("USER_ID")); + data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + PageData userReviewInfo = userCorpReviewService.findByUserId(data); map.put("pd", pd); map.put("userCerList", userCerList); map.put("certificateList", certificateList); + map.put("statusInfo", userReviewInfo); map.put("result", errInfo); return map; } @@ -2999,6 +3010,16 @@ public class UsersController extends BaseController { qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]); userCertificateAppendixService.save(qualificationCertificateCategory); } + PageData data = new PageData(); + data.put("USER_ID", pd.getString("USER_ID")); + data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + List userCorpList = userCorpService.listAll(data); + if(!CollectionUtil.isEmpty(userCorpList)) { + if(StringUtils.equals(userCorpList.get(0).getString("APPLY_STATUS"), "-1")) { + userCorpList.get(0).put("APPLY_STATUS", "0"); + } + } + userCorpService.edit(userCorpList.get(0)); map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java index fd7937b..7f95d8a 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java @@ -54,5 +54,7 @@ public interface UserCorpReviewMapper { * @throws Exception */ void deleteAll(String[] ArrayDATA_IDS); + + PageData findByUserId(PageData data); } diff --git a/src/main/java/com/zcloud/service/system/UserCorpReviewService.java b/src/main/java/com/zcloud/service/system/UserCorpReviewService.java index 35af16f..ee9ea2e 100644 --- a/src/main/java/com/zcloud/service/system/UserCorpReviewService.java +++ b/src/main/java/com/zcloud/service/system/UserCorpReviewService.java @@ -54,5 +54,7 @@ public interface UserCorpReviewService { * @throws Exception */ public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + + PageData findByUserId(PageData data); } diff --git a/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java index fc67f3c..6d3d290 100644 --- a/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java @@ -81,5 +81,9 @@ public class UserCorpReviewServiceImpl implements UserCorpReviewService { userCorpReviewMapper.deleteAll(ArrayDATA_IDS); } + @Override + public PageData findByUserId(PageData data) { + return userCorpReviewMapper.findByUserId(data); + } } diff --git a/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java index 1305bfc..0706b66 100644 --- a/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java @@ -134,7 +134,7 @@ public class UserCorpServiceImpl implements UserCorpService { review.put("USER_CORP_ID", pd.getString("USER_CORP_ID")); review.put("USER_ID", pd.getString("USER_ID")); review.put("REVIEW_RESULT", pd.getString("REVIEW_RESULT")); - review.put("REVIEW_COMMENTS", pd.getString("REVIEW_COMMENTS")); + review.put("REVIEW_COMMENTS", pd.getString("APPLY_CONTENT")); userCorpReviewService.save(review); if ("2".equals(pd.getString("APPLY_TYPE"))) { //入职确认 setPractitionerConfirmEntry(pd); diff --git a/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml b/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml index a3b046a..59fa3e9 100644 --- a/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml @@ -146,4 +146,15 @@ #{item} + +