系统台帐导出

dev
wangpeng 2025-05-27 09:06:25 +08:00
parent ba0e0fce23
commit 0030161f6f
131 changed files with 14145 additions and 145 deletions

32
pom.xml
View File

@ -358,6 +358,38 @@
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>15.8.0</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.core</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.document</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.template</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.document.docx</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.template.freemarker</artifactId>
<version>2.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sf.json-lib/json-lib -->
<dependency>
<groupId>net.sf.json-lib</groupId>

View File

@ -0,0 +1,503 @@
package com.zcloud.controller.bus;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Dictionaries;
import com.zcloud.service.archives.*;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.bus.TrainingScheduleService;
import com.zcloud.service.onlinexxks.*;
import com.zcloud.service.system.Users2Service;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.*;
/**
*
* luoxiaobao
* 2021-12-17
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/archivesedumanager")
public class ArchivesEduManagerController extends BaseController {
@Autowired
private ArchivesEduManagerService archivesEduManagerService;
@Autowired
private CorpInfoService corpInfoService;
@Autowired
private Users2Service corpUsersService;
@Autowired
private StudyTaskService studyTaskService;
@Autowired
private StageExamService stageExamService;
@Autowired
private StageExamRecordService stageExamRecordService;
@Autowired
private StageStudentRelationService stageStudentRelationService;
@Autowired
private ArchivesFilesService archivesFilesService;
@Autowired
private TrainingScheduleService trainingScheduleService;
@Autowired
private StageexampaperService stageExamPaperService;
@Autowired
private StageExamPaperQuestionService stageExamPaperQuestionService;
@Autowired
private ArchivesPostManService archivesPostManService;
@Autowired
private ArchivesTeacherService archivesTeacherService;
@Autowired
private ArchivesEduPlanService archivesEduPlanService;
@Autowired
private ArchivesCapitalService archivesCapitalService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedger")
public void exportExcelSystemLedger(HttpServletResponse response) throws Exception{
PageData pd = this.getPageData();
String projectPath = PathUtil.getProjectpath();
List<PageData> corpList = corpInfoService.getSelectByCorpInfo(pd);
ArrayList<File> corpOutFiles = new ArrayList<>();
String now = DateUtil.getSdfTimesSSS();
for (PageData corp : corpList) {
ArrayList<File> userOutfiles = new ArrayList<>();
List<PageData> corpUserList = corpUsersService.listAllForExport(corp);
for (PageData user : corpUserList) {
ArrayList<File> userFiles = new ArrayList<>();
if ("1".equals(user.getString2("ISMAIN"))) {
continue;
}
user.put("projectPath", projectPath);
String USER_NAME = user.getString2("NAME").replaceAll(" ","").replaceAll("\t","")+user.getString("USERNAME");
now = DateUtil.getSdfTimesSSS();
File pdf = archivesEduManagerService.registertable(user);
if (pdf != null) {
//人员登记表返回PDF文件
userFiles.add(pdf);
}
PageData st = new PageData();
st.put("USER_ID", user.getString2("USER_ID"));
List<PageData> taskList = studyTaskService.listAll(st);
for (PageData task : taskList) {
now = DateUtil.getSdfTimesSSS();
List<String> pathList = new ArrayList<String>();
st.put("STUDYTASK_ID", task.getString2("STUDYTASK_ID"));
List<PageData> stuList = stageStudentRelationService.listStudentTask(st);
PageData stu = new PageData();
if (stuList.size() > 0) {
stu = stuList.get(0);
} else {
continue;
}
stu.put("projectPath", projectPath);
stu.put("TYPE_OF_WORK_NAME", user.getString2("TYPE_OF_WORK_NAME"));
stu.put("PERSONNEL_TYPE_NAME",user.getString2("PERSONNEL_TYPE_NAME"));
stu.put("USERAVATARPREFIX", user.getString2("USERAVATARPREFIX"));
stu.put("USERAVATARURL_CONVERT", user.getString2("USERAVATARURL_CONVERT"));
task.put("STAGEEXAM_ID", stu.getString2("STAGEEXAM_ID"));
task.put("USER_ID", user.getString2("USER_ID"));
PageData para = new PageData();
para.put("CORP_NAME", corp.getString2("CORP_NAME"));
para.put("ENTERPRISE_NAME", corp.getString2("CORP_NAME")); //企业名称
para.put("ASSESSOR_SIGN", ""); //签字数据
para.put("RECORDOR_SIGN", ""); //签字数据
para.put("SAFETYDEPTOR_SIGN", ""); //签字数据
para.put("SIGNATURE_PATH", stu.getString2("SIGNATURE_PATH")); //签字数据
para.put("CLASS_ID", task.get("STUDYTASK_ID"));
para.put("POST_ID", stu.get("POST_ID"));
para.put("STUDENT_ID", stu.get("USER_ID"));
List<Dictionaries> personnelTypeList = new ArrayList<>();
List<PageData> curList = studyTaskService.getcurriculumAllBystudyTaskId(task); // 任务 -- 课件关系
List<PageData> coursewaresList = studyTaskService.getAllCourseware(task); //列出StudyTask列表
PageData paper = stageExamService.findResult(task);
String wordPathSy = archivesEduManagerService.homepage(stu, para, now, paper, task);
pathList.add(wordPathSy); //首页PDF
String wordPathXszm = archivesEduManagerService.classHour(stu, task, coursewaresList, corp, para, now, paper);
pathList.add(wordPathXszm); //学时证明
// String wordPathSi = archivesEduManagerService.studyInfo(stu, task, curList, coursewaresList, para, now, corp, paper);
// pathList.add(wordPathSi); // 学习档案
String wordPathKccl = archivesEduManagerService.curriculumword(stu, task, coursewaresList, corp, now);
pathList.add(wordPathKccl); //课程材料
if (!Tools.isEmpty(paper.get("QUESTIONLIST"))) { //有试卷就走里边
String wordPathKjxx = archivesEduManagerService.papermword(stu, task, corp, paper, now);
pathList.add(wordPathKjxx); //考卷信息
}
String wordPathPxkh = archivesEduManagerService.safelogword(stu, task, coursewaresList, para, corp, paper, now, personnelTypeList);
pathList.add(wordPathPxkh); //培训考核记录
WordToPdfUtil.mergePdf(pathList, projectPath + Const.FILEPATHFILE + USER_NAME + "-" + task.getString("STUDY_NAME") + "-档案详情-" + now + ".pdf");
//组装档案详情数据
userFiles.add(new File(projectPath + Const.FILEPATHFILE + USER_NAME + "-" + task.getString("STUDY_NAME") + "-档案详情-" + now + ".pdf"));
for (Object filepath : pathList) {
new File((String) filepath).delete(); //删除缓存文件
}
}
if (userFiles.size() == 0) {
System.out.println("学员【" + USER_NAME + "】无一人一档档案记录");
continue;
}
String path = projectPath + Const.TEMPZIPFILES + USER_NAME + "-" + now + ".zip";
FileZip.zipList(path, userFiles);
userOutfiles.add(new File(path));
}
if (userOutfiles.isEmpty()) {
System.out.println("企业【" + corp.getString("CORP_NAME") + "】暂无一人一档档案记录");
continue;
}
String path = projectPath + Const.TEMPZIPFILES + corp.getString("CORP_NAME") + "一人一档-" + now + ".zip";
FileZip.zipList(path, userOutfiles);
corpOutFiles.add(new File(path));
for (File filepath : userOutfiles) {
filepath.delete(); //删除缓存文件
}
}
if (!corpOutFiles.isEmpty()) {
String path = projectPath + Const.TEMPZIPFILES + "系统一人一档-" + now + ".zip";
FileZip.zipList(path, corpOutFiles);
for (File filepath : corpOutFiles) {
filepath.delete(); //删除缓存文件
}
FileDownload.mfFileDownload(response, path, "系统一人一档-" + now + ".zip");
}
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedgerEduArchive2")
public void exportExcelSystemLedgerEduArchive2(HttpServletResponse response) throws Exception{
PageData pd = this.getPageData();
String projectPath = PathUtil.getProjectpath();
List<PageData> corpList = corpInfoService.getSelectByCorpInfo(pd);
String now = DateUtil.getSdfTimesSSS();
ArrayList<File> outfiles = new ArrayList<>();
for (PageData corp : corpList) {
ArrayList<File> userOutfiles = new ArrayList<>();
PageData st = new PageData();
st.put("CORPINFO_ID", corp.getString2("CORPINFO_ID"));
List<PageData> taskList = studyTaskService.listAll(st);
for (PageData task : taskList) {
now = DateUtil.getSdfTimesSSS();
task.put("projectPath", projectPath);
String className = task.getString("STUDY_NAME");
ArrayList<File> files = new ArrayList<>();
PageData af = new PageData();
af.put("STUDYTASK_ID", task.getString("STUDYTASK_ID"));
ArrayList<File> archivesFiles = new ArrayList<>();
List<PageData> fileList = archivesFilesService.listAll(af);
String saveDir= projectPath + Const.FILEPATHFILE;
for (PageData filePd : fileList) {
if ("5".equals(filePd.getString2("TYPE"))) { // 5.安全培训教材会审表
now = DateUtil.getSdfTimesSSS();
String url = Const.HTTPFILEURL + filePd.getString("FILE_PATH");
String name = filePd.getString2("YEAR")+filePd.getString2("FILE_NAME").substring(0, filePd.getString("FILE_NAME").lastIndexOf(".")) + now + filePd.getString2("FILE_NAME").substring(filePd.getString("FILE_NAME").lastIndexOf("."));
if ("ok".equals(FileDownload.downloadFile(url, name, saveDir))) {
File file = new File(saveDir + name);
archivesFiles.add(file);
}
}
}
if (archivesFiles.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + "安全培训教材会审表-" + now + ".zip";
FileZip.zipList(path, archivesFiles);
files.add(new File(path));
archivesFiles.clear();
}
// 培训日程安排通知/也可称为培训计划
List<PageData> tsList = trainingScheduleService.listAll(task);
if (tsList.size() > 0) {
File pdf = archivesEduManagerService.exportPdfTrainingSchedule(task, tsList);
if (pdf != null) {
//人员登记表返回PDF文件
files.add(pdf);
}
}
// 安全培训教材或课程讲义
List<PageData> coursewaresList = studyTaskService.getAllCourseware(task); //列出StudyTask列表
if (tsList.size() > 0) {
File pdf = archivesEduManagerService.exportPdfCourseware(task, coursewaresList);
if (pdf != null) {
//培训日程安排通知(也可称为培训计划)
files.add(pdf);
}
}
// 安全培训教育记录及签字表
List<PageData> stuList = stageStudentRelationService.listStudentTask(task); //列出StudyTask列表
if (tsList.size() > 0) {
File pdf = archivesEduManagerService.exportPdfStudyTask(task, coursewaresList,stuList);
if (pdf != null) {
//培训日程安排通知(也可称为培训计划)
files.add(pdf);
}
}
// 培训影像资料
for (PageData filePd : fileList) {
if ("7".equals(filePd.getString2("TYPE"))) { // 7.培训影像资料
now = DateUtil.getSdfTimesSSS();
String url = Const.HTTPFILEURL + filePd.getString("FILE_PATH");
String name = filePd.getString2("YEAR")+filePd.getString2("FILE_NAME").substring(0, filePd.getString("FILE_NAME").lastIndexOf(".")) + now + filePd.getString2("FILE_NAME").substring(filePd.getString("FILE_NAME").lastIndexOf("."));
if ("ok".equals(FileDownload.downloadFile(url, name, saveDir))) {
File file = new File(saveDir + name);
archivesFiles.add(file);
}
}
}
if (archivesFiles.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + "培训影像资料-" + now + ".zip";
FileZip.zipList(path, archivesFiles);
files.add(new File(path));
archivesFiles.clear();
}
//培训考核试卷
PageData paper = stageExamPaperService.getDataById(task);
List<PageData> questionList = stageExamPaperQuestionService.findByExamPaper(task);
File examPaper = archivesEduManagerService.exportPdfExamPaper(task, paper, questionList);
if (examPaper != null) {
files.add(examPaper);
}
//学员考核成绩统计表
File archivesStudentScore = archivesEduManagerService.exportPdfArchivesStudentScore(task, coursewaresList, stuList);
if (archivesStudentScore != null) {
files.add(archivesStudentScore);
}
//学员考核成绩统计表
List<PageData> curList = studyTaskService.getcurriculumAllBystudyTaskId(task); // 任务 -- 课件关系
File archivesReport = archivesEduManagerService.exportPdfArchivesReport(task, curList, stuList);
if (archivesReport != null) {
files.add(archivesReport);
}
// 与培训机构签订的服务合同或者协议复印件
for (PageData filePd : fileList) {
if ("6".equals(filePd.getString2("TYPE"))) { // 7.与培训机构签订的服务合同或者协议复印件
now = DateUtil.getSdfTimesSSS();
String url = Const.HTTPFILEURL + filePd.getString("FILE_PATH");
String name = filePd.getString2("YEAR")+filePd.getString2("FILE_NAME").substring(0, filePd.getString("FILE_NAME").lastIndexOf(".")) + now + filePd.getString2("FILE_NAME").substring(filePd.getString("FILE_NAME").lastIndexOf("."));
if ("ok".equals(FileDownload.downloadFile(url, name, saveDir))) {
File file = new File(saveDir + name);
archivesFiles.add(file);
}
}
}
if (archivesFiles.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + "与培训机构签订的服务合同或者协议复印件-" + now + ".zip";
FileZip.zipList(path, archivesFiles);
files.add(new File(path));
archivesFiles.clear();
}
if (files.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + className + "-一期一档-" + now + ".zip";
FileZip.zipList(path, files);
for (File filepath : files) {
filepath.delete(); //删除缓存文件
}
userOutfiles.add(new File(path));
}
}
if (userOutfiles.isEmpty()) {
System.out.println("企业【" + corp.getString("CORP_NAME") + "】暂无一期一档档案记录");
continue;
}
String path = projectPath + Const.TEMPZIPFILES + corp.getString("CORP_NAME") + "【一期一档】-" + now + ".zip";
FileZip.zipList(path, userOutfiles);
for (File filepath : userOutfiles) {
filepath.delete(); //删除缓存文件
}
outfiles.add(new File(path));
}
if (outfiles.isEmpty()) {
System.out.println("系统暂无一期一档档案记录");
} else {
String path = projectPath + Const.TEMPZIPFILES + "系统一期一档-" + now + ".zip";
FileZip.zipList(path, outfiles);
FileDownload.mfFileDownload(response, path, "系统一期一档-" + now + ".zip");
}
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedgerEduArchive3")
public void exportExcelSystemLedgerEduArchive3(HttpServletResponse response) throws Exception{
PageData pd = this.getPageData();
String projectPath = PathUtil.getProjectpath();
List<PageData> corpList = corpInfoService.getSelectByCorpInfo(pd);
String now = DateUtil.getSdfTimesSSS();
ArrayList<File> outfiles = new ArrayList<>();
for (PageData corp : corpList) {
corp.put("projectPath", projectPath);
ArrayList<File> userOutfiles = new ArrayList<>();
PageData st = new PageData();
st.put("CORPINFO_ID", corp.getString2("CORPINFO_ID"));
now = DateUtil.getSdfTimesSSS();
String corpName = corp.getString("CORP_NAME");
ArrayList<File> files = new ArrayList<>();
ArrayList<File> archivesFiles = new ArrayList<>();
List<PageData> fileList = archivesFilesService.listAll(st);
String saveDir= projectPath + Const.FILEPATHFILE;
// 安全培训教育制度
for (PageData filePd : fileList) {
if ("1".equals(filePd.getString2("TYPE"))) { // 1.安全培训教育制度
now = DateUtil.getSdfTimesSSS();
String url = Const.HTTPFILEURL + filePd.getString("FILE_PATH");
String name = filePd.getString2("YEAR")+filePd.getString2("FILE_NAME").substring(0, filePd.getString("FILE_NAME").lastIndexOf(".")) + now + filePd.getString2("FILE_NAME").substring(filePd.getString("FILE_NAME").lastIndexOf("."));
if ("ok".equals(FileDownload.downloadFile(url, name, saveDir))) {
File file = new File(saveDir + name);
archivesFiles.add(file);
}
}
}
if (archivesFiles.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + "安全培训教育制度-" + now + ".zip";
FileZip.zipList(path, archivesFiles);
files.add(new File(path));
archivesFiles.clear();
}
// 关于任命安全教育主管部门和人员的文件
for (PageData filePd : fileList) {
if ("2".equals(filePd.getString2("TYPE"))) { // 关于任命安全教育主管部门和人员的文件
now = DateUtil.getSdfTimesSSS();
String url = Const.HTTPFILEURL + filePd.getString("FILE_PATH");
String name = filePd.getString2("YEAR")+filePd.getString2("FILE_NAME").substring(0, filePd.getString("FILE_NAME").lastIndexOf(".")) + now + filePd.getString2("FILE_NAME").substring(filePd.getString("FILE_NAME").lastIndexOf("."));
if ("ok".equals(FileDownload.downloadFile(url, name, saveDir))) {
File file = new File(saveDir + name);
archivesFiles.add(file);
}
}
}
if (archivesFiles.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + "关于任命安全教育主管部门和人员的文件-" + now + ".zip";
FileZip.zipList(path, archivesFiles);
files.add(new File(path));
archivesFiles.clear();
}
// 三岗人员管理台账
List<PageData> archivesPostManList = archivesPostManService.listAll(corp);
if (archivesPostManList.size() > 0) {
File archivesPostMan = archivesEduManagerService.exportPdfArchivesPostMant(corp, archivesPostManList);
if (archivesPostMan != null) {
files.add(archivesPostMan);
}
}
// 培训需求调查表
for (PageData filePd : fileList) {
if ("3".equals(filePd.getString2("TYPE"))) { // 培训需求调查表
now = DateUtil.getSdfTimesSSS();
String url = Const.HTTPFILEURL + filePd.getString("FILE_PATH");
String name = filePd.getString2("YEAR")+filePd.getString2("FILE_NAME").substring(0, filePd.getString("FILE_NAME").lastIndexOf(".")) + now + filePd.getString2("FILE_NAME").substring(filePd.getString("FILE_NAME").lastIndexOf("."));
if ("ok".equals(FileDownload.downloadFile(url, name, saveDir))) {
File file = new File(saveDir + name);
archivesFiles.add(file);
}
}
}
if (archivesFiles.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + "培训需求调查表-" + now + ".zip";
FileZip.zipList(path, archivesFiles);
files.add(new File(path));
archivesFiles.clear();
}
// 本单位师资管理台账
List<PageData> archivesTeacherList = archivesTeacherService.listAll(corp);
if (archivesTeacherList.size() > 0) {
File archivesTeacher = archivesEduManagerService.exportPdfArchivesTeacher(corp, archivesTeacherList);
if (archivesTeacher != null) {
files.add(archivesTeacher);
}
}
// 安全培训教育计划
List<PageData> archivesEduPlanList = archivesEduPlanService.listAll(corp);
if (archivesEduPlanList.size() > 0) {
File archivesEduPlan = archivesEduManagerService.exportPdfArchivesEduPlan(corp, archivesEduPlanList);
if (archivesEduPlan != null) {
files.add(archivesEduPlan);
}
}
// 安全培训教育管理台账
List<PageData> archivesEduManagerList = archivesEduManagerService.listAll(corp);
if (archivesEduManagerList.size() > 0) {
File archivesEduManager = archivesEduManagerService.exportPdfArchivesEduManager(corp, archivesEduManagerList);
if (archivesEduManager != null) {
files.add(archivesEduManager);
}
}
// 培训资金提取和使用情况管理台账
List<PageData> archivesCapitalList = archivesCapitalService.listAll(corp);
if (archivesCapitalList.size() > 0) {
File archivesCapital = archivesEduManagerService.exportPdfArchivesCapital(corp, archivesCapitalList);
if (archivesCapital != null) {
files.add(archivesCapital);
}
}
// 培训条件证明材料
for (PageData filePd : fileList) {
if ("4".equals(filePd.getString2("TYPE"))) { // 培训条件证明材料
now = DateUtil.getSdfTimesSSS();
String url = Const.HTTPFILEURL + filePd.getString("FILE_PATH");
String name = filePd.getString2("YEAR")+filePd.getString2("FILE_NAME").substring(0, filePd.getString("FILE_NAME").lastIndexOf(".")) + now + filePd.getString2("FILE_NAME").substring(filePd.getString("FILE_NAME").lastIndexOf("."));
if ("ok".equals(FileDownload.downloadFile(url, name, saveDir))) {
File file = new File(saveDir + name);
archivesFiles.add(file);
}
}
}
if (archivesFiles.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + "培训条件证明材料-" + now + ".zip";
FileZip.zipList(path, archivesFiles);
files.add(new File(path));
archivesFiles.clear();
}
if (files.size() > 0) {
String path = projectPath + Const.TEMPZIPFILES + corpName + "-一企一档-" + now + ".zip";
FileZip.zipList(path, files);
for (File filepath : files) {
filepath.delete(); //删除缓存文件
}
userOutfiles.add(new File(path));
}
if (userOutfiles.isEmpty()) {
System.out.println("企业【" + corp.getString("CORP_NAME") + "】暂无一企一档档案记录");
continue;
}
String path = projectPath + Const.TEMPZIPFILES + corp.getString("CORP_NAME") + "【一企一档】-" + now + ".zip";
FileZip.zipList(path, userOutfiles);
for (File filepath : userOutfiles) {
filepath.delete(); //删除缓存文件
}
outfiles.add(new File(path));
}
if (outfiles.isEmpty()) {
System.out.println("系统暂无一企一档档案记录");
} else {
String path = projectPath + Const.TEMPZIPFILES + "系统一企一档-" + now + ".zip";
FileZip.zipList(path, outfiles);
FileDownload.mfFileDownload(response, path, "系统一企一档-" + now + ".zip");
}
}
}

View File

@ -10,6 +10,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
@ -24,11 +25,6 @@ import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.util.AliSmsUtil;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.CheckRecordService;
import com.zcloud.service.bus.CorpInfoService;
@ -120,4 +116,31 @@ public class CheckRecordController extends BaseController {
map.put("result", errInfo);
return map;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedger")
public ModelAndView exportExcelSystemLedger() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<>();
List<String> titles = new ArrayList<>();
titles.add("企业名称"); //1
titles.add("清单名称"); //2
titles.add("人员"); //3
titles.add("检查周期"); //4
titles.add("检查人"); //5
titles.add("检查时间"); //6
titles.add("检查状态"); //7
dataMap.put("titles", titles);
List<PageData> list = checkrecordService.listExport(pd);
dataMap.put("varList", list);
ExcelExportCompressImg erv = new ExcelExportCompressImg();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -1,11 +1,10 @@
package com.zcloud.controller.bus;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import com.zcloud.entity.system.Dictionaries;
import com.zcloud.service.system.*;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -15,13 +14,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.util.Const;
import com.zcloud.util.DateUtil;
import com.zcloud.util.IniFileUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.PathUtil;
import com.zcloud.util.Tools;
import net.sf.json.JSONArray;
@ -30,8 +22,6 @@ import com.zcloud.service.bus.HiddenCheckService;
import com.zcloud.service.bus.HiddenSchemeService;
import com.zcloud.service.bus.HiddenService;
import com.zcloud.service.bus.ImgFilesService;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.UsersService;
/**
*
@ -51,6 +41,13 @@ public class HiddenController extends BaseController {
private HiddenSchemeService hiddenSchemeService;
@Autowired
private HiddenCheckService hiddenCheckService;
@Autowired
private DictionariesService dictionariesService;
@Autowired
private Users2Service users2Service;
@Autowired
private Department2Service department2Service;
/**
* @param
* @throws Exception
@ -504,4 +501,364 @@ public class HiddenController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* excel
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/exportExcelSystemLedger")
public ModelAndView exportExcelSystemLedger() throws Exception {
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
String dicParentId = "5e7cf8620ba54ad89719d0be62133c7a";
List<Dictionaries> dicList = dictionariesService.listSubDictByParentId(dicParentId);// 字典
Map<String, String> dicMap = new HashMap<>();
for (Dictionaries pageData : dicList) {
dicMap.put(pageData.getBIANMA(), pageData.getNAME());
}
PageData corpIdPd = new PageData();
// corpIdPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());// CORPINFO_ID
Map<String, String> userMap = new HashMap<>();// 查看企业下的所有用户根据用户id匹配信息
List<PageData> userList = users2Service.listAllUser(corpIdPd);
for (PageData pageData : userList) {
userMap.put(pageData.getString("USER_ID"), pageData.getString("NAME"));
}
Map<String, String> deparMap = new HashMap<>();
List<PageData> deparList = department2Service.listAll(corpIdPd);// 查看企业下的所有部门根据部门id匹配信息
for (PageData pageData : deparList) {
deparMap.put(pageData.getString("DEPARTMENT_ID"), pageData.getString("NAME"));
}
Map<String, String> sourceMap = new HashMap<>();
sourceMap.put("1", "隐患快报");
sourceMap.put("2", "隐患排查");
sourceMap.put("3", "隐患排查");
Map<String, String> stateMap = new HashMap<>();
stateMap.put("-1", "已过期");
stateMap.put("0", "未提交");
stateMap.put("1", "未整改");
stateMap.put("2", "已整改");
stateMap.put("3", "待验收");
stateMap.put("4", "已验收");
Map<String, String> rectifType = new HashMap<>();
rectifType.put("1", "立即整改");
rectifType.put("2", "限期整改");
Map<String, Object> haveschemeMap = new HashMap<>();
haveschemeMap.put("0", "无");
haveschemeMap.put("1", "有");
Map<String, Object> ysStatusMap = new HashMap<>();
ysStatusMap.put("0", "否");
ysStatusMap.put("1", "是");
Map<String, Object> dataMap = new HashMap<String, Object>();// 传给导出页面的数据
// List<String> imgKeyId = new ArrayList<>();// 需要查询图片的id标识信息
HashSet<String> imgIds = new HashSet<String>();
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id
// 查看隐患信息
List<PageData> varOList = hiddenService.listAll(pd);
for (PageData pageData : varOList) {
// imgKeyId.add(pageData.getString("HIDDEN_ID"));
imgIds.add(pageData.getString("HIDDEN_ID"));
}
// 查询整改方案
List<PageData> schemeList = hiddenSchemeService.listExport(pd);
Map<String, PageData> schemeMap = new HashMap<>();
for (PageData pageData : schemeList) {
schemeMap.put(pageData.getString("HIDDEN_ID"), pageData);
// imgKeyId.add(pageData.getString("HIDDEN_ID"));
// imgKeyId.add(pageData.getString("HIDDENSCHEME_ID"));
imgIds.add(pageData.getString("HIDDENSCHEME_ID"));
}
// 验收信息
List<PageData> checkList = hiddenCheckService.listExport(pd);
Map<String, List<PageData>> checkMap = new HashMap<>();
Integer checkMaxCount = 1;
for (PageData pageData : checkList) {
Integer checkCount = 1;
List<PageData> vaList = new ArrayList<>();
if (checkMap.containsKey(pageData.get("HIDDEN_ID"))) {
vaList = checkMap.get(pageData.get("HIDDEN_ID"));
checkCount = vaList.size();
if (checkMaxCount < checkCount) {
checkMaxCount = checkCount;
}
}
vaList.add(pageData);
checkMap.put(pageData.get("HIDDEN_ID").toString(), vaList);
// imgKeyId.add(pageData.getString("HIDDENCHECK_ID"));
imgIds.add(pageData.getString("HIDDENCHECK_ID"));
}
// String[] imgId = new String[imgKeyId.size()];
// for (int i = 0; i < imgKeyId.size(); i++) {
// imgId[i] = imgKeyId.get(i);
// }
// String[] imgId = new String[imgIds.size()];
// for(String imgid : imgIds) {
// imgId[i] = imgid;
// }
//
List<String> imgIdList = new ArrayList<>();
for(String imgid:imgIds) {
imgIdList.add(imgid);
}
PageData imgpd2 = new PageData();
String[] imgId =imgIdList.toArray(new String[imgIdList.size()]);
List<PageData> imgList = new ArrayList<PageData>();
if(imgId != null && imgId.length > 0){
imgpd2.put("ArrayDATA_IDS", imgId);
imgList = imgFilesService.listAllByIds(imgpd2);
}
Map<String, Integer> imgCount = new HashMap<>();
Integer imgTypeMaxCount1 = 1, imgTypeMaxCount2 = 1, imgTypeMaxCount3 = 1, imgTypeMaxCount4 = 1,
imgTypeMaxCount5 = 1, imgTypeMaxCount6 = 1, imgTypeMaxCount7 = 1, imgTypeMaxCount8 = 1;
Map<String, List<String>> imgMap = new HashMap<>();
for (int i = 0; i < imgList.size(); i++) {
if (Tools.isEmpty(imgList.get(i).get("TYPE"))) {
continue;
}
if (Tools.isEmpty(imgList.get(i).get("FOREIGN_KEY"))) {
continue;
}
List<String> list = new ArrayList<>();
String key = imgList.get(i).getString("FOREIGN_KEY") + ";" + imgList.get(i).get("TYPE");
if (imgMap.containsKey(key)) {
list = imgMap.get(key);
}
list.add(imgList.get(i).getString("FILEPATH"));
imgMap.put(key, list);
String imgType = imgList.get(i).get("TYPE").toString();
Integer count = 1;
if (imgCount.containsKey(key)) {
count = imgCount.get(key) + 1;
}
if ("1".equals(imgType)) {
if (imgTypeMaxCount1 < count) {
imgTypeMaxCount1 = count;
}
}
if ("2".equals(imgType)) {
if (imgTypeMaxCount2 < count) {
imgTypeMaxCount2 = count;
}
}
if ("3".equals(imgType)) {
if (imgTypeMaxCount3 < count) {
imgTypeMaxCount3 = count;
}
}
if ("4".equals(imgType)) {
if (imgTypeMaxCount4 < count) {
imgTypeMaxCount4 = count;
}
}
if ("5".equals(imgType)) {
if (imgTypeMaxCount5 < count) {
imgTypeMaxCount5 = count;
}
}
if ("6".equals(imgType)) {
if (imgTypeMaxCount6 < count) {
imgTypeMaxCount6 = count;
}
}
if ("7".equals(imgType)) {
if (imgTypeMaxCount7 < count) {
imgTypeMaxCount7 = count;
}
}
if ("8".equals(imgType)) {
if (imgTypeMaxCount8 < count) {
imgTypeMaxCount8 = count;
}
}
imgCount.put(key, count);
}
List<PageData> varList = new ArrayList<PageData>();
for (PageData pageData : varOList) {
int count = 0;
PageData vpd = new PageData();
String hidId = pageData.getString("HIDDEN_ID");
vpd.put("var" + (1 + count), sourceMap.get(pageData.getString("SOURCE")));
vpd.put("var" + (2 + count), pageData.getString("RISK_UNIT"));
vpd.put("var" + (3 + count), pageData.getString("IDENTIFICATION"));
vpd.put("var" + (4 + count), pageData.getString("RISK_DESCR"));
vpd.put("var" + (5 + count), pageData.getString("LEVEL"));
vpd.put("var" + (6 + count), pageData.getString("CHECK_CONTENT"));
vpd.put("var" + (7 + count), dicMap.get(pageData.getString("HIDDENLEVEL")));
vpd.put("var" + (8 + count), stateMap.get(pageData.getString("STATE")));
vpd.put("var" + (9 + count), pageData.getString("HIDDENDESCR"));
vpd.put("var" + (10 + count), pageData.getString("HIDDENPART"));
vpd.put("var" + (11 + count), deparMap.get(pageData.getString("HIDDENFINDDEPT")));
vpd.put("var" + (12 + count), userMap.get(pageData.getString("CREATOR")));
vpd.put("var" + (13 + count), pageData.getString("CREATTIME"));
vpd.put("var" + (14 + count), rectifType.get(pageData.getString("RECTIFICATIONTYPE")));
vpd.put("var" + (15 + count), pageData.getString("RECTIFICATIONDEADLINE"));
List<String> yhImg = imgMap.get(pageData.getString("HIDDEN_ID") + ";3");
for (int i = 0; i < imgTypeMaxCount3; i++) {
if (null != yhImg) {
if (i < yhImg.size()) {
vpd.put("img" + (16 + i), yhImg.get(i));
} else {
vpd.put("img" + (16 + i), "");
}
} else {
vpd.put("img" + (16 + i), "");
}
}
count += imgTypeMaxCount3;
vpd.put("var" + (16 + count), pageData.getString("RECTIFYDESCR"));// 整改描述
vpd.put("var" + (17 + count), deparMap.get(pageData.getString("RECTIFICATIONDEPT")));// 整改部门
vpd.put("var" + (18 + count), userMap.get(pageData.getString("RECTIFICATIONOR")));// 整改人
vpd.put("var" + (19 + count), pageData.getString("RECTIFICATIONTIME"));// 整改时间
List<String> zgImg = imgMap.get(hidId + ";4");// 整改后图片
for (int i = 0; i < imgTypeMaxCount4; i++) {
if (null != zgImg) {
if (i < zgImg.size()) {
vpd.put("img" + (20 + count + i), zgImg.get(i));
} else {
vpd.put("img" + (20 + count + i), "");
}
} else {
vpd.put("img" + (20 + count + i), "");
}
}
count += imgTypeMaxCount4;
vpd.put("var" + (20 + count), haveschemeMap.get(pageData.getString("HAVESCHEME")));// 整改方案
if (schemeMap.containsKey(hidId)) {
PageData schemePd = schemeMap.get(hidId);
if ("1".equals(pageData.getString("HAVESCHEME"))) {
vpd.put("var" + (21 + count), schemePd.getString("SCREENINGDATE"));// 排查日期
vpd.put("var" + (22 + count), schemePd.getString("LISTNAME"));// 隐患清单
vpd.put("var" + (23 + count), schemePd.getString("GOVERNSTANDARDS"));// 治理标准要求
vpd.put("var" + (24 + count), schemePd.getString("GOVERNMETHOD"));// 治理方法
vpd.put("var" + (25 + count), schemePd.getString("EXPENDITURE"));// 经费和物资的落实
vpd.put("var" + (26 + count), schemePd.getString("PRINCIPAL"));// 负责治理人员
vpd.put("var" + (27 + count), schemePd.getString("PROGRAMMING"));// 工时安排
vpd.put("var" + (28 + count), schemePd.getString("TIMELIMITFOR"));// 时限要求
vpd.put("var" + (29 + count), pageData.getString("FILEPATH"));// 应急预案附件
vpd.put("var" + (30 + count), schemePd.getString("JOBREQUIREMENT"));// 工作要求
vpd.put("var" + (31 + count), schemePd.getString("OTHERBUSINESS"));// 其他事项
List<String> ysImg = imgMap.get(schemePd.getString("HIDDENSCHEME_ID") + ";8");
for (int i = 0; i < imgTypeMaxCount8; i++) {
if (null != ysImg) {
if (i < ysImg.size()) {
vpd.put("img" + (32 + count + i), ysImg.get(i));// 方案图片
} else {
vpd.put("img" + (32 + count + i), "");
}
} else {
vpd.put("img" + (32 + count + i), "");
}
}
}
count += imgTypeMaxCount8;
if (checkMap.containsKey(hidId)) {
List<PageData> check = checkMap.get(hidId);
for (PageData pageData2 : check) {
vpd.put("var" + (32 + count), ysStatusMap.get(pageData2.getString("CHECKDESCR")));// 验收描述
vpd.put("var" + (33 + count), pageData2.getString("STATUS"));// 是否合格
vpd.put("var" + (34 + count), pageData2.getString("CHECKDEPTNAME"));// 验收部门
vpd.put("var" + (35 + count), pageData2.getString("CHECKORNAME"));// 验收人
vpd.put("var" + (36 + count), pageData2.getString("CHECK_TIME"));// 验收时间
// vpd.put("var"+(37+count),pageData2.getString("HIDDENCHECK_ID"));//验收图片
List<String> ysImg = imgMap.get(pageData2.getString("HIDDENCHECK_ID") + ";5");// 整改后图片
for (int i = 0; i < imgTypeMaxCount5; i++) {
if (null != ysImg) {
if (i < ysImg.size()) {
vpd.put("img" + (37 + count + i), ysImg.get(i));
} else {
vpd.put("img" + (37 + count + i), "");
}
} else {
vpd.put("img" + (37 + count + i), "");
}
}
}
}
}
varList.add(vpd);
}
List<String> titles = new ArrayList<String>();
titles.add("隐患来源"); // 1
titles.add("风险点(单元)"); // 2
titles.add("辨识部位"); // 3
titles.add("存在风险"); // 4
titles.add("风险分级"); // 6
titles.add("检查内容"); // 7
titles.add("隐患级别"); // 16
titles.add("隐患状态"); // 17=
titles.add("隐患描述"); // 8
titles.add("隐患部位"); // 9
titles.add("隐患发现部门"); // 9 ````````
titles.add("发现人"); // 10
titles.add("发现时间"); // 11
titles.add("整改类型"); // 10
titles.add("整改期限"); // 11
for (int i = 0; i < imgTypeMaxCount3; i++) {
titles.add("隐患图片"); // 11
}
titles.add("整改描述");
titles.add("整改部门");
titles.add("整改人");
titles.add("整改时间");
for (int i = 0; i < imgTypeMaxCount4; i++) {
titles.add("整改后图片"); // 11
}
titles.add("整改方案");
titles.add("排查日期");
titles.add("隐患清单");
titles.add("治理标准要求");
titles.add("治理方法");
titles.add("经费和物资的落实");
titles.add("负责治理人员");
titles.add("工时安排");
titles.add("时限要求");
titles.add("应急预案附件");
titles.add("工作要求");
titles.add("其他事项");
for (int i = 0; i < imgTypeMaxCount8; i++) {
titles.add("方案图片"); // 11
}
for (int i = 0; i < checkMaxCount; i++) {
titles.add("验收描述");
titles.add("是否合格");
titles.add("验收部门");
titles.add("验收人");
titles.add("验收时间");
for (int j = 0; j < imgTypeMaxCount5; j++) {
titles.add("验收图片");
}
}
dataMap.put("titles", titles);
dataMap.put("varList", varList);
ExcelExportCompressImg erv2 = new ExcelExportCompressImg();
mv = new ModelAndView(erv2, dataMap);
return mv;
}
}

View File

@ -0,0 +1,99 @@
package com.zcloud.controller.bus;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.*;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
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.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.*;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/listmanager")
public class ListManagerController extends BaseController {
@Autowired
private ListManagerService listmanagerService;
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
// pd.put("ISMAIN", Jurisdiction.getIS_MAIN());
// pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
String DEPTIDS = pd.getString("DEPTIDS");
if(Tools.notEmpty(DEPTIDS)) {
String DEPT_IDS[] = DEPTIDS.split(",");
pd.put("DEPT_IDS", DEPT_IDS);
}
pd.put("HIDFORBIDDEN", "no"); //企业
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
String USERNAME = pd.getString("USERNAME"); //关键词检索条件
if(Tools.notEmpty(USERNAME))pd.put("USERNAME", USERNAME.trim());
page.setPd(pd);
List<PageData> varList = listmanagerService.list(page); //列出ListManager列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedger")
public ModelAndView exportExcelSystemLedger() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<>();
List<String> titles = new ArrayList<>();
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
dataMap.put("titles", titles);
List<PageData> list = listmanagerService.listExport(pd);
dataMap.put("varList", list);
ExcelExportCompressImg erv = new ExcelExportCompressImg();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -0,0 +1,63 @@
package com.zcloud.controller.onlinexxks;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.onlinexxks.StageStudentRelationService;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
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 org.springframework.web.servlet.ModelAndView;
import java.util.*;
/**
*
* luoxiaobao
* 2021-10-08
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/stagestudentrelation")
public class StageStudentRelationController extends BaseController {
@Autowired
private StageStudentRelationService stagestudentrelationService;
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedger")
public ModelAndView exportExcelSystemLedger() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<>();
List<String> titles = new ArrayList<>();
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
dataMap.put("titles", titles);
List<PageData> list = stagestudentrelationService.listExport(pd);
dataMap.put("varList", list);
ExcelExportCompressImg erv = new ExcelExportCompressImg();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -0,0 +1,61 @@
package com.zcloud.controller.onlinexxks;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.onlinexxks.*;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
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.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.*;
/**
* 线-
* luoxiaobao
* 2021-12-20
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/studytask")
public class StudyTaskController extends BaseController {
@Autowired
private StudyTaskService studytaskService;
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedger")
public ModelAndView exportExcelSystemLedger() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<>();
List<String> titles = new ArrayList<>();
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
dataMap.put("titles", titles);
List<PageData> list = studytaskService.listExport(pd);
dataMap.put("varList", list);
ExcelExportCompressImg erv = new ExcelExportCompressImg();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -361,4 +361,20 @@ public class SuperviseInspectController extends BaseController {
return mv;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedger")
public ModelAndView exportExcelSystemLedger() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = this.getPageData();
Map<String,Object> dataMap = superviseinspectService.listExport(pd);
ExcelExportCompressImg erv = new ExcelExportCompressImg();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -7,10 +7,7 @@ import com.zcloud.service.superviseInspect.SuperviseInspectFilesService;
import com.zcloud.service.superviseInspect.SuperviseInspectHiddenService;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -278,4 +275,20 @@ public class SuperviseInspectHiddenController extends BaseController {
return mv;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelSystemLedger")
public ModelAndView exportExcelSystemLedger() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = this.getPageData();
Map<String,Object> dataMap = superviseinspecthiddenService.listExport(pd);
ExcelExportCompressImg erv = new ExcelExportCompressImg();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -177,13 +177,13 @@ public class LoginController extends BaseController {
String errInfo = "success";
// 2023-04-17 新增需求如果当前时间大于10月1号则不允许登录房嘉恺
// 2024-11-15 由于商务原因恢复系统登录限制(王鹏)
Date today = new Date();
Date limit_date = DateUtil.str2Date("2025-01-08 00:00:00");
if (today.getTime() > limit_date.getTime()){
errInfo = "error";
map.put("msg", "系统开小差,请联系管理员");
return map;
}
// Date today = new Date();
// Date limit_date = DateUtil.str2Date("2025-01-08 00:00:00");
// if (today.getTime() > limit_date.getTime()){
// errInfo = "error";
// map.put("msg", "系统开小差,请联系管理员");
// return map;
// }
String KEYDATA[] = pd.getString("KEYDATA").replaceAll("qdkjchina", "").split(",qd,");
if(null != KEYDATA && KEYDATA.length == 2){
String USERNAME = KEYDATA[0]; //登录过来的用户名

View File

@ -8,6 +8,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.zcloud.service.bus.ImgFilesService;
import com.zcloud.service.system.*;
import com.zcloud.util.*;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.DisabledAccountException;
@ -33,20 +35,6 @@ import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Department;
import com.zcloud.entity.system.Role;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.FHlogService;
import com.zcloud.service.system.RoleService;
import com.zcloud.service.system.UeditorService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.Const;
import com.zcloud.util.FileDownload;
import com.zcloud.util.FileUpload;
import com.zcloud.util.GetPinyin;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelRead;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.PathUtil;
import com.zcloud.util.Tools;
/**
*
@ -69,6 +57,8 @@ public class UsersController extends BaseController {
private DepartmentService departmentService;
@Autowired
private ImgFilesService imgFilesService;
@Autowired
private Users2Service corpUsersService;
/**
* @param page
* @return
@ -596,6 +586,74 @@ public class UsersController extends BaseController {
return map;
}
@RequestMapping(value="/goDaochu")
@ResponseBody
public Object goDaochu() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
List<Map<String,Object>> regList = usersService.getDaochuReglatory(pd); //列出CorpInfo列表
map.put("regList", regList);
List<Map<String,Object>> preList = usersService.getDaochuPrevention(pd); //列出CorpInfo列表
map.put("preList", preList);
map.put("result", errInfo);
return map;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/exportExcelDaochu")
public ModelAndView exportExcelDaochu() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<String,Object>();
String regKeys [] = pd.get("regKeys").toString().split(",");
String regVals [] = pd.get("regVals").toString().split(",");
String preKeys [] = pd.get("preKeys").toString().split(",");
String preVals [] = pd.get("preVals").toString().split(",");
List<String> titles = new ArrayList<String>();
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
titles.add("人员类型"); //17
titles.add("职称"); //18
titles.add("工种"); //19
titles.add("入职日期"); //20
titles.add("参加工作日期"); //21
titles.add("在职情况"); //22
titles.add("学习人员照片"); //23
titles.add("证书照片"); //24
dataMap.put("titles", titles);
List<PageData> list = new ArrayList<>();
List<PageData> regUserList = usersService.listExport(pd, regKeys);
list.addAll(regUserList);
List<PageData> corpUserList = corpUsersService.listExport(pd, preKeys);
list.addAll(corpUserList);
dataMap.put("varList", list);
ExcelExportCompressImg erv = new ExcelExportCompressImg();
mv = new ModelAndView(erv,dataMap);
return mv;
}
/**EXCEL
* @return
* @throws Exception

View File

@ -11,6 +11,7 @@ import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import com.alibaba.druid.proxy.jdbc.ClobProxyImpl;
import com.zcloud.util.Tools;
/**
* Map
@ -72,6 +73,10 @@ public class PageData extends HashMap<Object, Object> implements Map<Object, Obj
return (String) get(key);
}
public String getString2(Object key) {
return Tools.isEmpty(get(key)) ? "" : get(key).toString();
}
@Override
public Object put(Object key, Object value) {
if (value instanceof ClobProxyImpl) { // 读取oracle Clob类型数据

View File

@ -0,0 +1,257 @@
package com.zcloud.entity.word;
import fr.opensagres.xdocreport.document.images.ByteArrayImageProvider;
import java.io.Serializable;
/**
* word yangming www.qdkjchina.com
*/
public class TrainingPlanDao implements Serializable {
private static final long serialVersionUID = 1L;
private ByteArrayImageProvider pic;
private ByteArrayImageProvider pic2;
private ByteArrayImageProvider pic3;
private ByteArrayImageProvider pic4;
private ByteArrayImageProvider pic5;
private ByteArrayImageProvider pic6;
private String picx;
private String value1;
private String value2;
private String value3;
private String value4;
private String value5;
private String value6;
private String value7;
private String value8;
private String value9;
private String value10;
private String value11;
private String value12;
private String value13;
private String value14;
private String value15;
private String value16;
private String value17;
private String value18;
private String value19;
private String value20;
private String value21;
public String getValue1() {
return value1;
}
public void setValue1(String value1) {
this.value1 = value1;
}
public String getValue2() {
return value2;
}
public void setValue2(String value2) {
this.value2 = value2;
}
public String getValue3() {
return value3;
}
public void setValue3(String value3) {
this.value3 = value3;
}
public String getValue4() {
return value4;
}
public void setValue4(String value4) {
this.value4 = value4;
}
public String getValue5() {
return value5;
}
public void setValue5(String value5) {
this.value5 = value5;
}
public String getValue6() {
return value6;
}
public void setValue6(String value6) {
this.value6 = value6;
}
public String getValue7() {
return value7;
}
public void setValue7(String value7) {
this.value7 = value7;
}
public String getValue8() {
return value8;
}
public void setValue8(String value8) {
this.value8 = value8;
}
public String getValue9() {
return value9;
}
public void setValue9(String value9) {
this.value9 = value9;
}
public String getValue10() {
return value10;
}
public void setValue10(String value10) {
this.value10 = value10;
}
public String getValue11() {
return value11;
}
public void setValue11(String value11) {
this.value11 = value11;
}
public ByteArrayImageProvider getPic() {
return pic;
}
public void setPic(ByteArrayImageProvider pic) {
this.pic = pic;
}
public String getValue12() {
return value12;
}
public void setValue12(String value12) {
this.value12 = value12;
}
public String getValue13() {
return value13;
}
public void setValue13(String value13) {
this.value13 = value13;
}
public String getValue14() {
return value14;
}
public void setValue14(String value14) {
this.value14 = value14;
}
public String getValue15() {
return value15;
}
public void setValue15(String value15) {
this.value15 = value15;
}
public String getValue16() {
return value16;
}
public void setValue16(String value16) {
this.value16 = value16;
}
public String getValue17() {
return value17;
}
public void setValue17(String value17) {
this.value17 = value17;
}
public String getValue18() {
return value18;
}
public void setValue18(String value18) {
this.value18 = value18;
}
public String getValue19() {
return value19;
}
public void setValue19(String value19) {
this.value19 = value19;
}
public String getValue20() {
return value20;
}
public void setValue20(String value20) {
this.value20 = value20;
}
public String getValue21() {
return value21;
}
public void setValue21(String value21) {
this.value21 = value21;
}
public ByteArrayImageProvider getPic2() {
return pic2;
}
public void setPic2(ByteArrayImageProvider pic2) {
this.pic2 = pic2;
}
public ByteArrayImageProvider getPic3() {
return pic3;
}
public void setPic3(ByteArrayImageProvider pic3) {
this.pic3 = pic3;
}
public ByteArrayImageProvider getPic4() {
return pic4;
}
public void setPic4(ByteArrayImageProvider pic4) {
this.pic4 = pic4;
}
public ByteArrayImageProvider getPic5() {
return pic5;
}
public void setPic5(ByteArrayImageProvider pic5) {
this.pic5 = pic5;
}
public ByteArrayImageProvider getPic6() {
return pic6;
}
public void setPic6(ByteArrayImageProvider pic6) {
this.pic6 = pic6;
}
}

View File

@ -60,5 +60,6 @@ public interface SuperviseInspectHiddenMapper{
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> listExport(PageData pd);
}

View File

@ -54,5 +54,6 @@ public interface SuperviseInspectMapper{
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> listExport(PageData pd);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.dsno2.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* 使
* luoxiaobao
* 2021-12-17
* www.zcloudchina.com
*/
public interface ArchivesCapitalMapper {
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.dsno2.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-17
* www.zcloudchina.com
*/
public interface ArchivesEduManagerMapper {
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.dsno2.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-16
* www.zcloudchina.com
*/
public interface ArchivesEduPlanMapper{
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
}

View File

@ -0,0 +1,59 @@
package com.zcloud.mapper.dsno2.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-14
* www.zcloudchina.com
*/
public interface ArchivesFilesMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.dsno2.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-15
* www.zcloudchina.com
*/
public interface ArchivesPostManMapper{
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.dsno2.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-16
* www.zcloudchina.com
*/
public interface ArchivesTeacherMapper{
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
}

View File

@ -84,5 +84,7 @@ public interface CheckRecordMapper{
* @return
*/
List<PageData> recordByIde(PageData pd);
List<PageData> listExport(PageData pd);
}

View File

@ -56,5 +56,6 @@ public interface HiddenCheckMapper{
PageData findByHidden(PageData pd);
List<PageData> listExport(PageData pd);
}

View File

@ -66,5 +66,6 @@ public interface HiddenSchemeMapper{
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> listExport(PageData pd);
}

View File

@ -0,0 +1,26 @@
package com.zcloud.mapper.dsno2.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface ListManagerMapper {
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> listExport(PageData pd);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.dsno2.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-20
* www.zcloudchina.com
*/
public interface TrainingScheduleMapper {
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
}

View File

@ -0,0 +1,23 @@
package com.zcloud.mapper.dsno2.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-15
* www.zcloudchina.com
*/
public interface StageExamMapper{
/**
* idid
* @param pd
* @return
*/
List<PageData> findByPaperUser(PageData pd);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.dsno2.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-10-08
* www.zcloudchina.com
*/
public interface StageExamPaperQuestionMapper {
/**(ID)
* @param pd
* @throws Exception
*/
List<PageData> findByExamPaper(PageData pd);
}

View File

@ -0,0 +1,22 @@
package com.zcloud.mapper.dsno2.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-15
* www.zcloudchina.com
*/
public interface StageExamRecordMapper{
/**
* @param
* @throws Exception
*/
List<PageData> findByExam(PageData pd);
}

View File

@ -0,0 +1,30 @@
package com.zcloud.mapper.dsno2.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-10-08
* www.zcloudchina.com
*/
public interface StageStudentRelationMapper {
/**()
* @param pd
* @throws Exception
*/
List<PageData> listStudentTask(PageData pd);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listExport(PageData pd);
}

View File

@ -0,0 +1,22 @@
package com.zcloud.mapper.dsno2.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-07-04
* www.zcloudchina.com
*/
public interface StageexampaperMapper{
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
}

View File

@ -0,0 +1,34 @@
package com.zcloud.mapper.dsno2.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* 线-
* luoxiaobao
* 2021-12-20
* www.zcloudchina.com
*/
public interface StudyTaskMapper {
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
List<PageData> getcurriculumAllBystudyTaskId(PageData pd);
/**+
* @param pd
* @throws Exception
*/
List<PageData> getAllCourseware(PageData pd);
List<PageData> listAll(PageData pd);
}

View File

@ -117,4 +117,8 @@ public interface Users2Mapper {
* @param pd
*/
void editPassword(PageData pd);
List<PageData> listAllUser(PageData pd);
List<PageData> listAllForExport(PageData pd);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.service.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* 使
* luoxiaobao
* 2021-12-17
* www.zcloudchina.com
*/
public interface ArchivesCapitalService {
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd)throws Exception;
}

View File

@ -0,0 +1,147 @@
package com.zcloud.service.archives;
import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Dictionaries;
import java.io.File;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-17
* www.zcloudchina.com
*/
public interface ArchivesEduManagerService {
List<PageData> listAll(PageData corp) throws Exception;
/**
*
* @param stu
* @return
* @throws Exception
*/
File registertable(PageData stu)throws Exception;
/**
* word
* @throws Exception
*/
String homepage(PageData student, PageData pd, String now, PageData paper, PageData classInfo) throws Exception;
/**
* word
* @throws Exception
*/
String classHour(PageData student, PageData classInfo, List<PageData> coursewaresList, PageData corpinfo, PageData pd, String now, PageData paper) throws Exception;
/**
* word
* @throws Exception
*/
String studyInfo(PageData student, PageData classInfo, List<PageData> curList, List<PageData> coursewaresList, PageData pd, String now, PageData corpinfo, PageData paper) throws Exception;
/**
* word
* @throws Exception
*/
String curriculumword(PageData student, PageData classInfo, List<PageData> coursewaresList, PageData corpinfo, String now) throws Exception;
/**
* word
*
* @throws Exception
*/
String practiceword(PageData student, PageData pd, PageData classInfo, PageData corpinfo, String now, List<Dictionaries> personnelTypeList) throws Exception;
/**
* word
*
* @throws Exception
*/
String safelogword(PageData student, PageData classInfo, List<PageData> coursewaresList, PageData pd, PageData corpinfo, PageData paper, String now, List<Dictionaries> personnelTypeList) throws Exception;
/**
* word
*
* @throws Exception
*/
String papermword(PageData student, PageData classInfo, PageData corpinfo, PageData paper, String now) throws Exception;
File exportPdfTrainingSchedule(PageData pd,List<PageData> tsList) throws Exception;
File exportPdfCourseware(PageData task, List<PageData> coursewaresList) throws Exception;
File exportPdfStudyTask(PageData task, List<PageData> coursewaresList, List<PageData> stuList) throws Exception;
File exportPdfExamPaper(PageData task, PageData paper, List<PageData> questionList) throws Exception;
/**
*
* @param task
* @param coursewaresList
* @param stuList
* @return
* @throws Exception
*/
File exportPdfArchivesStudentScore(PageData task, List<PageData> coursewaresList, List<PageData> stuList) throws Exception;
/**
*
* @param task
* @param curList
* @param stuList
* @return
* @throws Exception
*/
File exportPdfArchivesReport(PageData task, List<PageData> curList, List<PageData> stuList) throws Exception;
/**
*
* @param corp
* @param archivesPostManList
* @return
* @throws Exception
*/
File exportPdfArchivesPostMant(PageData corp, List<PageData> archivesPostManList) throws Exception;
/**
*
* @param corp
* @param archivesTeacherList
* @return
* @throws Exception
*/
File exportPdfArchivesTeacher(PageData corp, List<PageData> archivesTeacherList) throws Exception;
/**
*
* @param corp
* @param archivesEduPlanList
* @return
* @throws Exception
*/
File exportPdfArchivesEduPlan(PageData corp, List<PageData> archivesEduPlanList) throws Exception;
/**
*
* @param corp
* @param archivesEduManagerList
* @return
* @throws Exception
*/
File exportPdfArchivesEduManager(PageData corp, List<PageData> archivesEduManagerList) throws Exception;
/**
* 使
* @param corp
* @param archivesCapitalList
* @return
* @throws Exception
*/
File exportPdfArchivesCapital(PageData corp, List<PageData> archivesCapitalList) throws Exception;
}

View File

@ -0,0 +1,23 @@
package com.zcloud.service.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-16
* www.zcloudchina.com
*/
public interface ArchivesEduPlanService{
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd)throws Exception;
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-14
* www.zcloudchina.com
*/
public interface ArchivesFilesService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
}

View File

@ -0,0 +1,24 @@
package com.zcloud.service.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-15
* www.zcloudchina.com
*/
public interface ArchivesPostManService{
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd)throws Exception;
}

View File

@ -0,0 +1,24 @@
package com.zcloud.service.archives;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-16
* www.zcloudchina.com
*/
public interface ArchivesTeacherService{
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd)throws Exception;
}

View File

@ -0,0 +1,36 @@
package com.zcloud.service.archives.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.archives.ArchivesCapitalMapper;
import com.zcloud.service.archives.ArchivesCapitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 使
* luoxiaobao
* 2021-12-17
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class ArchivesCapitalServiceImpl implements ArchivesCapitalService{
@Autowired
private ArchivesCapitalMapper archivescapitalMapper;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return archivescapitalMapper.listAll(pd);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
package com.zcloud.service.archives.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.archives.ArchivesEduPlanMapper;
import com.zcloud.service.archives.ArchivesEduPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-16
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class ArchivesEduPlanServiceImpl implements ArchivesEduPlanService{
@Autowired
private ArchivesEduPlanMapper archiveseduplanMapper;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return archiveseduplanMapper.listAll(pd);
}
}

View File

@ -0,0 +1,83 @@
package com.zcloud.service.archives.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.archives.ArchivesFilesMapper;
import com.zcloud.service.archives.ArchivesFilesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-14
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class ArchivesFilesServiceImpl implements ArchivesFilesService{
@Autowired
private ArchivesFilesMapper archivesfilesMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
archivesfilesMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
archivesfilesMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
archivesfilesMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return archivesfilesMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return archivesfilesMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return archivesfilesMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
archivesfilesMapper.deleteAll(ArrayDATA_IDS);
}
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.archives.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.archives.ArchivesPostManMapper;
import com.zcloud.service.archives.ArchivesPostManService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-15
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class ArchivesPostManServiceImpl implements ArchivesPostManService{
@Autowired
private ArchivesPostManMapper archivesPostManMapper;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return archivesPostManMapper.listAll(pd);
}
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.archives.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.archives.ArchivesTeacherMapper;
import com.zcloud.service.archives.ArchivesTeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-16
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class ArchivesTeacherServiceImpl implements ArchivesTeacherService{
@Autowired
private ArchivesTeacherMapper archivesteacherMapper;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return archivesteacherMapper.listAll(pd);
}
}

View File

@ -95,5 +95,7 @@ public interface CheckRecordService{
* @return
*/
public List<PageData> recordByIde(PageData pd)throws Exception;
List<PageData> listExport(PageData pd)throws Exception;
}

View File

@ -60,5 +60,12 @@ public interface HiddenCheckService{
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
/**()
* @param pd
* @throws Exception
*/
List<PageData> listExport(PageData pd)throws Exception;
}

View File

@ -67,5 +67,6 @@ public interface HiddenSchemeService{
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
List<PageData> listExport(PageData pd)throws Exception;
}

View File

@ -0,0 +1,26 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface ListManagerService {
/**
* @param page
* @throws Exception
*/
List<PageData> list(Page page)throws Exception;
List<PageData> listExport(PageData pd);
}

View File

@ -0,0 +1,23 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-20
* www.zcloudchina.com
*/
public interface TrainingScheduleService {
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd)throws Exception;
}

View File

@ -1,6 +1,9 @@
package com.zcloud.service.bus.impl;
import java.util.ArrayList;
import java.util.List;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -163,5 +166,29 @@ public class CheckRecordServiceImpl implements CheckRecordService{
public List<PageData> recordByIde(PageData pd)throws Exception{
return checkrecordMapper.recordByIde(pd);
}
@Override
public List<PageData> listExport(PageData pd) {
List<PageData> explist = new ArrayList<>();
List<PageData> varList = checkrecordMapper.listExport(pd);
for (PageData pd2 : varList) {
int count = 0;
PageData vpd = new PageData();
String id = pd2.getString("CHECKRECORD_ID");
vpd.put("var" + (1 + count), pd2.getString("CORP_NAME"));
vpd.put("var" + (2 + count), pd2.getString("LIST_NAME")); // 清单名称
vpd.put("var" + (3 + count), pd2.getString("PRINCIPALNAME")); //人员
vpd.put("var" + (4 + count), pd2.getString("DATESTART") + " 至 " + pd2.getString("DATEEND")); //检查周期
vpd.put("var" + (5 + count), pd2.getString("CHECK_USERS")); //检查人
vpd.put("var" + (6 + count), pd2.getString("CHECK_TIME")); //检查时间
String status = "已检查";
if (!Tools.isEmpty(pd2.get("TYPE")) && "2".equals(pd2.getString("TYPE"))) {
status = "超期未检查";
}
vpd.put("var" + (7 + count), status); // 检查状态
explist.add(vpd);
}
return explist;
}
}

View File

@ -86,5 +86,13 @@ public class HiddenCheckServiceImpl implements HiddenCheckService{
hiddencheckMapper.deleteAll(ArrayDATA_IDS);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listExport(PageData pd)throws Exception{
return hiddencheckMapper.listExport(pd);
}
}

View File

@ -94,5 +94,13 @@ public class HiddenSchemeServiceImpl implements HiddenSchemeService{
hiddenschemeMapper.deleteAll(ArrayDATA_IDS);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listExport(PageData pd)throws Exception{
return hiddenschemeMapper.listExport(pd);
}
}

View File

@ -0,0 +1,70 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.bus.ListManagerMapper;
import com.zcloud.service.bus.ListManagerService;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class ListManagerServiceImpl implements ListManagerService{
@Autowired
private ListManagerMapper listmanagerMapper;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return listmanagerMapper.datalistPage(page);
}
@Override
public List<PageData> listExport(PageData pd) {
List<PageData> explist = new ArrayList<>();
List<PageData> varList = listmanagerMapper.listExport(pd);
for (PageData pd2 : varList) {
int count = 0;
PageData vpd = new PageData();
String id = pd2.getString("LISTMANAGER_ID");
vpd.put("var" + (1 + count), pd2.getString("CORP_NAME"));
vpd.put("var" + (2 + count), pd2.getString("NAME")); // 清单名称
vpd.put("var" + (3 + count), pd2.getString("DEPARTMENT_NAME_ALL")); //部门
vpd.put("var" + (4 + count), pd2.getString("POST_NAME")); //岗位
vpd.put("var" + (5 + count), pd2.getString("USER_NAME")); //人员
vpd.put("var" + (6 + count), pd2.getString("PERIODNAME")); //排查周期
vpd.put("var" + (7 + count), pd2.getString("TYPENAME")); //清单类型
vpd.put("var" + (8 + count), pd2.getString("SCREENTYPENAME")); // 排查类型
String listStatus = "启用";
if (Tools.isEmpty(pd2.get("ISDELETE")) || "0".equals(pd2.getString("ISDELETE"))) {
listStatus = "启用";
} else if ("1".equals(pd2.getString("ISDELETE"))) {
listStatus = "禁用";
} else if ("2".equals(pd2.getString("ISDELETE"))) {
listStatus = "已删除";
}
vpd.put("var" + (9 + count), listStatus); // 状态
explist.add(vpd);
}
return explist;
}
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.bus.TrainingScheduleMapper;
import com.zcloud.service.bus.TrainingScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-12-20
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class TrainingScheduleServiceImpl implements TrainingScheduleService{
@Autowired
private TrainingScheduleMapper trainingscheduleMapper;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return trainingscheduleMapper.listAll(pd);
}
}

View File

@ -0,0 +1,23 @@
package com.zcloud.service.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-10-08
* www.zcloudchina.com
*/
public interface StageExamPaperQuestionService {
/**(ID)
* @param pd
* @throws Exception
*/
List<PageData> findByExamPaper(PageData pd) throws Exception;
}

View File

@ -0,0 +1,22 @@
package com.zcloud.service.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-15
* www.zcloudchina.com
*/
public interface StageExamRecordService {
/**
* @param
* @throws Exception
*/
List<PageData> findByExam(PageData pd)throws Exception;
}

View File

@ -0,0 +1,24 @@
package com.zcloud.service.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-15
* www.zcloudchina.com
*/
public interface StageExamService {
/**
*
* @param pd
* @return
*/
PageData findResult(PageData pd)throws Exception;
}

View File

@ -0,0 +1,31 @@
package com.zcloud.service.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.io.File;
import java.util.List;
/**
*
* luoxiaobao
* 2021-10-08
* www.zcloudchina.com
*/
public interface StageStudentRelationService {
/**()
* @param pd
* @throws Exception
*/
List<PageData> listStudentTask(PageData pd)throws Exception;
/**()
* @param pd
* @throws Exception
*/
List<PageData> listExport(PageData pd)throws Exception;
}

View File

@ -0,0 +1,22 @@
package com.zcloud.service.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-07-04
* www.zcloudchina.com
*/
public interface StageexampaperService {
/**id
* @param pd
* @throws Exception
*/
PageData getDataById(PageData pd)throws Exception;
}

View File

@ -0,0 +1,30 @@
package com.zcloud.service.onlinexxks;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* 线-
* luoxiaobao
* 2021-12-20
* www.zcloudchina.com
*/
public interface StudyTaskService {
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd)throws Exception;
List<PageData> getcurriculumAllBystudyTaskId(PageData pd)throws Exception;
List<PageData> getAllCourseware(PageData pd)throws Exception;
List<PageData> listAll(PageData pd)throws Exception;
List<PageData> listExport(PageData pd)throws Exception;
}

View File

@ -0,0 +1,37 @@
package com.zcloud.service.onlinexxks.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.onlinexxks.*;
import com.zcloud.service.onlinexxks.StageExamPaperQuestionService;
import com.zcloud.util.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-10-08
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class StageExamPaperQuestionServiceImpl implements StageExamPaperQuestionService{
@Autowired
private StageExamPaperQuestionMapper stageexampaperquestionMapper;
/**(ID)
* @param pd
* @throws Exception
*/
@Override
public List<PageData> findByExamPaper(PageData pd) {
return stageexampaperquestionMapper.findByExamPaper(pd);
}
}

View File

@ -0,0 +1,36 @@
package com.zcloud.service.onlinexxks.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.onlinexxks.StageExamRecordMapper;
import com.zcloud.service.onlinexxks.StageExamRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-15
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class StageExamRecordServiceImpl implements StageExamRecordService{
@Autowired
private StageExamRecordMapper stageexamrecordMapper;
/**
* @param
* @throws Exception
*/
@Override
public List<PageData> findByExam(PageData pd) throws Exception {
return stageexamrecordMapper.findByExam(pd);
}
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.onlinexxks.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.onlinexxks.StageExamMapper;
import com.zcloud.service.onlinexxks.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-15
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class StageExamServiceImpl implements StageExamService{
@Autowired
private StageExamMapper stageExamMapper;
@Autowired
private StageExamRecordService stageExamRecordService;
@Autowired
private StageStudentRelationService stageStudentRelationService;
@Autowired
private StudyTaskService studyTaskService;
@Autowired
private StageexampaperService stageExamPaperService;
@Autowired
private StageExamService stageExamService;
/**
* @param
* @throws Exception
*/
@Override
public PageData findResult(PageData pd) throws Exception {
List<PageData> dataList = stageExamMapper.findByPaperUser(pd); // 考试成绩 STAGEEXAM_ID
if (dataList.size()>0) {
PageData data = dataList.get(0);
pd.put("STAGEEXAM_ID", data.getString("STAGEEXAM_ID"));
List<PageData> questionList = stageExamRecordService.findByExam(pd); // 考试详情 STAGEEXAM_ID
PageData studyTaskData = studyTaskService.findById(data); //任务
PageData stageexampaperData = stageExamPaperService.getDataById(data); //试卷
data.put("studyTaskData", studyTaskData);
data.put("stageexampaperData", stageexampaperData);
data.put("QUESTIONLIST", questionList);
return data;
}
return new PageData();
}
}

View File

@ -0,0 +1,88 @@
package com.zcloud.service.onlinexxks.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.onlinexxks.StageStudentRelationMapper;
import com.zcloud.service.onlinexxks.StageStudentRelationService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
*
* luoxiaobao
* 2021-10-08
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class StageStudentRelationServiceImpl implements StageStudentRelationService{
@Autowired
private StageStudentRelationMapper stageStudentRelationMapper;
@Override
public List<PageData> listStudentTask(PageData pd) throws Exception {
return stageStudentRelationMapper.listStudentTask(pd);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listExport(PageData pd)throws Exception{
List<PageData> explist = new ArrayList<>();
List<PageData> varList = stageStudentRelationMapper.listExport(pd);
for (PageData pd2 : varList) {
int count = 0;
PageData vpd = new PageData();
String id = pd2.getString("STAGESTUDENTRELATION_ID");
vpd.put("var" + (1 + count), pd2.getString("CORP_NAME"));
vpd.put("var" + (2 + count), pd2.getString("STUDY_NAME")); // 学习任务名称
vpd.put("var" + (3 + count), pd2.getString("PEIXUE_START_TIME")); //培训开始时间
vpd.put("var" + (4 + count), pd2.getString("PEIXUE_END_TIME")); //培训结束时间
vpd.put("var" + (5 + count), pd2.getString("USER_NAME")); //姓名
vpd.put("var" + (6 + count), pd2.getString("PHONE")); //电话
vpd.put("var" + (7 + count), pd2.get("DEPARTMENT_NAME").toString()); //部门
vpd.put("var" + (8 + count), Tools.isEmpty(pd2.get("POSTNAME")) ? "" : pd2.get("POSTNAME").toString()); // 岗位
vpd.put("var" + (9 + count), pd2.get("SUM_CLASSHOUR").toString()); // 任务学时(分钟)
vpd.put("var" + (10 + count), pd2.get("COMPLETE_CLASSHOUR").toString()); // 已学习学时(分钟)
Double sum = 0.0;
if (!Tools.isEmpty(pd2.get("SUM_CLASSHOUR"))) {
sum = Double.parseDouble(pd2.get("SUM_CLASSHOUR").toString());
}
Double complete = 0.0;
if (!Tools.isEmpty(pd2.get("COMPLETE_CLASSHOUR"))) {
complete = Double.parseDouble(pd2.get("COMPLETE_CLASSHOUR").toString());
}
vpd.put("var" + (11 + count), complete >= sum ? "学习完" : "学习中"); // 学习状态
vpd.put("var" + (12 + count), "-1".equals(pd2.get("STAGEEXAMSCORE").toString()) ? "-" : pd2.get("STAGEEXAMSCORE").toString()); // 考试成绩
String status = "已结束";
Double stageExamScore = 0.0;
if (!Tools.isEmpty(pd2.get("STAGEEXAMSCORE"))) {
stageExamScore = Double.parseDouble(pd2.get("STAGEEXAMSCORE").toString());
}
Double passScore = 0.0;
if (!Tools.isEmpty(pd2.get("PASSSCORE"))) {
passScore = Double.parseDouble(pd2.get("PASSSCORE").toString());
}
String now = DateUtil.getDay();
if ("-1".equals(pd2.get("STAGEEXAMSCORE").toString())) {
status = "未开始";
} else if (stageExamScore >= passScore) {
status = "已通过";
} else {
status = "未通过";
}
vpd.put("var" + (13 + count), status); // 考试结果
explist.add(vpd);
}
return explist;
}
}

View File

@ -0,0 +1,37 @@
package com.zcloud.service.onlinexxks.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.onlinexxks.StageexampaperMapper;
import com.zcloud.service.onlinexxks.StageStudentRelationService;
import com.zcloud.service.onlinexxks.StageexampaperService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
*
* luoxiaobao
* 2021-07-04
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class StageexampaperServiceImpl implements StageexampaperService{
@Autowired
private StageexampaperMapper stageexampaperMapper;
@Autowired
private StageStudentRelationService stageStudentRelationService;
public PageData getDataById(PageData pd)throws Exception{
return stageexampaperMapper.findById(pd);
}
}

View File

@ -0,0 +1,93 @@
package com.zcloud.service.onlinexxks.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.onlinexxks.StudyTaskMapper;
import com.zcloud.service.onlinexxks.StudyTaskService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/**
* 线-
* luoxiaobao
* 2021-12-20
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class StudyTaskServiceImpl implements StudyTaskService {
@Autowired
private StudyTaskMapper studytaskMapper;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return studytaskMapper.findById(pd);
}
public List<PageData> getcurriculumAllBystudyTaskId(PageData pd)throws Exception{
return studytaskMapper.getcurriculumAllBystudyTaskId(pd);
}
/**+
* @param pd
* @throws Exception
*/
public List<PageData> getAllCourseware(PageData pd)throws Exception{
return studytaskMapper.getAllCourseware(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return studytaskMapper.listAll(pd);
}
@Override
public List<PageData> listExport(PageData pd) throws Exception {
List<PageData> explist = new ArrayList<>();
List<PageData> varList = studytaskMapper.listAll(pd);
for (PageData pd2 : varList) {
int count = 0;
PageData vpd = new PageData();
String id = pd2.getString("STUDYTASK_ID");
vpd.put("var" + (1 + count), pd2.getString("CORP_NAME"));
vpd.put("var" + (2 + count), pd2.getString("STUDY_NAME")); // 学习任务名称
vpd.put("var" + (3 + count), pd2.getString("train_type_name")); //培训行业类型
vpd.put("var" + (4 + count), pd2.getString("post_type_name")); //岗位培训类型
vpd.put("var" + (5 + count), pd2.getString("PEIXUE_START_TIME")); //培训开始时间
vpd.put("var" + (6 + count), pd2.getString("PEIXUE_END_TIME")); //培训结束时间
vpd.put("var" + (7 + count), pd2.get("SUM_CLASSHOUR").toString()); //任务课时(分钟)
vpd.put("var" + (8 + count), pd2.get("userCount").toString()); // 应参考人数
vpd.put("var" + (9 + count), pd2.get("cj").toString()); // 参考人数
vpd.put("var" + (10 + count), pd2.get("hg").toString()); // 合格人数
String status = "已结束";
String now = DateUtil.getDay();
if (DateUtil.getDaySub(now, pd2.getString("PEIXUE_START_TIME")) > 0) {
status = "未开始";
} else if (DateUtil.getDaySub(pd2.getString("PEIXUE_END_TIME"), now) > 0) {
status = "已结束";
} else {
status = "进行中";
}
vpd.put("var" + (11 + count), status); // 状态
explist.add(vpd);
}
return explist;
}
}

View File

@ -1,6 +1,8 @@
package com.zcloud.service.superviseInspect;
import java.util.List;
import java.util.Map;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -61,5 +63,6 @@ public interface SuperviseInspectHiddenService{
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
Map<String, Object> listExport(PageData pd)throws Exception;
}

View File

@ -1,6 +1,8 @@
package com.zcloud.service.superviseInspect;
import java.util.List;
import java.util.Map;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -54,5 +56,11 @@ public interface SuperviseInspectService{
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
/**
* @param
* @throws Exception
*/
Map<String,Object> listExport(PageData pd)throws Exception;
}

View File

@ -1,6 +1,12 @@
package com.zcloud.service.superviseInspect.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zcloud.service.superviseInspect.SuperviseInspectFilesService;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -21,6 +27,8 @@ public class SuperviseInspectHiddenServiceImpl implements SuperviseInspectHidden
@Autowired
private SuperviseInspectHiddenMapper superviseinspecthiddenMapper;
@Autowired
private SuperviseInspectFilesService superviseInspectFilesService;
/**
* @param pd
@ -86,5 +94,152 @@ public class SuperviseInspectHiddenServiceImpl implements SuperviseInspectHidden
superviseinspecthiddenMapper.deleteAll(ArrayDATA_IDS);
}
@Override
public Map<String,Object> listExport(PageData pd) throws Exception {
Map<String,Object> dataMap = new HashMap<>();
List<PageData> varList = new ArrayList<>();
List<PageData> dataList = superviseinspecthiddenMapper.listExport(pd);
PageData f = new PageData();
f.put("TYPE","3");
List<PageData> img3List = superviseInspectFilesService.listAll(f);
f.put("TYPE","4");
List<PageData> img4List = superviseInspectFilesService.listAll(f);
Map<String, Integer> imgCount = new HashMap<>();
Integer imgTypeMaxCount3 = 1,imgTypeMaxCount4 = 1;
Map<String, List<String>> imgMap = new HashMap<>();
for (int i = 0; i < img3List.size(); i++) {
if (Tools.isEmpty(img3List.get(i).get("TYPE"))) {
continue;
}
if (Tools.isEmpty(img3List.get(i).get("FOREIGN_KEY"))) {
continue;
}
List<String> list = new ArrayList<>();
String key = img3List.get(i).getString("FOREIGN_KEY") + ";" + img3List.get(i).get("TYPE");
if (imgMap.containsKey(key)) {
list = imgMap.get(key);
}
list.add(img3List.get(i).getString("FILEPATH"));
imgMap.put(key, list);
String imgType = img3List.get(i).get("TYPE").toString();
Integer count = 1;
if (imgCount.containsKey(key)) {
count = imgCount.get(key) + 1;
}
if ("3".equals(imgType)) {
if (imgTypeMaxCount3 < count) {
imgTypeMaxCount3 = count;
}
}
imgCount.put(key, count);
}
for (int i = 0; i < img4List.size(); i++) {
if (Tools.isEmpty(img4List.get(i).get("TYPE"))) {
continue;
}
if (Tools.isEmpty(img4List.get(i).get("FOREIGN_KEY"))) {
continue;
}
List<String> list = new ArrayList<>();
String key = img4List.get(i).getString("FOREIGN_KEY") + ";" + img4List.get(i).get("TYPE");
if (imgMap.containsKey(key)) {
list = imgMap.get(key);
}
list.add(img4List.get(i).getString("FILEPATH"));
imgMap.put(key, list);
String imgType = img4List.get(i).get("TYPE").toString();
Integer count = 1;
if (imgCount.containsKey(key)) {
count = imgCount.get(key) + 1;
}
if ("4".equals(imgType)) {
if (imgTypeMaxCount4 < count) {
imgTypeMaxCount4 = count;
}
}
imgCount.put(key, count);
}
for (PageData pd2 : dataList) {
int count = 0;
PageData vpd = new PageData();
String id = pd2.getString("SUPERVISE_INSPECT_HIDDEN_ID");
vpd.put("var" + (1 + count), pd2.get("CORP_NAME").toString()); // 被检查企业
vpd.put("var" + (2 + count), Tools.isEmpty(pd2.get("INSPECT_DEPARTMENT_NAME")) ? "" : pd2.get("INSPECT_DEPARTMENT_NAME").toString()); // 检查部门
vpd.put("var" + (3 + count), Tools.isEmpty(pd2.get("INSPECT_USER_NAME")) ? "" : pd2.get("INSPECT_USER_NAME").toString()); //检查人
vpd.put("var" + (4 + count), Tools.isEmpty(pd2.get("INSPECTTIME")) ? "" : pd2.get("INSPECTTIME").toString()); //检查时间
vpd.put("var" + (5 + count), Tools.isEmpty(pd2.get("HIDDENDESCR")) ? "" : pd2.get("HIDDENDESCR").toString()); //隐患描述
vpd.put("var" + (6 + count), Tools.isEmpty(pd2.get("HIDDENPART")) ? "" : pd2.get("HIDDENPART").toString()); //隐患部位
vpd.put("var" + (7 + count), Tools.isEmpty(pd2.get("HIDDENLEVELNAME")) ? "" : pd2.get("HIDDENLEVELNAME").toString()); //隐患级别
vpd.put("var" + (8 + count), Tools.isEmpty(pd2.get("DISCOVER_TIME")) ? "" : pd2.get("DISCOVER_TIME").toString()); // 发现时间
vpd.put("var" + (9 + count), Tools.isEmpty(pd2.get("RECTIFY_DEADLINE")) ? "" : pd2.get("RECTIFY_DEADLINE").toString()); // 整改截止时间
vpd.put("var" + (10 + count), Tools.isEmpty(pd2.get("DISPOSE")) ? "" : pd2.get("DISPOSE").toString()); // 隐患处置
int state = Tools.isEmpty(pd2.get("STATE")) ? 0 : Integer.parseInt(pd2.get("STATE").toString());
vpd.put("var" + (11 + count), state == 1 ? "待整改" : (state == 2 ? "待复查" : (state == 3 ? "已复查" : ""))); // 隐患状态
List<String> yhImg = imgMap.get(id + ";3");
for (int i = 0; i < imgTypeMaxCount3; i++) {
if (null != yhImg) {
if (i < yhImg.size()) {
vpd.put("img" + (12 + count + i), yhImg.get(i));// 方案图片
} else {
vpd.put("img" + (12 + count + i), "");
}
} else {
vpd.put("img" + (12 + count + i), "");
}
}
count += imgTypeMaxCount3;
vpd.put("var" + (12 + count), state > 1 ? Tools.isEmpty(pd2.get("RECTIFYER_NAME")) ? "" : pd2.get("RECTIFYER_NAME").toString() : ""); // 整改人
vpd.put("var" + (13 + count), state > 1 ? Tools.isEmpty(pd2.get("RECTIFY_TIME")) ? "" : pd2.get("RECTIFY_TIME").toString() : ""); // 整改时间
vpd.put("var" + (14 + count), state > 1 ? Tools.isEmpty(pd2.get("RECTIFY_DESCR")) ? "" : pd2.get("RECTIFY_DESCR").toString() : ""); // 整改描述
List<String> zgImg = imgMap.get(id + ";4");
for (int i = 0; i < imgTypeMaxCount4; i++) {
if (null != zgImg) {
if (i < zgImg.size()) {
vpd.put("img" + (15 + count + i), zgImg.get(i));// 方案图片
} else {
vpd.put("img" + (15 + count + i), "");
}
} else {
vpd.put("img" + (15 + count + i), "");
}
}
count += imgTypeMaxCount4;
int qualified = Tools.isEmpty(pd2.get("QUALIFIED")) ? 0 : Integer.parseInt(pd2.get("QUALIFIED").toString());
vpd.put("var" + (15 + count), state > 2 ? (qualified == 1 ? "合格" : (qualified == 0 ? "不合格" : "")) : ""); // 复查结果
vpd.put("var" + (16 + count), state > 2 ? Tools.isEmpty(pd2.get("REVIEW_TIME")) ? "" : pd2.get("REVIEW_TIME").toString() : ""); // 复查时间
varList.add(vpd);
}
dataMap.put("varList", varList);
List<String> titles = new ArrayList<String>();
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("隐患处置");
titles.add("隐患状态");
for (int i = 0; i < imgTypeMaxCount3; i++) {
titles.add("隐患图片"); // 9
}
titles.add("整改人"); //8
titles.add("整改时间"); //8
titles.add("整改描述"); //8
for (int i = 0; i < imgTypeMaxCount4; i++) {
titles.add("整改图片"); // 9
}
titles.add("复查结果"); //8
titles.add("复查时间"); //8
dataMap.put("titles", titles);
return dataMap;
}
}

View File

@ -1,6 +1,9 @@
package com.zcloud.service.superviseInspect.impl;
import java.util.List;
import java.util.*;
import com.zcloud.service.superviseInspect.SuperviseInspectFilesService;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -21,6 +24,8 @@ public class SuperviseInspectServiceImpl implements SuperviseInspectService{
@Autowired
private SuperviseInspectMapper superviseinspectMapper;
@Autowired
private SuperviseInspectFilesService superviseInspectFilesService;
/**
* @param pd
@ -78,5 +83,88 @@ public class SuperviseInspectServiceImpl implements SuperviseInspectService{
superviseinspectMapper.deleteAll(ArrayDATA_IDS);
}
@Override
public Map<String,Object> listExport(PageData pd) throws Exception {
Map<String,Object> dataMap = new HashMap<>();
List<PageData> varList = new ArrayList<>();
List<PageData> dataList = superviseinspectMapper.listExport(pd);
PageData f = new PageData();
f.put("TYPE","2");
List<PageData> img2List = superviseInspectFilesService.listAll(f);
Map<String, Integer> imgCount = new HashMap<>();
Integer imgTypeMaxCount2 = 1;
Map<String, List<String>> imgMap = new HashMap<>();
for (int i = 0; i < img2List.size(); i++) {
if (Tools.isEmpty(img2List.get(i).get("TYPE"))) {
continue;
}
if (Tools.isEmpty(img2List.get(i).get("FOREIGN_KEY"))) {
continue;
}
List<String> list = new ArrayList<>();
String key = img2List.get(i).getString("FOREIGN_KEY") + ";" + img2List.get(i).get("TYPE");
if (imgMap.containsKey(key)) {
list = imgMap.get(key);
}
list.add(img2List.get(i).getString("FILEPATH"));
imgMap.put(key, list);
String imgType = img2List.get(i).get("TYPE").toString();
Integer count = 1;
if (imgCount.containsKey(key)) {
count = imgCount.get(key) + 1;
}
if ("2".equals(imgType)) {
if (imgTypeMaxCount2 < count) {
imgTypeMaxCount2 = count;
}
}
imgCount.put(key, count);
}
for (PageData pd2 : dataList) {
int count = 0;
PageData vpd = new PageData();
String id = pd2.getString("SUPERVISE_INSPECT_ID");
vpd.put("var" + (1 + count), pd2.getString("CORP_NAME")); // 被检查企业
vpd.put("var" + (2 + count), pd2.getString("INSPECT_DEPARTMENT_NAME")); // 检查部门
vpd.put("var" + (3 + count), pd2.getString("INSPECTTYPENAME")); //检查类型
vpd.put("var" + (4 + count), pd2.getString("INSPECTTIME")); //检查时间
vpd.put("var" + (5 + count), pd2.getString("INSPECT_USER_NAME")); //检查人
vpd.put("var" + (6 + count), Tools.isEmpty(pd2.get("HASEXPERTS")) ? "" : ("1".equals(pd2.get("HASEXPERTS").toString()) ? "是" : "否")); //是否邀请专家
vpd.put("var" + (7 + count), pd2.getString("CONTENT")); //检查内容
vpd.put("var" + (8 + count), pd2.get("HIDDENNUM").toString()); // 隐患数量
List<String> ysImg = imgMap.get(pd2.getString("SUPERVISE_INSPECT_ID") + ";2");
for (int i = 0; i < imgTypeMaxCount2; i++) {
if (null != ysImg) {
if (i < ysImg.size()) {
vpd.put("img" + (9 + count + i), ysImg.get(i));// 方案图片
} else {
vpd.put("img" + (9 + count + i), "");
}
} else {
vpd.put("img" + (9 + count + i), "");
}
}
varList.add(vpd);
}
dataMap.put("varList", varList);
List<String> titles = new ArrayList<String>();
titles.add("被检查企业"); //1
titles.add("检查部门"); //2
titles.add("检查类型"); //3
titles.add("检查时间"); //4
titles.add("检查人"); //5
titles.add("是否邀请专家"); //6
titles.add("检查内容"); //7
titles.add("隐患数量"); //8
for (int i = 0; i < imgTypeMaxCount2; i++) {
titles.add("现场检查照片"); // 9
}
dataMap.put("titles", titles);
return dataMap;
}
}

View File

@ -87,7 +87,7 @@ public interface Department2Service{
*/
public String getDEPARTMENT_IDS(String DEPARTMENT_ID) throws Exception;
public Object listAll(PageData pd)throws Exception;
public List<PageData> listAll(PageData pd)throws Exception;
// public List<PageData> listAllMent(PageData pd) throws Exception;
//

View File

@ -178,4 +178,10 @@ public interface Users2Service {
* @throws Exception
*/
public void deleteByCorp(PageData pd)throws Exception;
List<PageData> listAllForExport(PageData pd)throws Exception;
List<PageData> listExport(PageData pd, String[] regKeys)throws Exception;
List<PageData> listAllUser(PageData corpIdPd)throws Exception;
}

View File

@ -1,6 +1,7 @@
package com.zcloud.service.system;
import java.util.List;
import java.util.Map;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -214,4 +215,15 @@ public interface UsersService {
* @throws Exception
*/
void editCorpUser(PageData pd)throws Exception;
List<Map<String,Object>> getDaochuReglatory (PageData pd)throws Exception;
List<Map<String,Object>> getDaochuPrevention (PageData pd)throws Exception;
/**()
* @param pd
* @return
* @throws Exception
*/
List<PageData> listExport(PageData pd, String[] regKeys)throws Exception;
}

View File

@ -69,11 +69,11 @@ public class Department2ServiceImpl implements Department2Service{
}
/**
* @param page
* @param
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return (List<PageData>)departmentMapper.listAll(pd);
return departmentMapper.listAll(pd);
}
/**id
* @param pd

View File

@ -1,18 +1,18 @@
package com.zcloud.service.system.impl;
import java.util.List;
import java.util.*;
import com.zcloud.service.bus.ImgFilesService;
import com.zcloud.util.Tools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.entity.system.User;
import com.zcloud.mapper.datasource.system.UsersMapper;
import com.zcloud.mapper.dsno2.system.Users2Mapper;
import com.zcloud.service.system.Users2Service;
import com.zcloud.service.system.UsersService;
/**
*
@ -23,8 +23,11 @@ import com.zcloud.service.system.UsersService;
@Transactional //开启事物
public class Users2ServiceImpl implements Users2Service {
private static final Logger log = LoggerFactory.getLogger(Users2ServiceImpl.class);
@Autowired
private Users2Mapper usersMapper;
@Autowired
private ImgFilesService imgFilesService;
/**
* @param pd
@ -239,4 +242,105 @@ public class Users2ServiceImpl implements Users2Service {
usersMapper.updateUserRole(pd);
}
public List<PageData> listAllForExport(PageData pd)throws Exception{
return usersMapper.listAllForExport(pd);
}
/**()
* @param pd
* @return
* @throws Exception
*/
public List<PageData> listAllUser(PageData pd)throws Exception{
return usersMapper.listAllUser(pd);
}
@Override
public List<PageData> listExport(PageData pd, String[] regKeys) throws Exception {
List<PageData> explist = new ArrayList<>();
List<PageData> userList = usersMapper.listAllForExport(pd);
List<PageData> userCerList = new ArrayList<>();
PageData userCerPd = new PageData();
userCerPd.put("TYPE","18");
userCerList = imgFilesService.listAll(userCerPd);
Map<String, Integer> imgCount = new HashMap<>();
Integer imgTypeMaxCount18 = 1;
Map<String, List<String>> imgMap = new HashMap<>();
for (int i = 0; i < userCerList.size(); i++) {
if (Tools.isEmpty(userCerList.get(i).get("TYPE"))) {
continue;
}
if (Tools.isEmpty(userCerList.get(i).get("FOREIGN_KEY"))) {
continue;
}
List<String> list = new ArrayList<>();
String key = userCerList.get(i).getString("FOREIGN_KEY") + ";" + userCerList.get(i).get("TYPE");
if (imgMap.containsKey(key)) {
list = imgMap.get(key);
}
list.add(userCerList.get(i).getString("FILEPATH"));
imgMap.put(key, list);
String imgType = userCerList.get(i).get("TYPE").toString();
Integer count = 1;
if (imgCount.containsKey(key)) {
count = imgCount.get(key) + 1;
}
if ("18".equals(imgType)) {
if (imgTypeMaxCount18 < count) {
imgTypeMaxCount18 = count;
}
}
imgCount.put(key, count);
}
for (PageData user : userList) {
int count = 0;
PageData vpd = new PageData();
String userId = user.getString("USER_ID");
vpd.put("var" + (1 + count), user.getString("CORP_NAME"));
vpd.put("var" + (2 + count), user.getString("NAME")); // 姓名
vpd.put("var" + (3 + count), user.getString("USERNAME")); //登录账号
vpd.put("var" + (4 + count), user.getString("DEPARTMENT_NAME")); //部门
vpd.put("var" + (5 + count), user.getString("POST_NAME")); //岗位
vpd.put("var" + (6 + count), user.getString("USERNAME")); //手机号
vpd.put("var" + (7 + count), user.getString("SEX_NAME")); //性别
vpd.put("var" + (8 + count), user.getString("DUTIES_NAME")); // 职务
vpd.put("var" + (9 + count), user.getString("EMAIL")); // 邮箱
vpd.put("var" + (10 + count), Tools.isEmpty(user.get("STATUS")) ? "" : ("1".equals(user.getString("STATUS")) ? "禁用" : "启用")); // 状态
vpd.put("var" + (11 + count), Tools.isEmpty(user.get("ISSTUDENT")) ? "" : ("true".equals(user.getString("ISSTUDENT")) ? "是" : "否")); // 是否在线学习人员
vpd.put("var" + (12 + count), user.getString("USER_ID_CARD")); // 身份证号
vpd.put("var" + (13 + count), user.getString("NATION_NAME")); // 民族
vpd.put("var" + (14 + count), user.getString("POLITICAL_OUTLOOK_NAME")); // 政治面貌
vpd.put("var" + (15 + count), user.getString("DATE_OF_BIRTH")); // 出生年月
vpd.put("var" + (16 + count), user.getString("DEGREE_OF_EDUCATION_NAME")); // 文化程度
vpd.put("var" + (17 + count), user.getString("PERSONNEL_TYPE_NAME")); // 人员类型
vpd.put("var" + (18 + count), user.getString("TITLE_NAME")); // 职称
vpd.put("var" + (19 + count), user.getString("TYPE_OF_WORK_NAME")); // 工种
vpd.put("var" + (20 + count), user.getString("ENTRY_DATE")); // 入职日期
vpd.put("var" + (21 + count), user.getString("WORKING_DATE")); // 参加工作日期
vpd.put("var" + (22 + count), user.getString("INCUMBENCY_NAME")); // 在职情况
if (!Tools.isEmpty(user.get("USERAVATARPREFIX")) && !Tools.isEmpty(user.get("USERAVATARURL_CONVERT"))) {
vpd.put("base64" + (23 + count), user.getString("USERAVATARPREFIX"));
vpd.put("base64" + (23 + count) + "_url", user.getString("USERAVATARURL_CONVERT"));
} else {
vpd.put("base64" + (23 + count), "");
vpd.put("base64" + (23 + count) + "_url", "");
}
List<String> userCerImg = imgMap.get(userId + ";18");
for (int i = 0; i < imgTypeMaxCount18; i++) {
if (null != userCerImg) {
if (i < userCerImg.size()) {
vpd.put("img" + (24 + i), userCerImg.get(i));
} else {
vpd.put("img" + (24 + i), "");
}
} else {
vpd.put("img" + (24 + i), "");
}
}
explist.add(vpd);
}
return explist;
}
}

View File

@ -1,7 +1,8 @@
package com.zcloud.service.system.impl;
import java.util.List;
import java.util.*;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -292,4 +293,84 @@ public class UsersServiceImpl implements UsersService {
public void editCorpUser (PageData pd) throws Exception{
usersMapper.editCorpUser(pd);
}
public List<Map<String,Object>> getDaochuReglatory (PageData page)throws Exception{
List<Map<String,Object>> list = new ArrayList<>();
Map<String,Object> map = new HashMap<>();
String vals[] = {"姓名","登录账号","部门","职务级别","手机号","性别","职务","邮箱","状态"};
String keys[] = {"NAME","USERNAME","DEPARTMENT_NAME","jobLevenName","PHONE","SEX","JOB","EMAIL","STATUS"};
for (int i =0 ;i<vals.length; i++){
map = new HashMap<>();
// map.put(keys[i],vals[i]);
map.put("name",vals[i]);
map.put("key",keys[i]);
list.add(map);
}
return list;
}
public List<Map<String,Object>> getDaochuPrevention (PageData page)throws Exception{
List<Map<String,Object>> list = new ArrayList<>();
Map<String,Object> map = new HashMap<>();
String vals[] = {
"姓名","登录账号","部门","岗位","手机号","性别","职务","邮箱","状态"
,"是否在线学习人员","身份证号","民族"
,"政治面貌","出生年月","文化程度","人员类型","职称"
,"工种","入职日期","参加工作日期","在职情况"
,"学习人员照片","证书照片"
};
String keys[] = {
"NAME","USERNAME","DEPARTMENT_NAME","POST_NAME","USERNAME","SEX_NAME","DUTIES_NAME","EMAIL","STATUS"
,"ISSTUDENT","USER_ID_CARD","NATION_NAME"
,"POLITICAL_OUTLOOK_NAME","DATE_OF_BIRTH","DEGREE_OF_EDUCATION_NAME","PERSONNEL_TYPE_NAME","TITLE_NAME"
,"TYPE_OF_WORK_NAME","ENTRY_DATE","WORKING_DATE","INCUMBENCY_NAME","USERAVATAR","userCerImg"
};
for (int i =0 ;i<vals.length; i++){
map = new HashMap<>();
// map.put(keys[i],vals[i]);
map.put("name",vals[i]);
map.put("key",keys[i]);
list.add(map);
}
return list;
}
@Override
public List<PageData> listExport(PageData pd, String[] regKeys) throws Exception {
List<PageData> varOList = listAll(pd);
List<PageData> varList = new ArrayList<PageData>();
for(int i=0;i<varOList.size();i++){
PageData vpd = new PageData();
vpd.put("var" + 1, "唐山文旅集团");
for(int j=0;j<regKeys.length;j++){
if ("SEX".equals(regKeys[j])){
vpd.put("var" + (j+2), "男");
if(!Tools.isEmpty(varOList.get(i).get("SEX"))){
if("1".equals(varOList.get(i).get("SEX").toString())){
vpd.put("var" + (j+2), "女");
}
}
}else if ("STATUS".equals(regKeys[j])){
vpd.put("var" + (j+2), "启用");
if(!Tools.isEmpty(varOList.get(i).get("STATUS"))){
if("1".equals(varOList.get(i).get("STATUS").toString())){
vpd.put("var" + (j+2), "禁用");
}
}
}else{
if(Tools.isEmpty(varOList.get(i).get(regKeys[j]))){
vpd.put("var" + (j+2), "");
}else{
vpd.put("var" + (j+2), varOList.get(i).get(regKeys[j]).toString());
}
}
}
varList.add(vpd);
}
return varList;
}
}

View File

@ -34,6 +34,9 @@ public class Const {
public static final String FILEPATHREGNOTICE = "/uploadFiles/regNotice/"; //监管公告文件
public static final String FILEPATHMAJORSOURCES = "/uploadFiles/majorSources/"; //重大危险源附件
public static final String FILEPATHSUPERVISE = "/uploadFiles/supervise/"; //文件上传路径-监督检查文件
public static final String FILEPATHWORDTEMPLATE = "/uploadFiles/wordTemplate/"; //word导出模板文件夹
public static final String TEMPZIPFILES = "/uploadFiles/tempZip/"; //文件上传路径
public static final String ARCHIVESPDFFILE = "/uploadFiles/archivesPdfFile/"; // 档案pdf 文件
public static final Integer NOTICEWIDTHMAX = 700; // 公告上传图片,最大宽度
public static final String FILEACTIVITI = "uploadFiles/activitiFile/"; //工作流生成XML和PNG目录
@ -62,10 +65,11 @@ public class Const {
public static final String POST_ID = "POST_ID"; //当前用户所属企业
public static final String USER_ID = "USER_ID"; //当前用户userid
public static final String FILEURL = "/mnt/wlaq/file/"; //文件服务器地址
// public static final String HTTPFILEURL = "http://36.133.193.8:8086/wlaqfile"; //文件服务器地址(测试)
public static final String FILEURL = "/home/proj/wlaq/apache-tomcat-8.5.100-file/webapps/wlaq/"; //文件服务器地址(测试)
public static final String HTTPFILEURL = "http://192.168.20.240:8463/wlaq/"; //文件服务器地址(测试)
// public static final String FILEURL = "/mnt/wlaq/file/"; //文件服务器地址
// public static final String HTTPFILEURL = "http://192.168.10.69:8080/file/"; //文件服务器地址(正式内网)
public static final String HTTPFILEURL = "https://wlqy.zcloudchina.com/file/"; //文件服务器地址
// public static final String HTTPFILEURL = "https://wlqy.zcloudchina.com/file/"; //文件服务器地址
public static final String USER_CITY_CODE = "SESSION_USER_CITY_CODE"; //session cityCode
public static final String USER_CITY_NAME = "SESSION_USER_CITY_NAME"; //session cityCode

View File

@ -18,6 +18,7 @@ public class DateUtil {
private final static SimpleDateFormat sdfDays = new SimpleDateFormat("yyyyMMdd");
private final static SimpleDateFormat sdfTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private final static SimpleDateFormat sdfTimes = new SimpleDateFormat("yyyyMMddHHmmss");
private final static SimpleDateFormat sdfTimesSSS = new SimpleDateFormat("yyyyMMddHHmmssSSS");
/**
* YYYY
@ -341,6 +342,15 @@ public class DateUtil {
return thisMonthEndTime;
}
/**
* YYYY
*
* @return
*/
public static String getSdfTimesSSS() {
return sdfTimesSSS.format(new Date());
}
public static void main(String[] args) {
System.out.println(getDays());
System.out.println(getAfterDayWeek("3"));

View File

@ -0,0 +1,192 @@
package com.zcloud.util;
import com.zcloud.entity.PageData;
import net.coobird.thumbnailator.Thumbnails;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.*;
import org.apache.tools.zip.ZipEntry;
import org.springframework.web.servlet.view.document.AbstractXlsxView;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.*;
import java.net.URL;
import java.util.Base64;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipOutputStream;
/**
* EXCEL()
* luoxiaobao
* www.qdkjchina.com
*/
public class ExcelExportCompressImg extends AbstractXlsxView {
public static void main(String[] args) throws IOException {
Thumbnails.of("C:\\Users\\Administrator\\Desktop\\微信图片_20220224094150.jpg").scale(0.3).toFile(new File("F:\\123.jpg"));
}
@Override
protected void buildExcelDocument(Map<String, Object> model,
Workbook workbook, HttpServletRequest request,
HttpServletResponse response) throws Exception {
// TODO Auto-generated method stub
String proPath = PathUtil.getProjectpath();
String beji = Const.HTTPFILEURL;
//beji =beji.replaceAll("\\\\", "/");
Date date = new Date();
XSSFSheet sheet;
XSSFWorkbook book = (XSSFWorkbook) workbook;
sheet = book.createSheet("sheet1");
List<String> titles = (List<String>) model.get("titles");
int len = titles.size();
XSSFCellStyle headerStyle = book.createCellStyle(); //标题样式
headerStyle.setAlignment(HorizontalAlignment.CENTER);
headerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
XSSFFont headerFont = book.createFont(); //标题字体
headerFont.setBold(true);
headerFont.setFontHeightInPoints((short)11);
headerStyle.setFont(headerFont);
short height=25*20;
XSSFRow row = sheet.createRow(0);
if(len>250) {
len = 250;
}
for(int i=0; i<len; i++){ //设置标题
String title = titles.get(i);
row.setRowStyle(headerStyle);
if(title.length()>250) {
row.createCell(i).setCellValue(title.substring(0, 250));
}else {
row.createCell(i).setCellValue(title);
}
}
sheet.getRow(0).setHeight(height);
XSSFCellStyle contentStyle = book.createCellStyle(); //内容样式
XSSFDrawing patriarch = sheet.createDrawingPatriarch();
contentStyle.setAlignment(HorizontalAlignment.CENTER);
List<PageData> varList = (List<PageData>) model.get("varList");
int varCount = varList.size();
for(int i=0; i<varCount; i++){
PageData vpd = varList.get(i);
XSSFRow rows = sheet.createRow(i+1);
for(int j=0;j<len;j++){
String valKey = "var"+(j+1);
String imgKey = "img" +(j+1);
String base64Key = "base64" +(j+1);
if(vpd.containsKey(valKey)) {
String varstr = vpd.getString(valKey) != null ? vpd.getString("var"+(j+1)) : "";
rows.setRowStyle(contentStyle);
rows.createCell(j).setCellValue(varstr);
}
if(vpd.containsKey(base64Key)) {
if(Tools.isEmpty(vpd.get(base64Key))) {
continue;
}
// 1. 解码Base64图片
byte[] imageBytes = Base64.getDecoder().decode(vpd.getString(base64Key+"_url"));
int format = XSSFWorkbook.PICTURE_TYPE_JPEG;
if ("data:image/png;base64,".equals(vpd.getString(base64Key))) {
format = XSSFWorkbook.PICTURE_TYPE_PNG;
}
int pictureIdx = workbook.addPicture(imageBytes, format); // 根据实际图片类型调整
Drawing<?> drawing = sheet.createDrawingPatriarch();
XSSFClientAnchor anchor1 = new XSSFClientAnchor(0, 0, 0, 0,(short) (j), (i+1), (short) (j+1), (i+2));
// 6. 添加图片
drawing.createPicture(anchor1, pictureIdx);
}
if(vpd.containsKey(imgKey)) {
String varstr = vpd.getString(imgKey) != null ? vpd.getString("img"+(j+1)) : "";
if(Tools.isEmpty(varstr)) {
continue;
}
URL url = new URL(beji+varstr);
BufferedImage bufferImg = null;
try {
bufferImg = Thumbnails.of(url).scale(0.3).asBufferedImage();
} catch (Exception e) {
e.printStackTrace();
}
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
if(bufferImg != null) {
ImageIO.write(bufferImg, "jpg", byteArrayOut);
XSSFClientAnchor anchor1 = new XSSFClientAnchor(0, 0, 0, 0,(short) (j), (i+1), (short) (j+1), (i+2));
patriarch.createPicture(anchor1, book.addPicture(byteArrayOut
.toByteArray(), XSSFWorkbook.PICTURE_TYPE_JPEG));
}
}
}
}
// 用户
String filename = DateUtil.date2Str(date, "yyyyMMddHHmmss");
String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE; //文件上传路径
FileOutputStream fileOutputStream = null;
System.out.println(filePath);
try {
fileOutputStream = new FileOutputStream(filePath + filename + ".xlsx");
book.write(fileOutputStream);
fileOutputStream.flush();
} catch (Exception e) {
e.printStackTrace();
} finally {
if(fileOutputStream != null){
try {
fileOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
File excel = new File(filePath + filename + ".xlsx");
FileInputStream in = new FileInputStream(excel);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(bos);
try {
zos.putNextEntry(new ZipEntry(filename+".xlsx"));
byte[] buf = new byte[1024];
int length;
while ((length = in.read(buf)) > 0) {
zos.write(buf, 0, length);
}
zos.closeEntry();
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
zos.close();
}
excel.delete();
response.setHeader("Content-Disposition", "attachment; filename=\"" + filename+".zip" + "\"");
response.setContentType("application/octet-stream;charset=UTF-8");
OutputStream os = response.getOutputStream();
os.write(bos.toByteArray());
os.close();
}
}

View File

@ -1,8 +1,16 @@
package com.zcloud.util;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import javax.servlet.http.HttpServletResponse;
@ -59,4 +67,30 @@ public class FileDownload {
response.flushBuffer();
}
public static String downloadFile(String fileURL, String fileName, String saveDir) throws IOException {
URL url = new URL(fileURL);
if (isURLExists(fileURL)) {
Path targetPath = Paths.get(saveDir, fileName);
System.out.println("下载附件【 " + fileName + " 】 到 【 " + saveDir + " 】");
try (InputStream in = url.openStream()) {
Files.copy(in, targetPath, StandardCopyOption.REPLACE_EXISTING);
}
System.out.println("附件【 " + fileName + " 】 下载完成!");
return "ok";
} else {
System.out.println("附件【 " + fileName + " 】 已不存在!(路径:" + fileURL + "");
return "fail";
}
}
public static boolean isURLExists(String urlString) {
try {
URL url = new URL(urlString);
URLConnection connection = url.openConnection();
connection.connect();
return true;
} catch (IOException e) {
return false;
}
}
}

View File

@ -13,11 +13,13 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.RandomAccessFile;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileChannel.MapMode;
import java.util.Base64;
/**
*
@ -358,4 +360,44 @@ public class FileUtil {
return fileContent.toString();
}
/**
* base64
*
* @throws Exception
*/
public static String encodeBase64File(String url) throws Exception {
ByteArrayOutputStream outPut = new ByteArrayOutputStream(); //网络路径
byte[] data = new byte[1024];
try {
// 创建URL
URL path = new URL(url);
// 创建链接
HttpURLConnection conn = (HttpURLConnection) path.openConnection();
conn.setRequestMethod("GET");
conn.setConnectTimeout(10 * 1000);
if (conn.getResponseCode() != 200) {
return "fail";//连接失败/链接失效/图片不存在
}
InputStream inStream = conn.getInputStream();
int len = -1;
while ((len = inStream.read(data)) != -1) {
outPut.write(data, 0, len);
}
inStream.close();
} catch (IOException e) {
e.printStackTrace();
}
// 对字节数组Base64编码
byte[] encode = Base64.getEncoder().encode(outPut.toByteArray());
String res = new String(encode);
return res;
// File file = new File(url); //本地路径
// FileInputStream inputFile = new FileInputStream(file);
// byte[] buffer = new byte[(int) file.length()];
// inputFile.read(buffer);
// inputFile.close();
// return new BASE64Encoder().encode(buffer);
}
}

View File

@ -1,8 +1,7 @@
package com.zcloud.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.*;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@ -49,6 +48,47 @@ public class FileZip {
}
}
/**
* @param fileName
* @param files
**/
public static void zipList(String fileName, List<File> files) {
ZipOutputStream outputStream1 = null;
FileOutputStream dest = null;
try {
byte[] data = new byte[1024];
dest = new FileOutputStream(fileName);
outputStream1 = new ZipOutputStream(new BufferedOutputStream(dest));
for (int i = 0; i < files.size(); i++) {
int count;
FileInputStream fis = new FileInputStream(files.get(i));
BufferedInputStream bfs = new BufferedInputStream(fis);
ZipEntry entry = new ZipEntry(files.get(i).getName());
outputStream1.putNextEntry(entry);
while ((count = bfs.read(data, 0, 1024)) != -1) {
outputStream1.write(data, 0, count);
}
bfs.close();
fis.close();
}
} catch (Exception e) {
System.out.println("压缩文件失败1");
e.printStackTrace();
} finally {
try {
outputStream1.close();
dest.close();
} catch (IOException e) {
System.out.println("压缩文件失败2");
e.printStackTrace();
}
}
for (File file : files) {
file.delete();
}
}
public static void main(String [] temp){
try {
zip("E:\\ftl","E:\\test.zip");//你要压缩的文件夹 和 压缩后的文件

View File

@ -20,7 +20,7 @@ public class PathUtil {
public static String getProjectpath(){
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getServletContext().getRealPath("/").replaceAll("%20", " ").replaceAll("file:/", "").trim();
return "/" + path;
return path;
}
/**Classpath

View File

@ -14,19 +14,19 @@ import org.springframework.web.multipart.MultipartFile;
public class Smb {
// 正式
private static String host="192.168.10.69";
private static Integer port=22;
private static String user="root";
private static String password="wljt@123456";
private static String basePath="/mnt/wlaq/file/";
// 测试
// private static String host="36.133.193.8";
// private static String host="192.168.10.69";
// private static Integer port=22;
// private static String user="root";
// private static String password="Zykj@zcloud88888";
// private static String password="wljt@123456";
// private static String basePath="/mnt/wlaq/file/";
// 测试
private static String host="192.168.20.240";
private static Integer port=22;
private static String user="root";
private static String password="Zcloud@zcloud240";
private static String basePath="/home/proj/wlaq/apache-tomcat-8.5.100-file/webapps/wlaq/";
public static void sshSftp(MultipartFile file, String fileName,String path) throws Exception {
Session session = null;
Channel channel = null;

View File

@ -0,0 +1,141 @@
package com.zcloud.util;
import com.aspose.words.Document;
import com.aspose.words.ImportFormatMode;
import com.aspose.words.License;
import com.aspose.words.SaveFormat;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
/**
* wordpdf
*
* @author JHY
* @date 2023/03/08
*/
public class WordToPdfUtil {
public static void main(String[] args) {
// doc 或 docx文档 都可以
String filePath = "C:\\Users\\Administrator\\Desktop\\档案详情.doc";
WordToPdfUtil.docToPdf(filePath, filePath + ".pdf");
}
public static boolean mergePdf(List<String> pathList, String pdfPath) throws Exception {
// 验证License 若不验证则转化出的pdf文档会有水印产生
if (!getLicense()) {
return false;
}
if (pathList == null || pathList.size() == 0) {
return false;
}
FileOutputStream os = null;
try {
long old = System.currentTimeMillis();
// 新建一个空白pdf文档
File file = new File(pdfPath);
os = new FileOutputStream(file);
Document word = new Document(pathList.get(0));
for (int i = 1; i < pathList.size(); i++) {
Document wordi = new Document(pathList.get(i));
word.appendDocument(wordi, ImportFormatMode.KEEP_DIFFERENT_STYLES);
}
// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,EPUB, XPS, SWF 相互转换
word.save(os, SaveFormat.PDF);
long now = System.currentTimeMillis();
// 转化用时
System.out.println("pdf合并成功共耗时" + ((now - old) / 1000.0) + "秒");
} catch (Exception e) {
e.printStackTrace();
System.err.println("pdf合并失败:" + e.getMessage());
return false;
} finally {
if (os != null) {
try {
os.flush();
os.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return true;
}
/**
* aspose
*/
private static boolean getLicense() {
boolean result = false;
InputStream is = null;
try {
Resource resource = new ClassPathResource("license.xml");
is = resource.getInputStream();
License aposeLic = new License();
aposeLic.setLicense(is);
result = true;
} catch (Exception e) {
e.printStackTrace();
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return result;
}
/**
* wordpdf
*
* @param wordPath word
* @param pdfPath pdf
* @return boolean /
*/
public static boolean docToPdf(String wordPath, String pdfPath) {
// 验证License 若不验证则转化出的pdf文档会有水印产生
if (!getLicense()) {
return false;
}
FileOutputStream os = null;
try {
long old = System.currentTimeMillis();
// 新建一个空白pdf文档
File file = new File(pdfPath);
os = new FileOutputStream(file);
// inPath是将要被转化的word文档
Document doc = new Document(wordPath);
// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,EPUB, XPS, SWF 相互转换
doc.save(os, SaveFormat.PDF);
long now = System.currentTimeMillis();
// 转化用时
System.out.println("word转换pdf成功共耗时" + ((now - old) / 1000.0) + "秒");
} catch (Exception e) {
System.out.println(wordPath);
System.out.println(pdfPath);
System.err.println("word转pdf失败:" + e.getMessage());
return false;
} finally {
if (os != null) {
try {
os.flush();
os.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return true;
}
}

View File

@ -1,5 +1,5 @@
spring.application.name=qa-regulatory-wlaq
server.port=7061
server.port=8461
#开发
spring.profiles.active=dev

View File

@ -141,7 +141,9 @@
<include refid="tableName"></include> f
WHERE
f.ISDELETE = '0'
<if test="FOREIGN_KEY != null and FOREIGN_KEY != ''">
AND f.FOREIGN_KEY = #{FOREIGN_KEY}
</if>
<if test="TYPE != null and TYPE != ''">
AND f.TYPE = #{TYPE}
</if>

View File

@ -264,4 +264,35 @@
</foreach>
</delete>
<!-- 列表 -->
<select id="listExport" parameterType="pd" resultType="pd">
select
f.SUPERVISE_INSPECT_HIDDEN_ID,
c.CORP_NAME,
group_concat(DISTINCT u.INSPECT_DEPARTMENT_NAME) INSPECT_DEPARTMENT_NAME,
group_concat(DISTINCT u.INSPECT_USER_NAME) INSPECT_USER_NAME,
si.INSPECTTIME,
f.HIDDENDESCR,
f.HIDDENPART,
hl.NAME HIDDENLEVELNAME,
f.DISCOVER_TIME,
f.RECTIFY_DEADLINE,
f.DISPOSE,
f.STATE,
f.RECTIFYER_NAME,
f.RECTIFY_TIME,
f.RECTIFY_DESCR,
f.QUALIFIED,
f.REVIEW_TIME
from BUS_SUPERVISE_INSPECT_HIDDEN f
LEFT JOIN BUS_SUPERVISE_INSPECT si on si.SUPERVISE_INSPECT_ID = f.SUPERVISE_INSPECT_ID and si.ISDELETE = '0'
left join BUS_SUPERVISE_INSPECT_USER u on u.SUPERVISE_INSPECT_ID = si.SUPERVISE_INSPECT_ID and u.ISDELETE = '0'
LEFT JOIN `qa-prevention-wlaq`.BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID and c.ISDELETE = '0'
left join sys_dictionaries hl on hl.BIANMA = f.HIDDENLEVEL
where c.ISDELETE = '0' and si.ISDELETE = '0' and f.ISDELETE = '0' and f.STATE > 0
group by f.SUPERVISE_INSPECT_HIDDEN_ID
order by c.CREATTIME ASC, si.OPERATTIME DESC, f.OPERATTIME desc
</select>
</mapper>

View File

@ -150,4 +150,26 @@
#{item}
</foreach>
</delete>
<!-- 列表 -->
<select id="listExport" parameterType="pd" resultType="pd">
select
f.SUPERVISE_INSPECT_ID,
c.CORP_NAME,
it.NAME INSPECTTYPENAME,
f.INSPECTTIME,
f.CORPINFO_ID,
f.HASEXPERTS,
f.CONTENT,
( select count(h.SUPERVISE_INSPECT_HIDDEN_ID) from bus_supervise_inspect_hidden h where h.SUPERVISE_INSPECT_ID = f.SUPERVISE_INSPECT_ID and h.ISDELETE = '0' ) HIDDENNUM,
group_concat(DISTINCT u.INSPECT_DEPARTMENT_NAME) INSPECT_DEPARTMENT_NAME,
group_concat(DISTINCT u.INSPECT_USER_NAME) INSPECT_USER_NAME
from BUS_SUPERVISE_INSPECT f
left join `qa-prevention-wlaq`.BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID
LEFT JOIN SYS_DICTIONARIES it on it.BIANMA = f.INSPECTTYPE
left join BUS_SUPERVISE_INSPECT_USER u on u.SUPERVISE_INSPECT_ID = f.SUPERVISE_INSPECT_ID and u.ISDELETE = '0'
where f.ISDELETE = '0'
group by f.SUPERVISE_INSPECT_ID
order by c.CREATTIME ASC, f.OPERATTIME DESC
</select>
</mapper>

View File

@ -533,10 +533,37 @@
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include>
u.USER_ID,
u.USERNAME,
u.NAME,
u.SEX,
u.PHONE,
u.JOB,
u.EMAIL,
u.STATUS,
d.NAME AS DEPARTMENT_NAME,
deptLeven.NAME AS jobLevenName
from <include refid="tableName"></include> u
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
left join SYS_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
left join `qa-prevention-wlaq`.sys_dictionaries deptLeven on deptLeven.DICTIONARIES_ID=u.JOB_LEVEL
where u.USERNAME != 'admin' and r.PARENT_ID = '1'
<if test="keyUserName != null and keyUserName != ''"><!-- 用户名称 -->
and u.USERNAME LIKE CONCAT(CONCAT('%', #{keyUserName}),'%')
</if>
<if test="keyDeptLeven != null and keyDeptLeven != ''"><!-- 部门级别 -->
and d.LEVEL = #{keyDeptLeven}
</if>
<if test="keyDeptType != null and keyDeptType != ''"><!-- 单位类型 -->
and d.UNITTYPE = #{keyDeptType}
</if>
<if test="keyDepeName != null and keyDepeName != ''"><!-- 部门名称 -->
and d.NAME LIKE CONCAT(CONCAT('%', #{keyDepeName}),'%')
</if>
<if test="keyJobLeven != null and keyJobLeven != ''"><!-- 职务级别 -->
and u.JOB_LEVEL = #{keyJobLeven}
</if>
order by d.DEP_ORDER asc,u.SORT asc
</select>
<!-- 用户列表(全部) -->
<select id="listAllUser" parameterType="pd" resultType="pd">

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.dsno2.archives.ArchivesCapitalMapper">
<!--表名 -->
<sql id="tableName">
BUS_ARCHIVESCAPITAL
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.DATE,
f.AMOUNT,
f.MATERIAL_COST,
f.TEACHER_COST,
f.PAPER_COST,
f.OUTSIDE_COST,
f.EQUIPMENT_COST,
f.TRAIN_COST,
f.ENTRUST_COST,
f.OTHER_COST,
f.BALANCE,
f.CORPINFO_ID,
f.YEAR,
f.ISDELETE,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ARCHIVESCAPITAL_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
DATE,
AMOUNT,
MATERIAL_COST,
TEACHER_COST,
PAPER_COST,
OUTSIDE_COST,
EQUIPMENT_COST,
TRAIN_COST,
ENTRUST_COST,
OTHER_COST,
BALANCE,
CORPINFO_ID,
YEAR,
ISDELETE,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ARCHIVESCAPITAL_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{DATE},
#{AMOUNT},
#{MATERIAL_COST},
#{TEACHER_COST},
#{PAPER_COST},
#{OUTSIDE_COST},
#{EQUIPMENT_COST},
#{TRAIN_COST},
#{ENTRUST_COST},
#{OTHER_COST},
#{BALANCE},
#{CORPINFO_ID},
#{YEAR},
#{ISDELETE},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ARCHIVESCAPITAL_ID}
</sql>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.YEAR = #{YEAR}
</if>
order by f.YEAR DESC,f.CREATTIME desc
</select>
</mapper>

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.dsno2.archives.ArchivesEduManagerMapper">
<!--表名 -->
<sql id="tableName">
BUS_ARCHIVESEDUMANAGER
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.TRAINING_DATE,
f.TRAINING_OBJECT,
f.TRAINING_TYPE,
f.TRAINING_CONTENT,
f.PERSON_NUMBER,
f.CLASS_HOURS,
f.TRAINING_PLACE,
f.TRAINING_TEACHER,
f.ASSESSMENT_METHOD,
f.ASSESSMENT,
f.CORPINFO_ID,
f.YEAR,
f.ISDELETE,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ARCHIVESEDUMANAGER_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
TRAINING_DATE,
TRAINING_OBJECT,
TRAINING_TYPE,
TRAINING_CONTENT,
PERSON_NUMBER,
CLASS_HOURS,
TRAINING_PLACE,
TRAINING_TEACHER,
ASSESSMENT_METHOD,
ASSESSMENT,
CORPINFO_ID,
YEAR,
ISDELETE,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ARCHIVESEDUMANAGER_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{TRAINING_DATE},
#{TRAINING_OBJECT},
#{TRAINING_TYPE},
#{TRAINING_CONTENT},
#{PERSON_NUMBER},
#{CLASS_HOURS},
#{TRAINING_PLACE},
#{TRAINING_TEACHER},
#{ASSESSMENT_METHOD},
#{ASSESSMENT},
#{CORPINFO_ID},
#{YEAR},
#{ISDELETE},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ARCHIVESEDUMANAGER_ID}
</sql>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.YEAR = #{YEAR}
</if>
order by f.YEAR DESC,f.CREATTIME DESC
</select>
</mapper>

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.dsno2.archives.ArchivesEduPlanMapper">
<!--表名 -->
<sql id="tableName">
BUS_ARCHIVESEDUPLAN
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.START_DATE,
f.END_DATE,
f.TRAINING_OBJECT,
f.TRAINING_MATERIALS,
f.TRAINING_METHODS,
f.ASSESSMENT_METHOD,
f.CLASS_HOURS,
f.PLACE,
f.TRAINING_TEACHERS,
f.FUND_GUARANTEE,
f.QUALITY_ASSESSMENT,
f.CORPINFO_ID,
f.YEAR,
f.ISDELETE,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ARCHIVESEDUPLAN_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
START_DATE,
END_DATE,
TRAINING_OBJECT,
TRAINING_MATERIALS,
TRAINING_METHODS,
ASSESSMENT_METHOD,
CLASS_HOURS,
PLACE,
TRAINING_TEACHERS,
FUND_GUARANTEE,
QUALITY_ASSESSMENT,
CORPINFO_ID,
YEAR,
ISDELETE,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ARCHIVESEDUPLAN_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{START_DATE},
#{END_DATE},
#{TRAINING_OBJECT},
#{ TRAINING_MATERIALS},
#{TRAINING_METHODS},
#{ASSESSMENT_METHOD},
#{CLASS_HOURS},
#{PLACE},
#{TRAINING_TEACHERS},
#{FUND_GUARANTEE},
#{QUALITY_ASSESSMENT},
#{CORPINFO_ID},
#{YEAR},
#{ISDELETE},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ARCHIVESEDUPLAN_ID}
</sql>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.YEAR = #{YEAR}
</if>
order by f.YEAR DESC,f.CREATTIME desc
</select>
</mapper>

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.dsno2.archives.ArchivesFilesMapper">
<!--表名 -->
<sql id="tableName">
BUS_ARCHIVESFILES
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.CORPINFO_ID,
f.YEAR,
f.STUDYTASK_ID,
f.FILE_PATH,
f.FILE_NAME,
f.TYPE,
f.ARCHIVESFILES_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
CORPINFO_ID,
YEAR,
STUDYTASK_ID,
FILE_PATH,
FILE_NAME,
TYPE,
ARCHIVESFILES_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{CORPINFO_ID},
#{YEAR},
#{STUDYTASK_ID},
#{FILE_PATH},
#{FILE_NAME},
#{TYPE},
#{ARCHIVESFILES_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
delete from
<include refid="tableName"></include>
where
ARCHIVESFILES_ID = #{ARCHIVESFILES_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
CORPINFO_ID = #{CORPINFO_ID},
YEAR = #{YEAR},
FILE_PATH = #{FILE_PATH},
FILE_NAME = #{FILE_NAME},
TYPE = #{TYPE},
ARCHIVESFILES_ID = ARCHIVESFILES_ID
where
ARCHIVESFILES_ID = #{ARCHIVESFILES_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.ARCHIVESFILES_ID = #{ARCHIVESFILES_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="TYPE != null and TYPE != ''"><!-- 关键词检索 -->
and f.TYPE = #{TYPE}
</if>
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.YEAR = #{YEAR}
</if>
<if test="STUDYTASK_ID != null and STUDYTASK_ID != ''"><!-- 关键词检索 -->
and f.STUDYTASK_ID = #{STUDYTASK_ID}
</if>
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
ARCHIVESFILES_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.dsno2.archives.ArchivesPostManMapper">
<!--表名 -->
<sql id="tableName">
BUS_ARCHIVES_POSTMAN
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.NAME,
f.POST,
f.PHONE,
f.CARD_ID,
f.EFFECTIVE_DATE,
f.RETRAINING,
f.CORPINFO_ID,
f.YEAR,
f.ISDELETE,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ARCHIVES_POSTMAN_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
NAME,
POST,
PHONE,
CARD_ID,
EFFECTIVE_DATE,
RETRAINING,
CORPINFO_ID,
YEAR,
ISDELETE,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ARCHIVES_POSTMAN_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{NAME},
#{POST},
#{PHONE},
#{CARD_ID},
#{EFFECTIVE_DATE},
#{RETRAINING},
#{CORPINFO_ID},
#{YEAR},
#{ISDELETE},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ARCHIVES_POSTMAN_ID}
</sql>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.YEAR = #{YEAR}
</if>
order by f.YEAR desc, f.CREATTIME desc
</select>
</mapper>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.dsno2.archives.ArchivesTeacherMapper">
<!--表名 -->
<sql id="tableName">
BUS_ARCHIVESTEACHER
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.NAME,
f.PHONE,
f.WORK_YEAR,
f.OCCUPATION,
f.CARD_ID,
f.ASSESSMENT_DEPT,
f.ASSESSMENT_DATE,
f.ASSESSMENT_RESULT,
f.DESCR,
f.CORPINFO_ID,
f.YEAR,
f.ISDELETE,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ARCHIVESTEACHER_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
NAME,
PHONE,
WORK_YEAR,
OCCUPATION,
CARD_ID,
ASSESSMENT_DEPT,
ASSESSMENT_DATE,
ASSESSMENT_RESULT,
DESCR,
CORPINFO_ID,
YEAR,
ISDELETE,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ARCHIVESTEACHER_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{NAME},
#{PHONE},
#{WORK_YEAR},
#{OCCUPATION},
#{CARD_ID},
#{ASSESSMENT_DEPT},
#{ASSESSMENT_DATE},
#{ASSESSMENT_RESULT},
#{DESCR},
#{CORPINFO_ID},
#{YEAR},
#{ISDELETE},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ARCHIVESTEACHER_ID}
</sql>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="YEAR != null and YEAR != ''"><!-- 关键词检索 -->
and f.YEAR = #{YEAR}
</if>
order by f.YEAR DESC,f.CREATTIME DESC
</select>
</mapper>

View File

@ -752,4 +752,37 @@
ORDER BY
f.CHECK_TIME DESC
</select>
<!-- 指定辨识部位检查记录 -->
<select id="listExport" parameterType="pd" resultType="pd">
SELECT
f.CHECKRECORD_ID,
c.CORP_NAME,
f.LIST_NAME,
su.NAME AS PRINCIPALNAME,
f.PERIODSTART DATESTART,
f.PERIODEND DATEEND,
(
SELECT
group_concat(chr.NAME)
FROM
BUS_CHECKUSER bh
LEFT JOIN sys_user chr ON chr.USER_ID = bh.USER_ID
WHERE
bh.CHECKRECORD_ID = f.CHECKRECORD_ID
) CHECK_USERS,
f.CHECK_TIME,
f.TYPE,
f.LONGITUDE,
f.LATITUDE
FROM
BUS_CHECKRECORD f
left join BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID
LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
LEFT JOIN SYS_USER su ON su.USER_ID = l.USER_ID
WHERE c.ISDELETE = '0' and f.ISDELETE = '0' and f.TYPE = '1'
ORDER BY c.CREATTIME ASC, IFNULL(f.CHECK_TIME, f.PERIODEND) DESC
</select>
</mapper>

View File

@ -149,4 +149,106 @@
</foreach>
</delete>
<select id="listExport" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="HIDDEN_ID != null and HIDDEN_ID != ''"><!-- 关键词检索 -->
and
f.HIDDEN_ID=#{HIDDEN_ID}
</if>
and EXISTS (
select
1
from bus_hidden h
where
h.hidden_id = f.hidden_id and
h.ISDELETE = '0' and h.STATE != '0'
<if test="SOURCE != null and SOURCE != ''">
and h.SOURCE=#{SOURCE}
</if>
<if test="IS_CANCEL != null and IS_CANCEL != ''"><!-- 是否作废 -->
and h.CHECKRECORD_ID is null
</if>
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
and h.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="FIND_CHECKRECORD_ID != null and FIND_CHECKRECORD_ID != ''">
and h.CHECKRECORD_ID=#{CHECKRECORD_ID}
</if>
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
and
(
h.RISK_UNIT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
h.RISK_POSITION LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
h.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
h.HIDDENDESCR LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
)
</if>
<if test="HIDDENDESCR != null and HIDDENDESCR != ''"><!-- 关键词检索 -->
and h.HIDDENDESCR LIKE CONCAT(CONCAT('%', #{HIDDENDESCR}),'%')
</if>
<if test="ISQUALIFIED != null and ISQUALIFIED != ''"><!-- 关键词检索 -->
and h.ISQUALIFIED = #{ISQUALIFIED}
</if>
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"><!-- 关键词检索 -->
and h.HIDDENFINDDEPT = #{DEPARTMENT_ID}
</if>
<if test="HIDDENLEVEL != null and HIDDENLEVEL != ''"><!-- 关键词检索 -->
and h.HIDDENLEVEL = #{HIDDENLEVEL}
</if>
<if test="STARTTIME != null and STARTTIME != ''"><!-- 关键词检索 -->
and h.CREATTIME &gt;= #{STARTTIME}
</if>
<if test="ENDTIME != null and ENDTIME != ''">
and h.CREATTIME &lt;= #{ENDTIME}
</if>
<if test="STATE != null and STATE !='' and STATE != 0" >
and h.STATE = #{STATE}
</if>
<if test="SELF_USER_ID != null and SELF_USER_ID != ''">
and h.CREATOR = #{SELF_USER_ID}
</if>
<if test="DISPOSESTATE != null and DISPOSESTATE != ''"><!-- 关键词检索 -->
<if test="DISPOSESTATE==2"><!-- 整改 -->
and h.RECTIFICATIONOR = #{SELFUSERID}
and h.STATE in('1','-1')
</if>
<if test="DISPOSESTATE==3"><!-- 验收 -->
and h.STATE = '3'
and (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=h.HIDDEN_ID and bh.STATUS=0)>0
</if>
<if test="DISPOSESTATE==4"><!-- 已验收 -->
and h.STATE = '4'
and (h.RECTIFICATIONOR = #{SELFUSERID} or h.CREATOR = #{SELFUSERID} or (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=h.HIDDEN_ID)>0)
</if>
<if test="DISPOSESTATE==-1"><!-- 所有 -->
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and
h.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="STATE != null and STATE != ''"><!-- 关键词检索 -->
and
h.STATE = #{STATE}
</if>
</if>
</if>
<if test="HIDDEN_IDS != null and HIDDEN_IDS != ''"><!-- 关键词检索 -->
and
(
h.HIDDEN_ID in
<foreach item="item" index="index" collection="HIDDEN_IDS" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
)
</select>
</mapper>

View File

@ -651,7 +651,7 @@
<if test="HIDDENLEVEL != null and HIDDENLEVEL !=''" >
and f.HIDDENLEVEL = #{HIDDENLEVEL}
</if>
order by f.CREATTIME desc
order by c.CREATTIME ASC, f.CREATTIME desc
</select>
<!-- 批量删除 -->

Some files were not shown because too many files have changed in this diff Show More