diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java index 7d466a2..f42eb73 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingCommitmentController.java @@ -46,12 +46,9 @@ public class TrafficDrivingCommitmentController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //主键 pd.put("ISDELETE", "0"); //是否删除 pd.put("INQUIRYCONCLUSION","正常"); - pd.put("CREATORNAME", Jurisdiction.getUsername()); //是否发送短信0不发1发 + pd.put("CREATORNAME", Jurisdiction.getUsername()); pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间 - pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人 - pd.put("OPERATORNAME", Jurisdiction.getUsername()); //操作人 - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间 trafficDrivingCommitmentService.save(pd); map.put("pd",pd); @@ -80,8 +77,6 @@ public class TrafficDrivingCommitmentController extends BaseController { return map; } - - //列表 @RequestMapping(value = "/listForSafetyDrivingCommitment") @ResponseBody diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java index 8b892bc..1b20d37 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficDrivingTypeController.java @@ -40,12 +40,9 @@ public class TrafficDrivingTypeController extends BaseController { pd.put("DRIVINGTYPE_ID", this.get32UUID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //主键 pd.put("ISDELETE", "0"); //是否删除 - pd.put("CREATORNAME", Jurisdiction.getUsername()); //是否发送短信0不发1发 + pd.put("CREATORNAME", Jurisdiction.getUsername()); pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间 - pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人 - pd.put("OPERATORNAME", Jurisdiction.getUsername()); //操作人 - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间 trafficDrivingTypeService.save(pd); map.put("pd",pd); diff --git a/src/main/java/com/zcloud/controller/firefightingEquipmentFacility/FirefightingEquipmentFacilityController.java b/src/main/java/com/zcloud/controller/firefightingEquipmentFacility/FirefightingEquipmentFacilityController.java index 5eab23c..2bb032b 100644 --- a/src/main/java/com/zcloud/controller/firefightingEquipmentFacility/FirefightingEquipmentFacilityController.java +++ b/src/main/java/com/zcloud/controller/firefightingEquipmentFacility/FirefightingEquipmentFacilityController.java @@ -50,9 +50,6 @@ public class FirefightingEquipmentFacilityController extends BaseController { pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 - pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id - pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字 - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 firefightingEquipmentFacilityService.save(pd); map.put("pd", pd); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java index 5ec03bc..a1bd090 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -12,14 +12,19 @@ import com.zcloud.service.scrapManage.ScrapManageService; import com.zcloud.service.system.ImgFilesService; import com.zcloud.service.taxationManage.TaxationManageService; import com.zcloud.util.*; +import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletResponse; +import java.io.File; import java.util.*; /** @@ -202,6 +207,166 @@ public class FreighttTrailerController extends BaseController { return map; } + /**从EXCEL导入到数据库 + * @param file + * @return + * @throws Exception + */ + @RequestMapping(value = "/readExcel") + @SuppressWarnings("unchecked") + @ResponseBody + @Transactional + @LogAnno(menuType= "双重预防",menuServer= "风险管控",instructionsOperate = "风险点(单元)",instructionsType = "上传附件") + public Object readExcel(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + StringBuffer errorStr = new StringBuffer(); + if (null != file && !file.isEmpty()) { + File tempFile = new File(file.getOriginalFilename()); //新建file + FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile); //将MultipartFile复制到File + List listPd = (List) ObjectExcelRead.readExcel(tempFile, 1, 0, 0); // 执行读EXCEL操作,读出的数据导入List + // 2:从第3行开始;0:从第A列开始;0:第0个sheet + /** + * var0 :风险点(单元) var1 :所属部门 + */ + + try { + if (listPd.size() < 1) { + map.put("result", "error"); // 返回结果 + map.put("resultStr", "Excel数据为空,请检查数据后,重新上传!"); + FileUtils.deleteQuietly(tempFile);//删除临时文件 + return map; + } + List riskunitList = new ArrayList<>(); + PageData pd = new PageData(); + pd.put("ISDELETE", "0"); + pd.put("BELONGING_DEPT", Jurisdiction.getCORPINFO_ID()); + List riskunitListAll = freightTrailerService.listAll(pd); + Map riskunitMapAll = new HashMap<>(); + for (PageData pageData : riskunitListAll) { + // 使用车牌号作为键 + String plateNumberKey = Tools.excelHandle(pageData.getString("PLATE_NUMBER")); + riskunitMapAll.put(plateNumberKey, pageData); + } + List header = new ArrayList<>(); + header.add("自编号"); + header.add("车牌号"); + header.add("车架号"); + header.add("车身编号"); + header.add("挂车类型"); + header.add("运营证号"); + header.add("归属部门"); + header.add("车主"); + header.add("车主电话"); + header.add("联系人"); + header.add("联系电话"); + header.add("初登日期"); + header.add("发证日期"); + header.add("到期日期"); + header.add("挂车品牌"); + header.add("挂车型号"); + header.add("核定总质量"); + header.add("核定载质量"); + header.add("容积"); + header.add("备注"); + Map hasRiskUnit = new HashMap<>(); + int succeeNum = 1; + for (PageData lpd : listPd) { + succeeNum++; + convertExcelDate(lpd, "var11"); // 初登日期 INITIAL_REGISTRATION_DATE + convertExcelDate(lpd, "var12"); // 发证日期 CERTIFICATE_DATE + convertExcelDate(lpd, "var13"); // 到期日期 DUE_DATE + System.out.println(lpd.get("var11")+"--"+lpd.get("var12")+"--"+lpd.get("var13")); + for (int i = 0; i < header.size(); i++) { + if (!lpd.containsKey("var" + i)) { + errorStr.append("

第" + succeeNum + "行的\"" + header.get(i) + "\"无数据

"); + continue; + } + if (Tools.isEmpty(lpd.get("var" + i))) { + errorStr.append("

第" + succeeNum + "行的\"" + header.get(i) + "\"无数据

"); + continue; + } + } + + String plateNumberVar = Tools.isEmpty(lpd.get("var1")) ? "" : Tools.excelHandle(lpd.get("var1")); + + if (riskunitMapAll.containsKey(plateNumberVar)) { + errorStr.append("

第" + succeeNum + "行:" + "车牌号为\"" + plateNumberVar + "\"的记录已存在,请检查!" + "

"); + continue; + } + if (hasRiskUnit.containsKey(plateNumberVar)) { + errorStr.append("

第" + succeeNum + "行:" + "车牌号重复,请重新检查内容!" + "

"); + continue; + } + hasRiskUnit.put(plateNumberVar, "1"); + PageData riskunit = new PageData(); + riskunit.put("NUM", lpd.get("var0")); + riskunit.put("PLATE_NUMBER", lpd.get("var1")); + riskunit.put("VIN", lpd.get("var2")); + riskunit.put("VEHICLE_BODY_NUMBER", lpd.get("var3")); + riskunit.put("TRAILER_TYPE", lpd.get("var4")); + riskunit.put("OPER_CERTIFICATE_NUM", lpd.get("var5")); + riskunit.put("BELONGING_DEPT", lpd.get("var6")); + riskunit.put("CAR_OWNERS", lpd.get("var7")); + riskunit.put("CAR_OWNERS_TEL", lpd.get("var8")); + riskunit.put("CONTACTS", lpd.get("var9")); + riskunit.put("CONTACT_PHONE", lpd.get("var10")); + riskunit.put("INITIAL_REGISTRATION_DATE", lpd.get("var11")); + riskunit.put("CERTIFICATE_DATE", lpd.get("var12")); + riskunit.put("DUE_DATE", lpd.get("var13")); + riskunit.put("TRAILER_BRAND", lpd.get("var14")); + riskunit.put("TRAILER_MODEL", lpd.get("var15")); + riskunit.put("APPROVED_TOTAL_MASS", lpd.get("var16")); + riskunit.put("APPROVED_LOAD_CAPACITY", lpd.get("var17")); + riskunit.put("VOLUME", lpd.get("var18")); + riskunit.put("NOTES", lpd.get("var19")); + riskunit.put("FREIGHTTRAILER_ID", this.get32UUID()); + riskunit.put("ISDELETE", "0"); + riskunit.put("CREATOR", Jurisdiction.getUsername()); + riskunit.put("CREATTIME", DateUtil.date2Str(new Date())); + riskunit.put("OPERATOR", Jurisdiction.getUsername()); + riskunit.put("OPERATTIME", DateUtil.date2Str(new Date())); + riskunit.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + riskunitList.add(riskunit); + } + if (Tools.isEmpty(errorStr.toString())) { + for (PageData riskunit : riskunitList) { + freightTrailerService.save(riskunit); + } + errorStr.append("成功导入" + riskunitList.size() + "条数据!"); + } else { + errInfo = "error"; + } + + FileUtils.deleteQuietly(tempFile);//删除临时文件 + } catch (Exception e) { + map.put("result", "fail"); // 返回结果 + map.put("resultStr", errorStr.toString()); + FileUtils.deleteQuietly(tempFile);//删除临时文件 + return map; + } + } + map.put("result", "success");//返回结果 + map.put("resultType", errInfo);//返回message类型 + map.put("isExcel","1");//返回类型 + map.put("resultStr", errorStr.toString()); + return map; + } + + private void convertExcelDate(PageData lpd, String field) { + Object excelDateObj = lpd.get(field); + if (excelDateObj != null) { + // 尝试将对象转换为Double,因为Excel中的日期是以Double类型的数字存储的 + double excelDate = Double.parseDouble(excelDateObj.toString()); + // 使用Apache POI的DateUtil获取Java日期对象 + Date javaDate = org.apache.poi.ss.usermodel.DateUtil.getJavaDate(excelDate); + // 使用您的DateUtil工具类进行日期格式化 + String formattedDate = DateUtil.date2Str(javaDate, "yyyy-MM-dd"); + // 更新lpd对象中的日期字段 + lpd.put(field, formattedDate); + } + } + /** * 去修改页面获取数据 * diff --git a/src/main/java/com/zcloud/controller/labourEntrenchThing/LabourEntrenchThingController.java b/src/main/java/com/zcloud/controller/labourEntrenchThing/LabourEntrenchThingController.java index a35fe94..a803d36 100644 --- a/src/main/java/com/zcloud/controller/labourEntrenchThing/LabourEntrenchThingController.java +++ b/src/main/java/com/zcloud/controller/labourEntrenchThing/LabourEntrenchThingController.java @@ -46,9 +46,6 @@ public class LabourEntrenchThingController extends BaseController { pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 - pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id - pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字 - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 labourEntrenchThingService.save(pd); map.put("pd", pd); map.put("result", errInfo); @@ -87,9 +84,6 @@ public class LabourEntrenchThingController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) - pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id - pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 - pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index afc7088..b378fd3 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -97,6 +97,27 @@ public class UsersController extends BaseController { return ReturnMap.ok().put("pd", usersService.getUserByCardNo(pageData)); } + /** + * 根据USERID找人 + * + * @param page + * @return + * @throws Exception + */ + @RequestMapping("/getUserByUserId") + @ResponseBody + public Object getUserByUserId() { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = this.getPageData(); + pd = usersService.getUserByUserId(pd); + map.put("pd",pd); + map.put("result", errInfo); + return map; +// PageData pageData = getPageData(); +// pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + } + /** * 用户列表 * diff --git a/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java b/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java index de48558..924bc7f 100644 --- a/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java @@ -76,5 +76,7 @@ public interface FreightTrailerMapper { List vehicleList(PageData pd); List listOut(PageData pd); + + List listAll(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 3ae43e1..76e5a63 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java @@ -295,4 +295,6 @@ public interface UsersMapper { void editPractitioner(PageData pd); List userSelectPersonTypelist(PageData pd); + + PageData getUserByUserId(PageData pd); } diff --git a/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java b/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java index 5be0879..0728ce9 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java +++ b/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java @@ -76,5 +76,7 @@ public interface FreightTrailerService { public List vehicleList(PageData pd) throws Exception; List listOut(PageData pd); + + List listAll(PageData pd); } diff --git a/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java b/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java index 60bca84..74d5c2a 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java +++ b/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java @@ -108,5 +108,10 @@ public class FreightTrailerServiceImpl implements FreightTrailerService { return freightTrailerMapper.listOut(pd); } + @Override + public List listAll(PageData pd) { + return freightTrailerMapper.listAll(pd); + } + } diff --git a/src/main/java/com/zcloud/service/system/UsersService.java b/src/main/java/com/zcloud/service/system/UsersService.java index 6b2b556..62f5497 100644 --- a/src/main/java/com/zcloud/service/system/UsersService.java +++ b/src/main/java/com/zcloud/service/system/UsersService.java @@ -368,4 +368,6 @@ public interface UsersService { void setPractitionerConfirm(PageData pd) throws Exception; 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 2433d22..a80b4f0 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -1333,4 +1333,10 @@ public class UsersServiceImpl implements UsersService { public List userSelectPersonTypelist(PageData pd) { return usersMapper.userSelectPersonTypelist(pd); } + + @Override + public PageData getUserByUserId(PageData pd) { + return usersMapper.getUserByUserId(pd); + } + } diff --git a/src/main/java/com/zcloud/util/DateUtil.java b/src/main/java/com/zcloud/util/DateUtil.java index 644a58d..037e5f2 100644 --- a/src/main/java/com/zcloud/util/DateUtil.java +++ b/src/main/java/com/zcloud/util/DateUtil.java @@ -891,4 +891,5 @@ public class DateUtil { } return new Date(); } + } diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml index c462ffd..03bd6d6 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml @@ -101,7 +101,7 @@ and f.INQUIRYCONTENT LIKE CONCAT(CONCAT('%', #{pd.INQUIRYCONTENT}),'%') - order by f.OPERATTIME DESC + order by f.CREATTIME DESC diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml index 8bacaf9..999f8a1 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityCustomerManagementMapper.xml @@ -109,7 +109,7 @@ and f.CUSTOMERTYPE = #{pd.CUSTOMERTYPE} - and f.TRANSPORTATIONCOMPANY = #{pd.TRANSPORTATIONCOMPANY} + and i.CORP_NAME = #{pd.TRANSPORTATIONCOMPANY} diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityLocationManagementMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityLocationManagementMapper.xml index 2f0714b..027ed8b 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityLocationManagementMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityLocationManagementMapper.xml @@ -119,7 +119,7 @@ and f.LOCATIONTYPE = #{pd.LOCATIONTYPE} - and f.TRANSPORTATIONCOMPANY = #{pd.TRANSPORTATIONCOMPANY} + and i.CORP_NAME = #{pd.TRANSPORTATIONCOMPANY} diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityNoticeMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityNoticeMapper.xml index 91f47b4..548acbc 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityNoticeMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityNoticeMapper.xml @@ -149,6 +149,7 @@ and f.PRACTITIONER = #{pd.PRACTITIONER} + ORDER BY f.CREATETIME DESC + diff --git a/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml b/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml index 69529d3..78263cd 100644 --- a/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml +++ b/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml @@ -186,7 +186,7 @@ v1.PLATE_NUMBER from f - left join sys_dictionaries b on f.ANNUAL_INSPECTION_CYCLE = b.DICTIONARIES_ID + left join sys_dictionaries b on f.ANNUAL_INSPECTION_CYCLE = b.DICTIONARIES_ID AND b.PARENT_ID = '8b7dea3977fd4360a3cc8112368b90ff' INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} diff --git a/src/main/resources/mybatis/datasource/labourEntrenchThing/LabourEntrenchThingMapper.xml b/src/main/resources/mybatis/datasource/labourEntrenchThing/LabourEntrenchThingMapper.xml index 083313d..6a0217d 100644 --- a/src/main/resources/mybatis/datasource/labourEntrenchThing/LabourEntrenchThingMapper.xml +++ b/src/main/resources/mybatis/datasource/labourEntrenchThing/LabourEntrenchThingMapper.xml @@ -350,6 +350,7 @@ and f.PERSON_NAME LIKE CONCAT(CONCAT('%', #{pd.PERSON_NAME}),'%') + ORDER BY f.CREATTIME desc - + select u.USER_ID, - u.USERNAME, - u.PASSWORD, - u.LAST_LOGIN, - u.NAME, - u.SEX, - u.IP, - u.EMAIL, - u.NUMBER, - u.PHONE, - u.ISMAIN, - u.PUSH_CID, - r.ROLE_ID, - r.ROLE_NAME, - d.NAME as DEPARTMENT_NAME, - p.NAME AS POST_NAME + u.USERNAME, + u.PASSWORD, + u.LAST_LOGIN, + u.NAME, + u.SEX, + u.IP, + u.EMAIL, + u.NUMBER, + u.PHONE, + u.ISMAIN, + u.PUSH_CID, + r.ROLE_ID, + r.ROLE_NAME, + d.NAME as DEPARTMENT_NAME, + p.NAME AS POST_NAME, + c.PERSONNEL_TYPE, + sd.NAME AS PERSONNEL_TYPE_NAME -- 添加的字段,表示人员类型名称 from u left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID left join SYS_POST p on p.POST_ID=u.POST_ID + left join SYS_USERINFO c on c.USER_ID=u.USER_ID + left join sys_dictionaries sd on sd.DICTIONARIES_ID = c.PERSONNEL_TYPE AND sd.PARENT_ID = '0b62f92b0b624aab8e89a77304a64d5e' where u.ISDELETE = 0 and u.USERNAME != 'admin' and - ( - u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') - or - u.EMAIL LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') - or - u.NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') - or - u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') - or - u.PHONE LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') + ( + u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') + or + u.EMAIL LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') + or + u.NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') + or + u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') + or + u.PHONE LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') or d.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') - ) + ) - + and u.ROLE_ID=#{pd.ROLE_ID} - + and u.DEPARTMENT_ID=#{pd.DEPARTMENT_ID} - + and u.LAST_LOGIN >= #{pd.STARTTIME} - + and u.LAST_LOGIN <= #{pd.ENDTIME} AND - u.CORPINFO_ID = #{pd.CORPINFO_ID} + u.CORPINFO_ID = #{pd.CORPINFO_ID} order by d.LEVEL asc ,d.DEP_ORDER,d.DEPARTMENT_ID asc, u.SORT asc,u.USER_ID @@ -1796,6 +1800,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by u.SORT asc,u.LAST_LOGIN desc + + update diff --git a/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml b/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml index 9034d8b..e72a45b 100644 --- a/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml +++ b/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml @@ -445,8 +445,7 @@ AND f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES} - ORDER BY f.OPERATTIME DESC - + ORDER BY f.CREATTIME DESC