diff --git a/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java index aeaf41c..23ea01a 100644 --- a/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java +++ b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java @@ -1,5 +1,6 @@ package com.zcloud.controller.assignedManage; +import cn.hutool.core.collection.CollectionUtil; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -8,12 +9,15 @@ import com.zcloud.service.freighttrailer.FreightTrailerService; import com.zcloud.service.operatingvehicles.OperatingVehiclesService; import com.zcloud.service.system.ImgFilesService; import com.zcloud.util.*; +import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.*; +import java.util.stream.Collectors; @Controller @RequestMapping("/assignedmanage") @@ -195,7 +199,6 @@ public class AssignedManageController extends BaseController { if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); page.setPd(pd); List varList = assignedManageService.list(page); //列出MajorDangerSource列表 - List vehicleList = new ArrayList<>(); map.put("varList", varList); map.put("page", page); @@ -255,40 +258,26 @@ public class AssignedManageController extends BaseController { PageData pd = new PageData(); String corpId = Jurisdiction.getCORPINFO_ID(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - List allOperatingVehicleList = operatingVehiclesService.getPulldownVehicleList(pd); // 查询出所有不包括 删除、报废的车辆 + List allOperatingVehicleList = operatingVehiclesService.getPulldownVehicleList(pd); // 查询出所有不包括 删除、报废的营运车辆 List allAssignedList = assignedManageService.assignedList(corpId); // 所有过户的车辆 - for (int i = 0; i < allAssignedList.size(); i++) { - for (int j = 0; j < allOperatingVehicleList.size(); j++) { - if(allAssignedList.get(i).get("RAW_PLATE_NUMBER").equals(allOperatingVehicleList.get(j).get("OPERATING_ID"))) { - allOperatingVehicleList.remove(j); + List varList = new ArrayList<>(); + if(!CollectionUtil.isEmpty(allAssignedList)) { + varList = allOperatingVehicleList.stream().filter(operating -> { + for (PageData assigned : allAssignedList) { + if(!StringUtils.equals(operating.getString("OPERATING_ID"),assigned.getString("RAW_PLATE_NUMBER"))) { + return true; + } } - } + return false; + }).collect(Collectors.toList()); + }else{ + varList = allOperatingVehicleList; } - map.put("varList", allOperatingVehicleList); + map.put("varList", varList); map.put("result", errInfo); return map; } - /*@RequestMapping(value = "/getassignedfreighttrailerlist") - @ResponseBody - public Object getAssignedFreightTrailerList() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - String corpId = Jurisdiction.getCORPINFO_ID(); - List freightList = freightTrailerService.trailerList(corpId); - List assignedList = assignedManageService.assignedList(corpId); - for (int i = 0; i < assignedList.size(); i++) { - for (int j = 0; j < freightList.size(); j++) { - if(assignedList.get(i).get("RAW_PLATE_NUMBER").equals(freightList.get(j).get("PLATE_NUMBER"))) { - freightList.remove(j); - } - } - } - map.put("varList", freightList); - map.put("result", errInfo); - return map; - }*/ - @RequestMapping(value = "/getAssignedFreightTrailerList") @ResponseBody public Object getAssignedFreightTrailerList() throws Exception { @@ -297,14 +286,20 @@ public class AssignedManageController extends BaseController { String corpId = Jurisdiction.getCORPINFO_ID(); List freightList = freightTrailerService.getPulldownVehicleList(corpId); List assignedList = assignedManageService.assignedList(corpId); - for (int i = 0; i < assignedList.size(); i++) { - for (int j = 0; j < freightList.size(); j++) { - if(assignedList.get(i).get("RAW_PLATE_NUMBER").equals(freightList.get(j).get("FREIGHTTRAILER_ID"))) { - freightList.remove(j); + List varList = new ArrayList<>(); + if(!CollectionUtils.isEmpty(assignedList)) { + varList = freightList.stream().filter(freight -> { + for (PageData assigned : assignedList) { + if(!StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"),assigned.getString("RAW_PLATE_NUMBER"))) { + return true; + } } - } + return false; + }).collect(Collectors.toList()); + }else { + varList = freightList; } - map.put("varList", freightList); + map.put("varList", varList); map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java index 1b20d37..cdf8d4a 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java @@ -125,4 +125,5 @@ public class TrafficDrivingTypeController extends BaseController { map.put("result", errInfo); return map; } + } diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyActivitiesController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyActivitiesController.java index df021a1..8fcca7c 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyActivitiesController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyActivitiesController.java @@ -1,5 +1,6 @@ package com.zcloud.controller.comprehensive; +import com.alibaba.excel.util.DateUtils; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -58,7 +59,8 @@ public class TrafficSafetyActivitiesController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + //String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = file.getOriginalFilename(); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); @@ -85,6 +87,13 @@ public class TrafficSafetyActivitiesController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业 pd.put("ISDELETE", "0"); + + if(!StringUtils.isEmpty(pd.getString("EXPIRYDATE")) && DateUtil.compareDate(pd.getString("EXPIRYDATE"),DateUtil.getDay())) { + pd.put("VALIDSTATUS","1"); + } else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("EXPIRYDATE"))) { + pd.put("VALIDSTATUS","0"); + } + String ffile = DateUtil.getDays(); if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){ @@ -96,7 +105,7 @@ public class TrafficSafetyActivitiesController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = file.getOriginalFilename(); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); @@ -138,6 +147,13 @@ public class TrafficSafetyActivitiesController extends BaseController { page.setPd(pd); List varList = activeService.listForSafetyActivitieslist(page); + varList.forEach(active -> { + if(DateUtil.getDay().equals(active.getString("EXPIRYDATE")) || DateUtil.compareDate(active.getString("EXPIRYDATE"),DateUtil.getDay())){ + active.put("VALIDSTATUS","1"); + } else if (DateUtil.compareDate(DateUtil.getDay(),active.getString("EXPIRYDATE"))) { + active.put("VALIDSTATUS","0"); + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyAssessmentController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyAssessmentController.java index b735991..850a857 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyAssessmentController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyAssessmentController.java @@ -87,6 +87,7 @@ public class TrafficSafetyAssessmentController extends BaseController { pd.put("ISDELETE", "0"); String ffile = DateUtil.getDays(); + if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){ pd.put("COMPLETIONSTATUS", "1"); String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); @@ -96,13 +97,16 @@ public class TrafficSafetyAssessmentController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); +// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = file.getOriginalFilename(); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); } + + safetyAssessmentService.edit(pd); map.put("result", errInfo); @@ -138,6 +142,13 @@ public class TrafficSafetyAssessmentController extends BaseController { page.setPd(pd); List varList = safetyAssessmentService.listForSafetyAssessment(page); + varList.forEach(safetyAssessment -> { + if(DateUtil.getDay().equals(safetyAssessment.get("EXPIRYDATE")) || DateUtil.compareDate(safetyAssessment.getString("EXPIRYDATE"),DateUtil.getDay())) { + safetyAssessment.put("VALIDSTATUS","1"); + } else if (DateUtil.compareDate(DateUtil.getDay(),safetyAssessment.getString("EXPIRYDATE"))) { + safetyAssessment.put("VALIDSTATUS","0"); + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyManualController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyManualController.java index a6c92b0..ec05845 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyManualController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyManualController.java @@ -57,7 +57,8 @@ public class TrafficSafetyManualController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + //String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = file.getOriginalFilename(); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); @@ -84,6 +85,14 @@ public class TrafficSafetyManualController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业 pd.put("ISDELETE", "0"); + + + if(!StringUtils.isEmpty(pd.getString("EXPIRYDATE")) && DateUtil.compareDate(pd.getString("EXPIRYDATE"),DateUtil.getDay())) { + pd.put("VALIDSTATUS","1"); + } else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("EXPIRYDATE"))) { + pd.put("VALIDSTATUS","0"); + } + String ffile = DateUtil.getDays(); if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){ @@ -95,7 +104,8 @@ public class TrafficSafetyManualController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + //String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = file.getOriginalFilename(); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); @@ -137,6 +147,13 @@ public class TrafficSafetyManualController extends BaseController { page.setPd(pd); List varList = safetyManualService.listForSafetyManuallist(page); + varList.forEach(manual -> { + if(DateUtil.getDay().equals(manual.getString("EXPIRYDATE")) || DateUtil.compareDate(manual.getString("EXPIRYDATE"),DateUtil.getDay())){ + manual.put("VALIDSTATUS","1"); + } else if (DateUtil.compareDate(DateUtil.getDay(),manual.getString("EXPIRYDATE"))) { + manual.put("VALIDSTATUS","0"); + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyOccupationalHazardsController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyOccupationalHazardsController.java index f94c8f0..13252e0 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyOccupationalHazardsController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyOccupationalHazardsController.java @@ -68,14 +68,14 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController { pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); } - page.setPd(pd); + /*page.setPd(pd); List varList = occupationalHazardsService.listForSafetyOccupationalHazardsUser(page); if (!varList.isEmpty()){ for(PageData varPd : varList){ varPd.put("VALIDSTATUS", "2"); occupationalHazardsService.edit(varPd); } - } + }*/ occupationalHazardsService.save(pd); map.put("result", errInfo); @@ -97,8 +97,14 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController { pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业 pd.put("ISDELETE", "0"); pd.put("COMPLETIONSTATUS", "1"); - pd.put("VALIDSTATUS", "1"); pd.put("ISSIGNED", "1"); + + if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) { + pd.put("VALIDSTATUS", "0"); + } else { + pd.put("VALIDSTATUS", "1"); + } + String ffile = DateUtil.getDays(); if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){ @@ -155,6 +161,8 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController { if (Tools.notEmpty(ISSIGNED)) pd.put("ISSIGNED", ISSIGNED.trim()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + page.setPd(pd); List varList = occupationalHazardsService.listForSecurityOccupationalHazards(page); map.put("varList", varList); @@ -179,6 +187,15 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController { page.setPd(pd); List varList = occupationalHazardsService.listForSafetyOccupationalHazardsUser(page); + varList.forEach(occupational -> { + if(DateUtil.getDay().equals(occupational.getString("EXPIRYDATE"))) { + occupational.put("VALIDSTATUS", "1"); + } else if(DateUtil.compareDate(DateUtil.getDay(), occupational.getString("EXPIRYDATE"))) { + occupational.put("VALIDSTATUS", "2"); + }else{ + occupational.put("VALIDSTATUS", "1"); + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); @@ -218,4 +235,18 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController { map.put("result", errInfo); return map; } + + + @RequestMapping(value="/getSafetyOccupationalHazardsEdit") + @ResponseBody + public Object getSafetyOccupationalHazardsEdit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List varList = occupationalHazardsService.getSafetyOccupationalHazardsEdit(pd); //根据ID读取 + map.put("varList", varList); + map.put("result", errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyProductionController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyProductionController.java index 19a1079..c11a2e7 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyProductionController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyProductionController.java @@ -42,7 +42,7 @@ public class TrafficSafetyProductionController extends BaseController { pd.put("ISDELETE", "0"); if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) { - pd.put("VALIDSTATUS", "0"); + pd.put("VALIDSTATUS", "2"); } else { pd.put("VALIDSTATUS", "1"); } @@ -57,11 +57,16 @@ public class TrafficSafetyProductionController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = file.getOriginalFilename(); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); + /*String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); + pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); + pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); + pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));*/ } safetyProductionService.save(pd); @@ -84,6 +89,13 @@ public class TrafficSafetyProductionController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业 pd.put("ISDELETE", "0"); + + if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) { + pd.put("VALIDSTATUS", "2"); + } else { + pd.put("VALIDSTATUS", "1"); + } + String ffile = DateUtil.getDays(); if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){ @@ -95,7 +107,8 @@ public class TrafficSafetyProductionController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); +// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName = file.getOriginalFilename(); smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile); pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName); pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); @@ -137,6 +150,15 @@ public class TrafficSafetyProductionController extends BaseController { page.setPd(pd); List varList = safetyProductionService.listForSafetyProductionlist(page); + varList.forEach(safetyProduction -> { + if(DateUtil.getDay().equals(safetyProduction.getString("EXPIRYDATE"))) { + safetyProduction.put("VALIDSTATUS", "1"); + } else if(DateUtil.compareDate(DateUtil.getDay(), safetyProduction.getString("EXPIRYDATE"))) { + safetyProduction.put("VALIDSTATUS", "2"); + }else{ + safetyProduction.put("VALIDSTATUS", "1"); + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); @@ -176,4 +198,18 @@ public class TrafficSafetyProductionController extends BaseController { map.put("result", errInfo); return map; } + + + @RequestMapping(value="/getSafetyProductionEdit") + @ResponseBody + public Object getSafetyProductionEdit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List varList = safetyProductionService.getSafetyProductionEdit(pd); //根据ID读取 + map.put("varList", varList); + map.put("result", errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyResponsibilityController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyResponsibilityController.java index 3c32de2..645dfae 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyResponsibilityController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSafetyResponsibilityController.java @@ -66,14 +66,14 @@ public class TrafficSafetyResponsibilityController extends BaseController { pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); } - page.setPd(pd); + /*page.setPd(pd); List varList = responseService.listForSafetyResponsibilityUser(page); if (!varList.isEmpty()){ for(PageData varPd : varList){ varPd.put("VALIDSTATUS", "2"); responseService.edit(varPd); } - } + }*/ responseService.save(pd); map.put("result", errInfo); @@ -93,6 +93,12 @@ public class TrafficSafetyResponsibilityController extends BaseController { pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业 + + if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) { + pd.put("VALIDSTATUS", "0"); + } else { + pd.put("VALIDSTATUS", "1"); + } String ffile = DateUtil.getDays(); if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){ @@ -149,6 +155,8 @@ public class TrafficSafetyResponsibilityController extends BaseController { if (Tools.notEmpty(ISSIGNED)) pd.put("ISSIGNED", ISSIGNED.trim()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + page.setPd(pd); List varList = responseService.listForSecurityResponsibility(page); map.put("varList", varList); @@ -187,6 +195,15 @@ public class TrafficSafetyResponsibilityController extends BaseController { page.setPd(pd); List varList = responseService.listForSafetyResponsibilityUser(page); + varList.forEach(response -> { + if(DateUtil.getDay().equals(response.getString("EXPIRYDATE"))) { + response.put("VALIDSTATUS", "1"); + } else if(DateUtil.compareDate(DateUtil.getDay(), response.getString("EXPIRYDATE"))) { + response.put("VALIDSTATUS", "2"); + }else{ + response.put("VALIDSTATUS", "1"); + } + }); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCommitmentController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCommitmentController.java index ea8e52c..fd92b05 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCommitmentController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityCommitmentController.java @@ -66,14 +66,6 @@ public class TrafficSecurityCommitmentController extends BaseController { pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); } - page.setPd(pd); - List varList = securityCommitmentService.listForSecurityCommitmentUser(page); - if (!varList.isEmpty()){ - for(PageData varPd : varList){ - varPd.put("VALIDSTATUS", "2"); - securityCommitmentService.edit(varPd); - } - } securityCommitmentService.save(pd); map.put("result", errInfo); map.put("pd", pd); @@ -155,6 +147,8 @@ public class TrafficSecurityCommitmentController extends BaseController { if (Tools.notEmpty(ISSIGNED)) pd.put("ISSIGNED", ISSIGNED.trim()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + page.setPd(pd); List varList = securityCommitmentService.listForSecurityCommitment(page); map.put("varList", varList); @@ -179,7 +173,9 @@ public class TrafficSecurityCommitmentController extends BaseController { page.setPd(pd); List varList = securityCommitmentService.listForSecurityCommitmentUser(page); varList.forEach(securityCommitment -> { - if(DateUtil.compareDate(DateUtil.getDay(), securityCommitment.getString("EXPIRYDATE"))) { + if(DateUtil.getDay().equals(securityCommitment.getString("EXPIRYDATE"))) { + securityCommitment.put("VALIDSTATUS", "1"); + } else if(DateUtil.compareDate(DateUtil.getDay(), securityCommitment.getString("EXPIRYDATE"))) { securityCommitment.put("VALIDSTATUS", "2"); }else{ securityCommitment.put("VALIDSTATUS", "1"); diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityManagementAgreementController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityManagementAgreementController.java index be8204a..44983b7 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityManagementAgreementController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityManagementAgreementController.java @@ -140,6 +140,15 @@ public class TrafficSecurityManagementAgreementController extends BaseController page.setPd(pd); List varList = managementAgreementService.listForManagementAgreementlist(page); + varList.forEach(data -> { + if(DateUtil.getDay().equals(data.getString("EXPIRYDATE"))) { + data.put("VALIDSTATUS","1"); + } else if(DateUtil.compareDate( DateUtil.getDay(),data.getString("EXPIRYDATE")) ) { + data.put("VALIDSTATUS","0"); + } else if (DateUtil.compareDate( data.getString("EXPIRYDATE"),DateUtil.getDay()) || DateUtil.getDay().equals(data.getString("EXPIRYDATE"))) { + data.put("VALIDSTATUS","1"); + } + }); 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 e19a148..b12d35a 100644 --- a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java +++ b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java @@ -13,6 +13,7 @@ import com.zcloud.util.Jurisdiction; import com.zcloud.util.ObjectExcelView; import com.zcloud.util.Tools; import org.apache.commons.lang.StringUtils; +import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import java.util.*; +import java.util.stream.Collectors; /** * 年检管理 @@ -157,11 +159,13 @@ public class InspectAnnuallyController extends BaseController { pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); - List varList = inspectAnnuallyService.list(page); //列出Question列表 + List varList = inspectAnnuallyService.list(page); //列出年检列表 varList.forEach(inspectAnnually -> { - if("1".equals(inspectAnnually.get("OPEAR_ISSCRAP")) || "1".equals(inspectAnnually.get("FREIGHT_ISSCRAP"))) { + boolean isScrapFlag = varList.stream().anyMatch(data -> "1".equals(inspectAnnually.get("OPEAR_ISSCRAP")) || "1".equals(inspectAnnually.get("FREIGHT_ISSCRAP"))); + boolean isAssignedFlag = varList.stream().anyMatch(data -> "1".equals(inspectAnnually.get("OPEAR_ISASSIGNED")) || "1".equals(inspectAnnually.get("FREIGHT_ISASSIGNED"))); + if(isScrapFlag) { inspectAnnually.put("ARCHIVES_TYPE","2"); - } else if ("1".equals(inspectAnnually.get("OPEAR_ISASSIGNED")) || "1".equals(inspectAnnually.get("FREIGHT_ISASSIGNED"))) { + } else if (isAssignedFlag) { inspectAnnually.put("ARCHIVES_TYPE","1"); } }); diff --git a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java index bff57f1..fdb3193 100644 --- a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java +++ b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java @@ -166,7 +166,7 @@ public class OperatingVehiclesController extends BaseController { List headstockphoto = imgfilesService.listAll(pd);//车头照片 pd.put("TYPE",121); List drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片 - pd.put("TYPE",132); + pd.put("TYPE",122); List operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片 List zdepartmentPdList = new ArrayList(); diff --git a/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java b/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java index 788a307..d392a7d 100644 --- a/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java +++ b/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java @@ -9,6 +9,8 @@ import com.zcloud.service.freighttrailer.FreightTrailerService; import com.zcloud.service.operatingvehicles.OperatingVehiclesService; import com.zcloud.service.scrapManage.ScrapManageService; import com.zcloud.util.*; +import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.ObjectUtils; @@ -17,10 +19,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; @Controller @RequestMapping("/scrapmanage") @@ -211,38 +211,24 @@ public class ScrapManageController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); List operationList = operatingVehiclesService.getScrapPulldownVehicleList(pd); //列出Question列表 List scrapList = scrapManageService.scrapListAll(corpId); - for (int i = 0; i < scrapList.size(); i++) { - for (int j = 0; j < operationList.size(); j++) { - if(scrapList.get(i).get("PLATE_NUMBER").equals(operationList.get(j).get("PLATE_NUMBER"))) { - operationList.remove(j); + List varList = new ArrayList<>(); + if(!CollectionUtils.isEmpty(scrapList)) { + varList = operationList.stream().filter(operation -> { + for (PageData scrap : scrapList) { + if(StringUtils.equals(operation.getString("PLATE_NUMBER"),scrap.getString("PLATE_NUMBER"))) { + return true; + } } - } + return false; + }).collect(Collectors.toList()); + }else { + varList = operationList; } - map.put("varList", operationList); + map.put("varList", varList); map.put("result", errInfo); return map; } - /*@RequestMapping(value = "/getscrapfreighttrailerlist") - @ResponseBody - public Object getScrapFreightTrailerList() throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - String corpId = Jurisdiction.getCORPINFO_ID(); - List freightList = freightTrailerService.trailerList(corpId); - List scrapList = scrapManageService.scrapListAll(corpId); - for (int i = 0; i < scrapList.size(); i++) { - for (int j = 0; j < freightList.size(); j++) { - if(scrapList.get(i).get("PLATE_NUMBER").equals(freightList.get(j).get("PLATE_NUMBER"))) { - freightList.remove(j); - } - } - } - map.put("varList", freightList); - map.put("result", errInfo); - return map; - }*/ - @RequestMapping(value = "/getScrapFreightTrailerList") @ResponseBody public Object getAssignedFreightTrailerList() throws Exception { @@ -251,14 +237,20 @@ public class ScrapManageController extends BaseController { String corpId = Jurisdiction.getCORPINFO_ID(); List freightList = freightTrailerService.getScrapPulldownVehicleList(corpId); List scrapList = scrapManageService.scrapListAll(corpId); - for (int i = 0; i < scrapList.size(); i++) { - for (int j = 0; j < freightList.size(); j++) { - if(scrapList.get(i).get("PLATE_NUMBER").equals(freightList.get(j).get("PLATE_NUMBER"))) { - freightList.remove(j); + List varList = new ArrayList<>(); + if(!CollectionUtils.isEmpty(scrapList)) { + varList = freightList.stream().filter(freight -> { + for (PageData scrap : scrapList) { + if(StringUtils.equals(freight.getString("PLATE_NUMBER"),scrap.getString("PLATE_NUMBER"))){ + return true; + } } - } + return false; + }).collect(Collectors.toList()); + }else{ + varList = freightList; } - map.put("varList", freightList); + map.put("varList", varList); map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index b378fd3..5af317c 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -2984,4 +2984,35 @@ public class UsersController extends BaseController { map.put("result", errInfo); return map; } + + + + @RequestMapping("/getTrafficPenaltyUserList") + @ResponseBody + public Object getTrafficPenaltyUserList(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + + /*检索条件*/ + String ROLE_ID = pd.getString("ROLE_ID"); //角色ID + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + String DEPARTMENT_ID = pd.getString("DEPARTMENT_ID"); //关键词检索条件 + if (Tools.notEmpty(DEPARTMENT_ID)) pd.put("DEPARTMENT_ID", DEPARTMENT_ID.trim()); + String STARTTIME = pd.getString("STARTTIME"); //开始时间 + String ENDTIME = pd.getString("ENDTIME"); //结束时间 + if (Tools.notEmpty(STARTTIME)) pd.put("STARTTIME", STARTTIME + " 00:00:00"); + if (Tools.notEmpty(ENDTIME)) pd.put("ENDTIME", ENDTIME + " 00:00:00"); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + page.setPd(pd); + Object practitionerPage = this.getPractitionerPage(page);//列出用户列表 + map.put("userList", practitionerPage); + map.put("page", page); + map.put("pd", pd); + + map.put("result", errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyOccupationalHazardsMapper.java b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyOccupationalHazardsMapper.java index 9ed5e95..e2cec12 100644 --- a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyOccupationalHazardsMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyOccupationalHazardsMapper.java @@ -19,4 +19,6 @@ public interface TrafficSafetyOccupationalHazardsMapper { List datalistPageUser(Page page); void delete(PageData pd); + + List getSafetyOccupationalHazardsEdit(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyProductionMapper.java b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyProductionMapper.java index 32919df..8ff4716 100644 --- a/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyProductionMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/comprehensive/TrafficSafetyProductionMapper.java @@ -17,4 +17,6 @@ public interface TrafficSafetyProductionMapper { PageData findById(PageData pd); void delete(PageData pd); + + List getSafetyProductionEdit(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java index 76e5a63..4afc6ab 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java @@ -297,4 +297,5 @@ public interface UsersMapper { List userSelectPersonTypelist(PageData pd); PageData getUserByUserId(PageData pd); + } diff --git a/src/main/java/com/zcloud/service/comprehensive/TrafficDrivingTypeService.java b/src/main/java/com/zcloud/service/comprehensive/TrafficDrivingTypeService.java index f37a4ea..002327f 100644 --- a/src/main/java/com/zcloud/service/comprehensive/TrafficDrivingTypeService.java +++ b/src/main/java/com/zcloud/service/comprehensive/TrafficDrivingTypeService.java @@ -31,4 +31,5 @@ public interface TrafficDrivingTypeService { void delete(PageData pd); PageData findById(PageData pd) throws Exception; + } diff --git a/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyOccupationalHazardsService.java b/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyOccupationalHazardsService.java index 7a55725..8222748 100644 --- a/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyOccupationalHazardsService.java +++ b/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyOccupationalHazardsService.java @@ -17,4 +17,6 @@ public interface TrafficSafetyOccupationalHazardsService { List listForSafetyOccupationalHazardsUser(Page page); void delete(PageData pd); + + List getSafetyOccupationalHazardsEdit(PageData pd); } diff --git a/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyProductionService.java b/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyProductionService.java index 3b7e990..cee6b02 100644 --- a/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyProductionService.java +++ b/src/main/java/com/zcloud/service/comprehensive/TrafficSafetyProductionService.java @@ -15,4 +15,6 @@ public interface TrafficSafetyProductionService { PageData findById(PageData pd); void delete(PageData pd); + + List getSafetyProductionEdit(PageData pd); } 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 fb6c024..2dbb7fd 100644 --- a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficDrivingTypeServiceImpl.java +++ b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficDrivingTypeServiceImpl.java @@ -62,6 +62,8 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService public PageData findById(PageData pd) { return trafficDrivingTypeMapper.findById(pd); } + + @Autowired private TrafficDrivingSignMapper trafficDrivingSignMapper; diff --git a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyOccupationalHazardsServiceImpl.java b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyOccupationalHazardsServiceImpl.java index c93c9e4..96579ef 100644 --- a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyOccupationalHazardsServiceImpl.java +++ b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyOccupationalHazardsServiceImpl.java @@ -43,4 +43,9 @@ public class TrafficSafetyOccupationalHazardsServiceImpl implements TrafficSafet public void delete(PageData pd) { occupationalHazardsMapper.delete(pd); } + + @Override + public List getSafetyOccupationalHazardsEdit(PageData pd) { + return occupationalHazardsMapper.getSafetyOccupationalHazardsEdit(pd); + } } diff --git a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyProductionServiceImpl.java b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyProductionServiceImpl.java index 246a309..2c48fab 100644 --- a/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyProductionServiceImpl.java +++ b/src/main/java/com/zcloud/service/comprehensive/impl/TrafficSafetyProductionServiceImpl.java @@ -37,4 +37,9 @@ public class TrafficSafetyProductionServiceImpl implements TrafficSafetyProducti public void delete(PageData pd) { speedProductionMapper.delete(pd); } + + @Override + public List getSafetyProductionEdit(PageData pd) { + return speedProductionMapper.getSafetyProductionEdit(pd); + } } diff --git a/src/main/java/com/zcloud/service/system/UsersService.java b/src/main/java/com/zcloud/service/system/UsersService.java index 62f5497..4865b92 100644 --- a/src/main/java/com/zcloud/service/system/UsersService.java +++ b/src/main/java/com/zcloud/service/system/UsersService.java @@ -370,4 +370,5 @@ public interface UsersService { List userSelectPersonTypelist(PageData pd); PageData getUserByUserId(PageData pd); + } diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index 365c114..3059864 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -1340,4 +1340,5 @@ public class UsersServiceImpl implements UsersService { return usersMapper.getUserByUserId(pd); } + } diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyActivitiesMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyActivitiesMapper.xml index 2a26728..fcbb98e 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyActivitiesMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyActivitiesMapper.xml @@ -96,9 +96,13 @@ OPERATOR = #{OPERATOR}, OPERATORNAME = #{OPERATORNAME}, OPERATTIME = #{OPERATTIME}, + ACTIVITIESNAME = #{ACTIVITIESNAME}, EXPIRYDATE = #{EXPIRYDATE}, CYCLE = #{CYCLE}, ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE} + + ,VALIDSTATUS = #{VALIDSTATUS} + where ACTIVITIES_ID = #{ACTIVITIES_ID} diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyAssessmentMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyAssessmentMapper.xml index d558d81..17cd4a5 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyAssessmentMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyAssessmentMapper.xml @@ -97,7 +97,7 @@ OPERATORNAME = #{OPERATORNAME}, OPERATTIME = #{OPERATTIME}, EXPIRYDATE = #{EXPIRYDATE}, - ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE}, + ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE} ,VALIDSTATUS = #{VALIDSTATUS} @@ -135,6 +135,7 @@ and f.VALIDSTATUS = #{pd.VALIDSTATUS} + ORDER BY f.OPERATTIME DESC + + + + diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyProductionMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyProductionMapper.xml index 34c2ccd..dadd06d 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyProductionMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyProductionMapper.xml @@ -96,6 +96,7 @@ OPERATOR = #{OPERATOR}, OPERATORNAME = #{OPERATORNAME}, OPERATTIME = #{OPERATTIME}, + EXPIRYDATE = #{EXPIRYDATE}, ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE} where SAFETYPRODUCTION_ID = #{SAFETYPRODUCTION_ID} @@ -131,7 +132,7 @@ and f.VALIDSTATUS = #{pd.VALIDSTATUS} - ORDER BY f.CREATETIME DESC + ORDER BY f.OPERATTIME DESC + + + + diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyResponsibilityMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyResponsibilityMapper.xml index 4a2e3d9..688967a 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyResponsibilityMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSafetyResponsibilityMapper.xml @@ -141,6 +141,7 @@ left join bus_corp_info i on u.CORPINFO_ID = i.CORPINFO_ID left join BUS_TRAFFIC_SAFETY_RESPONSIBILITY c on u.USER_ID = c.USER_ID and c.ISDELETE !='1' where u.ISDELETE = '0' + and u.CORPINFO_ID = #{pd.CORPINFO_ID} and u.ISMAIN != '1' and (c.VALIDSTATUS != '2' or c.VALIDSTATUS is null) @@ -177,6 +178,7 @@ and f.USER_ID = #{pd.USER_ID} + ORDER BY f.OPERATTIME DESC diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCommitmentMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCommitmentMapper.xml index 812240b..995eecc 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCommitmentMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCommitmentMapper.xml @@ -112,7 +112,7 @@ ,VALIDSTATUS = #{VALIDSTATUS} where - SECURITYCOMMITMENT_ID = #{SECURITYCOMMITMENT_ID} + SECURITYCOMMITMENT_ID = #{SECURITYCOMMITMENT_ID} @@ -149,6 +149,7 @@ left JOIN BUS_TRAFFIC_SECURITY_COMMITMENT c ON u.USER_ID = c.USER_ID and c.ISDELETE !='1' WHERE u.ISDELETE = '0' + and u.CORPINFO_ID = #{pd.CORPINFO_ID} and (c.ISDELETE='0' or c.ISDELETE is null ) AND u.ISMAIN != '1' AND ( c.VALIDSTATUS != '2' OR c.VALIDSTATUS IS NULL ) @@ -213,7 +214,7 @@ u.ISDELETE = '0' and (f.ISDELETE='0' or f.ISDELETE is null ) AND u.ISMAIN != '1' - AND ( f.VALIDSTATUS != '2' OR f.VALIDSTATUS IS NULL ) + AND f.VALIDSTATUS IS NOT NULL and f.SECURITYCOMMITMENT_ID = #{SECURITYCOMMITMENT_ID} and f.USER_ID = #{USER_ID} diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityManagementAgreementMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityManagementAgreementMapper.xml index e039c98..d5b98aa 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityManagementAgreementMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityManagementAgreementMapper.xml @@ -97,6 +97,7 @@ OPERATOR = #{OPERATOR}, OPERATORNAME = #{OPERATORNAME}, OPERATTIME = #{OPERATTIME}, + MANAGEMENTAGREEMENTNAME = #{MANAGEMENTAGREEMENTNAME}, EXPIRYDATE = #{EXPIRYDATE}, ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE} where diff --git a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml index 78970d2..b92ba14 100644 --- a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml +++ b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml @@ -598,10 +598,11 @@ v.PLATE_NUMBER from f - INNER JOIN v_traffic v on v.ID = f.OPERATING_ID + LEFT JOIN v_traffic v on v.ID = f.OPERATING_ID where f.CORPINFO_ID = #{corpId} - and f.ISDELETE = '0' and f.ISSCRAP = '0' + AND (f.ISDELETE = '0' OR f.ISDELETE IS NULL) + AND (f.ISSCRAP = '0' OR f.ISSCRAP IS NULL) diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index ffd0c73..87ea9cd 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -1838,4 +1838,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where USER_ID = #{USER_ID} +