Browse Source

社保导入模块

dzx 1 month ago
parent
commit
3881c97e63

+ 30 - 0
src/main/java/com/xjrsoft/module/job/ClassGraduateTask.java

@@ -0,0 +1,30 @@
+package com.xjrsoft.module.job;
+
+import com.xjrsoft.module.base.service.IBaseClassService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author dzx
+ * @date 2025/1/14
+ */
+@Component
+@Slf4j
+public class ClassGraduateTask {
+
+    @Autowired
+    private IBaseClassService classService;
+
+    @Scheduled(cron = "0 */15 23 30 6 ?")
+    public void execute() {
+        doExecute();
+    }
+
+    public void doExecute(){
+
+    }
+
+}
+

+ 10 - 135
src/main/java/com/xjrsoft/module/personnel/controller/BasePersonnelLabourCapitalController.java

@@ -3,7 +3,6 @@ package com.xjrsoft.module.personnel.controller;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.excel.EasyExcel;
-import com.alibaba.excel.support.ExcelTypeEnum;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -17,19 +16,14 @@ import com.xjrsoft.module.personnel.dto.BasePersonnelLabourCapitalPageDto;
 import com.xjrsoft.module.personnel.dto.BasePersonnelLabourCapitalYearPageDto;
 import com.xjrsoft.module.personnel.dto.UpdateBasePersonnelLabourCapitalDto;
 import com.xjrsoft.module.personnel.entity.BasePersonnelLabourCapital;
-import com.xjrsoft.module.personnel.entity.BasePersonnelLabourCapitalData;
-import com.xjrsoft.module.personnel.entity.BasePersonnelLabourCapitalTitle;
 import com.xjrsoft.module.personnel.service.IBasePersonnelLabourCapitalService;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalMonthPageVo;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalPageVo;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalVo;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalYearPageVo;
-import com.xjrsoft.module.weekly.dto.WeeklyDutySchedulePageDto;
-import com.yomahub.liteflow.util.JsonUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -41,11 +35,8 @@ import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.validation.Valid;
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
@@ -71,7 +62,8 @@ public class BasePersonnelLabourCapitalController {
 
         LambdaQueryWrapper<BasePersonnelLabourCapital> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper
-                    .orderByDesc(BasePersonnelLabourCapital::getId)
+                .orderByDesc(BasePersonnelLabourCapital::getId)
+                .eq(BasePersonnelLabourCapital::getCategory, dto.getCategory())
                 .select(BasePersonnelLabourCapital.class,x -> VoToColumnUtil.fieldsToColumns(BasePersonnelLabourCapitalPageVo.class).contains(x.getProperty()));
         IPage<BasePersonnelLabourCapital> page = basePersonnelLabourCapitalService.page(ConventPage.getPage(dto), queryWrapper);
         PageOutput<BasePersonnelLabourCapitalPageVo> pageOutput = ConventPage.getPageOutput(page, BasePersonnelLabourCapitalPageVo.class);
@@ -136,135 +128,18 @@ public class BasePersonnelLabourCapitalController {
     @PostMapping("/import")
     @ApiOperation(value = "导入")
     public RT<Boolean> importData(@Valid AddBasePersonnelLabourCapitalDto dto, @RequestParam("file") MultipartFile file) throws IOException, ParseException {
+        if(dto.getCategory() == null){
+            return RT.error("类别不能为空");
+        }
         List<Map<Integer, Object>> excelDataList = EasyExcel.read(file.getInputStream()).sheet().headRowNumber(4 - 1).doReadSync();
         //验证数据
 
-        //构造数据
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        BasePersonnelLabourCapital basePersonnelLabourCapital = BeanUtil.toBean(dto, BasePersonnelLabourCapital.class);
-        basePersonnelLabourCapital.setDataRow(4);
-        basePersonnelLabourCapital.setPersonnelNameColumn(3);
-        basePersonnelLabourCapital.setAmountToColumn(4);
-        basePersonnelLabourCapital.setIdTypeColumn(0);
-        basePersonnelLabourCapital.setIdNumberColumn(1);
-        basePersonnelLabourCapital.setJobNumberColumn(2);
-        basePersonnelLabourCapital.setDateOfIssue(sdf.parse(dto.getDateOfIssue()));
-
-        //处理表头数据,目前只支持2行表头
-        List<BasePersonnelLabourCapitalTitle> titleList = initTitleList(excelDataList.get(0), excelDataList.get(1), basePersonnelLabourCapital);
-        //读取表内容数据
-        List<BasePersonnelLabourCapitalData> dataList = initDataList(dto, excelDataList);
-
-        //添加表头数据
-        basePersonnelLabourCapital.setBasePersonnelLabourCapitalTitleList(titleList);
-        basePersonnelLabourCapital.setBasePersonnelLabourCapitalDataList(dataList);
-
-        Boolean result = basePersonnelLabourCapitalService.add(basePersonnelLabourCapital);
-        return RT.ok(result);
-    }
-
-    /**
-     * 处理教师工资数据
-     * @param excelDataList 表格数据
-     * @return 返回集合
-     */
-    List<BasePersonnelLabourCapitalData> initDataList(AddBasePersonnelLabourCapitalDto dto, List<Map<Integer, Object>> excelDataList){
-        List<BasePersonnelLabourCapitalData> resultList = new ArrayList<>();
-        for (int i = 0; i < excelDataList.size(); i ++){
-            //跳过表头
-            if(i < 2){
-                continue;
-            }
-            Map<Integer, Object> datatMap = excelDataList.get(i);
-            BasePersonnelLabourCapitalData data = new BasePersonnelLabourCapitalData();
-            data.setName(datatMap.get(3) == null?null:datatMap.get(3).toString());
-            data.setIdNumber(datatMap.get(1) == null?null:datatMap.get(1).toString());
-            data.setIdType(datatMap.get(0) == null?null:datatMap.get(0).toString());
-            data.setAmountTo(datatMap.get(4) == null?null:datatMap.get(4).toString());
-            data.setJobNumber(datatMap.get(2) == null?null:datatMap.get(2).toString());
-            for (Integer integer : datatMap.keySet()) {
-                Object o = datatMap.get(integer);
-                if(o != null && o.toString().startsWith("(") && o.toString().endsWith(")")){
-                    datatMap.put(integer, "-" + o.toString().replace("(", "").replace(")", ""));
-                }
-            }
-            String jsonString = JsonUtil.toJsonString(datatMap);
-            jsonString = jsonString.replaceAll("- 0", "-");
-            data.setExtendJson(jsonString);
-            resultList.add(data);
+        if(dto.getCategory() == 1){
+            basePersonnelLabourCapitalService.importLabourCapitalData(dto, excelDataList);
+        }else if(dto.getCategory() == 2){
+            basePersonnelLabourCapitalService.importSocialSecurityData(dto, excelDataList);
         }
-
-        return resultList;
-    }
-
-    /**
-     * 处理表头数据
-     * @param titleRow1 第一行数据
-     * @param titleRow2 第二行数据
-     * @return 返回集合
-     */
-    List<BasePersonnelLabourCapitalTitle> initTitleList(Map<Integer, Object> titleRow1, Map<Integer, Object> titleRow2, BasePersonnelLabourCapital capital){
-        List<BasePersonnelLabourCapitalTitle> resultList = new ArrayList<>();
-        //识别第一行
-        int mergeColumns = 0, mergeRows = 0;
-        for (Integer column : titleRow1.keySet()) {
-            BasePersonnelLabourCapitalTitle title = new BasePersonnelLabourCapitalTitle();
-            Object value = titleRow1.get(column);
-            if(value == null){
-                mergeColumns = 0;
-                continue;
-            }
-            for (int i = column + 1; i < titleRow1.size(); i ++){
-                Object mergeValue = titleRow1.get(i);
-                if(mergeValue != null){
-                    break;
-                }
-                mergeColumns ++;
-            }
-
-            Object value2 = titleRow2.get(column);
-            if(value2 == null){
-                mergeRows = 2;
-            }
-
-            title.setName(value.toString());
-            title.setColumnNumber(column);
-            title.setRowsNumber(capital.getDataRow() - 1);
-            title.setMergeColumns(mergeColumns);
-            title.setMergeRows(mergeRows);
-            resultList.add(title);
-
-            mergeColumns = 0;
-            mergeRows = 0;
-        }
-
-        //识别第二行
-        for (Integer column : titleRow2.keySet()) {
-            BasePersonnelLabourCapitalTitle title = new BasePersonnelLabourCapitalTitle();
-            Object value = titleRow2.get(column);
-            if(value == null){
-                continue;
-            }
-
-            title.setName(value.toString());
-            title.setColumnNumber(column);
-            title.setRowsNumber(capital.getDataRow());
-            title.setMergeColumns(mergeColumns);
-            title.setMergeRows(mergeRows);
-            resultList.add(title);
-        }
-
-        return resultList;
-    }
-
-    @GetMapping("/export")
-    @ApiOperation(value = "导出")
-    public ResponseEntity<byte[]> exportData(@Valid WeeklyDutySchedulePageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
-        List<BasePersonnelLabourCapital> list = basePersonnelLabourCapitalService.list();
-        ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, BasePersonnelLabourCapital.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(list);
-
-        return RT.fileStream(bot.toByteArray(), "BasePersonnelLabourCapital" + ExcelTypeEnum.XLSX.getValue());
+        return RT.ok(true);
     }
 
 }

+ 7 - 0
src/main/java/com/xjrsoft/module/personnel/dto/AddBasePersonnelLabourCapitalDto.java

@@ -29,4 +29,11 @@ public class AddBasePersonnelLabourCapitalDto implements Serializable {
     @ApiModelProperty("发放年月")
     private String dateOfIssue;
 
+    @ApiModelProperty("类别(1:工资 2:社保)")
+    private Integer category = 1;
+
+
+    @ApiModelProperty("年份")
+    private Integer year;
+
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/personnel/dto/BasePersonnelLabourCapitalMonthPageDto.java

@@ -22,4 +22,7 @@ public class BasePersonnelLabourCapitalMonthPageDto extends PageInput {
 
     @ApiModelProperty("工号")
     public String jobNumber;
+
+    @ApiModelProperty("类别(1:工资 2:社保)")
+    private Integer category = 1;
 }

+ 3 - 1
src/main/java/com/xjrsoft/module/personnel/dto/BasePersonnelLabourCapitalPageDto.java

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.personnel.dto;
 
 import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -15,5 +16,6 @@ import lombok.EqualsAndHashCode;
 @EqualsAndHashCode(callSuper = false)
 public class BasePersonnelLabourCapitalPageDto extends PageInput {
 
-
+    @ApiModelProperty("类别(1:工资 2:社保)")
+    private Integer category = 1;
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/personnel/dto/BasePersonnelLabourCapitalYearPageDto.java

@@ -25,4 +25,7 @@ public class BasePersonnelLabourCapitalYearPageDto extends PageInput {
 
     @ApiModelProperty("姓名")
     public String name;
+
+    @ApiModelProperty("类别(1:工资 2:社保)")
+    private Integer category = 1;
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/personnel/entity/BasePersonnelLabourCapital.java

@@ -132,4 +132,10 @@ public class BasePersonnelLabourCapital implements Serializable {
     @EntityMapping(thisField = "id", joinField = "labourCapitalId")
     private List<BasePersonnelLabourCapitalTitle> basePersonnelLabourCapitalTitleList;
 
+    @ApiModelProperty("类别(1:工资 2:社保)")
+    private Integer category;
+
+    @ApiModelProperty("年份")
+    private Integer year;
+
 }

+ 8 - 0
src/main/java/com/xjrsoft/module/personnel/service/IBasePersonnelLabourCapitalService.java

@@ -2,13 +2,16 @@ package com.xjrsoft.module.personnel.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.personnel.dto.AddBasePersonnelLabourCapitalDto;
 import com.xjrsoft.module.personnel.dto.BasePersonnelLabourCapitalMonthPageDto;
 import com.xjrsoft.module.personnel.dto.BasePersonnelLabourCapitalYearPageDto;
 import com.xjrsoft.module.personnel.entity.BasePersonnelLabourCapital;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalMonthPageVo;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalYearPageVo;
 
+import java.text.ParseException;
 import java.util.List;
+import java.util.Map;
 
 /**
 * @title: 工资发放
@@ -44,4 +47,9 @@ public interface IBasePersonnelLabourCapitalService extends MPJBaseService<BaseP
 
     Page<BasePersonnelLabourCapitalMonthPageVo> getMonthPage(Page<BasePersonnelLabourCapitalMonthPageDto> page, BasePersonnelLabourCapitalMonthPageDto dto);
     Page<BasePersonnelLabourCapitalYearPageVo> getYearPage(Page<BasePersonnelLabourCapitalYearPageDto> page, BasePersonnelLabourCapitalYearPageDto dto);
+
+
+    Boolean importLabourCapitalData(AddBasePersonnelLabourCapitalDto dto, List<Map<Integer, Object>> excelDataList) throws ParseException;
+
+    Boolean importSocialSecurityData(AddBasePersonnelLabourCapitalDto dto, List<Map<Integer, Object>> excelDataList) throws ParseException;
 }

+ 176 - 0
src/main/java/com/xjrsoft/module/personnel/service/impl/BasePersonnelLabourCapitalServiceImpl.java

@@ -1,13 +1,18 @@
 package com.xjrsoft.module.personnel.service.impl;
 
 import cn.dev33.satoken.stp.StpUtil;
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.support.ExcelTypeEnum;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
+import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.organization.service.IUserService;
+import com.xjrsoft.module.personnel.dto.AddBasePersonnelLabourCapitalDto;
 import com.xjrsoft.module.personnel.dto.BasePersonnelLabourCapitalMonthPageDto;
 import com.xjrsoft.module.personnel.dto.BasePersonnelLabourCapitalYearPageDto;
 import com.xjrsoft.module.personnel.entity.BasePersonnelLabourCapital;
@@ -19,12 +24,24 @@ import com.xjrsoft.module.personnel.mapper.BasePersonnelLabourCapitalTitleMapper
 import com.xjrsoft.module.personnel.service.IBasePersonnelLabourCapitalService;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalMonthPageVo;
 import com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalYearPageVo;
+import com.xjrsoft.module.weekly.dto.WeeklyDutySchedulePageDto;
+import com.yomahub.liteflow.util.JsonUtil;
+import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 
+import javax.validation.Valid;
+import java.io.ByteArrayOutputStream;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
 import java.util.stream.Collectors;
 
@@ -75,6 +92,165 @@ public class BasePersonnelLabourCapitalServiceImpl extends MPJBaseServiceImpl<Ba
         return labourCapitalMapper.getYearPage(page, dto);
     }
 
+    /**
+     * 导入工资条数据
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean importLabourCapitalData(AddBasePersonnelLabourCapitalDto dto, List<Map<Integer, Object>> excelDataList) throws ParseException {
+        //构造数据
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        BasePersonnelLabourCapital basePersonnelLabourCapital = BeanUtil.toBean(dto, BasePersonnelLabourCapital.class);
+        basePersonnelLabourCapital.setDataRow(4);
+        basePersonnelLabourCapital.setPersonnelNameColumn(3);
+        basePersonnelLabourCapital.setAmountToColumn(4);
+        basePersonnelLabourCapital.setIdTypeColumn(0);
+        basePersonnelLabourCapital.setIdNumberColumn(1);
+        basePersonnelLabourCapital.setJobNumberColumn(2);
+        basePersonnelLabourCapital.setDateOfIssue(sdf.parse(dto.getDateOfIssue()));
+
+        //处理表头数据,目前只支持2行表头
+        List<BasePersonnelLabourCapitalTitle> titleList = initTitleList(excelDataList.get(0), excelDataList.get(1), basePersonnelLabourCapital);
+        //读取表内容数据
+        List<BasePersonnelLabourCapitalData> dataList = initDataList(dto, excelDataList, 2);
+
+        //添加表头数据
+        basePersonnelLabourCapital.setBasePersonnelLabourCapitalTitleList(titleList);
+        basePersonnelLabourCapital.setBasePersonnelLabourCapitalDataList(dataList);
+
+        return this.add(basePersonnelLabourCapital);
+    }
+
+    @Override
+    public Boolean importSocialSecurityData(AddBasePersonnelLabourCapitalDto dto, List<Map<Integer, Object>> excelDataList) throws ParseException {
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        BasePersonnelLabourCapital basePersonnelLabourCapital = BeanUtil.toBean(dto, BasePersonnelLabourCapital.class);
+        basePersonnelLabourCapital.setDataRow(4);
+        basePersonnelLabourCapital.setPersonnelNameColumn(3);
+        basePersonnelLabourCapital.setIdTypeColumn(0);
+        basePersonnelLabourCapital.setIdNumberColumn(1);
+        basePersonnelLabourCapital.setJobNumberColumn(2);
+        basePersonnelLabourCapital.setDateOfIssue(sdf.parse(dto.getDateOfIssue()));
+
+        List<BasePersonnelLabourCapitalTitle> titleList = initTitleList(excelDataList.get(0), new LinkedHashMap<>(), basePersonnelLabourCapital);
+        List<BasePersonnelLabourCapitalData> dataList = initDataList(dto, excelDataList, 1);
+
+        //添加表头数据
+        basePersonnelLabourCapital.setBasePersonnelLabourCapitalTitleList(titleList);
+        basePersonnelLabourCapital.setBasePersonnelLabourCapitalDataList(dataList);
+
+        return this.add(basePersonnelLabourCapital);
+    }
+
+
+    /**
+     * 处理教师工资数据
+     * @param excelDataList 表格数据
+     * @return 返回集合
+     */
+    List<BasePersonnelLabourCapitalData> initDataList(AddBasePersonnelLabourCapitalDto dto, List<Map<Integer, Object>> excelDataList, int titleRowNumber){
+        List<BasePersonnelLabourCapitalData> resultList = new ArrayList<>();
+        for (int i = 0; i < excelDataList.size(); i ++){
+            //跳过表头
+            if(i < titleRowNumber){
+                continue;
+            }
+            Map<Integer, Object> datatMap = excelDataList.get(i);
+            BasePersonnelLabourCapitalData data = new BasePersonnelLabourCapitalData();
+            data.setName(datatMap.get(3) == null?null:datatMap.get(3).toString());
+            data.setIdNumber(datatMap.get(1) == null?null:datatMap.get(1).toString());
+            data.setIdType(datatMap.get(0) == null?null:datatMap.get(0).toString());
+            data.setAmountTo(datatMap.get(4) == null?null:datatMap.get(4).toString());
+            data.setJobNumber(datatMap.get(2) == null?null:datatMap.get(2).toString());
+            for (Integer integer : datatMap.keySet()) {
+                Object o = datatMap.get(integer);
+                if(o != null && o.toString().startsWith("(") && o.toString().endsWith(")")){
+                    datatMap.put(integer, "-" + o.toString().replace("(", "").replace(")", ""));
+                }
+            }
+            String jsonString = JsonUtil.toJsonString(datatMap);
+            jsonString = jsonString.replaceAll("- 0", "-");
+            data.setExtendJson(jsonString);
+            resultList.add(data);
+        }
+
+        return resultList;
+    }
+
+    /**
+     * 处理表头数据
+     * @param titleRow1 第一行数据
+     * @param titleRow2 第二行数据
+     * @return 返回集合
+     */
+    List<BasePersonnelLabourCapitalTitle> initTitleList(Map<Integer, Object> titleRow1, Map<Integer, Object> titleRow2, BasePersonnelLabourCapital capital){
+        List<BasePersonnelLabourCapitalTitle> resultList = new ArrayList<>();
+        //识别第一行
+        int mergeColumns = 0, mergeRows = 0;
+        for (Integer column : titleRow1.keySet()) {
+            BasePersonnelLabourCapitalTitle title = new BasePersonnelLabourCapitalTitle();
+            Object value = titleRow1.get(column);
+            if(value == null){
+                mergeColumns = 0;
+                continue;
+            }
+            for (int i = column + 1; i < titleRow1.size(); i ++){
+                Object mergeValue = titleRow1.get(i);
+                if(mergeValue != null){
+                    break;
+                }
+                mergeColumns ++;
+            }
+
+            Object value2 = titleRow2.get(column);
+            if(value2 == null){
+                mergeRows = 2;
+            }
+
+            title.setName(value.toString());
+            title.setColumnNumber(column);
+            title.setRowsNumber(capital.getDataRow() - 1);
+            title.setMergeColumns(mergeColumns);
+            title.setMergeRows(mergeRows);
+            resultList.add(title);
+
+            mergeColumns = 0;
+            mergeRows = 0;
+        }
+
+        //识别第二行
+        for (Integer column : titleRow2.keySet()) {
+            BasePersonnelLabourCapitalTitle title = new BasePersonnelLabourCapitalTitle();
+            Object value = titleRow2.get(column);
+            if(value == null){
+                continue;
+            }
+
+            title.setName(value.toString());
+            title.setColumnNumber(column);
+            title.setRowsNumber(capital.getDataRow());
+            title.setMergeColumns(mergeColumns);
+            title.setMergeRows(mergeRows);
+            resultList.add(title);
+        }
+
+        return resultList;
+    }
+
+    @GetMapping("/export")
+    @ApiOperation(value = "导出")
+    public ResponseEntity<byte[]> exportData(@Valid WeeklyDutySchedulePageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
+        List<BasePersonnelLabourCapital> list = this.list();
+        ByteArrayOutputStream bot = new ByteArrayOutputStream();
+        EasyExcel.write(bot, BasePersonnelLabourCapital.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(list);
+
+        return RT.fileStream(bot.toByteArray(), "BasePersonnelLabourCapital" + ExcelTypeEnum.XLSX.getValue());
+    }
+
+
+
+
     private String getBpName(Long labourCapitalId, String columnNumber) {
         List<BasePersonnelLabourCapitalTitle> bpTitles = capitalTitleMapper.selectList(
                 Wrappers.<BasePersonnelLabourCapitalTitle>lambdaQuery()

+ 2 - 2
src/main/resources/mapper/personnel/BasePersonnelLabourCapitalMapper.xml

@@ -19,7 +19,7 @@
                 LEFT JOIN xjr_user u ON t1.job_number = u.user_name
                 LEFT JOIN xjr_user_dept_relation w ON u.id = w.user_id
                 LEFT JOIN xjr_department d ON w.dept_id = d.id
-        WHERE t.delete_mark = 0
+        WHERE t.delete_mark = 0 and t.category = #{dto.category}
         <if test="dto.year != null and dto.month != null">
             and YEAR(t.date_of_issue) = #{dto.year}
             and MONTH(t.date_of_issue) = #{dto.month}
@@ -44,7 +44,7 @@
                  LEFT JOIN xjr_department d ON w.dept_id = d.id
                  LEFT JOIN base_personnel_labour_capital_title bp ON bp.labour_capital_id = t.id
         WHERE
-            t.delete_mark = 0
+            t.delete_mark = 0 and t.category = #{dto.category}
         and YEAR(t1.date_of_issue) = #{dto.year}
         and t.job_number = #{dto.jobNumber}
     </select>

+ 21 - 0
src/main/resources/sqlScript/20241230_sql.sql

@@ -0,0 +1,21 @@
+ALTER TABLE `base_student_assessment_inspection`   
+  CHANGE `class_ids` `class_ids` VARCHAR(30) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL   COMMENT '班级Ids(多选)';
+
+-- 增加菜单地址字段长度
+ALTER TABLE `base_student_assessment_student_relation`   
+  ADD COLUMN `delete_mark` INT DEFAULT 0  NULL AFTER `score`,
+  ADD COLUMN `enabled_mark` INT DEFAULT 1  NULL AFTER `delete_mark`;
+
+-- 增加菜单地址字段长度
+ALTER TABLE `xjr_menu`   
+  CHANGE `path` `path` VARCHAR(500) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL   COMMENT '地址',
+  CHANGE `iframe_src` `iframe_src` VARCHAR(500) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL   COMMENT '外链地址';
+
+
+ALTER TABLE `wf_teacher_course_time`   
+  ADD COLUMN `file_id` BIGINT NULL   COMMENT '上传的文件(xjr_file[floder_id])' AFTER `create_date`;
+
+ALTER TABLE `base_student_assessment_student_relation`   
+  ADD COLUMN `modify_date` DATETIME DEFAULT NULL;
+  
+  

+ 32 - 0
src/main/resources/sqlScript/20250106_sql.sql

@@ -0,0 +1,32 @@
+
+DROP TABLE IF EXISTS exam_subject_score_enter;
+CREATE TABLE `exam_subject_score_enter`  (
+  `id` BIGINT NOT NULL COMMENT '主键',
+  `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME(3) NULL DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人id',
+  `modify_date` DATETIME(3) NULL DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT NULL DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT NULL DEFAULT NULL COMMENT '有效标记',
+  `course_subject_id` BIGINT NULL DEFAULT NULL COMMENT '科目id',
+  `coursename` VARCHAR(50) NULL DEFAULT NULL COMMENT '科目名称',
+  `exam_plan_id` BIGINT NULL DEFAULT NULL COMMENT '考试计划id',
+  `semester_id` BIGINT NULL DEFAULT NULL COMMENT '学期id',
+  `class_ids` LONGTEXT NULL DEFAULT NULL COMMENT '班级id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = INNODB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '成绩录入';
+
+
+ALTER TABLE `exam_subject_score`   
+  ADD COLUMN `exam_subject_score_enter_id` BIGINT NULL   COMMENT '成绩录入id';
+ALTER TABLE `exam_subject_score`   
+  CHANGE `score` `score` FLOAT(5,2) NULL   COMMENT '分数';
+
+ALTER TABLE `exam_subject_score`   
+  ADD INDEX (`exam_subject_score_enter_id`),
+  ADD INDEX (`course_subject_id`),
+  ADD INDEX (`user_id`),
+  ADD INDEX (`semester_id`),
+  ADD INDEX (`milexamid`);
+ALTER TABLE `exam_subject_score`   
+  ADD COLUMN `exam_plan_id` BIGINT NULL   COMMENT '考试计划id' AFTER `exam_subject_score_enter_id`;