diff --git a/aspose-words-15.8.0-jdk16.jar b/aspose-words-15.8.0-jdk16.jar deleted file mode 100644 index c0e699f..0000000 Binary files a/aspose-words-15.8.0-jdk16.jar and /dev/null differ diff --git a/pom.xml b/pom.xml index 49891ff..8d03daf 100644 --- a/pom.xml +++ b/pom.xml @@ -377,7 +377,12 @@ commons-codec commons-codec - + + org.springframework + spring-mock + 2.0.8 + compile + commons-fileupload @@ -483,7 +488,7 @@ org.apache.poi poi - 4.1.2 + 3.17 @@ -501,7 +506,7 @@ org.apache.poi poi-ooxml - 4.1.2 + 3.17 diff --git a/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java index 39fbd7d..37b95a0 100644 --- a/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java +++ b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java @@ -56,9 +56,6 @@ public class AssignedManageController 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())); // 修改时间 pd.put("ASSIGNED_DATE", pd.get("TRANSACTION_DATE")); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("VEHICLE_TYPE",pd.get("ASSIGNED_VEHICLE_MODEL")); diff --git a/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java b/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java index b9b175a..0a94b99 100644 --- a/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java +++ b/src/main/java/com/zcloud/controller/eduApp/AppUsersCacheController.java @@ -126,9 +126,7 @@ public class AppUsersCacheController extends BaseController { pd = this.getPageData(); PageData faceBase64 = new PageData(); -// PageData oldStudent = usersService.findStuById(pd); if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) { - String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); try { FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL")); } catch (Exception e) { @@ -136,7 +134,11 @@ public class AppUsersCacheController extends BaseController { map.put("msg", "人脸图像不符合要求 请重新上传!"); return map; } - faceBase64.put("BASE", USERAVATARURL64); + MultipartFile FFILE = ImageUtil.base64ToMultipartFile(pd.getString("USERAVATARPREFIX") + pd.getString("USERAVATARURL")); + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID() + FFILE.getOriginalFilename().substring(FFILE.getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(FFILE, fileName, Const.FILEPATHUSERFACE + ffile); + faceBase64.put("COVERPATH", Const.FILEPATHUSERFACE + ffile + "/" + fileName); } else { map.put("result", "error"); map.put("msg", "未上传人脸识别照片,请先认证人脸!"); @@ -144,7 +146,7 @@ public class AppUsersCacheController extends BaseController { } initPageDataUtil.initSaveApp(faceBase64, pd.getString("USER_ID")); faceBase64.put("BASE_FACTORY_ID", this.get32UUID()); - faceBase64.put("TABLE_NAME", "SYS_USER"); + faceBase64.put("TABLE_NAME", "SYS_USERINFO"); faceBase64.put("COLUMN_NAME", "USER_ID"); faceBase64.put("USERAVATARPREFIX", pd.getString("USERAVATARPREFIX")); faceBase64.put("FOREIGN_KEY", pd.get("USER_ID")); @@ -152,9 +154,8 @@ public class AppUsersCacheController extends BaseController { baseFactoryMapper.deleteByForeign(faceBase64); baseFactoryMapper.save(faceBase64); - initPageDataUtil.initEditApp(pd, pd.getString("USER_ID")); pd.put("AUTHENTICATION", "1"); - usersCacheService.editAuthentication(pd); + userInfoService.editAuthentication(pd); PageData user = new PageData(); user.put("USER_ID", pd.get("USER_ID")); @@ -163,8 +164,7 @@ public class AppUsersCacheController extends BaseController { String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); smb.sshSftp(file, fileName, Const.FILEPATHFACE + ffile); user.put("PORTRAIT", Const.FILEPATHFACE + ffile + "/" + fileName); - initPageDataUtil.initEditApp(user, pd.getString("USER_ID")); - usersCacheService.editUser(user); + userInfoService.editUserInfo(user); map.put("result", errInfo); return map; } @@ -185,12 +185,13 @@ public class AppUsersCacheController extends BaseController { pd.put("TYPE", "1"); pd.put("FOREIGN_KEY", pd.get("USER_ID")); PageData user = baseFactoryMapper.findByKeyType(pd); - if (user == null || user.get("BASE") == null || user.get("BASE") == "") { + if (user == null || user.get("COVERPATH") == null || user.get("COVERPATH") == "") { map.put("result", "error"); map.put("msg", "用户未录入人脸信息,无法验证"); return map; } - String USERAVATARURL = ImageAnd64Binary.upZip(user.getString("BASE")); + MultipartFile coverpath = ImageUtil.getMultipartFile(Const.HTTPFILEURL + user.getString("COVERPATH")); + String USERAVATARURL = Base64Util.getBase64String(coverpath); try { String confidence = FaceUtil.compareFace(pd.getString("USERAVATARURL"), USERAVATARURL); @@ -209,7 +210,6 @@ public class AppUsersCacheController extends BaseController { smb.sshSftp(file, fileName, Const.FILEPATHFACE + student.get("CORPINFO_ID") + "/" + ffile); PageData faceImg = new PageData(); faceImg.put("FACEIMGLOG_ID", this.get32UUID()); - faceImg.put("ENTERPRISE_ID", student.get("ENTERPRISE_ID")); faceImg.put("CORPINFO_ID", student.get("CORPINFO_ID")); faceImg.put("STUDENT_ID", student.get("STUDENT_ID")); faceImg.put("USER_ID", pd.get("USER_ID")); diff --git a/src/main/java/com/zcloud/controller/eduArchives/ArchivesPostManController.java b/src/main/java/com/zcloud/controller/eduArchives/ArchivesPostManController.java index 31343e8..4d150a4 100644 --- a/src/main/java/com/zcloud/controller/eduArchives/ArchivesPostManController.java +++ b/src/main/java/com/zcloud/controller/eduArchives/ArchivesPostManController.java @@ -172,7 +172,6 @@ public class ArchivesPostManController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //机构 - pd.put("ENTERPRISE_ID", pd.get("ID")); //企业 List varList = archivespostmanService.listAll(pd); //列出ArchivesPostMan列表 map.put("varList", varList); map.put("result", errInfo); @@ -340,7 +339,7 @@ public class ArchivesPostManController extends BaseController { @SuppressWarnings("unchecked") @ResponseBody @Transactional - public Object readExcel(@RequestParam(value = "excel", required = false) MultipartFile file) throws Exception { + public Object readExcel(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception { Map map = new HashMap(); String errInfo = "success"; StringBuffer errorStr = new StringBuffer(); @@ -438,8 +437,7 @@ public class ArchivesPostManController extends BaseController { pageData.put("EFFECTIVE_DATE", effective_date); pageData.put("RETRAINING", retraining); pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //机构 - pageData.put("ENTERPRISE_ID", pd.get("ID")); //企业 - pageData.put("YEAR", pd.getString("YEAR")); + pageData.put("YEAR", pd.getString("year")); pageData.put("ISDELETE", "0"); pageData.put("CREATOR", Jurisdiction.getName());// 账号类型 pageData.put("CREATTIME", DateUtil.date2Str(new Date())); diff --git a/src/main/java/com/zcloud/controller/eduArchives/ArchivesStudentController.java b/src/main/java/com/zcloud/controller/eduArchives/ArchivesStudentController.java index 57bf940..64fe770 100644 --- a/src/main/java/com/zcloud/controller/eduArchives/ArchivesStudentController.java +++ b/src/main/java/com/zcloud/controller/eduArchives/ArchivesStudentController.java @@ -131,10 +131,6 @@ public class ArchivesStudentController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); PageData stu = archivesstudentService.getStuInfo(pd); - pd = archivesstudentService.findById(pd); //根据ID读取 - if (pd != null) { - stu.putAll(pd); - } map.put("pd", stu); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/controller/eduStudy/ClassController.java b/src/main/java/com/zcloud/controller/eduStudy/ClassController.java index a2b3fcc..33b794e 100644 --- a/src/main/java/com/zcloud/controller/eduStudy/ClassController.java +++ b/src/main/java/com/zcloud/controller/eduStudy/ClassController.java @@ -102,13 +102,8 @@ public class ClassController extends BaseController { int classNum = 0; PageData data = new PageData(); //注意数据权限。企业看企业数据,机构看机构数据 -// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); -// data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); -// if ("0".equals(Jurisdiction.getIS_MAIN())){ -// pd.put("USER_ID", Jurisdiction.getUSER_ID()); -// data.put("USER_ID", Jurisdiction.getUSER_ID()); -// } - classNum = classService.getClassNum(data); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + classNum = classService.getClassNum(pd); String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); @@ -150,9 +145,6 @@ public class ClassController extends BaseController { pd = this.getPageData(); PageData data = new PageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - if ("0".equals(Jurisdiction.getIS_MAIN())){ - pd.put("USER_ID", Jurisdiction.getUSER_ID()); - } String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); page.setPd(pd); diff --git a/src/main/java/com/zcloud/controller/eduStudy/StudentController.java b/src/main/java/com/zcloud/controller/eduStudy/StudentController.java index 8c22c0e..d9e1f13 100644 --- a/src/main/java/com/zcloud/controller/eduStudy/StudentController.java +++ b/src/main/java/com/zcloud/controller/eduStudy/StudentController.java @@ -11,6 +11,7 @@ import fr.opensagres.xdocreport.template.IContext; import fr.opensagres.xdocreport.template.TemplateEngineKind; import fr.opensagres.xdocreport.template.formatter.FieldsMetadata; import fr.opensagres.xdocreport.template.formatter.NullImageBehaviour; +import org.apache.tools.ant.Project; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -343,61 +344,63 @@ public class StudentController extends BaseController { Map objMap = new LinkedHashMap<>(); List> list = new ArrayList<>(); -// List list = new ArrayList<>(); if (varList.size() > 0) { + int num = 1; for (PageData student : varList) { - StudentMessageExcel excelObj = new StudentMessageExcel(); - excelObj.setUSER_ID_CARD(student.getString("USER_ID_CARD")); - excelObj.setNAME(student.getString("NAME")); - excelObj.setSEX("1".equals(student.getString("SEX")) ? "男" : "女"); - excelObj.setPHONE(student.getString("PHONE")); - excelObj.setDEPARTMENT_NAME(student.getString("DEPARTMENT_NAME")); - excelObj.setPOST_NAME(student.getString("POST_NAME")); - excelObj.setALL_CLASSHOUR(student.getString("ALL_CLASSHOUR")); - excelObj.setCOMPLETE_CLASSHOUR(student.getString("COMPLETE_CLASSHOUR")); - excelObj.setPASSED("0".equals(student.getString("STAGEEXAMSTATE")) ? "不考试" : student.getString("PASSED")); - excelObj.setEXAMSCORE(student.getString("EXAMSCORE")); + objMap = new LinkedHashMap<>(); + objMap.put("NUMBER", num); + objMap.put("USER_ID_CARD",student.getString("USER_ID_CARD")); + objMap.put("NAME",student.getString("NAME")); + objMap.put("SEX", "1".equals(student.getString("SEX")) ? "男" : "女"); + objMap.put("PHONE",student.getString("PHONE")); + objMap.put("DEPARTMENT_NAME",student.getString("DEPARTMENT_NAME")); + objMap.put("POST_NAME",student.getString("POST_NAME")); + objMap.put("ALL_CLASSHOUR",student.getString("ALL_CLASSHOUR")); + objMap.put("COMPLETE_CLASSHOUR",student.getString("COMPLETE_CLASSHOUR")); + objMap.put("PASSED","0".equals(student.getString("STAGEEXAMSTATE")) ? "不考试" : student.getString("PASSED")); + objMap.put("EXAMSCORE",student.getString("EXAMSCORE")); switch (student.getString("STUDYSTATE")) { case "1": - excelObj.setSTUDYSTATE("学习中"); + objMap.put("STUDYSTATE","学习中"); break; case "2": - excelObj.setSTUDYSTATE("已学完"); + objMap.put("STUDYSTATE","已学完"); break; case "3": - excelObj.setSTUDYSTATE("已完成"); + objMap.put("STUDYSTATE","已完成"); break; case "4": - excelObj.setSTUDYSTATE("未完成"); + objMap.put("STUDYSTATE","未完成"); break; case "5": - excelObj.setSTUDYSTATE("待评估"); + objMap.put("STUDYSTATE","待评估"); break; case "6": - excelObj.setSTUDYSTATE("评估未合格"); + objMap.put("STUDYSTATE","评估未合格"); break; case "0": - excelObj.setSTUDYSTATE("未学习"); + objMap.put("STUDYSTATE","未学习"); break; } - excelObj.setCLASS_NAME(student.getString("CLASS_NAME")); -// if (Tools.notEmpty(pd.getString("USER_SIGN_FILE_PATH"))) { -// File USER_SIGN = new File(PathUtil.getProjectpath() + Const.FILEPATHFILE + pd.getString("USER_SIGN_FILE_PATH")); -// excelObj.setUSER_SIGN_FILE(USER_SIGN); -// } - File USER_SIGN = new File("D:\\图片\\11111.png"); - excelObj.setUSER_SIGN_FILE(USER_SIGN); - if (Tools.notEmpty(pd.getString("PORTRAIT"))) { - File PORTRAIT = new File(PathUtil.getProjectpath() + Const.FILEPATHFILE + pd.getString("PORTRAIT")); - excelObj.setPORTRAIT(PORTRAIT); + objMap.put("CLASS_NAME",student.getString("CLASS_NAME")); + if (Tools.notEmpty(student.getString("SIGNATURE_PATH"))) { + objMap.put("IMAGE1", student.getString("SIGNATURE_PATH")); + }else { + objMap.put("IMAGE1", null); + } + if (Tools.notEmpty(student.getString("PORTRAIT"))) { + objMap.put("IMAGE2", student.getString("PORTRAIT")); + }else { + objMap.put("IMAGE2", null); } - objMap = ImageExcelUtil.javaBean2Map(excelObj); list.add(objMap); + num++; } } Object[] objects = objMap.keySet().toArray(); String[] titles = new String[objects.length]; Map titleName = new LinkedHashMap<>(); + titleName.put("NUMBER", "序号"); titleName.put("USER_ID_CARD", "身份证号"); titleName.put("NAME", "姓名"); titleName.put("SEX", "性别"); @@ -410,29 +413,13 @@ public class StudentController extends BaseController { titleName.put("EXAMSCORE", "考试分数"); titleName.put("STUDYSTATE", "学习状态"); titleName.put("CLASS_NAME", "班级名称"); - titleName.put("USER_SIGN_FILE", "用户签字"); - titleName.put("PORTRAIT", "人像照片"); + titleName.put("IMAGE1", "用户签字"); + titleName.put("IMAGE2", "人像照片"); for (int i = 0; i < titles.length; i++) { String key = objects[i].toString(); titles[i] = titleName.get(key); } -// List titles = new ArrayList<>(); -// titles.add("身份证号"); -// titles.add("姓名"); -// titles.add("性别"); -// titles.add("手机号"); -// titles.add("部门"); -// titles.add("工种"); -// titles.add("要求总学时"); -// titles.add("已完成学时"); -// titles.add("是否考试通过"); -// titles.add("考试分数"); -// titles.add("学习状态"); -// titles.add("班级名称"); -// titles.add("用户签字"); -// titles.add("人像照片"); - String fileName = "学员学习记录"; response.setContentType("application/vnd.ms-excel"); response.addHeader("Content-Disposition", "attachment; filename=" + fileName); diff --git a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java index 2fa8c88..f13a573 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -263,20 +263,45 @@ public class FreighttTrailerController extends BaseController { String[] ArrayDATA_IDS = DATA_IDS.split(","); pd.put("ArrayDATA_IDS",ArrayDATA_IDS); } - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); Map dataMap = new HashMap(); List titles = new ArrayList(); - titles.add("所属企业"); //1 - titles.add("风险点(单元)名称"); //2 - titles.add("所属部门"); //3 + titles.add("车牌号"); //1 + titles.add("车架号"); //2 + titles.add("车身编号"); //3 + titles.add("挂车类型"); //4 + titles.add("运营证号"); //5 + titles.add("归属部门"); //6 + titles.add("车主"); //7 + titles.add("车主电话"); //8 + titles.add("初登日期"); //9 + titles.add("发证日期"); //10 + titles.add("到期日期"); //11 + titles.add("挂车品牌"); //12 + titles.add("挂车型号"); //13 + titles.add("核定总质量"); //14 + titles.add("核定载质量"); //15 + titles.add("容积"); //16 dataMap.put("titles", titles); List varOList = freightTrailerService.listOut(pd); List varList = new ArrayList(); for(int i=0;i allSign = classMapper.findByIdForSign(student); //考核记录下边的签字信息 USERNAME = student.getString("STUDENT_NAME"); PageData regstu = archivesStudentMapper.getStuInfo(pageData); - PageData arpd = archivesStudentMapper.findById(pageData); //根据ID读取 - if (arpd != null) { - regstu.putAll(arpd); - } if (checkArchivesList.toString().contains("人员登记表")) { regstu.put("projectPath", projectPath); File pdf = archivesStudentService.registertable(regstu); //人员登记返回PDF文件 @@ -740,10 +736,6 @@ public class ArchivesPdfFileServiceImpl implements ArchivesPdfFileService { String projectPath = pd.getString("projectPath"); ArrayList files = new ArrayList<>(); //最外层 PageData stu = archivesStudentMapper.getStuInfo(pd); - PageData arpd = archivesStudentMapper.findById(pd); //根据ID读取 - if (arpd != null) { - stu.putAll(arpd); - } String now = DateUtil.getSdfTimesSSS(); File file = new File(projectPath + Const.FILEPATHWORDTEMPLATE + "registerform.docx"); InputStream mbwj = new FileInputStream(file); @@ -767,7 +759,7 @@ public class ArchivesPdfFileServiceImpl implements ArchivesPdfFileService { context.put("value13", Tools.notEmpty(stu.getString("ENTRY_DATE")) ? stu.getString("ENTRY_DATE") : ""); // 进入本单位时间 context.put("value14", Tools.notEmpty(stu.getString("DEPARTMENT_NAME")) ? stu.getString("DEPARTMENT_NAME") : ""); // 入职部门 - context.put("value15", Tools.notEmpty(stu.getString("POST_NAME")) ? stu.getString("POST_NAME") : ""); // 岗位名称 + context.put("value15", Tools.notEmpty(stu.getString("TYPE_OF_WORK_NAME")) ? stu.getString("TYPE_OF_WORK_NAME") : ""); // 岗位名称 context.put("value16", Tools.notEmpty(stu.getString("PREVIOUS_POST_DATE")) ? stu.getString("PREVIOUS_POST_DATE") : ""); // 之前从事本岗位时间 context.put("value17", Tools.notEmpty(stu.getString("WORK_EXPERIENCE")) ? stu.getString("WORK_EXPERIENCE") : ""); // 主要工作经历 context.put("value18", Tools.notEmpty(stu.getString("CERTIFICATES")) ? stu.getString("CERTIFICATES") : ""); // 有关的岗位证书等情况 @@ -840,11 +832,6 @@ public class ArchivesPdfFileServiceImpl implements ArchivesPdfFileService { PageData studentpd = new PageData(); studentpd.put("STUDENT_ID", user.getString("STUDENT_ID")); PageData stu = archivesStudentMapper.getStuInfo(studentpd);//学员数据 - pd.put("USER_ID", stu.getString("USER_ID")); - studentpd = archivesStudentMapper.findById(pd); //根据ID读取 - if (studentpd != null) { - stu.putAll(studentpd); - } stu.put("projectPath", projectPath); if (checkArchivesList.toString().contains("人员登记表")) { File pdf = this.registertable(stu); @@ -3020,7 +3007,7 @@ public class ArchivesPdfFileServiceImpl implements ArchivesPdfFileService { context.put("value13", Tools.notEmpty(stu.getString("ENTRY_DATE")) ? stu.getString("ENTRY_DATE") : ""); // 进入本单位时间 context.put("value14", Tools.notEmpty(stu.getString("DEPARTMENT_NAME")) ? stu.getString("DEPARTMENT_NAME") : ""); // 入职部门 - context.put("value15", Tools.notEmpty(stu.getString("POST_NAME")) ? stu.getString("POST_NAME") : ""); // 岗位名称 + context.put("value15", Tools.notEmpty(stu.getString("TYPE_OF_WORK_NAME")) ? stu.getString("TYPE_OF_WORK_NAME") : ""); // 岗位名称 context.put("value16", Tools.notEmpty(stu.getString("PREVIOUS_POST_DATE")) ? stu.getString("PREVIOUS_POST_DATE") : ""); // 之前从事本岗位时间 context.put("value17", Tools.notEmpty(stu.getString("WORK_EXPERIENCE")) ? stu.getString("WORK_EXPERIENCE") : ""); // 主要工作经历 context.put("value18", Tools.notEmpty(stu.getString("CERTIFICATES")) ? stu.getString("CERTIFICATES") : ""); // 有关的岗位证书等情况 diff --git a/src/main/java/com/zcloud/service/eduArchives/impl/ArchivesStudentServiceImpl.java b/src/main/java/com/zcloud/service/eduArchives/impl/ArchivesStudentServiceImpl.java index 67f42d4..71d9e05 100644 --- a/src/main/java/com/zcloud/service/eduArchives/impl/ArchivesStudentServiceImpl.java +++ b/src/main/java/com/zcloud/service/eduArchives/impl/ArchivesStudentServiceImpl.java @@ -144,7 +144,7 @@ public class ArchivesStudentServiceImpl implements ArchivesStudentService { context.put("value13", Tools.notEmpty(stu.getString("ENTRY_DATE")) ? stu.getString("ENTRY_DATE") : ""); // 进入本单位时间 context.put("value14", Tools.notEmpty(stu.getString("DEPARTMENT_NAME")) ? stu.getString("DEPARTMENT_NAME") : ""); // 入职部门 - context.put("value15", Tools.notEmpty(stu.getString("POST_NAME")) ? stu.getString("POST_NAME") : ""); // 岗位名称 + context.put("value15", Tools.notEmpty(stu.getString("TYPE_OF_WORK_NAME")) ? stu.getString("TYPE_OF_WORK_NAME") : ""); // 岗位名称 context.put("value16", Tools.notEmpty(stu.getString("PREVIOUS_POST_DATE")) ? stu.getString("PREVIOUS_POST_DATE") : ""); // 之前从事本岗位时间 context.put("value17", Tools.notEmpty(stu.getString("WORK_EXPERIENCE")) ? stu.getString("WORK_EXPERIENCE") : ""); // 主要工作经历 context.put("value18", Tools.notEmpty(stu.getString("CERTIFICATES")) ? stu.getString("CERTIFICATES") : ""); // 有关的岗位证书等情况 diff --git a/src/main/java/com/zcloud/service/eduStudy/StrengthenStageExamPaperInputService.java b/src/main/java/com/zcloud/service/eduStudy/StrengthenStageExamPaperInputService.java index ae753b8..0cae4ea 100644 --- a/src/main/java/com/zcloud/service/eduStudy/StrengthenStageExamPaperInputService.java +++ b/src/main/java/com/zcloud/service/eduStudy/StrengthenStageExamPaperInputService.java @@ -81,14 +81,6 @@ public interface StrengthenStageExamPaperInputService { */ public void deleteAll(String[] ArrayDATA_IDS) throws Exception; - /** - * 获取对应的试卷习题 - * - * @param pd - * @return - * @throws Exception - */ - public List getSaveStage(PageData pd) throws Exception; /** * 修改 状态 diff --git a/src/main/java/com/zcloud/service/eduStudy/impl/CourseStudyVideoRecordServiceImpl.java b/src/main/java/com/zcloud/service/eduStudy/impl/CourseStudyVideoRecordServiceImpl.java index 6e92fae..f7ad447 100644 --- a/src/main/java/com/zcloud/service/eduStudy/impl/CourseStudyVideoRecordServiceImpl.java +++ b/src/main/java/com/zcloud/service/eduStudy/impl/CourseStudyVideoRecordServiceImpl.java @@ -168,7 +168,6 @@ public class CourseStudyVideoRecordServiceImpl implements CourseStudyVideoRecord initPageDataUtil.initSaveApp(entity, entity.getString("USER_ID")); entity.put("CORPINFO_ID", student.get("CORPINFO_ID")); entity.put("STUDENT_ID", student.get("STUDENT_ID")); - entity.put("ENTERPRISE_ID", student.get("ENTERPRISE_ID")); coursestudyvideorecordMapper.save(entity); } else { diff --git a/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java b/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java index 91e1996..c56e781 100644 --- a/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java +++ b/src/main/java/com/zcloud/service/eduStudy/impl/StageExamServiceImpl.java @@ -228,7 +228,7 @@ public class StageExamServiceImpl implements StageExamService { record.put("STAGEEXAM_ID", entity.getString("STAGEEXAM_ID")); record.put("PAPER_ID", entity.getString("STAGEEXAMPAPERINPUT_ID")); record.put("CLASS_ID", entity.getString("CLASS_ID")); - record.put("TUDENT_ID", student.getString("STUDENT_ID")); + record.put("STUDENT_ID", student.getString("STUDENT_ID")); record.put("CORPINFO_ID", student.getString("CORPINFO_ID")); //企业ID initPageDataUtil.initSaveApp(record, entity.getString("USER_ID")); for (PageData x : list) { @@ -299,7 +299,7 @@ public class StageExamServiceImpl implements StageExamService { PageData stuEndTime = new PageData(); stuEndTime.put("STUDENT_ID", student.getString("STUDENT_ID")); stuEndTime.put("STUDY_END_TIME", nowDate); - initPageDataUtil.initEdit(stuEndTime); + initPageDataUtil.initEditApp(stuEndTime,entity.getString("USER_ID")); studentMapper.edit(stuEndTime); scores.put("STAGEEXAMSTATE", '2'); //考试状态 scores.put("STUDYSTATE", '2'); // 学习状态 diff --git a/src/main/java/com/zcloud/service/eduStudy/impl/StageexampaperInputServiceImpl.java b/src/main/java/com/zcloud/service/eduStudy/impl/StageexampaperInputServiceImpl.java index 5345fd0..adb758a 100644 --- a/src/main/java/com/zcloud/service/eduStudy/impl/StageexampaperInputServiceImpl.java +++ b/src/main/java/com/zcloud/service/eduStudy/impl/StageexampaperInputServiceImpl.java @@ -136,8 +136,8 @@ public class StageexampaperInputServiceImpl implements StageexampaperInputServic //试题类型(单选题、多选题、判断题、填空题) // 批量添加自动生成试卷 if (Tools.notEmpty(pd.getString("addType"))) { - String[] COURSEWAREIDS = (String[]) pd.get("COURSEWAREIDS"); - questionPd.put("COURSEWAREIDS", COURSEWAREIDS); + String[] COURSEWAREIDS = pd.get("COURSEWAREIDS").toString().split(","); + questionPd.put("COURSEWAREIDS", Arrays.asList(COURSEWAREIDS)); } else { JSONArray coursewareids = JSON.parseArray(pd.get("COURSEWAREIDS").toString()); questionPd.put("COURSEWAREIDS", Arrays.asList(coursewareids.toArray())); diff --git a/src/main/java/com/zcloud/service/eduStudy/impl/StrengthenStageExamPaperInputServiceImpl.java b/src/main/java/com/zcloud/service/eduStudy/impl/StrengthenStageExamPaperInputServiceImpl.java index a2a1b86..2436342 100644 --- a/src/main/java/com/zcloud/service/eduStudy/impl/StrengthenStageExamPaperInputServiceImpl.java +++ b/src/main/java/com/zcloud/service/eduStudy/impl/StrengthenStageExamPaperInputServiceImpl.java @@ -117,58 +117,6 @@ public class StrengthenStageExamPaperInputServiceImpl implements StrengthenStage stageexampaperinputMapper.deleteAll(ArrayDATA_IDS); } - public List getSaveStage(PageData pd) throws Exception { - List valList = new ArrayList<>(); - for (int i = 1; i <= 4; i++) { - String xitiType = ""; - Double QUESTIONSCORE = 0.0; - if (1 == i) { - xitiType = "DANYUANTICOUNT"; - QUESTIONSCORE = Double.parseDouble(pd.getString("DANXUANTINUMBER")); - } else if (2 == i) { - xitiType = "DUOXUANTICOUNT"; - QUESTIONSCORE = Double.parseDouble(pd.getString("DUOXUANTINUMBER")); - } else if (3 == i) { - xitiType = "PANDUITICOUNT"; - QUESTIONSCORE = Double.parseDouble(pd.getString("PANDUITINUMBER")); - } else if (4 == i) { - xitiType = "TIANKONGTICOUNT"; - QUESTIONSCORE = Double.parseDouble(pd.getString("TIANKONGTINUMBER")); - } - PageData questionPd = new PageData(); - questionPd.put("QUESTIONTYPE", i); - //试题类型(单选题、多选题、判断题、填空题) - // 批量添加自动生成试卷 - if (Tools.notEmpty(pd.getString("addType"))) { - questionPd.put("COURSEWAREIDS", (String[]) pd.get("COURSEWAREIDS")); - } else { - JSONArray coursewareids = JSON.parseArray(pd.get("COURSEWAREIDS").toString()); - questionPd.put("COURSEWAREIDS", Arrays.asList(coursewareids.toArray())); - } - //课件id - List questionAllList = questionService.listAllByType(questionPd); // 获取该类型的习题数据 - Integer danxuanNmber = Integer.parseInt(pd.getString(xitiType)); //选择该类型数据的个数 - - if (danxuanNmber > questionAllList.size()) { - System.out.println("课程习题总数少于考试试题数,无法生成试卷试题"); - return null; - } - List tempList = new ArrayList(); //索引 - for (int j = 0; j < danxuanNmber; j++) { - int random = new Random().nextInt(questionAllList.size()); - if (!tempList.contains(random)) { - tempList.add(random); - PageData quMap = questionAllList.get(random); - quMap.put("SCORE", QUESTIONSCORE); //添加分数 - valList.add(quMap); - } else { - j--; - } - } - } - return valList; - } - /** * 修改 状态 * diff --git a/src/main/java/com/zcloud/service/system/UserInfoService.java b/src/main/java/com/zcloud/service/system/UserInfoService.java index 4460370..28049e7 100644 --- a/src/main/java/com/zcloud/service/system/UserInfoService.java +++ b/src/main/java/com/zcloud/service/system/UserInfoService.java @@ -79,5 +79,10 @@ public interface UserInfoService{ * @param pd */ void editPractitioner(PageData pd)throws Exception; + + void editAuthentication(PageData pd) throws Exception; + + void editUserInfo(PageData user) throws Exception; } + diff --git a/src/main/java/com/zcloud/service/system/impl/UserInfoServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UserInfoServiceImpl.java index b4f260a..0c155bc 100644 --- a/src/main/java/com/zcloud/service/system/impl/UserInfoServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UserInfoServiceImpl.java @@ -137,5 +137,17 @@ public class UserInfoServiceImpl implements UserInfoService { userinfoMapper.editPractitioner(pd); } + public void editAuthentication(PageData pd) throws Exception { + userinfoMapper.editAuthentication(pd); + } + /** + * 修改用户 + * + * @param pd + * @throws Exception + */ + public void editUserInfo(PageData pd) throws Exception { + userinfoMapper.editUserInfo(pd); + } } diff --git a/src/main/java/com/zcloud/util/ClassScheduled.java b/src/main/java/com/zcloud/util/ClassScheduled.java deleted file mode 100644 index 7b72ad0..0000000 --- a/src/main/java/com/zcloud/util/ClassScheduled.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.zcloud.util; - -import com.zcloud.entity.PageData; -import com.zcloud.service.eduStudy.ClassService; -import com.zcloud.service.eduStudy.StageStudentRelationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -@Component -public class ClassScheduled { - @Autowired - private ClassService classService; - @Autowired - private StageStudentRelationService stageStudentRelationService; - - -// @Scheduled(cron = "0 30 0 * * ?") // 每天晚上12:30执行 - @Scheduled(cron ="0 0/5 * * * ?") // 测试 每5分钟执行一次 - public void scheduled() { - try { - PageData pd = new PageData(); - String[] STATEARRAY = new String[]{"4", "5"}; - pd.put("STATEARRAY", STATEARRAY); - // 查询所有班级列表 - List classList = classService.listAllScheduled(pd); - if (classList != null && classList.size() > 0) { - for (PageData classInfo : classList) { - if (classInfo != null - && classInfo.get("TRAINTYPE") != null && Tools.notEmpty(classInfo.get("TRAINTYPE").toString()) - && classInfo.get("START_TIME") != null - && classInfo.get("END_TIME") != null) { - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - Date startTime = formatter.parse(classInfo.getString("START_TIME")); - Date endTime = formatter.parse(classInfo.getString("END_TIME")); - Date now = new Date(); - - if (startTime.before(now) && now.before(endTime)) { - classInfo.put("STATE", "5"); - } else if (endTime.before(now)) { - classInfo.put("STATE", "6"); - pd.put("CLASS_ID", classInfo.getString("CLASS_ID")); - int count = stageStudentRelationService.getCountByCla(pd); - PageData studyState = new PageData(); - if (count > 0) { - studyState.put("STUDYSTATE", "6"); - studyState.put("WHERESTUDYSTATE", new String[]{"5"}); - studyState.put("OPERATOR", "1"); //修改人 - studyState.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - studyState.put("CLASS_ID", classInfo.get("CLASS_ID")); - stageStudentRelationService.updateClassStateSch(studyState); - } - studyState.put("STUDYSTATE", "4"); - studyState.put("WHERESTUDYSTATE", new String[]{"0", "1"}); - studyState.put("OPERATOR", "1"); //修改人 - studyState.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - studyState.put("CLASS_ID", classInfo.get("CLASS_ID")); - stageStudentRelationService.updateClassStateSch(studyState); - PageData stageExamState = new PageData(); - stageExamState.put("STAGEEXAMSTATE", "4"); - stageExamState.put("WHERESTAGEEXAMSTATE", new String[]{"1"}); - stageExamState.put("OPERATOR", "1"); //修改人 - stageExamState.put("CLASS_ID", classInfo.get("CLASS_ID")); - stageExamState.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - stageStudentRelationService.updateClassStateSch(stageExamState); - - } - classInfo.put("OPERATOR", "1"); //修改人 - classInfo.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - classService.editState(classInfo); - } - } - } - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/src/main/java/com/zcloud/util/Const.java b/src/main/java/com/zcloud/util/Const.java index 70a0a5b..0a42e55 100644 --- a/src/main/java/com/zcloud/util/Const.java +++ b/src/main/java/com/zcloud/util/Const.java @@ -31,6 +31,7 @@ public class Const { public static final String BIFILEPATHFILE = "/TrafficFile/uploadFiles/Bfile/"; //文件上传路径 public static final String FILEPATHIMG = "/TrafficFile/uploadFiles/imgs/"; //图片上传路径 public static final String FILEPATHIMGSPECIAL = "/TrafficFile/uploadFiles/imgs/special/"; //图片上传路径(特种装备) + public static final String FILEPATHUSERFACE = "/TrafficFile/uploadFiles/userFace/"; //图片上传路径(人脸) public static final String FILEPATHDZJM = "/TrafficFile/uploadFiles/dzjm/"; //图片上传路径 public static final String FILEPATHYHTP = "/TrafficFile/uploadFiles/yhtp/"; //图片上传路径 public static final String FILEPATHFXSST = "/TrafficFile/uploadFiles/fxsst/"; //图片上传路径 风险四色图 diff --git a/src/main/java/com/zcloud/util/ImageAnd64Binary.java b/src/main/java/com/zcloud/util/ImageAnd64Binary.java index 6376e4e..b5de526 100644 --- a/src/main/java/com/zcloud/util/ImageAnd64Binary.java +++ b/src/main/java/com/zcloud/util/ImageAnd64Binary.java @@ -119,7 +119,7 @@ public class ImageAnd64Binary { ByteArrayOutputStream out = new ByteArrayOutputStream(); // 创建一个 ByteArrayInputStream,使用 buf 作为其缓冲区数组 - ByteArrayInputStream in = new ByteArrayInputStream( zipBase64 .getBytes( "ISO-8859-1" ) ); + ByteArrayInputStream in = new ByteArrayInputStream( zipBase64.getBytes( "ISO-8859-1" ) ); // 使用默认缓冲区大小创建新的输入流 GZIPInputStream gzip = new GZIPInputStream( in ); diff --git a/src/main/java/com/zcloud/util/ImageExcelUtil.java b/src/main/java/com/zcloud/util/ImageExcelUtil.java index f3677af..58a81a6 100644 --- a/src/main/java/com/zcloud/util/ImageExcelUtil.java +++ b/src/main/java/com/zcloud/util/ImageExcelUtil.java @@ -43,6 +43,7 @@ public class ImageExcelUtil { OutputStream out = null; BufferedImage bufferImg = null; HSSFWorkbook wb = null; + List fileList = new ArrayList(); try { //创建工作sheet @@ -88,12 +89,14 @@ public class ImageExcelUtil { cellRow = row.createCell(cellColumn); cellRow.setCellStyle(style); //如果行数据中有图片时候的处理 - if ("USER_SIGN_FILE".equals(value) || "PORTRAIT".equals(value)) { - File file = (File) stringObjectMap.get(value); - if (file == null) { + if ("IMAGE1".equals(value) || "IMAGE2".equals(value)) { + if (stringObjectMap.get(value) == null) { cellRow.setCellValue(""); + cellColumn++; continue; } else { + String filePath = saveFile(Const.HTTPFILEURL + stringObjectMap.get(value).toString(), path); + File file = new File(filePath); row.setHeightInPoints(50); ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream(); cellRow = row.createCell(cellColumn); @@ -101,16 +104,17 @@ public class ImageExcelUtil { sheet.setColumnWidth(cellColumn, 5000); log.error("图片路径" + file); bufferImg = ImageIO.read(file); - ImageIO.write(bufferImg, "jpg", byteArrayOut); - anchor = new HSSFClientAnchor(0, 0, 1023, 255, (short) cellColumn, i, (short) cellColumn, i); - patriarch.createPicture(anchor, wb.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_PNG)); - cellColumn++; + ImageIO.write(bufferImg, "png", byteArrayOut); + anchor = new HSSFClientAnchor(0, 0, 800, 255, (short) cellColumn, i, (short) cellColumn, i); + patriarch.createPicture(anchor, wb.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); + fileList.add(file); } - } - if (stringObjectMap.get(value) != null) { - cellRow.setCellValue(stringObjectMap.get(value).toString()); } else { - cellRow.setCellValue(""); + if (stringObjectMap.get(value) != null) { + cellRow.setCellValue(stringObjectMap.get(value).toString()); + } else { + cellRow.setCellValue(""); + } } cellColumn++; } @@ -129,12 +133,9 @@ public class ImageExcelUtil { if (out != null) { try { out.close(); - - //执行删除生成的图片 TODO -// File file = new File("E:\\data\\nginxd\\sportsApplets");//输入要删除文件目录的绝对路径 -// File file = new File("/data/nginxd/sportsApplets/excelDeleteImage/");//输入要删除文件目录的绝对路径 - File file = new File(path);//输入要删除文件目录的绝对路径 - deleteFile(file);//由于是保存网络图片到本地服务区,所以画完图片到excel就要删除文件 + for (File file : fileList) { + file.delete(); //由于是保存网络图片到本地服务区,所以画完图片到excel就要删除文件 + } } catch (IOException e) { e.printStackTrace(); } @@ -143,36 +144,6 @@ public class ImageExcelUtil { } } - /** - * 删除文件夹目录下的所有文件 (我是怕到时候本地服务器图片越来越多,占用资源,所以把图片洗完到excel里面就删除) - * - * @param file - * @date 2021/01/11 - */ - public static void deleteFile(File file) { - //判断文件不为null或文件目录存在 - if (file == null || !file.exists()) { - log.error("文件删除失败,请检查文件路径是否正确"); - return; - } - //取得这个目录下的所有子文件对象 - File[] files = file.listFiles(); - //遍历该目录下的文件对象 - for (File f : files) { - //打印文件名 - String name = file.getName(); - log.error("删除的文件名" + name); - //判断子目录是否存在子目录,如果是文件则删除 - if (f.isDirectory()) { - deleteFile(f); - } else { - f.delete(); - } - } - //删除空文件夹 for循环已经把上一层节点的目录清空。 - file.delete(); - } - /** * 保存图片到本地 * @@ -207,8 +178,6 @@ public class ImageExcelUtil { // 读取到的数据长度 int len; // 输出的文件流 -// String path = "E:\\data\\nginxd\\sportsApplets"; -// String path = "/data/nginxd/sportsApplets/excelDeleteImage/"; sf = new File(path); if (!sf.exists()) { sf.mkdirs(); @@ -236,50 +205,6 @@ public class ImageExcelUtil { return sf.getPath() + "/" + filename; } - - /** - * 将java类对象属性-值转换成map的键值对 去除getClass方法属性,以及自定义的file属性放置最后。 - * - * @param javaBean - * @return Map - * @throws Exception - * @date 2021/01/11 - */ - public static Map javaBean2Map(Object javaBean) throws Exception { - Map map = new LinkedHashMap<>(); - //反射的实现方式:第一种 - /*Class studentClass = Student.class; - studentClass.getClass();*/ - //第二种实现方式 - Method[] methods = javaBean.getClass().getMethods(); // 获取所有方法 - //第三种实现方式 - /*Class.forName("类路径");*/ - String fileName = null; - File file = null; - for (Method method : methods) { - if (method.getName().startsWith("get")) { - String field = method.getName(); // 拼接属性名 - if (field.contains("getClass")) { - continue; - } - field = field.substring(field.indexOf("get") + 3); - Object value = method.invoke(javaBean, (Object[]) null); // 执行方法 - if (field.equals("USER_SIGN_FILE") || field.equals("PORTRAIT")) { - fileName = field; - file = (File) value; - continue; - } - if (fileName != null) { - map.put(fileName, file); - fileName = null; - } else { - map.put(field, value); - } - } - } - return map; - } - /** * 递归调用让字符串对中调换 * diff --git a/src/main/java/com/zcloud/util/ImageUtil.java b/src/main/java/com/zcloud/util/ImageUtil.java new file mode 100644 index 0000000..8e9e05d --- /dev/null +++ b/src/main/java/com/zcloud/util/ImageUtil.java @@ -0,0 +1,148 @@ +package com.zcloud.util; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.StrUtil; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItem; +import org.apache.tomcat.util.http.fileupload.IOUtils; +import org.springframework.mock.web.MockMultipartFile; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import java.io.*; +import java.net.URL; +import java.nio.file.Files; +import java.util.UUID; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class ImageUtil { + + /** + * 图片路径层级分隔符 + */ + private static final String separator = "/"; + + public static MultipartFile base64ToMultipartFile(String baseImg) { + + //定义一个正则表达式的筛选规则,为了获取图片的类型 + String rgex = "data:image/(.*?);base64"; + if (StrUtil.isBlank(baseImg)) { + return null; + } + String type = getSubUtilSimple(baseImg, rgex); + //去除base64图片的前缀 + baseImg = baseImg.replaceFirst("data:(.+?);base64,", ""); + byte[] imageByte; + String fileName = ""; + //把图片转换成二进制 + imageByte = Base64.decode(baseImg.replaceAll(" ", "+")); + + //随机生成图片的名字,同时根据类型结尾 + fileName = UUID.randomUUID().toString() + "." + type; + + InputStream inputStream = new ByteArrayInputStream(imageByte); + MockMultipartFile mockMultipartFile = null; + try { + mockMultipartFile = new MockMultipartFile(fileName, fileName, "", inputStream); + } catch (IOException e) { + e.printStackTrace(); + } + return mockMultipartFile; + } + + + public static String getSubUtilSimple(String soap, String rgex) { + Pattern pattern = Pattern.compile(rgex); + Matcher m = pattern.matcher(soap); + while (m.find()) { + return m.group(1); + } + return ""; + } + + /** + * 根据url 拉取文件 + * @param url + * @return + * @throws Exception + */ + public static File getFile(String url) throws Exception { + //对本地文件命名 + String fileName = url.substring(url.lastIndexOf("."),url.length()); + File file = null; + + URL urlfile; + InputStream inStream = null; + OutputStream os = null; + try { + file = File.createTempFile("fwj_url", fileName); + //下载 + urlfile = new URL(url); + inStream = urlfile.openStream(); + os = new FileOutputStream(file); + + int bytesRead = 0; + byte[] buffer = new byte[8192]; + while ((bytesRead = inStream.read(buffer, 0, 8192)) != -1) { + os.write(buffer, 0, bytesRead); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (null != os) { + os.close(); + } + if (null != inStream) { + inStream.close(); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + + return file; + } + + /** + * 根据url获取图片并转换为multipartFile类型 + * @param url + * @return + */ + public static MultipartFile getMultipartFile(String url) { + FileInputStream inputStream = null; + OutputStream outputStream = null; + try { + File file = getFile(url); + System.out.println(file.toPath()); + FileItem fileItem = new DiskFileItem("formFieldName",//form表单文件控件的名字随便起 + Files.probeContentType(file.toPath()),//文件类型 + false, //是否是表单字段 + file.getName(),//原始文件名 + (int) file.length(),//Interger的最大值可以存储两部1G的电影 + file.getParentFile());//文件会在哪个目录创建 + //为DiskFileItem的OutputStream赋值 + inputStream = new FileInputStream(file); + outputStream = fileItem.getOutputStream(); + IOUtils.copy(inputStream, outputStream); + return new CommonsMultipartFile(fileItem); + } catch (Exception e) { + System.out.println("文件类型转换失败" + e.getMessage()); + return null; + } finally { + try { + if (null != inputStream) { + inputStream.close(); + } + + if (null != outputStream) { + outputStream.close(); + } + } catch (IOException e) { + System.out.println(">>文件流关闭失败" + e.getMessage()); + } + } + } +} diff --git a/src/main/java/com/zcloud/util/ObjectExcelRead.java b/src/main/java/com/zcloud/util/ObjectExcelRead.java index e33347e..fed7f21 100644 --- a/src/main/java/com/zcloud/util/ObjectExcelRead.java +++ b/src/main/java/com/zcloud/util/ObjectExcelRead.java @@ -5,6 +5,7 @@ import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.Cell; import java.io.File; import java.io.FileInputStream; @@ -49,7 +50,7 @@ public class ObjectExcelRead { HSSFCell cell = row.getCell(Short.parseShort(j + "")); String cellValue = null; if (null != cell) { - switch (cell.getCellType().getCode()) { // 判断excel单元格内容的格式,并对其进行转换,以便插入数据库 + switch (cell.getCellType()) { // 判断excel单元格内容的格式,并对其进行转换,以便插入数据库 case 0: BigDecimal bigDecimal = new BigDecimal(cell.getNumericCellValue()); @@ -117,7 +118,7 @@ public class ObjectExcelRead { HSSFCell cell = row.getCell(Short.parseShort(j + "")); String cellValue = null; if (null != cell) { - switch (cell.getCellType().getCode()) { // 判断excel单元格内容的格式,并对其进行转换,以便插入数据库 + switch (cell.getCellType()) { // 判断excel单元格内容的格式,并对其进行转换,以便插入数据库 case 0: BigDecimal bigDecimal = new BigDecimal(cell.getNumericCellValue()); cellValue = bigDecimal.toPlainString(); @@ -163,22 +164,32 @@ public class ObjectExcelRead { */ public static int getExcelRealRow(HSSFSheet sheet) { boolean flag = false; - int rowCount = 0; - for (int i = 1; i <= sheet.getLastRowNum(); i++) { - HSSFRow row = sheet.getRow(i); //行 - if(row == null){ - break; - } - HSSFCell cell = row.getCell(0); - if(null != cell){ - rowCount ++; + for (int i = 1; i <= sheet.getLastRowNum(); ) { + HSSFRow r = sheet.getRow(i); + if (r == null) { + // 如果是空行(即没有任何数据、格式),直接把它以下的数据往上移动 + sheet.shiftRows(i + 1, sheet.getLastRowNum(), -1); continue; - }else{ - break; } - + flag = false; + for (Cell c : r) { + if (Tools.notEmpty(c.getStringCellValue())) { + flag = true; + break; + } + } + if (flag) { + i++; + continue; + } else { + // 如果是空白行(即可能没有数据,但是有一定格式) + if (i == sheet.getLastRowNum())// 如果到了最后一行,直接将那一行remove掉 + sheet.removeRow(r); + else//如果还没到最后一行,则数据往上移一行 + sheet.shiftRows(i + 1, sheet.getLastRowNum(), -1); + } } - return rowCount; + return sheet.getLastRowNum(); } } diff --git a/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml b/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml index ebe786a..fa1721b 100644 --- a/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml +++ b/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml @@ -454,6 +454,7 @@ and f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES} + ORDER BY f.CREATTIME desc select f.*, case when f.DUE_DATE < NOW() then 0 else 1 end as DUE_DATE_TYPE, - v1.PLATE_NUMBER + v1.PLATE_NUMBER, + case + when btsm.PLATE_NUMBER is not null then '1' + when bta.RAW_PLATE_NUMBER is not null then '2' + else f.ARCHIVES_TYPE + end as NEW_ARCHIVES_TYPE from - - f + f INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID + LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER + LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') @@ -251,10 +296,16 @@ and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') - and case when f.DUE_DATE < NOW() then 0 else 1 end = #{pd.DUE_DATE_TYPE} + -- 添加条件:只有当当前时间(NOW())处于提醒时间段内时,才会返回相应的记录。 + -- 提醒时间段是由两个日期定义的: + -- 1. 提前提醒的日期,即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。 + -- 2. 到期日期(DUE_DATE字段)本身。 + -- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数,以得到提醒开始的日期。 + -- DATE_SUB的第一个参数是到期日期(f.DUE_DATE), + -- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数(f.REMINDER_DAYS字段的值) + and NOW() BETWEEN DATE_SUB(f.DUE_DATE, INTERVAL f.REMINDER_DAYS DAY) AND f.DUE_DATE ORDER BY f.CREATTIME DESC - diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml index 1aa4a2b..ae400f2 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xml @@ -343,13 +343,14 @@ and f.USER_ID = #{pd.USER_ID} - - and f.PENALTYTIME = #{pd.PENALTYTIME} + + and f.ACCIDENTDATE = #{pd.ACCIDENTDATE} and f.ACCIDENTDATE = #{pd.ACCIDENTDATE} ORDER BY OPERATTIME DESC + ORDER BY f.CREATETIME DESC select - , + from f - inner join bus_corp_info b on f.CORPINFO_ID = b.CORPINFO_ID - where f.FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID} + where f.ISDELETE = '0' + and f.FREIGHTTRAILER_ID in #{item} diff --git a/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml b/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml index d49d5e2..a17f555 100644 --- a/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml +++ b/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml @@ -191,7 +191,6 @@ f.REMINDER_STATUS, (select t.FILEPATH from bus_imgfiles t where t.TYPE = 127 and t.FOREIGN_KEY = f.MAINTENANCE_ID limit 1) as MAINTENANCEINFO, f.NOTES, - f.ARCHIVES_TYPE, f.ISDELETE, f.CREATOR, f.CREATORNAME, @@ -222,11 +221,19 @@ select f.*, case when f.DUE_DATE < NOW() then 0 else 1 end as DUE_DATE_TYPE, - v1.PLATE_NUMBER + v1.PLATE_NUMBER, + case + when btsm.PLATE_NUMBER is not null then '1' + when bta.RAW_PLATE_NUMBER is not null then '2' + else f.ARCHIVES_TYPE + end as NEW_ARCHIVES_TYPE, + COALESCE(bta.RAW_PLATE_NUMBER, '0') as RAW_PLATE_NUMBER from f INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID + LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER + LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') @@ -250,7 +257,14 @@ and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') - and case when f.DUE_DATE < NOW() then 0 else 1 end = #{pd.DUE_DATE_TYPE} + -- 添加条件:只有当当前时间(NOW())处于提醒时间段内时,才会返回相应的记录。 + -- 提醒时间段是由两个日期定义的: + -- 1. 提前提醒的日期,即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。 + -- 2. 到期日期(DUE_DATE字段)本身。 + -- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数,以得到提醒开始的日期。 + -- DATE_SUB的第一个参数是到期日期(f.DUE_DATE), + -- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数(f.REMINDER_DAYS字段的值) + and NOW() BETWEEN DATE_SUB(f.DUE_DATE, INTERVAL f.REMINDER_DAYS DAY) AND f.DUE_DATE ORDER BY f.CREATTIME DESC diff --git a/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml b/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml index eb525c7..999e162 100644 --- a/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml +++ b/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml @@ -38,6 +38,7 @@ REMINDER_STATUS, OPERATIONSINFO, NOTES, + NUM, ISDELETE, CREATOR, CREATORNAME, @@ -80,6 +81,7 @@ #{REMINDER_STATUS}, #{OPERATIONSINFO}, #{NOTES}, + #{NUM}, #{ISDELETE}, #{CREATOR}, #{CREATORNAME}, @@ -122,7 +124,6 @@ update set - NUM = #{NUM}, VEHICLE_MODEL = #{VEHICLE_MODEL}, VEHICLE = #{VEHICLE}, CAR_OWNERS = #{CAR_OWNERS}, @@ -163,7 +164,6 @@ select f.OPERATIONS_ID, f.CORPINFO_ID, - f.NUM, f.VEHICLE_MODEL, f.VEHICLE, f.CAR_OWNERS, @@ -174,10 +174,10 @@ f.DUE_DATE, f.REMINDER_DAYS, f.REMINDER_DATE, + f.NUM, f.REMINDER_STATUS, (select t.FILEPATH from bus_imgfiles t where t.TYPE = 126 and t.FOREIGN_KEY = f.OPERATIONS_ID limit 1) as OPERATIONSINFO, f.NOTES, - f.ARCHIVES_TYPE, f.ISDELETE, f.CREATOR, f.CREATORNAME, @@ -209,11 +209,19 @@ f.*, case when f.DUE_DATE < NOW() then 0 else 1 end as DUE_DATE_TYPE, v1.PLATE_NUMBER, - (SELECT sd.NAME FROM sys_dictionaries sd where sd.DICTIONARIES_ID=f.CYCLE) as CYCLE_NAME + case + when btsm.PLATE_NUMBER is not null then '1' + when bta.RAW_PLATE_NUMBER is not null then '2' + else f.ARCHIVES_TYPE + end as NEW_ARCHIVES_TYPE, + COALESCE((SELECT sd.NAME FROM sys_dictionaries sd WHERE sd.DICTIONARIES_ID=f.CYCLE), '0') as CYCLE_NAME, + COALESCE(bta.RAW_PLATE_NUMBER, '0') as RAW_PLATE_NUMBER from f INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID + LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER + LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') @@ -237,10 +245,16 @@ and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') - and case when f.DUE_DATE < NOW() then 0 else 1 end = #{pd.DUE_DATE_TYPE} + -- 添加条件:只有当当前时间(NOW())处于提醒时间段内时,才会返回相应的记录。 + -- 提醒时间段是由两个日期定义的: + -- 1. 提前提醒的日期,即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。 + -- 2. 到期日期(DUE_DATE字段)本身。 + -- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数,以得到提醒开始的日期。 + -- DATE_SUB的第一个参数是到期日期(f.DUE_DATE), + -- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数(f.REMINDER_DAYS字段的值) + and NOW() BETWEEN DATE_SUB(f.DUE_DATE, INTERVAL f.REMINDER_DAYS DAY) AND f.DUE_DATE ORDER BY f.CREATTIME DESC - diff --git a/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml b/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml index 5c0b360..1fcf4ff 100644 --- a/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml +++ b/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml @@ -392,6 +392,7 @@ and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%') + ORDER BY f.CREATTIME DESC - select - - from + SELECT + f.*, + CASE + WHEN btsm.PLATE_NUMBER IS NOT NULL THEN '1' + WHEN bta.RAW_PLATE_NUMBER IS NOT NULL THEN '2' + ELSE '0' + END AS NEW_ARCHIVES_TYPE + FROM f - where f.ISDELETE = '0' - - and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') + LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm ON f.PLATE_NUMBER = btsm.PLATE_NUMBER + LEFT JOIN BUS_TRAFFIC_ASSIGNED bta ON f.PLATE_NUMBER = bta.RAW_PLATE_NUMBER + WHERE f.ISDELETE = '0' + + AND f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}), '%') - - and f.VEHICLEOWNER LIKE CONCAT(CONCAT('%', #{pd.VEHICLEOWNER}),'%') + + AND f.VEHICLEOWNER LIKE CONCAT(CONCAT('%', #{pd.VEHICLEOWNER}), '%') - - and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%') + + AND f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}), '%') - - and f.EXPIRE_DATE = #{pd.EXPIRE_DATE} + + + + + -- 添加条件:只有当当前时间(NOW())处于提醒时间段内时,才会返回相应的记录。 + -- 提醒时间段是由两个日期定义的: + -- 1. 提前提醒的日期,即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。 + -- 2. 到期日期(DUE_DATE字段)本身。 + -- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数,以得到提醒开始的日期。 + -- DATE_SUB的第一个参数是到期日期(f.DUE_DATE), + -- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数(f.REMINDER_DAYS字段的值) + and NOW() BETWEEN DATE_SUB(f.EXPIRE_DATE, INTERVAL f.REMINDER_DAY DAY) AND f.EXPIRE_DATE - - and f.EXPIRE_STATUS = #{pd.EXPIRE_STATUS} + + AND f.EXPIRE_STATUS = #{pd.EXPIRE_STATUS} - - and f.REMINDER_STATUS = #{pd.REMINDER_STATUS} + + AND f.REMINDER_STATUS = #{pd.REMINDER_STATUS} - - and f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES} + + AND f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES} + ORDER BY f.OPERATTIME DESC ORDER BY OPERATTIME DESC diff --git a/src/main/resources/mybatis/dsno3/eduArchives/ArchivesMapper.xml b/src/main/resources/mybatis/dsno3/eduArchives/ArchivesMapper.xml index f43ff12..6454836 100644 --- a/src/main/resources/mybatis/dsno3/eduArchives/ArchivesMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduArchives/ArchivesMapper.xml @@ -406,6 +406,7 @@ IFNULL(s.COMPLETE_CLASSHOUR, 0) COMPLETE_CLASSHOUR, c.START_TIME, c.END_TIME, + c.CODE, f.PERSONNEL_TYPE, f.POST_ID, f.CLASS_ID, diff --git a/src/main/resources/mybatis/dsno3/eduArchives/ArchivesStudentMapper.xml b/src/main/resources/mybatis/dsno3/eduArchives/ArchivesStudentMapper.xml index c0493ec..22fc0cd 100644 --- a/src/main/resources/mybatis/dsno3/eduArchives/ArchivesStudentMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduArchives/ArchivesStudentMapper.xml @@ -205,13 +205,29 @@ else '未知' end as SEX_NAME, cl.NAME as DEGREE_OF_EDUCATION_NAME, d.NAME AS DUTIES_NAME, + tw.NAME AS TYPE_OF_WORK_NAME, + po.NAME AS POLITICAL_OUTLOOK_NAME, + na.NAME AS NATION_NAME, ui.ID_PHOTO, ui.PORTRAIT, + ui.DATE_OF_BIRTH, + ui.ENTRY_DATE, + ui.WORKING_DATE, + ui.PREVIOUS_POST_DATE, + ui.WORK_EXPERIENCE, + ui.CERTIFICATES, + ui.PUNISH, + ui.HEALTH, + ui.UNIVERSITY, + ui.RESIDENCE, ci.CORP_NAME FROM BUS_STUDENT s left join sys_userinfo ui on ui.user_id = s.user_id - LEFT JOIN SYS_DICTIONARIES cl on cl.DICTIONARIES_ID = s.DEGREE_OF_EDUCATION - LEFT JOIN SYS_DICTIONARIES d on d.DICTIONARIES_ID = s.DUTIES + LEFT JOIN SYS_DICTIONARIES cl on cl.DICTIONARIES_ID = ui.DEGREE_OF_EDUCATION + LEFT JOIN SYS_DICTIONARIES d on d.DICTIONARIES_ID = ui.DUTIES + LEFT JOIN SYS_DICTIONARIES po on po.DICTIONARIES_ID = ui.POLITICAL_OUTLOOK + LEFT JOIN SYS_DICTIONARIES na on na.DICTIONARIES_ID = ui.NATION + LEFT JOIN SYS_POST tw on tw.POST_ID = ui.TYPE_OF_WORK LEFT JOIN BUS_CORP_INFO ci on ci.CORPINFO_ID = s.CORPINFO_ID and ci.ISDELETE = '0' where s.STUDENT_ID = #{STUDENT_ID} diff --git a/src/main/resources/mybatis/dsno3/eduStudy/ClassMapper.xml b/src/main/resources/mybatis/dsno3/eduStudy/ClassMapper.xml index 1c729a7..fe40adc 100644 --- a/src/main/resources/mybatis/dsno3/eduStudy/ClassMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduStudy/ClassMapper.xml @@ -423,7 +423,10 @@ and ( f.PRINCIPAL_PHONE LIKE CONCAT(CONCAT('%', #{pd.PRINCIPAL_PHONE}),'%') ) - + + and f.TRAINTYPE = #{pd.TRAINTYPE} + + and f.POSTTYPE = #{pd.POSTTYPE} @@ -593,17 +596,10 @@ select count(*) from bus_class c - left join bus_enterprise e on c.ENTERPRISE_ID = e.ENTERPRISE_ID where c.ISDELETE = 0 and c.STATE != '1' - - AND e.CREATOR = #{USER_ID} - and c.CORPINFO_ID = #{CORPINFO_ID} - - and c.ENTERPRISE_ID = #{ENTERPRISE_ID} - diff --git a/src/main/resources/mybatis/dsno3/eduStudy/CurriculumMapper.xml b/src/main/resources/mybatis/dsno3/eduStudy/CurriculumMapper.xml index 54dafc7..ebfd9d2 100644 --- a/src/main/resources/mybatis/dsno3/eduStudy/CurriculumMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduStudy/CurriculumMapper.xml @@ -224,6 +224,7 @@ f.INDUSTRY_END_ID, f.INDUSTRY_ALL_TYPE, f.CURRICULUM_ID_REMOTE, + f.CREATTIME, IF(cc.CLASSCURRICULUM_ID IS NULL,'0','1') ISUSE, diff --git a/src/main/resources/mybatis/dsno3/eduStudy/QuestionMapper.xml b/src/main/resources/mybatis/dsno3/eduStudy/QuestionMapper.xml index e7fa9a2..c89bd03 100644 --- a/src/main/resources/mybatis/dsno3/eduStudy/QuestionMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduStudy/QuestionMapper.xml @@ -193,99 +193,16 @@ and f.CORPINFO_ID = #{CORPINFO_ID} - diff --git a/src/main/resources/mybatis/dsno3/eduStudy/StageStudentRelationMapper.xml b/src/main/resources/mybatis/dsno3/eduStudy/StageStudentRelationMapper.xml index ae3c4f7..063088d 100644 --- a/src/main/resources/mybatis/dsno3/eduStudy/StageStudentRelationMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduStudy/StageStudentRelationMapper.xml @@ -626,7 +626,7 @@ f INNER JOIN bus_class t ON t.CLASS_ID = f.CLASS_ID AND t.ISDELETE = '0' LEFT JOIN BUS_STUDENT s on s.CLASS_ID = f.CLASS_ID and s.USER_ID = f.USER_ID and s.ISDELETE = '0' - LEFT JOIN BUS_POST_PAPER ppa on ppa.CLASS_ID = f.CLASS_ID and ppa.POST_ID = s.POST_ID and f.ISDELETE = '0' + LEFT JOIN BUS_POST_PAPER ppa on ppa.CLASS_ID = f.CLASS_ID and ppa.POST_ID = s.POST_ID and ppa.ISDELETE = '0' LEFT JOIN BUS_STAGEEXAMPAPER_INPUT p ON p.STAGEEXAMPAPERINPUT_ID = ppa.STAGEEXAMPAPERINPUT_ID AND p.ISDELETE = '0' LEFT JOIN BUS_POST_TYPE pt on pt.POSTTYPE_ID = t.POSTTYPE diff --git a/src/main/resources/mybatis/dsno3/eduStudy/StrengthenStudentRelationMapper.xml b/src/main/resources/mybatis/dsno3/eduStudy/StrengthenStudentRelationMapper.xml index bc59c27..68acf1d 100644 --- a/src/main/resources/mybatis/dsno3/eduStudy/StrengthenStudentRelationMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduStudy/StrengthenStudentRelationMapper.xml @@ -636,7 +636,7 @@ f INNER JOIN bus_class t ON t.CLASS_ID = f.CLASS_ID AND t.ISDELETE = '0' LEFT JOIN BUS_STUDENT s on s.CLASS_ID = f.CLASS_ID and s.USER_ID = f.USER_ID and s.ISDELETE = '0' - LEFT JOIN BUS_POST_PAPER ppa on ppa.CLASS_ID = f.CLASS_ID and ppa.POST_ID = s.POST_ID and f.ISDELETE = '0' + LEFT JOIN BUS_POST_PAPER ppa on ppa.CLASS_ID = f.CLASS_ID and ppa.POST_ID = s.POST_ID and ppa.ISDELETE = '0' LEFT JOIN bus_strengthenstageexampaper_input p ON p.STRENGTHEN_STAGEEXAMPAPER_INPUT_ID = ppa.STRENGTHEN_STAGEEXAMPAPER_INPUT_ID AND p.ISDELETE = '0' diff --git a/src/main/resources/mybatis/dsno3/eduStudy/StudentMapper.xml b/src/main/resources/mybatis/dsno3/eduStudy/StudentMapper.xml index 5f636b4..65070dc 100644 --- a/src/main/resources/mybatis/dsno3/eduStudy/StudentMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduStudy/StudentMapper.xml @@ -498,6 +498,9 @@ and ( f.NAME LIKE CONCAT(CONCAT('%', #{pd.STUDENT_NAME}),'%') ) + + and su.USER_ID_CARD = #{pd.USER_ID_CARD} + AND c.CODE = #{pd.CODE} @@ -545,11 +548,7 @@ from f LEFT JOIN bus_class c on f.CLASS_ID = c.CLASS_ID - left join bus_enterprise e on c.ENTERPRISE_ID = e.ENTERPRISE_ID where f.ISDELETE = '0' and c.STATE != '1' - - AND e.CREATOR = #{USER_ID} - and f.CORPINFO_ID = #{CORPINFO_ID} @@ -1109,8 +1108,6 @@ f.NAME, f.USER_ID_CARD, dic1.NAME as DEGREE_OF_EDUCATION, - f.MAJOR, - f.DUTIES, dep.NAME as DEPARTMENT_NAME, post.NAME as POST_NAME, c.INDUSTRY_ALL_NAME, @@ -1124,7 +1121,8 @@ ssti.EXAMSCORE as STRENGTHEN_EXAMSCORE, sst.STRENGTHENEXAMSCORE, sst.OPERATTIME as STRENGTHEN_OPERATTIME, - sst.STRENGTHEN_STAGEEXAMPAPER_INPUT_ID + sst.STRENGTHEN_STAGEEXAMPAPER_INPUT_ID, + CONCAT_WS(dic3.NAME ,'/' , dic4.NAME ) DUTIES from f left join dic1 on f.DEGREE_OF_EDUCATION = dic1.DICTIONARIES_ID @@ -1135,6 +1133,9 @@ left join (select * from bus_stagestudentrelation where STAGEEXAMSTATE = '3') bsr on bsr.STUDENT_ID = f.STUDENT_ID left join bus_strengthenstudentrelation sst on sst.STUDENT_ID = f.STUDENT_ID left join bus_strengthenstageexampaper_input ssti on sst.STRENGTHEN_STAGEEXAMPAPER_INPUT_ID = ssti.STRENGTHEN_STAGEEXAMPAPER_INPUT_ID + left join sys_userinfo ui on ui.user_id = f.user_id + left join dic3 on ui.DUTIES = dic3.DICTIONARIES_ID + left join dic4 on ui.TITLE = dic4.DICTIONARIES_ID where f.STUDENT_ID = #{STUDENT_ID} @@ -1272,6 +1273,7 @@ and f.DEPARTMENT_ID = clp.DEPARTMENT_ID LEFT JOIN bus_curriculum cn ON clp.CURRICULUM_ID = cn.CURRICULUM_ID AND cn.ISDELETE = 0 LEFT JOIN bus_stageexam AS ex ON f.STUDENT_ID = ex.STUDENT_ID AND ex.ISDELETE = 0 + LEFT JOIN sys_userinfo AS su ON f.USER_ID = su.USER_ID WHERE f.ISDELETE = '0' AND c.ISDELETE = '0' AND ssr.ISDELETE = '0' @@ -1285,6 +1287,9 @@ and ( f.NAME LIKE CONCAT(CONCAT('%', #{STUDENT_NAME}),'%') ) + + AND su.USER_ID_CARD = #{USER_ID_CARD} + AND c.CODE = #{CODE} diff --git a/src/main/resources/mybatis/dsno3/eduSystem/BaseFactoryMapper.xml b/src/main/resources/mybatis/dsno3/eduSystem/BaseFactoryMapper.xml index a3cf628..c8611df 100644 --- a/src/main/resources/mybatis/dsno3/eduSystem/BaseFactoryMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduSystem/BaseFactoryMapper.xml @@ -28,8 +28,8 @@ f.OPERATOR, f.OPERATTIME, f.TYPE, - f.USERAVATARPREFIX - + f.USERAVATARPREFIX, + f.COVERPATH @@ -47,7 +47,8 @@ OPERATOR, OPERATTIME, TYPE, - USERAVATARPREFIX + USERAVATARPREFIX, + COVERPATH @@ -65,7 +66,8 @@ #{OPERATOR}, #{OPERATTIME}, #{TYPE}, - #{USERAVATARPREFIX} + #{USERAVATARPREFIX}, + #{COVERPATH} diff --git a/src/main/resources/mybatis/dsno3/eduSystem/UsersCacheMapper.xml b/src/main/resources/mybatis/dsno3/eduSystem/UsersCacheMapper.xml index ee1fdff..2fe5b78 100644 --- a/src/main/resources/mybatis/dsno3/eduSystem/UsersCacheMapper.xml +++ b/src/main/resources/mybatis/dsno3/eduSystem/UsersCacheMapper.xml @@ -486,18 +486,6 @@ ISDELETE = #{ISDELETE}, - - CREATOR = #{CREATOR}, - - - CREATTIME = #{CREATTIME}, - - - OPERATOR = #{OPERATOR}, - - - OPERATTIME = #{OPERATTIME}, - USER_ID_CARD = #{USER_ID_CARD},