xx
孔祥富
2021-03-10 b0b4f17b8dfc4a3b99dab13aea57a8792e317691
xx
3个文件已修改
244 ■■■■■ 已修改文件
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/entity/EmpAccidentCases.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/impl/ExportPdfServiceImpl.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/util/CreatePdf.java 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/entity/EmpAccidentCases.java
@@ -194,6 +194,8 @@
    @TableField("settleStatus")
    @ExcelField(value = "结案状态", writeConverterExp = "0=未结案,1=已结案")
    private Integer settleStatus = 0;
    @TableField(exist = false)
    private String settleStatusName;
    @FieldInfo(name = "remark", type = "varchar", explain = "备注")
    @TableField("remark")
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/impl/ExportPdfServiceImpl.java
@@ -1,7 +1,10 @@
package cc.mrbird.febs.server.hr.service.impl;
import cc.mrbird.febs.common.core.constant.DicCode;
import cc.mrbird.febs.common.core.entity.QueryRequest;
import cc.mrbird.febs.common.core.entity.system.DicItem;
import cc.mrbird.febs.common.core.utils.CastUtil;
import cc.mrbird.febs.common.redis.service.RedisService;
import cc.mrbird.febs.server.hr.entity.*;
import cc.mrbird.febs.server.hr.feign.IRemoteDicItemService;
import cc.mrbird.febs.server.hr.mapper.EmpAccessoryMapper;
@@ -59,7 +62,8 @@
    private     IEmpUnemploymentService iEmpUnemploymentService;
    @Autowired
    private     IEmpAccidentCasesService iEmpAccidentCasesService;
    @Autowired
    private  RedisService redisService;
    @Autowired
    private EmpAccessoryMapper empAccessoryMapper;
    @Autowired
@@ -160,10 +164,10 @@
                EDUCATION.put(m.getDicItemCode(),m.getDicItemName());
            }
            //籍贯
            Map<String,String> NATIVEPLACE= new HashMap<>();
            /*Map<String,String> NATIVEPLACE= new HashMap<>();
            for (DicItem m:    empAccessoryMapper.getDictType("NATIVEPLACE")) {
                NATIVEPLACE.put(m.getDicItemCode(),m.getDicItemName());
            }
            }*/
            //保险类型
            Map<String,String> INSURANCETYPE= new HashMap<>();
            for (DicItem m:   empAccessoryMapper.getDictType("INSURANCETYPE")) {
@@ -196,7 +200,7 @@
                    , "身份证号码"};
            EmpBaseInfo baseInfo=new EmpBaseInfo();
            baseInfo.setCertificateNumb(empNum);
            List<DicItem> dicItems = CastUtil.castList(redisService.get("dicItems"), DicItem.class);
            List<EmpBaseInfo> empBaseInfoList = iEmpBaseInfoService.findEmpBaseInfos(queryRequest, baseInfo).getRecords();
            for (EmpBaseInfo empBaseInfo: empBaseInfoList){
                empBaseInfo.setArchivesStatusName(archivesStatus.get(empBaseInfo.getArchivesStatus()==null?"":empBaseInfo.getArchivesStatus()));
@@ -206,20 +210,30 @@
                empBaseInfo.setMarriageName(MARRIAGE.get(empBaseInfo.getMarriage()==null?"":empBaseInfo.getMarriage()));
                empBaseInfo.setPoliticsName(PLITICAL.get(empBaseInfo.getPolitics()==null?"":empBaseInfo.getPolitics()));
                empBaseInfo.setEducationName(EDUCATION.get(empBaseInfo.getEducation()==null?"":empBaseInfo.getEducation()));
                empBaseInfo.setNativePlaceName(NATIVEPLACE.get(empBaseInfo.getNativePlace()==null?"":empBaseInfo.getNativePlace()));
                empBaseInfo.setNativePlaceName(dicItems.stream()
                        .filter(k -> DicCode.NATIVEPLACE.equals(k.getDicCode()) && k.getDicItemCode().equals(empBaseInfo.getNativePlace()==null?"":empBaseInfo.getNativePlace()))
                        .findFirst()
                        .map(DicItem::getDicItemName)
                        .orElse(""));
                empBaseInfo.setInsuranceTypeName(INSURANCETYPE.get(empBaseInfo.getInsuranceType()==null?"":empBaseInfo.getInsuranceType()));
                empBaseInfo.setHandbookStatusName(handbookStatus.get(empBaseInfo.getHandbookStatus()==null?"":empBaseInfo.getHandbookStatus()));
                empBaseInfo.setCertificateListName(certificateList.get(empBaseInfo.getCertificateList()==null?"":empBaseInfo.getCertificateList()));
                empBaseInfo.setEmpStatusName("0".equals(empBaseInfo.getEmpStatus()) ? "在职" : "离职");
                empBaseInfo.setEntryTypeName(dicItems.stream()
                        .filter(k -> DicCode.IN_OUT_TYPE.equals(k.getDicCode()) && k.getDicItemCode().equals(empBaseInfo.getEntryType()))
                        .findFirst()
                        .map(DicItem::getDicItemName)
                        .orElse(""));
            }
            //工作经历
            String[] workhead = { "开始时间", "结束时间", "工作单位", "主要工作内容"};
            String[] workhead = { "序号","开始时间", "结束时间", "工作单位", "主要工作内容"};
            EmpWorkExperience empWorkExperiences=new EmpWorkExperience();
            empWorkExperiences.setCertificateNumb(empNum);
            empWorkExperiences.setDelFlag(0);
            
            List<EmpWorkExperience> empWorkExperiences1 = iEmpWorkExperienceService.findEmpWorkExperiences(queryRequest, empWorkExperiences).getRecords();
            //体检信息
            String[] empPhysicalhead = { "体检医院", "体检日期", "体检类型", "血压", "转氨酶", "心电图", "体检结论", "复查记录", "备注"};
            String[] empPhysicalhead = {  "序号","体检医院", "体检日期", "体检类型", "血压", "转氨酶", "心电图", "体检结论", "复查日期", "备注"};
            EmpPhysicalExam empPhysicalExam=new EmpPhysicalExam();
            empPhysicalExam.setCertificateNumb(empNum);
            
@@ -228,7 +242,7 @@
                empPhysicalExam1.setPhysicalExamTypeName(physicalExamType.get(empPhysicalExam1.getPhysicalExamType()==null?"":empPhysicalExam1.getPhysicalExamType()));
            }
            //合同信息
            String[] empContractInfo = { "合同签订日期", "合同结束日期", "合同期限(年)", "合同状态", "合同办理人"};
            String[] empContractInfo = {  "序号","合同签订日期", "合同结束日期", "合同期限(年)", "合同状态", "合同办理人","备注"};
            EmpContractInfo empContractInfo1=new EmpContractInfo();
            empContractInfo1.setCertificateNumb(empNum);
            
@@ -237,7 +251,7 @@
                empCon.setContractStatusName(contractstatus.get(empCon.getContractStatus()==null?"":empCon.getContractStatus()));
            }
            //调岗记录
            String[] empJobChange = { "现部门", "现岗位", "姓名", "原部门", "原岗位", "调岗日期", "调岗类型"};
            String[] empJobChange = {  "序号","现部门", "现岗位", "姓名", "原部门", "原岗位", "调岗日期", "调岗类型"};
            EmpJobChange empJobChange1=new EmpJobChange();
            empJobChange1.setCertificateNumb(empNum);
            
@@ -246,7 +260,7 @@
                map.put("changeType",changeType.get(map.get("changeType")==null?"":map.get("changeType").toString()));
            }
            //请假记录
            String[] leaveInfo = { "开始时间", "结束时间", "请假天数", "请假类型", "到岗时间", "报备人", "备注"};
            String[] leaveInfo = {  "序号","开始时间", "结束时间", "请假天数", "请假类型", "到岗时间", "报备人", "备注"};
            EmpLeaveInfo empLeaveInfo=new EmpLeaveInfo();
            empLeaveInfo.setCertificateNumb(empNum);
            
@@ -255,19 +269,19 @@
                leaveInfo1.setLeaveTypeName(leavetype.get(leaveInfo1.getLeaveType()==null?"":leaveInfo1.getLeaveType()));
            }
            //辞职申请
            String[] resign = { "辞职申请日期", "辞职事由", "汇报人", "备注"};
            String[] resign = {  "序号","辞职申请日期", "辞职事由", "汇报人", "备注"};
            EmpResign empResign=new EmpResign();
            empResign.setCertificateNumb(empNum);
            
            List<EmpResign> empResigns = iEmpResignService.findEmpResigns(queryRequest, empResign).getRecords();
            //离职当月考勤
            String[] dimissionAttend = { "离职考勤月份", "出勤天数", "加班(天)", "加班(小时)", "有无代扣款项", "请假(天)", "旷工(天)", "备注"};
            String[] dimissionAttend = {  "序号","离职考勤月份", "出勤天数", "加班(天)", "加班(小时)", "有无代扣款项", "请假(天)", "旷工(天)", "备注"};
            EmpDimissionAttend empDimissionAttend=new EmpDimissionAttend();
            empDimissionAttend.setCertificateNumb(empNum);
            
            List<EmpDimissionAttend> dimissionAttends = iEmpDimissionAttendService.findEmpDimissionattends(queryRequest, empDimissionAttend).getRecords();
            //入离职记录
            String[] dimissionLog = { "入职日期", "离职日期", "离职类型", "自离天数", "报备人", "备注"};
            String[] dimissionLog = {  "序号","入职日期", "离职日期", "离职类型", "自离天数", "报备人", "备注"};
            EmpDimissionLog empDimissionLog=new EmpDimissionLog();
            empDimissionLog.setCertificateNumb(empNum);
            
@@ -276,13 +290,13 @@
                objectMap.put("dimissionType",lztype.get(objectMap.get("dimissionType")==null?"":objectMap.get("dimissionType").toString()));
            }
            //失业金领取
            String[] unemployment = { "失业金申请日期", "申报事由", "汇报人", "审核人", "备注"};
            String[] unemployment = {  "序号","失业金申请日期", "申报事由", "汇报人", "审核人", "备注"};
            EmpUnemployment empUnemployment=new EmpUnemployment();
            empUnemployment.setCertificateNumb(empNum);
            
            List<EmpUnemployment> empUnemployments = iEmpUnemploymentService.findEmpUnemployments(queryRequest, empUnemployment).getRecords();
           //社保申请
            String[] insurance = { "社保申请日期", "申请人", "社保档位", "是否已报告", "状态", "审核人", "备注"};
            String[] insurance = {  "序号","社保申请日期", "申请人", "社保档位", "是否已报告", "状态", "审核人", "备注"};
            EmpInsurance empInsurance=new EmpInsurance();
            empInsurance.setCertificateNumb(empNum);
            
@@ -293,41 +307,43 @@
                leaveInfo1.setApplayStatusName(applayStatus.get(leaveInfo1.getApplayStatus()==null?"":String.valueOf(leaveInfo1.getApplayStatus())));
            }
            //意外险案件
            String[] accidentCases = { "受伤日期", "受伤地点", "受伤部位", "受伤经过描述", "意外险诊断", "就诊医院", "是否住院", "床号", "报案时间", "递交资料时间", "递交人", "医疗总费用", "保险赔付费用"};
            String[] accidentCases = {  "序号","受伤日期", "受伤地点", "受伤部位", "受伤经过描述", "意外险诊断", "就诊医院", "是否住院", "床号", "报案时间", "递交资料时间", "递交人", "医疗总费用", "保险赔付费用", "是否结案"};
            EmpAccidentCases empAccidentCases=new EmpAccidentCases();
            empAccidentCases.setCertificateNumb(empNum);
            
            List<EmpAccidentCases> empAccidentCases1 = iEmpAccidentCasesService.findEmpAccidentcasess(queryRequest, empAccidentCases).getRecords();
            for (EmpAccidentCases leaveInfo1:empAccidentCases1){
                leaveInfo1.setHospitalizatioFlagName(hospitalizatioFlag.get(leaveInfo1.getHospitalizatioFlag()==null?"":leaveInfo1.getHospitalizatioFlag().toString()));
                leaveInfo1.setSettleStatusName(settleStatus.get(leaveInfo1.getSettleStatus()==null?"":leaveInfo1.getSettleStatus().toString()));
            }
            //工伤案件
            String[] occupational = { "受伤日期", "受伤地点", "受伤部位", "受伤经过描述", "工伤诊断", "就诊医院", "就诊科室", "是否住院", "床号", "报案时间", "递交资料时间", "递交人", "医疗总费用", "已赔付医药费用"};
            String[] occupational = {  "序号","受伤日期", "受伤地点", "受伤部位", "受伤经过描述", "工伤诊断", "就诊医院", "就诊科室", "是否住院", "床号", "报案时间", "递交资料时间", "递交人", "医疗总费用", "已赔付医药费用", "是否结案"};
            EmpOccupational empOccupational=new EmpOccupational();
            empOccupational.setCertificateNumb(empNum);
            
            List<EmpOccupational> empOccupationals = iEmpOccupationalService.findEmpOccupationals(queryRequest, empOccupational).getRecords();
            for (EmpOccupational leaveInfo1:empOccupationals){
                leaveInfo1.setHospitalizatioFlagName(hospitalizatioFlag.get(leaveInfo1.getHospitalizatioFlag()==null?"":leaveInfo1.getHospitalizatioFlag().toString()));
                leaveInfo1.setSettleStatusName(settleStatus.get(leaveInfo1.getSettleStatus()==null?"":leaveInfo1.getSettleStatus().toString()));
            }
            //劳资案件
            String[] laborTrouble = { "仲裁日期", "仲裁类型", "仲裁事由", "报备人", "备注", "仲裁赔付(元)", "状态", "案结日期"};
            String[] laborTrouble = {  "序号","仲裁日期", "仲裁类型", "仲裁事由", "报备人", "备注", "仲裁赔付(元)", "是否结案", "案结日期"};
            EmpLaborTrouble empLaborTrouble=new EmpLaborTrouble();
            empLaborTrouble.setCertificateNumb(empNum);
            
            List<EmpLaborTrouble> empLaborTroubles = iEmpLaborTroubleService.findEmpLabortroubles(queryRequest, empLaborTrouble).getRecords();
            for (EmpLaborTrouble leaveInfo1:empLaborTroubles){
                leaveInfo1.setArbitrationTypeName(zctype.get(leaveInfo1.getArbitrationType()==null?"":leaveInfo1.getArbitrationType()));
                leaveInfo1.setArbitrationStatusName(reportStatus.get(leaveInfo1.getArbitrationStatus()==null?"":String.valueOf(leaveInfo1.getArbitrationStatus())));
                leaveInfo1.setArbitrationStatusName(settleStatus.get(leaveInfo1.getArbitrationStatus()==null?"":String.valueOf(leaveInfo1.getArbitrationStatus())));
            }
            //不良记录
            String[] badRecord = { "不良记录日期", "不良记录描述", "汇报人", "备注"};
            String[] badRecord = {  "序号","不良记录日期", "不良记录描述", "汇报人", "备注"};
            EmpBadRecord empBadRecord=new EmpBadRecord();
            empBadRecord.setCertificateNumb(empNum);
            
            List<EmpBadRecord> empBadRecords = iEmpBadRecordService.findEmpBadrecords(queryRequest, empBadRecord).getRecords();
            //备注
            String[] remarkInfo = { "备注日期", "备注信息"};
            String[] remarkInfo = {  "序号","备注日期", "备注信息"};
            EmpRemarkInfo empRemarkInfo=new EmpRemarkInfo();
            empRemarkInfo.setCertificateNumb(empNum);
            
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/util/CreatePdf.java
@@ -22,6 +22,8 @@
import java.util.List;
import java.util.Map;
import static com.itextpdf.text.pdf.PdfName.BOX;
public class CreatePdf {
    Document document = new Document();// 建立一个Document对象
@@ -36,8 +38,8 @@
        try {
            // 设置中文显示
            bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
            headfont = new Font(bfChinese, 15, Font.BOLD);// 设置字体大小
            keyfont = new Font(bfChinese, 10, Font.BOLD);// 设置字体大小
            headfont = new Font(bfChinese, 15, Font.NORMAL);// 设置字体大小
            keyfont = new Font(bfChinese, 10, Font.NORMAL);// 设置字体大小
            textfont = new Font(bfChinese, 10, Font.NORMAL);// 设置字体大小
        } catch (Exception e) {
            e.printStackTrace();
@@ -78,7 +80,7 @@
        }
    }
    int maxWidth = 800;
    int maxWidth = 770;
    /**
     * 为表格添加一个内容
@@ -95,6 +97,7 @@
        PdfPCell cell = new PdfPCell();
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        cell.setHorizontalAlignment(align);
        cell.setFixedHeight(20);
        cell.setPhrase(new Phrase(value, font));
        return cell;
    }
@@ -187,6 +190,13 @@
        Font fontChinese = new Font(bfChinese, 12, Font.NORMAL);
        return fontChinese;
    }
    public static Font getPdfChineseFonts() throws Exception {
        BaseFont bfChinese = BaseFont.createFont("STSongStd-Light", "UniGB-UCS2-H",
                BaseFont.NOT_EMBEDDED);
        Font fontChinese = new Font(bfChinese, 35, Font.NORMAL);
        return fontChinese;
    }
    /**
     * 为表格添加一个内容
     *
@@ -208,7 +218,7 @@
        cell.setHorizontalAlignment(align);
        cell.setColspan(colspan);
        cell.setPhrase(new Phrase(value, font));
        cell.setPadding(3.0f);
        cell.setPadding(2.0f);
        cell.setMinimumHeight(30);
        cell.setBorderColorBottom(BaseColor.BLACK);
        cell.setBorderColorLeft(BaseColor.BLACK);
@@ -224,7 +234,7 @@
    public static void setTableStyle(PdfPTable table, PdfPCell cell) {
// 设置表格样式
        table.setLockedWidth(true);
        table.setTotalWidth(800);
        table.setTotalWidth(770);
        table.setHorizontalAlignment(Element.ALIGN_LEFT);
// 设置单元格样式
        cell.setMinimumHeight(35);
@@ -329,7 +339,7 @@
        PdfPTable unemploymenttable = createTable(unemploymentlength);
        PdfPTable insurancetable = createTable(insurancelength);
        PdfPTable accidentCasestable = createTable(accidentCaseslength);
        PdfPTable occupationaltable = createTable(occupationallength);
        PdfPTable occtable = createTable(occupationallength);
        PdfPTable laborTroubletable = createTable(laborTroublelength);
        PdfPTable badRecordtable = createTable(badRecordlength);
        PdfPTable remarkInfotable = createTable(remarkInfolength);
@@ -367,11 +377,9 @@
                {"紧急联系电话",empBaseInfo.getUrgencyPhone()==null?"":empBaseInfo.getUrgencyPhone(),
                        "员工手册",empBaseInfo.getHandbookStatusName()==null?"":empBaseInfo.getHandbookStatusName(),
                        "相关证件",empBaseInfo.getCertificateListName()==null?"":empBaseInfo.getCertificateListName()},
                {"身份证号码",empBaseInfo.getCertificateNumb()==null?"":empBaseInfo.getCertificateNumb()}};
                {"身份证号码",empBaseInfo.getCertificateNumb()==null?"":empBaseInfo.getCertificateNumb(),
                        "员工状态",empBaseInfo.getEmpStatusName()==null?"":empBaseInfo.getEmpStatusName(),
                        "入职类型",empBaseInfo.getEntryTypeName()==null?"":empBaseInfo.getEntryTypeName()}};
        //生成三列表格
        PdfPTable table1 = new PdfPTable(1);
        PdfPCell cell1 = new PdfPCell();
@@ -380,18 +388,43 @@
        cell1.setBorderWidthBottom(0);
        cell1.setBorderWidthLeft(0);
        cell1.setUseAscender(true);
        cell1.setUseDescender(true);
        cell1.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);//水平居中
        Paragraph para = null;
        try {
            para = new Paragraph(empBaseInfo.getEmpName()+"的档案", getPdfChineseFont());
            para = new Paragraph("员工档案", getPdfChineseFonts());
        } catch (Exception e) {
            e.printStackTrace();
        }
        //设置该段落为居中显示
        cell1.setPhrase(para);
        table1.addCell(cell1);
        Image img =null;
        try {
            img = Image.getInstance("http://120.24.23.155:8301/hr/empBaseInfo/image/"+empBaseInfo.getEmpId()+"");
        } catch (BadElementException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        img.setAlignment(Element.ALIGN_LEFT);
        img.scaleAbsolute(120,125);
        System.out.println(img.getScaledWidth());
        System.out.println(img.getScaledHeight());
@@ -406,6 +439,7 @@
        PdfPTable basicTable = new PdfPTable(widthss);
        basicTable.addCell(createCell("基本信息:", keyfont, Element.ALIGN_LEFT,basicDatas.length, false));
        basicTable.addCell(createCell("档案号:"+empBaseInfo.getArchivesNumb()==null?"":empBaseInfo.getArchivesNumb(), keyfont, Element.ALIGN_RIGHT,basicDatas.length, false));
        // 添加备注,靠左,不显示边框
//            外层循环表格的行
        for (int i = 0; i < basicDatas.length; i++) {
@@ -453,9 +487,11 @@
        // 添加备注,靠左,不显示边框
        accidentCasestable.addCell(createCell("意外险案件:", keyfont, Element.ALIGN_LEFT, accidentCaseslength, false));
        // 添加备注,靠左,不显示边框
        occupationaltable.addCell(createCell("工伤案件:", keyfont, Element.ALIGN_LEFT, occupationallength, false));
        // 添加备注,靠左,不显示边框
        laborTroubletable.addCell(createCell("劳资案件:", keyfont, Element.ALIGN_LEFT, laborTroublelength, false));// 添加备注,靠左,不显示边框
        occtable.addCell(createCell("工伤案件:", keyfont, Element.ALIGN_LEFT, occupationallength, false));
        badRecordtable.addCell(createCell("不良记录:", keyfont, Element.ALIGN_LEFT, badRecordlength, false));
        // 添加备注,靠左,不显示边框
        remarkInfotable.addCell(createCell("备注:", keyfont, Element.ALIGN_LEFT, remarkInfolength, false));
@@ -497,11 +533,11 @@
        for (int i = 0; i < accidentCaseslength; i++) {
            accidentCasestable.addCell(createCell(accidentCases[i], keyfont, Element.ALIGN_CENTER));
        }
        for (int i = 0; i < occupationallength; i++) {
            occupationaltable.addCell(createCell(occupational[i], keyfont, Element.ALIGN_CENTER));
        }
        for (int i = 0; i < laborTroublelength; i++) {
            laborTroubletable.addCell(createCell(laborTrouble[i], keyfont, Element.ALIGN_CENTER));
        }
        for (int i = 0; i < occupationallength; i++) {
            occtable.addCell(createCell(occupational[i], keyfont, Element.ALIGN_CENTER));
        }
        for (int i = 0; i < badRecordlength; i++) {
            badRecordtable.addCell(createCell(badRecord[i], keyfont, Element.ALIGN_CENTER));
@@ -512,8 +548,9 @@
        if (null != empWorkExperiences1 && empWorkExperiences1.size() > 0) {
            int size = empWorkExperiences1.size();
            for (int i = 0; i < size; i++) {
                EmpWorkExperience user = empWorkExperiences1.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpWorkExperience user = empWorkExperiences1.get(i-1);
                workheadtable.addCell(createCell(String.valueOf(i++), textfont));
                workheadtable.addCell(createCell(user.getBeginDate()==null?"":format1.format(user.getBeginDate()), textfont));
                workheadtable.addCell(createCell(user.getEndDate()==null?"":format1.format(user.getEndDate()), textfont));
                workheadtable.addCell(createCell(user.getWorkUnit()==null?"":user.getWorkUnit(), textfont));
@@ -522,8 +559,9 @@
        }
        if (null != records && records.size() > 0) {
            int size = records.size();
            for (int i = 0; i < size; i++) {
                EmpPhysicalExam user = records.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpPhysicalExam user = records.get(i-1);
                empPhysicalheadtable.addCell(createCell(String.valueOf(i++), textfont));
                empPhysicalheadtable.addCell(createCell(user.getHospital()==null?"":user.getHospital(), textfont));
                empPhysicalheadtable.addCell(createCell(user.getPhysicalExamDate()==null?"":format1.format(user.getPhysicalExamDate()), textfont));
                empPhysicalheadtable.addCell(createCell(user.getPhysicalExamTypeName()==null?"":user.getPhysicalExamTypeName(), textfont));
@@ -537,8 +575,9 @@
        }
        if (null != empContractInfos && empContractInfos.size() > 0) {
            int size = empContractInfos.size();
            for (int i = 0; i < size; i++) {
                EmpContractInfo user = empContractInfos.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpContractInfo user = empContractInfos.get(i-1);
                empContractInfotable.addCell(createCell(String.valueOf(i++), textfont));
                empContractInfotable.addCell(createCell(user.getSigningDate()==null?"":format1.format(user.getSigningDate()), textfont));
                empContractInfotable.addCell(createCell(user.getEndDate()==null?"":format1.format(user.getEndDate()), textfont));
                empContractInfotable.addCell(createCell(user.getContractPeriod()==null?"":String.valueOf(user.getContractPeriod()), textfont));
@@ -548,8 +587,9 @@
        }
        if (null != empJobChangeList && empJobChangeList.size() > 0) {
            int size = empJobChangeList.size();
            for (int i = 0; i < size; i++) {
                Map user = empJobChangeList.get(i);
            for (int i = 1; i < size+1; i++) {
                Map user = empJobChangeList.get(i-1);
                empJobChangetable.addCell(createCell(String.valueOf(i++), textfont));
                empJobChangetable.addCell(createCell(user.get("newDeptName")==null?"":user.get("newDeptName").toString(), textfont));
                empJobChangetable.addCell(createCell(user.get("newJobName")==null?"":user.get("newJobName").toString(), textfont));
                empJobChangetable.addCell(createCell(user.get("empName")==null?"":user.get("empName").toString(), textfont));
@@ -561,8 +601,9 @@
        }
        if (null != records1 && records1.size() > 0) {
            int size = records1.size();
            for (int i = 0; i < size; i++) {
                Map user = records1.get(i);
            for (int i = 1; i < size+1; i++) {
                Map user = records1.get(i-1);
                dimissionLogtable.addCell(createCell(String.valueOf(i++), textfont));
                dimissionLogtable.addCell(createCell(user.get("entryDate")==null?"":user.get("entryDate").toString(), textfont));
                dimissionLogtable.addCell(createCell(user.get("dimissionDate")==null?"":user.get("dimissionDate").toString(), textfont));
                dimissionLogtable.addCell(createCell(user.get("dimissionType")==null?"":user.get("dimissionType").toString(), textfont));
@@ -573,8 +614,9 @@
        }
        if (null != empLeaveInfos && empLeaveInfos.size() > 0) {
            int size = empLeaveInfos.size();
            for (int i = 0; i < size; i++) {
                EmpLeaveInfo user = empLeaveInfos.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpLeaveInfo user = empLeaveInfos.get(i-1);
                leaveInfotable.addCell(createCell(String.valueOf(i++), textfont));
                leaveInfotable.addCell(createCell(user.getBeginTime()==null?"":format1.format(user.getBeginTime()), textfont));
                leaveInfotable.addCell(createCell(user.getEndTime()==null?"":format1.format(user.getEndTime()), textfont));
                leaveInfotable.addCell(createCell(user.getLeaveDay()==null?"":String.valueOf(user.getLeaveDay()), textfont));
@@ -586,8 +628,9 @@
        }
        if (null != empResigns && empResigns.size() > 0) {
            int size = empResigns.size();
            for (int i = 0; i < size; i++) {
                EmpResign user = empResigns.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpResign user = empResigns.get(i-1);
                resigntable.addCell(createCell(String.valueOf(i++), textfont));
                resigntable.addCell(createCell(user.getApplayDate()==null?"":format1.format(user.getApplayDate()), textfont));
                resigntable.addCell(createCell(user.getReason()==null?"":user.getReason(), textfont));
                resigntable.addCell(createCell(user.getReporter()==null?"":user.getReporter() , textfont));
@@ -596,8 +639,9 @@
        }
        if (null != dimissionAttends && dimissionAttends.size() > 0) {
            int size = dimissionAttends.size();
            for (int i = 0; i < size; i++) {
                EmpDimissionAttend user = dimissionAttends.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpDimissionAttend user = dimissionAttends.get(i-1);
                dimissionAttendtable.addCell(createCell(String.valueOf(i++), textfont));
                dimissionAttendtable.addCell(createCell(user.getAttendMonth()==null?"":user.getAttendMonth(), textfont));
                dimissionAttendtable.addCell(createCell(user.getAttendDays()==null?"":user.getAttendDays().toString() , textfont));
                dimissionAttendtable.addCell(createCell(user.getOvertimeDay()==null?"":user.getOvertimeDay().toString(), textfont));
@@ -610,8 +654,9 @@
        }
        if (null != empUnemployments && empUnemployments.size() > 0) {
            int size = empUnemployments.size();
            for (int i = 0; i < size; i++) {
                EmpUnemployment user = empUnemployments.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpUnemployment user = empUnemployments.get(i-1);
                unemploymenttable.addCell(createCell(String.valueOf(i++), textfont));
                unemploymenttable.addCell(createCell(user.getApplayDate()==null?"":format1.format(user.getApplayDate()), textfont));
                unemploymenttable.addCell(createCell(user.getApplayReason()==null?"":user.getApplayReason().toString() , textfont));
                unemploymenttable.addCell(createCell(user.getReporter()==null?"":user.getReporter().toString(), textfont));
@@ -621,8 +666,9 @@
        }
        if (null != empInsurances && empInsurances.size() > 0) {
            int size = empInsurances.size();
            for (int i = 0; i < size; i++) {
                EmpInsurance user = empInsurances.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpInsurance user = empInsurances.get(i-1);
                insurancetable.addCell(createCell(String.valueOf(i++), textfont));
                insurancetable.addCell(createCell(user.getApplayDate()==null?"":format1.format(user.getApplayDate()), textfont));
                insurancetable.addCell(createCell(user.getProposer()==null?"":user.getProposer().toString() , textfont));
                insurancetable.addCell(createCell(user.getInsuranceGaers()==null?"":user.getInsuranceGaers().toString(), textfont));
@@ -634,8 +680,9 @@
        }
        if (null != empAccidentCases1 && empAccidentCases1.size() > 0) {
            int size = empAccidentCases1.size();
            for (int i = 0; i < size; i++) {
                EmpAccidentCases user = empAccidentCases1.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpAccidentCases user = empAccidentCases1.get(i-1);
                accidentCasestable.addCell(createCell(String.valueOf(i++), textfont));
                accidentCasestable.addCell(createCell(user.getInjuredTime()==null?"":format1.format(user.getInjuredTime()), textfont));
                accidentCasestable.addCell(createCell(user.getInjuredAddress()==null?"":user.getInjuredAddress().toString() , textfont));
                accidentCasestable.addCell(createCell(user.getInjuredPart()==null?"":user.getInjuredPart().toString(), textfont));
@@ -649,31 +696,14 @@
                accidentCasestable.addCell(createCell(user.getSbumitBy()==null?"":user.getSbumitBy().toString(), textfont));
                accidentCasestable.addCell(createCell(user.getExpensesFee()==null?"":user.getExpensesFee().toString(), textfont));
                accidentCasestable.addCell(createCell(user.getInnsureFee()==null?"":user.getInnsureFee().toString() , textfont));
            }
        }
        if (null != empOccupationals && empOccupationals.size() > 0) {
            int size = empOccupationals.size();
            for (int i = 0; i < size; i++) {
                EmpOccupational user = empOccupationals.get(i);
                occupationaltable.addCell(createCell(user.getInjuredTime()==null?"":format1.format(user.getInjuredTime()), textfont));
                occupationaltable.addCell(createCell(user.getInjuredAddress()==null?"":user.getInjuredAddress().toString() , textfont));
                occupationaltable.addCell(createCell(user.getInjuredPart()==null?"":user.getInjuredPart().toString(), textfont));
                occupationaltable.addCell(createCell(user.getInjuredDescribe()==null?"":user.getInjuredDescribe().toString(), textfont));
                occupationaltable.addCell(createCell(user.getInjuredDiacrisis()==null?"":user.getInjuredDiacrisis().toString(), textfont));
                occupationaltable.addCell(createCell(user.getHospitalName()==null?"":user.getHospitalName().toString(), textfont));
                occupationaltable.addCell(createCell(user.getHospitalizatioFlagName()==null?"":user.getHospitalizatioFlagName().toString(), textfont));
                occupationaltable.addCell(createCell(user.getBedNumb()==null?"":user.getBedNumb().toString(), textfont));
                occupationaltable.addCell(createCell(user.getReportTime()==null?"":format1.format(user.getReportTime()), textfont));
                occupationaltable.addCell(createCell(user.getSubmitTime()==null?"":format1.format(user.getSubmitTime()), textfont));
                occupationaltable.addCell(createCell(user.getSbumitBy()==null?"":user.getSbumitBy().toString(), textfont));
                occupationaltable.addCell(createCell(user.getExpensesFee()==null?"":user.getExpensesFee().toString(), textfont));
                occupationaltable.addCell(createCell(user.getCompensated()==null?"":user.getCompensated().toString() , textfont));
                accidentCasestable.addCell(createCell(user.getSettleStatusName()==null?"":user.getSettleStatusName().toString() , textfont));
            }
        }
        if (null != empLaborTroubles && empLaborTroubles.size() > 0) {
            int size = empLaborTroubles.size();
            for (int i = 0; i < size; i++) {
                EmpLaborTrouble user = empLaborTroubles.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpLaborTrouble user = empLaborTroubles.get(i-1);
                laborTroubletable.addCell(createCell(String.valueOf(i++), textfont));
                laborTroubletable.addCell(createCell(user.getArbitrationDate()==null?"":format1.format(user.getArbitrationDate()), textfont));
                laborTroubletable.addCell(createCell(user.getArbitrationTypeName()==null?"":user.getArbitrationTypeName().toString() , textfont));
                laborTroubletable.addCell(createCell(user.getArbitrationReason()==null?"":user.getArbitrationReason().toString(), textfont));
@@ -684,10 +714,32 @@
                laborTroubletable.addCell(createCell(user.getSettleDate()==null?"":format1.format(user.getSettleDate()), textfont));
            }
        }
        if (null != empOccupationals && empOccupationals.size() > 0) {
            int size = empOccupationals.size();
            for (int i = 1; i < size+1; i++) {
                EmpOccupational user = empOccupationals.get(i-1);
                occtable.addCell(createCell(String.valueOf(i++), textfont));
                occtable.addCell(createCell(user.getInjuredTime()==null?"":format1.format(user.getInjuredTime()), textfont));
                occtable.addCell(createCell(user.getInjuredAddress()==null?"":user.getInjuredAddress().toString() , textfont));
                occtable.addCell(createCell(user.getInjuredPart()==null?"":user.getInjuredPart().toString(), textfont));
                occtable.addCell(createCell(user.getInjuredDescribe()==null?"":user.getInjuredDescribe().toString(), textfont));
                occtable.addCell(createCell(user.getInjuredDiacrisis()==null?"":user.getInjuredDiacrisis().toString(), textfont));
                occtable.addCell(createCell(user.getHospitalName()==null?"":user.getHospitalName().toString(), textfont));
                occtable.addCell(createCell(user.getHospitalizatioFlagName()==null?"":user.getHospitalizatioFlagName().toString(), textfont));
                occtable.addCell(createCell(user.getBedNumb()==null?"":user.getBedNumb().toString(), textfont));
                occtable.addCell(createCell(user.getReportTime()==null?"":format1.format(user.getReportTime()), textfont));
                occtable.addCell(createCell(user.getSubmitTime()==null?"":format1.format(user.getSubmitTime()), textfont));
                occtable.addCell(createCell(user.getSbumitBy()==null?"":user.getSbumitBy().toString(), textfont));
                occtable.addCell(createCell(user.getExpensesFee()==null?"":user.getExpensesFee().toString(), textfont));
                occtable.addCell(createCell(user.getCompensated()==null?"":user.getCompensated().toString() , textfont));
                occtable.addCell(createCell(user.getSettleStatusName()==null?"":user.getSettleStatusName().toString() , textfont));
            }
        }
        if (null != empBadRecords && empBadRecords.size() > 0) {
            int size = empBadRecords.size();
            for (int i = 0; i < size; i++) {
                EmpBadRecord user = empBadRecords.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpBadRecord user = empBadRecords.get(i-1);
                badRecordtable.addCell(createCell(String.valueOf(i++), textfont));
                badRecordtable.addCell(createCell(user.getBadDate()==null?"":format1.format(user.getBadDate()), textfont));
                badRecordtable.addCell(createCell(user.getBadContent()==null?"":user.getBadContent().toString() , textfont));
                badRecordtable.addCell(createCell(user.getReporter()==null?"":user.getReporter().toString(), textfont));
@@ -696,14 +748,16 @@
        }
        if (null != empRemarkInfos && empRemarkInfos.size() > 0) {
            int size = empRemarkInfos.size();
            for (int i = 0; i < size; i++) {
                EmpRemarkInfo user = empRemarkInfos.get(i);
            for (int i = 1; i < size+1; i++) {
                EmpRemarkInfo user = empRemarkInfos.get(i-1);
                remarkInfotable.addCell(createCell(String.valueOf(i++), textfont));
                remarkInfotable.addCell(createCell(user.getRemarkDate()==null?"":format1.format(user.getRemarkDate()), textfont));
                remarkInfotable.addCell(createCell(user.getRemarkContent()==null?"":user.getRemarkContent().toString() , textfont));
            }
        }
        try {
            document.add(table1);
            document.add(img);
            // 将表格添加到文档中
            document.add(basicTable);
            document.add(workheadtable);
@@ -717,8 +771,8 @@
            document.add(unemploymenttable);
            document.add(insurancetable);
            document.add(accidentCasestable);
            document.add(occupationaltable);
            document.add(laborTroubletable);
            document.add(occtable);
            document.add(badRecordtable);
            document.add(remarkInfotable);
        } catch (DocumentException e) {