dzx преди 1 година
родител
ревизия
597b55278a
променени са 62 файла, в които са добавени 1591 реда и са изтрити 140 реда
  1. 9 0
      src/main/java/com/xjrsoft/common/enums/YesOrNoEnum.java
  2. 2 2
      src/main/java/com/xjrsoft/common/utils/WeChatUtil.java
  3. 2 0
      src/main/java/com/xjrsoft/config/CommonPropertiesConfig.java
  4. 24 1
      src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertSourceController.java
  5. 130 13
      src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertTemplateController.java
  6. 27 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertConditionsDto.java
  7. 36 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertDto.java
  8. 24 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertSourceFieldListDto.java
  9. 22 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplateFieldListDto.java
  10. 20 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplateListDto.java
  11. 3 1
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplatePageDto.java
  12. 2 7
      src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertSource.java
  13. 94 0
      src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertSourceField.java
  14. 79 0
      src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertTemplateField.java
  15. 17 0
      src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertSourceFieldMapper.java
  16. 16 0
      src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertTemplateFieldMapper.java
  17. 6 0
      src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertTemplateMapper.java
  18. 4 0
      src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertSourceService.java
  19. 11 0
      src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertTemplateService.java
  20. 24 4
      src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertSourceServiceImpl.java
  21. 34 0
      src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertTemplateServiceImpl.java
  22. 35 0
      src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertSourceFieldVo.java
  23. 35 0
      src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertTemplateFieldVo.java
  24. 3 0
      src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertTemplatePageVo.java
  25. 36 4
      src/main/java/com/xjrsoft/module/oa/controller/NewsController.java
  26. 1 1
      src/main/java/com/xjrsoft/module/oa/vo/NewsCountTypeVo.java
  27. 4 2
      src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java
  28. 4 2
      src/main/java/com/xjrsoft/module/student/entity/BaseStudent.java
  29. 6 0
      src/main/java/com/xjrsoft/module/student/entity/BaseStudentSchoolRoll.java
  30. 6 0
      src/main/java/com/xjrsoft/module/student/entity/BaseStudentUser.java
  31. 16 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentContactService.java
  32. 16 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentFamilyService.java
  33. 18 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentService.java
  34. 16 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentSubsidizeService.java
  35. 2 1
      src/main/java/com/xjrsoft/module/student/service/IStudentManagerService.java
  36. 20 0
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentContactServiceImpl.java
  37. 20 0
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentFamilyServiceImpl.java
  38. 26 0
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentServiceImpl.java
  39. 20 0
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSubsidizeServiceImpl.java
  40. 575 85
      src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java
  41. 35 3
      src/main/java/com/xjrsoft/module/system/controller/SystemUpdateMessageController.java
  42. 3 0
      src/main/java/com/xjrsoft/module/system/dto/AddMenuDto.java
  43. 3 0
      src/main/java/com/xjrsoft/module/system/dto/MenuTreeDto.java
  44. 3 0
      src/main/java/com/xjrsoft/module/system/entity/Menu.java
  45. 4 0
      src/main/java/com/xjrsoft/module/system/mapper/SystemUpdateMessageNoticeMapper.java
  46. 2 0
      src/main/java/com/xjrsoft/module/system/service/ISystemUpdateMessageNoticeService.java
  47. 3 1
      src/main/java/com/xjrsoft/module/system/service/impl/MenuServiceImpl.java
  48. 5 0
      src/main/java/com/xjrsoft/module/system/service/impl/SystemUpdateMessageNoticeServiceImpl.java
  49. 3 0
      src/main/java/com/xjrsoft/module/system/vo/MenuTreeVo.java
  50. 3 0
      src/main/java/com/xjrsoft/module/system/vo/MenuVo.java
  51. 3 0
      src/main/java/com/xjrsoft/module/system/vo/SystemUpdateMessageVo.java
  52. 2 0
      src/main/java/com/xjrsoft/module/workflow/controller/WorkflowExecuteController.java
  53. 45 12
      src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java
  54. 4 0
      src/main/java/com/xjrsoft/module/workflow/vo/LaunchAndApproveVo.java
  55. 3 0
      src/main/java/com/xjrsoft/module/workflow/vo/PendingTaskVo.java
  56. 3 0
      src/main/java/com/xjrsoft/module/workflow/vo/UserDefinedProcessRecordListVo.java
  57. 1 0
      src/main/resources/application-dev.yml
  58. 1 0
      src/main/resources/application-pre.yml
  59. 1 0
      src/main/resources/application-prod.yml
  60. 9 0
      src/main/resources/mapper/dataexpert/DataExpertSourceMapper.xml
  61. 9 0
      src/main/resources/mapper/dataexpert/DataExpertTemplateMapper.xml
  62. 1 1
      src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml

+ 9 - 0
src/main/java/com/xjrsoft/common/enums/YesOrNoEnum.java

@@ -30,4 +30,13 @@ public enum YesOrNoEnum {
         this.code = code;
         this.value = message;
     }
+
+    public static Integer getCode(String value) {
+        for (YesOrNoEnum item : values()) {
+            if (item.getValue().equals(value)) {
+                return  item.getCode();
+            }
+        }
+        return null;
+    }
 }

+ 2 - 2
src/main/java/com/xjrsoft/common/utils/WeChatUtil.java

@@ -190,8 +190,8 @@ public class WeChatUtil {
     //       }
     public Boolean sendTemplateMessage(JSONObject object){
         String active = SpringUtil.getActiveProfile();
-        if(!"prod".equals(active)){
-            log.info("非正式环境,无法执行数据推送");
+        if("dev".equals(active)){
+            log.info("测试环境,无法执行数据推送");
             return false;
         }
         String token = this.getToken(WeChatType.WEWEB);

+ 2 - 0
src/main/java/com/xjrsoft/config/CommonPropertiesConfig.java

@@ -39,4 +39,6 @@ public class CommonPropertiesConfig {
     private List<String> excludeUrls;
 
     private List<String> whiteList;
+
+    private Integer approvalTime;
 }

+ 24 - 1
src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertSourceController.java

@@ -3,16 +3,19 @@ package com.xjrsoft.module.dataexpert.controller;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.dataexpert.dto.AddDataExpertSourceDto;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.dto.DataExpertSourcePageDto;
 import com.xjrsoft.module.dataexpert.dto.UpdateDataExpertSourceDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
 import com.xjrsoft.module.dataexpert.service.IDataExpertSourceService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertSourcePageVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertSourceVo;
 import io.swagger.annotations.Api;
@@ -73,6 +76,20 @@ public class DataExpertSourceController {
         return RT.ok(BeanUtil.copyToList(list, DataExpertSourceVo.class));
     }
 
+    @GetMapping(value = "/info-source-type")
+    @ApiOperation(value="根据sourceType查询数据导出-数据源设置信息")
+    @SaCheckPermission("dataexpertsource:detail")
+    public RT<DataExpertSourceVo> list(@RequestParam String sourceType){
+        DataExpertSource dataExpertSource = dataExpertSourceService.getOne(
+                new QueryWrapper<DataExpertSource>().lambda()
+                .eq(DataExpertSource::getSourceType, sourceType)
+        );
+        if (dataExpertSource == null) {
+            return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(dataExpertSource, DataExpertSourceVo.class));
+    }
+
     @GetMapping(value = "/info")
     @ApiOperation(value="根据id查询数据导出-数据源设置信息")
     @SaCheckPermission("dataexpertsource:detail")
@@ -111,7 +128,13 @@ public class DataExpertSourceController {
     @SaCheckPermission("dataexpertsource:delete")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
         return RT.ok(dataExpertSourceService.delete(ids));
-
     }
 
+
+    @GetMapping(value = "/field-list")
+    @ApiOperation(value="数据源字段")
+    @SaCheckPermission("dataexpertsource:field-list")
+    public RT<List<DataExpertSourceFieldVo>> fieldList(@Valid DataExpertSourceFieldListDto dto){
+        return RT.ok(dataExpertSourceService.getFieldList(dto));
+    }
 }

+ 130 - 13
src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertTemplateController.java

@@ -2,22 +2,41 @@ package com.xjrsoft.module.dataexpert.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.dataexpert.dto.AddDataExpertTemplateDto;
+import com.xjrsoft.module.dataexpert.dto.DataExpertConditionsDto;
+import com.xjrsoft.module.dataexpert.dto.DataExpertDto;
+import com.xjrsoft.module.dataexpert.dto.DataExpertTemplateListDto;
 import com.xjrsoft.module.dataexpert.dto.DataExpertTemplatePageDto;
 import com.xjrsoft.module.dataexpert.dto.UpdateDataExpertTemplateDto;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
 import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
+import com.xjrsoft.module.dataexpert.service.IDataExpertSourceService;
 import com.xjrsoft.module.dataexpert.service.IDataExpertTemplateService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertTemplatePageVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+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;
@@ -28,7 +47,13 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
 * @title: 数据导出-数据模板
@@ -42,7 +67,7 @@ import java.util.List;
 @AllArgsConstructor
 public class DataExpertTemplateController {
 
-
+    private final IDataExpertSourceService dataExpertSourceService;
     private final IDataExpertTemplateService dataExpertTemplateService;
 
     @GetMapping(value = "/page")
@@ -50,11 +75,14 @@ public class DataExpertTemplateController {
     @SaCheckPermission("dataexperttemplate:detail")
     public RT<PageOutput<DataExpertTemplatePageVo>> page(@Valid DataExpertTemplatePageDto dto){
 
-        LambdaQueryWrapper<DataExpertTemplate> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper
-                    .orderByDesc(DataExpertTemplate::getId)
-                .select(DataExpertTemplate.class,x -> VoToColumnUtil.fieldsToColumns(DataExpertTemplatePageVo.class).contains(x.getProperty()));
-        IPage<DataExpertTemplate> page = dataExpertTemplateService.page(ConventPage.getPage(dto), queryWrapper);
+        MPJLambdaWrapper<DataExpertTemplate> select = new MPJLambdaWrapper<DataExpertTemplate>()
+                .leftJoin(DataExpertSource.class, DataExpertSource::getId, DataExpertTemplate::getDataExpertSourceId)
+                .orderByDesc(DataExpertTemplate::getId)
+                .like(StrUtil.isNotEmpty(dto.getName()), DataExpertTemplate::getName, dto.getName())
+                .selectAs(DataExpertSource::getName, DataExpertTemplatePageVo::getDataExpertSourceName)
+                .selectAs(DataExpertTemplate::getId, DataExpertTemplatePageVo::getId)
+                .select(DataExpertTemplate.class, x -> VoToColumnUtil.fieldsToColumns(DataExpertTemplatePageVo.class).contains(x.getProperty()));
+        IPage<DataExpertTemplatePageVo> page = dataExpertTemplateService.selectJoinListPage(ConventPage.getPage(dto), DataExpertTemplatePageVo.class, select);
         PageOutput<DataExpertTemplatePageVo> pageOutput = ConventPage.getPageOutput(page, DataExpertTemplatePageVo.class);
         return RT.ok(pageOutput);
     }
@@ -70,6 +98,17 @@ public class DataExpertTemplateController {
         return RT.ok(BeanUtil.toBean(dataExpertTemplate, DataExpertTemplateVo.class));
     }
 
+    @GetMapping(value = "/list")
+    @ApiOperation(value="根据数据源id查询数据导出-数据模板信息")
+    @SaCheckPermission("dataexperttemplate:detail")
+    public RT<List<DataExpertTemplateVo>> list(@Valid DataExpertTemplateListDto dto){
+        List<DataExpertTemplate> list = dataExpertTemplateService.list(
+            new QueryWrapper<DataExpertTemplate>().lambda()
+            .eq(DataExpertTemplate::getDataExpertSourceId, dto.getDataExpertSourceId())
+        );
+        return RT.ok(BeanUtil.copyToList(list, DataExpertTemplateVo.class));
+    }
+
 
     @PostMapping
     @ApiOperation(value = "新增数据导出-数据模板")
@@ -84,7 +123,6 @@ public class DataExpertTemplateController {
     @ApiOperation(value = "修改数据导出-数据模板")
     @SaCheckPermission("dataexperttemplate:edit")
     public RT<Boolean> update(@Valid @RequestBody UpdateDataExpertTemplateDto dto){
-
         DataExpertTemplate dataExpertTemplate = BeanUtil.toBean(dto, DataExpertTemplate.class);
         return RT.ok(dataExpertTemplateService.updateById(dataExpertTemplate));
 
@@ -100,12 +138,91 @@ public class DataExpertTemplateController {
     @GetMapping(value = "/field-info")
     @ApiOperation(value="根据id查询数据导出-数据模板信息")
     @SaCheckPermission("dataexperttemplate:detail")
-    public RT<DataExpertTemplateVo> getFieldInfo(@RequestParam Long id){
-        DataExpertTemplate dataExpertTemplate = dataExpertTemplateService.getById(id);
-        if (dataExpertTemplate == null) {
-            return RT.error("找不到此数据!");
+    public RT<List<DataExpertTemplateFieldVo>> getFieldInfo(@RequestParam Long id){
+        return RT.ok(dataExpertTemplateService.getFieldList(id));
+    }
+
+
+    @PostMapping("/export-query")
+    @ApiOperation(value = "导出")
+    public ResponseEntity<byte[]> exportData(@Valid @RequestBody DataExpertDto dto) throws SQLException, IOException {
+        //拼接字段
+        List<String> fields = new ArrayList<>();
+        Map<Integer, String> showNameMap = new HashMap<>();
+        List<String> titleList = new ArrayList<>();
+        List<DataExpertTemplateFieldVo> fieldList = dto.getFieldList();
+        DataExpertSource expertSource;
+        String conditions = "";
+        if(dto.getDataExpertSourceId() != null){
+            expertSource = dataExpertSourceService.getById(dto.getDataExpertSourceId());
+            for (int i = 0; i < fieldList.size(); i ++){
+                DataExpertTemplateFieldVo fieldVo = fieldList.get(i);
+                showNameMap.put(i, fieldVo.getShowName());
+                fields.add("ifnull(" + fieldVo.getFieldName() + ", '')");
+                titleList.add(fieldVo.getShowName());
+            }
+        }else{
+            //查出想要的数据
+            DataExpertTemplate template = dataExpertTemplateService.getById(dto.getDataExpertTemplateId());
+            expertSource = dataExpertSourceService.getById(template.getDataExpertSourceId());
+            String fieldJsonStr = template.getFieldJson();
+            JsonParser parser = new JsonParser();
+            JsonArray fieldJson = parser.parse(fieldJsonStr).getAsJsonArray();
+            int i = 0;
+            for (JsonElement jsonElement : fieldJson) {
+                JsonObject jsonObject = jsonElement.getAsJsonObject();
+                showNameMap.put(i, jsonObject.get("name").getAsString());
+                fields.add("ifnull(" + jsonObject.get("field").getAsString() + ", '')");
+                titleList.add(jsonObject.get("name").getAsString());
+                i ++;
+            }
         }
-        return RT.ok(BeanUtil.toBean(dataExpertTemplate, DataExpertTemplateVo.class));
+        if(dto.getIds() != null && !dto.getIds().isEmpty()){
+            String ids = dto.getIds().toString().substring(1, dto.getIds().toString().length() - 1).replaceAll(",","','").replaceAll(" ", "");
+            conditions += " and id in ('" + ids + "')";
+        }
+        if(dto.getConditions() != null && dto.getConditions().size() != 0){
+            for (DataExpertConditionsDto condition : dto.getConditions()) {
+                if(condition.getKeyType() == 1 && condition.getKeyValue() != null && !"".equals(condition.getKeyValue())){
+                    conditions += " and " + condition.getKeyName() + " like '%" + condition.getKeyValue() + "%'";
+                }else if(condition.getKeyType() == 2 && condition.getKeyValue() != null && !"".equals(condition.getKeyValue())){
+                    conditions += " and " + condition.getKeyName() + " in (";
+                    String[] keyValues = condition.getKeyValue().split(",");
+                    for(int k = 0; k < keyValues.length; k ++){
+                        if(k > 0){
+                            conditions += ",";
+                        }
+                        conditions += "'" + keyValues[k] + "'";
+                    }
+                    conditions += ")";
+                }
+            }
+        }
+
+        //查出导出的数据并进行组装
+        List<String[]> dataList = dataExpertTemplateService.getDataList(fields.toString().substring(1, fields.toString().length() - 1), expertSource.getViewName(), conditions);
+
+        List<String[]> allDataList = new ArrayList<>();
+        allDataList.add(titleList.toArray(new String[titleList.size()]));
+        allDataList.addAll(dataList);
+
+        String sheetName = "数据";
+        Workbook workbook = new XSSFWorkbook();
+        Sheet sheet = workbook.createSheet(sheetName);
+        sheet.createFreezePane(0, 1, 0, 1);
+        for (int i = 0; i < allDataList.size(); i ++){
+            Row row = sheet.createRow(i);
+            String[] data = allDataList.get(i);
+            for (int j = 0; j < data.length; j ++ ){
+                Cell cell = row.createCell(j);
+                cell.setCellValue(data[j]);
+            }
+        }
+
+        String fileName = "导出结果" + ExcelTypeEnum.XLSX.getValue();
+        ByteArrayOutputStream bot = new ByteArrayOutputStream();
+        workbook.write(bot);
+        return RT.fileStream(bot.toByteArray(), fileName);
     }
 
 }

+ 27 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertConditionsDto.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+
+/**
+* @title: 数据导出-数据源设置字段查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertConditionsDto {
+
+    @ApiModelProperty("keyName")
+    private String keyName;
+
+    @ApiModelProperty("keyValue")
+    private String keyValue;
+
+    @ApiModelProperty("keyType")
+    private Integer keyType;
+}

+ 36 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertDto.java

@@ -0,0 +1,36 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import com.google.gson.JsonArray;
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+* @title: 数据导出-数据源设置字段查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertDto {
+
+    @ApiModelProperty("数据模板(data_expert_template)")
+    private Long dataExpertTemplateId;
+
+    @ApiModelProperty("数据字段")
+    private List<DataExpertTemplateFieldVo> fieldList;
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+    @ApiModelProperty("数据行id")
+    private List<String> ids;
+
+    @ApiModelProperty("条件(json)")
+    private List<DataExpertConditionsDto> conditions;
+
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertSourceFieldListDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 数据导出-数据源设置字段查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertSourceFieldListDto {
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 22 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplateFieldListDto.java

@@ -0,0 +1,22 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+* @title: 数据导出-数据源设置字段查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertTemplateFieldListDto {
+
+    @ApiModelProperty("数据模板(data_expert_template)")
+    private Long dataExpertTemplateId;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 20 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplateListDto.java

@@ -0,0 +1,20 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 数据导出-数据模板分页查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertTemplateListDto {
+
+    @ApiModelProperty("数据源id")
+    private Long dataExpertSourceId;
+}

+ 3 - 1
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplatePageDto.java

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.dataexpert.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 DataExpertTemplatePageDto extends PageInput {
 
-
+    @ApiModelProperty("模板名称")
+    private String name;
 }

+ 2 - 7
src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertSource.java

@@ -84,13 +84,8 @@ public class DataExpertSource implements Serializable {
     */
     @ApiModelProperty("数据源类型")
     private String sourceType;
-    /**
-    * magicapi地址
-    */
-    @ApiModelProperty("magicapi地址")
-    private String apiUrl;
 
-    @ApiModelProperty("字段配置")
-    private String fieldJson;
+    @ApiModelProperty("视图名称")
+    private String viewName;
 
 }

+ 94 - 0
src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertSourceField.java

@@ -0,0 +1,94 @@
+package com.xjrsoft.module.dataexpert.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 数据导出-数据源设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+@TableName("data_expert_source_field")
+@ApiModel(value = "data_expert_source_field", description = "数据导出-数据源-字段设置")
+public class DataExpertSourceField implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Integer sortCode;
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+    /**
+    * 数据源名称
+    */
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+    /**
+    * 数据源类型
+    */
+    @ApiModelProperty("映射名称")
+    private String showName;
+    /**
+    * magicapi地址
+    */
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 79 - 0
src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertTemplateField.java

@@ -0,0 +1,79 @@
+package com.xjrsoft.module.dataexpert.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 数据导出-数据源-字段设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+@TableName("data_expert_template_field")
+@ApiModel(value = "data_expert_template_field", description = "数据导出-数据源-字段设置")
+public class DataExpertTemplateField implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+
+    @ApiModelProperty("")
+    private Integer sortCode;
+
+    @ApiModelProperty("模板名称")
+    private String name;
+
+    @ApiModelProperty("数据模板(data_expert_template)")
+    private Long dataExpertTemplateId;
+
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+
+    @ApiModelProperty("映射名称")
+    private String showName;
+
+
+}

+ 17 - 0
src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertSourceFieldMapper.java

@@ -0,0 +1,17 @@
+package com.xjrsoft.module.dataexpert.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSourceField;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 数据导出-数据源设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Mapper
+public interface DataExpertSourceFieldMapper extends MPJBaseMapper<DataExpertSourceField> {
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertTemplateFieldMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.dataexpert.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.dataexpert.entity.DataExpertTemplateField;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 数据导出-数据源设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Mapper
+public interface DataExpertTemplateFieldMapper extends MPJBaseMapper<DataExpertTemplateField> {
+
+}

+ 6 - 0
src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertTemplateMapper.java

@@ -3,6 +3,10 @@ package com.xjrsoft.module.dataexpert.mapper;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
 
 /**
 * @title: 数据导出-数据模板
@@ -13,4 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface DataExpertTemplateMapper extends MPJBaseMapper<DataExpertTemplate> {
 
+    @Select("select #{fields} from #{viewName}")
+    List<String[]> getDataList(@Param("fields") String fields, @Param("viewName") String viewName);
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertSourceService.java

@@ -1,7 +1,9 @@
 package com.xjrsoft.module.dataexpert.service;
 
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
 
 import java.util.List;
 
@@ -36,4 +38,6 @@ public interface IDataExpertSourceService extends MPJBaseService<DataExpertSourc
     * @return
     */
     Boolean delete(List<Long> ids);
+
+    List<DataExpertSourceFieldVo> getFieldList(DataExpertSourceFieldListDto dto);
 }

+ 11 - 0
src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertTemplateService.java

@@ -1,7 +1,13 @@
 package com.xjrsoft.module.dataexpert.service;
 
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
+
+import java.sql.SQLException;
+import java.util.List;
 
 /**
 * @title: 数据导出-数据模板
@@ -11,4 +17,9 @@ import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
 */
 
 public interface IDataExpertTemplateService extends MPJBaseService<DataExpertTemplate> {
+
+    List<DataExpertTemplateFieldVo> getFieldList(Long id);
+
+
+    List<String[]> getDataList(String fields, String viewName, String conditions) throws SQLException;
 }

+ 24 - 4
src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertSourceServiceImpl.java

@@ -1,9 +1,17 @@
 package com.xjrsoft.module.dataexpert.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.common.enums.DeleteMark;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSourceField;
+import com.xjrsoft.module.dataexpert.mapper.DataExpertSourceFieldMapper;
 import com.xjrsoft.module.dataexpert.mapper.DataExpertSourceMapper;
 import com.xjrsoft.module.dataexpert.service.IDataExpertSourceService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -19,27 +27,39 @@ import java.util.List;
 @Service
 @AllArgsConstructor
 public class DataExpertSourceServiceImpl extends MPJBaseServiceImpl<DataExpertSourceMapper, DataExpertSource> implements IDataExpertSourceService {
-    private final DataExpertSourceMapper dataExpertSourceDataExpertSourceMapper;
+    private final DataExpertSourceMapper expertSourceMapper;
+    private final DataExpertSourceFieldMapper fieldMapper;
 
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean add(DataExpertSource dataExpertSource) {
-        dataExpertSourceDataExpertSourceMapper.insert(dataExpertSource);
+        expertSourceMapper.insert(dataExpertSource);
         return true;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean update(DataExpertSource dataExpertSource) {
-        dataExpertSourceDataExpertSourceMapper.updateById(dataExpertSource);
+        expertSourceMapper.updateById(dataExpertSource);
         return true;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean delete(List<Long> ids) {
-        dataExpertSourceDataExpertSourceMapper.deleteBatchIds(ids);
+        expertSourceMapper.deleteBatchIds(ids);
         return true;
     }
+
+    @Override
+    public List<DataExpertSourceFieldVo> getFieldList(DataExpertSourceFieldListDto dto) {
+        List<DataExpertSourceField> list = fieldMapper.selectList(
+            new QueryWrapper<DataExpertSourceField>().lambda()
+            .eq(dto.getDataExpertSourceId() != null, DataExpertSourceField::getDataExpertSourceId, dto.getDataExpertSourceId())
+            .eq(StrUtil.isNotEmpty(dto.getDataGroup()), DataExpertSourceField::getDataGroup, dto.getDataGroup())
+            .eq(DataExpertSourceField::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        return BeanUtil.copyToList(list, DataExpertSourceFieldVo.class);
+    }
 }

+ 34 - 0
src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertTemplateServiceImpl.java

@@ -1,12 +1,26 @@
 package com.xjrsoft.module.dataexpert.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.db.Db;
+import cn.hutool.db.Entity;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.common.constant.GlobalConstant;
+import com.xjrsoft.common.utils.DatasourceUtil;
 import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
+import com.xjrsoft.module.dataexpert.entity.DataExpertTemplateField;
+import com.xjrsoft.module.dataexpert.mapper.DataExpertTemplateFieldMapper;
 import com.xjrsoft.module.dataexpert.mapper.DataExpertTemplateMapper;
 import com.xjrsoft.module.dataexpert.service.IDataExpertTemplateService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
+import com.xjrsoft.module.schedule.entity.JianyueData;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.List;
+
 /**
 * @title: 数据导出-数据模板
 * @Author dzx
@@ -16,4 +30,24 @@ import org.springframework.stereotype.Service;
 @Service
 @AllArgsConstructor
 public class DataExpertTemplateServiceImpl extends MPJBaseServiceImpl<DataExpertTemplateMapper, DataExpertTemplate> implements IDataExpertTemplateService {
+    private final DataExpertTemplateFieldMapper fieldMapper;
+
+    private final DataExpertTemplateMapper templateMapper;
+    @Override
+    public List<DataExpertTemplateFieldVo> getFieldList(Long id) {
+        List<DataExpertTemplateField> list = fieldMapper.selectList(
+            new QueryWrapper<DataExpertTemplateField>().lambda()
+            .eq(DataExpertTemplateField::getDataExpertTemplateId, id)
+        );
+        return BeanUtil.copyToList(list, DataExpertTemplateFieldVo.class);
+    }
+
+    @Override
+    public List<String[]> getDataList(String fields, String viewName, String conditions) throws SQLException {
+        DataSource datasource = DatasourceUtil.getDataSource(GlobalConstant.DEFAULT_DATASOURCE_KEY);
+        Db use = Db.use(datasource);
+        String sql = "SELECT " + fields + " FROM " + viewName + " WHERE 1 = 1 " + conditions;
+        List<String[]> list = use.query(sql, String[].class);
+        return list;
+    }
 }

+ 35 - 0
src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertSourceFieldVo.java

@@ -0,0 +1,35 @@
+package com.xjrsoft.module.dataexpert.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 数据导出-数据源设置表单出参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertSourceFieldVo {
+
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+
+    @ApiModelProperty("映射名称")
+    private String showName;
+
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 35 - 0
src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertTemplateFieldVo.java

@@ -0,0 +1,35 @@
+package com.xjrsoft.module.dataexpert.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 数据导出-数据源设置表单出参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertTemplateFieldVo {
+
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+
+    @ApiModelProperty("映射名称")
+    private String showName;
+
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 3 - 0
src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertTemplatePageVo.java

@@ -70,4 +70,7 @@ public class DataExpertTemplatePageVo {
     @ApiModelProperty("字段配置")
     private String fieldJson;
 
+    @ApiModelProperty("数据源名称")
+    private String dataExpertSourceName;
+
 }

+ 36 - 4
src/main/java/com/xjrsoft/module/oa/controller/NewsController.java

@@ -15,7 +15,14 @@ import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
-import com.xjrsoft.module.oa.dto.*;
+import com.xjrsoft.module.oa.dto.AddNewsDto;
+import com.xjrsoft.module.oa.dto.ChangeNewsDto;
+import com.xjrsoft.module.oa.dto.DeleteNewsRelationDto;
+import com.xjrsoft.module.oa.dto.NewsPageDto;
+import com.xjrsoft.module.oa.dto.NewsRelationPageDto;
+import com.xjrsoft.module.oa.dto.NewsReplyDto;
+import com.xjrsoft.module.oa.dto.UpdateNewsDto;
+import com.xjrsoft.module.oa.dto.UpdateNewsRelationDto;
 import com.xjrsoft.module.oa.entity.News;
 import com.xjrsoft.module.oa.entity.NewsAppendix;
 import com.xjrsoft.module.oa.entity.NewsRelation;
@@ -24,7 +31,12 @@ import com.xjrsoft.module.oa.service.INewsAppendixService;
 import com.xjrsoft.module.oa.service.INewsRelationConfigService;
 import com.xjrsoft.module.oa.service.INewsRelationService;
 import com.xjrsoft.module.oa.service.INewsService;
-import com.xjrsoft.module.oa.vo.*;
+import com.xjrsoft.module.oa.vo.NewsAppendixVo;
+import com.xjrsoft.module.oa.vo.NewsCountTypeVo;
+import com.xjrsoft.module.oa.vo.NewsPageVo;
+import com.xjrsoft.module.oa.vo.NewsRelationConfigVo;
+import com.xjrsoft.module.oa.vo.NewsRelationVo;
+import com.xjrsoft.module.oa.vo.NewsVo;
 import com.xjrsoft.module.organization.entity.Department;
 import com.xjrsoft.module.organization.mapper.DepartmentMapper;
 import com.xjrsoft.module.system.entity.File;
@@ -37,7 +49,14 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang3.BooleanUtils;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.time.LocalDateTime;
 import java.util.ArrayList;
@@ -63,6 +82,7 @@ public class NewsController {
     private INewsRelationConfigService newsRelationConfigService;
     private final ISystemUpdateMessageService systemUpdateMessageService;
 
+
     @GetMapping
     @ApiOperation(value = "获取新闻分页")
     public RT<PageOutput<NewsPageVo>> page(NewsPageDto dto) {
@@ -324,7 +344,7 @@ public class NewsController {
     @ApiOperation(value = "未读类型统计")
     public RT<List<NewsCountTypeVo>> countType() {
         List<NewsCountTypeVo> newsCountTypeVoList = new ArrayList<>();
-        Integer typeIds[] = {1, 2, 3};
+        Integer typeIds[] = {1, 2, 3, 4};
         for (Integer typeId : typeIds) {
             NewsCountTypeVo newsCountTypeVo = new NewsCountTypeVo();
             News news = new News();
@@ -420,6 +440,18 @@ public class NewsController {
                 newsCountTypeVo.setTime(news.getReleaseTime());
                 newsCountTypeVo.setTitle(news.getFullHead());
             }
+            if(typeId == 4){
+                long count = systemUpdateMessageService.count(
+                        MPJWrappers.<SystemUpdateMessage>lambdaJoin()
+                                .leftJoin(SystemUpdateMessageNotice.class, SystemUpdateMessageNotice::getSystemUpdateMessageId, SystemUpdateMessage::getId)
+                                .eq(SystemUpdateMessageNotice::getUserId, StpUtil.getLoginIdAsLong())
+                                .eq(SystemUpdateMessage::getDeleteMark, DeleteMark.NODELETE.getCode())
+                                .eq(SystemUpdateMessage::getStatus, 1)
+                                .eq(SystemUpdateMessageNotice::getStatus, 0)
+                );
+                newsCountTypeVo.setTypeId(typeId);
+                newsCountTypeVo.setTotal(count);
+            }
             newsCountTypeVoList.add(newsCountTypeVo);
         }
         return RT.ok(newsCountTypeVoList);

+ 1 - 1
src/main/java/com/xjrsoft/module/oa/vo/NewsCountTypeVo.java

@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
 @Data
 public class NewsCountTypeVo {
 
-    @ApiModelProperty("类型(1-新闻2-公告)")
+    @ApiModelProperty("类型(1-新闻2-公告4-系统更新消息)")
     private Integer typeId;
 
     @ApiModelProperty("最后一条标题")

+ 4 - 2
src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java

@@ -46,6 +46,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.validation.Valid;
 import java.io.IOException;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -210,8 +211,9 @@ public class StudentManagerController {
 
     @PostMapping("/import")
     @ApiOperation(value = "导入学生信息")
-    public RT<Boolean> importData(@RequestParam("file") MultipartFile file) throws IOException {
+    public RT<Boolean> importData(@RequestParam("file") MultipartFile file) throws IOException, ParseException {
         List<Map<Integer, Object>> excelDataList = EasyExcel.read(file.getInputStream()).sheet().headRowNumber(3).doReadSync();
-        return RT.ok(true);
+
+        return RT.ok(studentManagerService.importStudentData(excelDataList));
     }
 }

+ 4 - 2
src/main/java/com/xjrsoft/module/student/entity/BaseStudent.java

@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.Date;
 
@@ -107,7 +108,7 @@ public class BaseStudent implements Serializable {
      */
     @ApiModelProperty("出生日期")
     @JsonFormat(pattern = "yyyy-MM-dd")
-    private LocalDateTime dayOfBirth;
+    private LocalDate dayOfBirth;
     /**
      * 生日类型(xjr_dictionary_item[date_type])
      */
@@ -259,5 +260,6 @@ public class BaseStudent implements Serializable {
     @ApiModelProperty("特长")
     private String specialty;
 
-
+    @ApiModelProperty("籍贯类型")
+    private String nativePlaceType;
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentSchoolRoll.java

@@ -201,4 +201,10 @@ public class BaseStudentSchoolRoll implements Serializable {
     @ApiModelProperty("备注")
     private String remark;
 
+    @ApiModelProperty("考号")
+    private String candidateNumber;
+
+    @ApiModelProperty("学习形式")
+    private String rollModality;
+
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentUser.java

@@ -204,4 +204,10 @@ public class BaseStudentUser implements Serializable {
 
     @ApiModelProperty("出生日期")
     private LocalDateTime birthDate;
+
+    @ApiModelProperty("qq号码")
+    private String qqNumber;
+
+    @ApiModelProperty("微信号")
+    private String wechatNumber;
 }

+ 16 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentContactService.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.student.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.entity.BaseStudentContact;
+import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
+
+/**
+* @title: 奖学金申请
+* @Author dzx
+* @Date: 2023-11-23
+* @Version 1.0
+*/
+
+public interface IBaseStudentContactService extends MPJBaseService<BaseStudentContact> {
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentFamilyService.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.student.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.entity.BaseStudentFamily;
+import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
+
+/**
+* @title: 奖学金申请
+* @Author dzx
+* @Date: 2023-11-23
+* @Version 1.0
+*/
+
+public interface IBaseStudentFamilyService extends MPJBaseService<BaseStudentFamily> {
+
+}

+ 18 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentService.java

@@ -0,0 +1,18 @@
+package com.xjrsoft.module.student.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.entity.BaseStudent;
+import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
+import com.xjrsoft.module.student.mapper.BaseStudentMapper;
+import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
+
+/**
+* @title: 奖学金申请
+* @Author dzx
+* @Date: 2023-11-23
+* @Version 1.0
+*/
+
+public interface IBaseStudentService extends MPJBaseService<BaseStudent> {
+    StudentPersonalInfoVo getPersonalInfo(Long userId);
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentSubsidizeService.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.student.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
+import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
+
+/**
+* @title: 奖学金申请
+* @Author dzx
+* @Date: 2023-11-23
+* @Version 1.0
+*/
+
+public interface IBaseStudentSubsidizeService extends MPJBaseService<BaseStudentSubsidize> {
+
+}

+ 2 - 1
src/main/java/com/xjrsoft/module/student/service/IStudentManagerService.java

@@ -6,6 +6,7 @@ import com.xjrsoft.module.student.vo.BaseStudentClassVo;
 import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
 import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
 
+import java.text.ParseException;
 import java.util.List;
 import java.util.Map;
 
@@ -50,5 +51,5 @@ public interface IStudentManagerService extends MPJBaseService<BaseStudentUser>
      */
     PersonalPortraitPersonalInfoVo getPersonalInfo(Long userId);
 
-    Boolean importStudentData(List<Map<Integer, Object>> excelDataList);
+    Boolean importStudentData(List<Map<Integer, Object>> excelDataList) throws ParseException;
 }

+ 20 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentContactServiceImpl.java

@@ -0,0 +1,20 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.entity.BaseStudentContact;
+import com.xjrsoft.module.student.mapper.BaseStudentContactMapper;
+import com.xjrsoft.module.student.service.IBaseStudentContactService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 助学金申请
+* @Author dzx
+* @Date: 2023-11-24
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseStudentContactServiceImpl extends MPJBaseServiceImpl<BaseStudentContactMapper, BaseStudentContact> implements IBaseStudentContactService {
+
+}

+ 20 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentFamilyServiceImpl.java

@@ -0,0 +1,20 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.entity.BaseStudentFamily;
+import com.xjrsoft.module.student.mapper.BaseStudentFamilyMapper;
+import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 助学金申请
+* @Author dzx
+* @Date: 2023-11-24
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseStudentFamilyServiceImpl extends MPJBaseServiceImpl<BaseStudentFamilyMapper, BaseStudentFamily> implements IBaseStudentFamilyService {
+
+}

+ 26 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentServiceImpl.java

@@ -0,0 +1,26 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.entity.BaseStudent;
+import com.xjrsoft.module.student.mapper.BaseStudentMapper;
+import com.xjrsoft.module.student.service.IBaseStudentService;
+import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 助学金申请
+* @Author dzx
+* @Date: 2023-11-24
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseStudentServiceImpl extends MPJBaseServiceImpl<BaseStudentMapper, BaseStudent> implements IBaseStudentService {
+    private final BaseStudentMapper studentMapper;
+
+    @Override
+    public StudentPersonalInfoVo getPersonalInfo(Long userId){
+        return studentMapper.getPersonalInfo(userId);
+    };
+}

+ 20 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSubsidizeServiceImpl.java

@@ -0,0 +1,20 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
+import com.xjrsoft.module.student.mapper.BaseStudentSubsidizeMapper;
+import com.xjrsoft.module.student.service.IBaseStudentSubsidizeService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 助学金申请
+* @Author dzx
+* @Date: 2023-11-24
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseStudentSubsidizeServiceImpl extends MPJBaseServiceImpl<BaseStudentSubsidizeMapper, BaseStudentSubsidize> implements IBaseStudentSubsidizeService {
+
+}

+ 575 - 85
src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java

@@ -1,16 +1,25 @@
 package com.xjrsoft.module.student.service.impl;
 
 import cn.dev33.satoken.secure.BCrypt;
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.enums.GenderDictionaryEnum;
 import com.xjrsoft.common.enums.RoleEnum;
+import com.xjrsoft.common.enums.YesOrNoEnum;
+import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.module.base.entity.BaseClass;
+import com.xjrsoft.module.base.entity.BaseGrade;
+import com.xjrsoft.module.base.entity.BaseMajorSet;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
+import com.xjrsoft.module.base.mapper.BaseGradeMapper;
+import com.xjrsoft.module.base.mapper.BaseMajorSetMapper;
 import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
 import com.xjrsoft.module.student.entity.BaseStudent;
@@ -20,31 +29,42 @@ import com.xjrsoft.module.student.entity.BaseStudentFamilyMember;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
-import com.xjrsoft.module.student.mapper.BaseStudentContactMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentFamilyMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentFamilyMemberMapper;
-import com.xjrsoft.module.student.mapper.BaseStudentMapper;
-import com.xjrsoft.module.student.mapper.BaseStudentSchoolRollMapper;
-import com.xjrsoft.module.student.mapper.BaseStudentSubsidizeMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentUserMapper;
+import com.xjrsoft.module.student.service.IBaseStudentContactService;
+import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
+import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
+import com.xjrsoft.module.student.service.IBaseStudentService;
+import com.xjrsoft.module.student.service.IBaseStudentSubsidizeService;
 import com.xjrsoft.module.student.service.IStudentManagerService;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
 import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
 import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
+import com.xjrsoft.module.system.entity.Area;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
 import com.xjrsoft.module.system.entity.DictionaryItem;
 import com.xjrsoft.module.system.mapper.DictionarydetailMapper;
+import com.xjrsoft.module.system.mapper.DictionaryitemMapper;
+import com.xjrsoft.module.system.service.IAreaService;
 import lombok.AllArgsConstructor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 @Service
@@ -52,17 +72,21 @@ import java.util.stream.Collectors;
 public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUserMapper, BaseStudentUser> implements IStudentManagerService {
     private final com.xjrsoft.module.student.mapper.BaseStudentUserMapper studentbaseManagerBaseStudentUserMapper;
 
-    private final BaseStudentMapper studentbaseManagerBaseStudentMapper;
+    private final IBaseStudentService baseStudentService;
     private final BaseClassMapper baseClassMapper;
-    private final BaseStudentContactMapper studentbaseManagerBaseStudentContactMapper;
-    private final BaseStudentFamilyMapper studentbaseManagerBaseStudentFamilyMapper;
-    private final BaseStudentFamilyMemberMapper studentbaseManagerBaseStudentFamilyMemberMapper;
-    private final BaseStudentSchoolRollMapper studentbaseManagerBaseStudentSchoolRollMapper;
-    private final BaseStudentSubsidizeMapper studentbaseManagerBaseStudentSubsidizeMapper;
+    private final IBaseStudentContactService studentContactService;
+    private final BaseStudentFamilyMapper familyMapper;
+    private final BaseStudentFamilyMemberMapper familyMemberMapper;
 
     private final UserRoleRelationMapper userRoleRelationMapper;
-    private final BaseStudentMapper baseStudentMapper;
     private final DictionarydetailMapper dictionarydetailMapper;
+    private final IAreaService areaService;
+    private final BaseGradeMapper baseGradeMapper;
+    private final BaseMajorSetMapper baseMajorSetMapper;
+    private final DictionaryitemMapper dictionaryitemMapper;
+    private final IBaseStudentSchoolRollService schoolRollService;
+    private final IBaseStudentSubsidizeService subsidizeService;
+    private final IBaseStudentFamilyService familyService;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -76,27 +100,27 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         studentbaseManagerBaseStudentUserMapper.insert(baseStudentUser);
         for (BaseStudent baseStudent : baseStudentUser.getBaseStudentList()) {
             baseStudent.setUserId(baseStudentUser.getId());
-            studentbaseManagerBaseStudentMapper.insert(baseStudent);
+            baseStudentService.save(baseStudent);
         }
         for (BaseStudentContact baseStudentContact : baseStudentUser.getBaseStudentContactList()) {
             baseStudentContact.setUserId(baseStudentUser.getId());
-            studentbaseManagerBaseStudentContactMapper.insert(baseStudentContact);
+            studentContactService.save(baseStudentContact);
         }
         for (BaseStudentFamily BaseStudentFamily : baseStudentUser.getBaseStudentFamilyList()) {
             BaseStudentFamily.setUserId(baseStudentUser.getId());
-            studentbaseManagerBaseStudentFamilyMapper.insert(BaseStudentFamily);
+            familyMapper.insert(BaseStudentFamily);
         }
         for (BaseStudentFamilyMember BaseStudentFamilyMember : baseStudentUser.getBaseStudentFamilyMemberList()) {
             BaseStudentFamilyMember.setUserId(baseStudentUser.getId());
-            studentbaseManagerBaseStudentFamilyMemberMapper.insert(BaseStudentFamilyMember);
+            familyMemberMapper.insert(BaseStudentFamilyMember);
         }
         for (BaseStudentSchoolRoll baseStudentSchoolRoll : baseStudentUser.getBaseStudentSchoolRollList()) {
             baseStudentSchoolRoll.setUserId(baseStudentUser.getId());
-            studentbaseManagerBaseStudentSchoolRollMapper.insert(baseStudentSchoolRoll);
+            schoolRollService.save(baseStudentSchoolRoll);
         }
         for (BaseStudentSubsidize baseStudentSubsidize : baseStudentUser.getBaseStudentSubsidizeList()) {
             baseStudentSubsidize.setUserId(baseStudentUser.getId());
-            studentbaseManagerBaseStudentSubsidizeMapper.insert(baseStudentSubsidize);
+            subsidizeService.save(baseStudentSubsidize);
         }
 
         // 添加角色
@@ -115,7 +139,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         //********************************* BaseStudent  增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BaseStudent> baseStudentList = studentbaseManagerBaseStudentMapper.selectList(Wrappers.lambdaQuery(BaseStudent.class).eq(BaseStudent::getUserId, baseStudentUser.getId()).select(BaseStudent::getId));
+            List<BaseStudent> baseStudentList = baseStudentService.list(Wrappers.lambdaQuery(BaseStudent.class).eq(BaseStudent::getUserId, baseStudentUser.getId()).select(BaseStudent::getId));
             List<Long> baseStudentIds = baseStudentList.stream().map(BaseStudent::getId).collect(Collectors.toList());
             //原有子表单 没有被删除的主键
             List<Long> baseStudentOldIds = baseStudentUser.getBaseStudentList().stream().map(BaseStudent::getId).filter(Objects::nonNull).collect(Collectors.toList());
@@ -125,18 +149,18 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
             for (BaseStudent baseStudent : baseStudentUser.getBaseStudentList()) {
                 //如果不等于空则修改
                 if (baseStudent.getId() != null) {
-                    studentbaseManagerBaseStudentMapper.updateById(baseStudent);
+                    baseStudentService.updateById(baseStudent);
                 }
                 //如果等于空 则新增
                 else {
                     //已经不存在的id 删除
                     baseStudent.setUserId(baseStudentUser.getId());
-                    studentbaseManagerBaseStudentMapper.insert(baseStudent);
+                    baseStudentService.save(baseStudent);
                 }
             }
             //已经不存在的id 删除
             if (baseStudentRemoveIds.size() > 0) {
-                studentbaseManagerBaseStudentMapper.deleteBatchIds(baseStudentRemoveIds);
+                baseStudentService.removeBatchByIds(baseStudentRemoveIds);
             }
         }
         //********************************* BaseStudent  增删改  结束 *******************************************/
@@ -144,7 +168,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         //********************************* BaseStudentContact  增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BaseStudentContact> baseStudentContactList = studentbaseManagerBaseStudentContactMapper.selectList(Wrappers.lambdaQuery(BaseStudentContact.class).eq(BaseStudentContact::getUserId, baseStudentUser.getId()).select(BaseStudentContact::getId));
+            List<BaseStudentContact> baseStudentContactList = studentContactService.list(Wrappers.lambdaQuery(BaseStudentContact.class).eq(BaseStudentContact::getUserId, baseStudentUser.getId()).select(BaseStudentContact::getId));
             List<Long> baseStudentContactIds = baseStudentContactList.stream().map(BaseStudentContact::getId).collect(Collectors.toList());
             //原有子表单 没有被删除的主键
             List<Long> baseStudentContactOldIds = baseStudentUser.getBaseStudentContactList().stream().map(BaseStudentContact::getId).filter(Objects::nonNull).collect(Collectors.toList());
@@ -154,18 +178,18 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
             for (BaseStudentContact baseStudentContact : baseStudentUser.getBaseStudentContactList()) {
                 //如果不等于空则修改
                 if (baseStudentContact.getId() != null) {
-                    studentbaseManagerBaseStudentContactMapper.updateById(baseStudentContact);
+                    studentContactService.updateById(baseStudentContact);
                 }
                 //如果等于空 则新增
                 else {
                     //已经不存在的id 删除
                     baseStudentContact.setUserId(baseStudentUser.getId());
-                    studentbaseManagerBaseStudentContactMapper.insert(baseStudentContact);
+                    studentContactService.save(baseStudentContact);
                 }
             }
             //已经不存在的id 删除
             if (baseStudentContactRemoveIds.size() > 0) {
-                studentbaseManagerBaseStudentContactMapper.deleteBatchIds(baseStudentContactRemoveIds);
+                studentContactService.removeBatchByIds(baseStudentContactRemoveIds);
             }
         }
         //********************************* BaseStudentContact  增删改  结束 *******************************************/
@@ -173,7 +197,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         //********************************* BaseStudentFamily  增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BaseStudentFamily> BaseStudentFamilyList = studentbaseManagerBaseStudentFamilyMapper.selectList(Wrappers.lambdaQuery(BaseStudentFamily.class).eq(BaseStudentFamily::getUserId, baseStudentUser.getId()).select(BaseStudentFamily::getId));
+            List<BaseStudentFamily> BaseStudentFamilyList = familyMapper.selectList(Wrappers.lambdaQuery(BaseStudentFamily.class).eq(BaseStudentFamily::getUserId, baseStudentUser.getId()).select(BaseStudentFamily::getId));
             List<Long> BaseStudentFamilyIds = BaseStudentFamilyList.stream().map(BaseStudentFamily::getId).collect(Collectors.toList());
             //原有子表单 没有被删除的主键
             List<Long> BaseStudentFamilyOldIds = baseStudentUser.getBaseStudentFamilyList().stream().map(BaseStudentFamily::getId).filter(Objects::nonNull).collect(Collectors.toList());
@@ -183,18 +207,18 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
             for (BaseStudentFamily BaseStudentFamily : baseStudentUser.getBaseStudentFamilyList()) {
                 //如果不等于空则修改
                 if (BaseStudentFamily.getId() != null) {
-                    studentbaseManagerBaseStudentFamilyMapper.updateById(BaseStudentFamily);
+                    familyMapper.updateById(BaseStudentFamily);
                 }
                 //如果等于空 则新增
                 else {
                     //已经不存在的id 删除
                     BaseStudentFamily.setUserId(baseStudentUser.getId());
-                    studentbaseManagerBaseStudentFamilyMapper.insert(BaseStudentFamily);
+                    familyMapper.insert(BaseStudentFamily);
                 }
             }
             //已经不存在的id 删除
             if (BaseStudentFamilyRemoveIds.size() > 0) {
-                studentbaseManagerBaseStudentFamilyMapper.deleteBatchIds(BaseStudentFamilyRemoveIds);
+                familyMapper.deleteBatchIds(BaseStudentFamilyRemoveIds);
             }
         }
         //********************************* BaseStudentFamily  增删改  结束 *******************************************/
@@ -202,7 +226,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         //********************************* BaseStudentFamilyMember  增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BaseStudentFamilyMember> BaseStudentFamilyMemberList = studentbaseManagerBaseStudentFamilyMemberMapper.selectList(Wrappers.lambdaQuery(BaseStudentFamilyMember.class).eq(BaseStudentFamilyMember::getUserId, baseStudentUser.getId()).select(BaseStudentFamilyMember::getId));
+            List<BaseStudentFamilyMember> BaseStudentFamilyMemberList = familyMemberMapper.selectList(Wrappers.lambdaQuery(BaseStudentFamilyMember.class).eq(BaseStudentFamilyMember::getUserId, baseStudentUser.getId()).select(BaseStudentFamilyMember::getId));
             List<Long> BaseStudentFamilyMemberIds = BaseStudentFamilyMemberList.stream().map(BaseStudentFamilyMember::getId).collect(Collectors.toList());
             //原有子表单 没有被删除的主键
             List<Long> BaseStudentFamilyMemberOldIds = baseStudentUser.getBaseStudentFamilyMemberList().stream().map(BaseStudentFamilyMember::getId).filter(Objects::nonNull).collect(Collectors.toList());
@@ -212,18 +236,18 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
             for (BaseStudentFamilyMember BaseStudentFamilyMember : baseStudentUser.getBaseStudentFamilyMemberList()) {
                 //如果不等于空则修改
                 if (BaseStudentFamilyMember.getId() != null) {
-                    studentbaseManagerBaseStudentFamilyMemberMapper.updateById(BaseStudentFamilyMember);
+                    familyMemberMapper.updateById(BaseStudentFamilyMember);
                 }
                 //如果等于空 则新增
                 else {
                     //已经不存在的id 删除
                     BaseStudentFamilyMember.setUserId(baseStudentUser.getId());
-                    studentbaseManagerBaseStudentFamilyMemberMapper.insert(BaseStudentFamilyMember);
+                    familyMemberMapper.insert(BaseStudentFamilyMember);
                 }
             }
             //已经不存在的id 删除
             if (BaseStudentFamilyMemberRemoveIds.size() > 0) {
-                studentbaseManagerBaseStudentFamilyMemberMapper.deleteBatchIds(BaseStudentFamilyMemberRemoveIds);
+                familyMemberMapper.deleteBatchIds(BaseStudentFamilyMemberRemoveIds);
             }
         }
         //********************************* BaseStudentFamilyMember  增删改  结束 *******************************************/
@@ -231,7 +255,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         //********************************* StudentSchoolRoll  增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BaseStudentSchoolRoll> baseStudentSchoolRollList = studentbaseManagerBaseStudentSchoolRollMapper.selectList(Wrappers.lambdaQuery(BaseStudentSchoolRoll.class).eq(BaseStudentSchoolRoll::getUserId, baseStudentUser.getId()).select(BaseStudentSchoolRoll::getId));
+            List<BaseStudentSchoolRoll> baseStudentSchoolRollList = schoolRollService.list(Wrappers.lambdaQuery(BaseStudentSchoolRoll.class).eq(BaseStudentSchoolRoll::getUserId, baseStudentUser.getId()).select(BaseStudentSchoolRoll::getId));
             List<Long> baseStudentSchoolRollIds = baseStudentSchoolRollList.stream().map(BaseStudentSchoolRoll::getId).collect(Collectors.toList());
             //原有子表单 没有被删除的主键
             List<Long> baseStudentSchoolRollOldIds = baseStudentUser.getBaseStudentSchoolRollList().stream().map(BaseStudentSchoolRoll::getId).filter(Objects::nonNull).collect(Collectors.toList());
@@ -241,18 +265,18 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
             for (BaseStudentSchoolRoll baseStudentSchoolRoll : baseStudentUser.getBaseStudentSchoolRollList()) {
                 //如果不等于空则修改
                 if (baseStudentSchoolRoll.getId() != null) {
-                    studentbaseManagerBaseStudentSchoolRollMapper.updateById(baseStudentSchoolRoll);
+                    schoolRollService.updateById(baseStudentSchoolRoll);
                 }
                 //如果等于空 则新增
                 else {
                     //已经不存在的id 删除
                     baseStudentSchoolRoll.setUserId(baseStudentUser.getId());
-                    studentbaseManagerBaseStudentSchoolRollMapper.insert(baseStudentSchoolRoll);
+                    schoolRollService.save(baseStudentSchoolRoll);
                 }
             }
             //已经不存在的id 删除
             if (baseStudentSchoolRollRemoveIds.size() > 0) {
-                studentbaseManagerBaseStudentSchoolRollMapper.deleteBatchIds(baseStudentSchoolRollRemoveIds);
+                schoolRollService.removeBatchByIds(baseStudentSchoolRollRemoveIds);
             }
         }
         //********************************* StudentSchoolRoll  增删改  结束 *******************************************/
@@ -260,7 +284,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         //********************************* BaseStudentSubsidize 增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BaseStudentSubsidize> baseStudentSubsidizeList = studentbaseManagerBaseStudentSubsidizeMapper.selectList(Wrappers.lambdaQuery(BaseStudentSubsidize.class).eq(BaseStudentSubsidize::getUserId, baseStudentUser.getId()).select(BaseStudentSubsidize::getId));
+            List<BaseStudentSubsidize> baseStudentSubsidizeList = subsidizeService.list(Wrappers.lambdaQuery(BaseStudentSubsidize.class).eq(BaseStudentSubsidize::getUserId, baseStudentUser.getId()).select(BaseStudentSubsidize::getId));
             List<Long> baseStudentSubsidizeIds = baseStudentSubsidizeList.stream().map(BaseStudentSubsidize::getId).collect(Collectors.toList());
             //原有子表单 没有被删除的主键
             List<Long> baseStudentSubsidizeOldIds = baseStudentUser.getBaseStudentSubsidizeList().stream().map(BaseStudentSubsidize::getId).filter(Objects::nonNull).collect(Collectors.toList());
@@ -270,18 +294,18 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
             for (BaseStudentSubsidize BaseStudentEducation : baseStudentUser.getBaseStudentSubsidizeList()) {
                 //如果不等于空则修改
                 if (BaseStudentEducation.getId() != null) {
-                    studentbaseManagerBaseStudentSubsidizeMapper.updateById(BaseStudentEducation);
+                    subsidizeService.updateById(BaseStudentEducation);
                 }
                 //如果等于空 则新增
                 else {
                     //已经不存在的id 删除
                     BaseStudentEducation.setUserId(baseStudentUser.getId());
-                    studentbaseManagerBaseStudentSubsidizeMapper.insert(BaseStudentEducation);
+                    subsidizeService.save(BaseStudentEducation);
                 }
             }
             //已经不存在的id 删除
             if (baseStudentSubsidizeRemoveIds.size() > 0) {
-                studentbaseManagerBaseStudentSubsidizeMapper.deleteBatchIds(baseStudentSubsidizeRemoveIds);
+                subsidizeService.removeBatchByIds(baseStudentSubsidizeRemoveIds);
             }
         }
         //********************************* BaseStudentEducation  增删改  结束 *******************************************/
@@ -292,12 +316,12 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     @Transactional(rollbackFor = Exception.class)
     public Boolean delete(List<Long> ids) {
         studentbaseManagerBaseStudentUserMapper.deleteBatchIds(ids);
-        studentbaseManagerBaseStudentMapper.delete(Wrappers.lambdaQuery(BaseStudent.class).in(BaseStudent::getUserId, ids));
-        studentbaseManagerBaseStudentContactMapper.delete(Wrappers.lambdaQuery(BaseStudentContact.class).in(BaseStudentContact::getUserId, ids));
-        studentbaseManagerBaseStudentFamilyMapper.delete(Wrappers.lambdaQuery(BaseStudentFamily.class).in(BaseStudentFamily::getUserId, ids));
-        studentbaseManagerBaseStudentFamilyMemberMapper.delete(Wrappers.lambdaQuery(BaseStudentFamilyMember.class).in(BaseStudentFamilyMember::getUserId, ids));
-        studentbaseManagerBaseStudentSchoolRollMapper.delete(Wrappers.lambdaQuery(BaseStudentSchoolRoll.class).in(BaseStudentSchoolRoll::getUserId, ids));
-        studentbaseManagerBaseStudentSubsidizeMapper.delete(Wrappers.lambdaQuery(BaseStudentSubsidize.class).in(BaseStudentSubsidize::getUserId, ids));
+        baseStudentService.remove(Wrappers.lambdaQuery(BaseStudent.class).in(BaseStudent::getUserId, ids));
+        studentContactService.remove(Wrappers.lambdaQuery(BaseStudentContact.class).in(BaseStudentContact::getUserId, ids));
+        familyMapper.delete(Wrappers.lambdaQuery(BaseStudentFamily.class).in(BaseStudentFamily::getUserId, ids));
+        familyMemberMapper.delete(Wrappers.lambdaQuery(BaseStudentFamilyMember.class).in(BaseStudentFamilyMember::getUserId, ids));
+        schoolRollService.remove(Wrappers.lambdaQuery(BaseStudentSchoolRoll.class).in(BaseStudentSchoolRoll::getUserId, ids));
+        subsidizeService.remove(Wrappers.lambdaQuery(BaseStudentSubsidize.class).in(BaseStudentSubsidize::getUserId, ids));
         return true;
     }
 
@@ -322,10 +346,10 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
      */
     @Override
     public PersonalPortraitPersonalInfoVo getPersonalInfo(Long userId) {
-        StudentPersonalInfoVo info = studentbaseManagerBaseStudentMapper.getPersonalInfo(userId);
+        StudentPersonalInfoVo info = baseStudentService.getPersonalInfo(userId);
         PersonalPortraitPersonalInfoVo p = new PersonalPortraitPersonalInfoVo();
         BeanUtils.copyProperties(info, p);
-        List<BaseStudentFamilyMember> members = studentbaseManagerBaseStudentFamilyMemberMapper.selectList(
+        List<BaseStudentFamilyMember> members = familyMemberMapper.selectList(
             new QueryWrapper<BaseStudentFamilyMember>().lambda()
             .eq(BaseStudentFamilyMember::getUserId, userId)
             .eq(BaseStudentFamilyMember::getIsGuardian, 1)
@@ -344,20 +368,28 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     }
 
     @Override
-    public Boolean importStudentData(List<Map<Integer, Object>> excelDataList) {
+    public Boolean importStudentData(List<Map<Integer, Object>> excelDataList) throws ParseException {
+        List<String> idNumbers = new ArrayList<>();
+        for (Map<Integer, Object> integerObjectMap : excelDataList) {
+            idNumbers.add(integerObjectMap.get(0).toString());
+        }
         //查询所有学生的用户信息,组装起来备用
         List<BaseStudentUser> studentUsers = this.selectJoinList(BaseStudentUser.class,
             new MPJLambdaWrapper<BaseStudentUser>()
             .leftJoin(BaseStudent.class, BaseStudent::getUserId, BaseStudentUser::getId)
+            .in(BaseStudentUser::getCredentialNumber, idNumbers)
         );
         Map<String, BaseStudentUser> studentUserMap = new HashMap<>();
+        Set<Long> userIds = new HashSet<>();
         for (BaseStudentUser studentUser : studentUsers) {
             studentUserMap.put(studentUser.getCredentialNumber(), studentUser);
+            userIds.add(studentUser.getId());
         }
         //查询所有的学生信息,组装起来备用
-        List<BaseStudent> baseStudents = baseStudentMapper.selectJoinList(BaseStudent.class,
+        List<BaseStudent> baseStudents = baseStudentService.selectJoinList(BaseStudent.class,
             new MPJLambdaWrapper<BaseStudent>()
             .leftJoin(BaseStudentUser.class, BaseStudentUser::getId, BaseStudent::getUserId)
+            .in(BaseStudentUser::getCredentialNumber, idNumbers)
         );
         Map<Long, BaseStudent> baseStudentMap = new HashMap<>();
         for (BaseStudent studentUser : baseStudents) {
@@ -365,81 +397,492 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         }
         //查询所用到的字典
         Map<String, String> dictionary = initDictionary();
+        //查行政区划
+        List<Area> areaList = areaService.list();
+        Map<String, Long> areaMap = new HashMap<>();
+        for (Area area : areaList) {
+            areaMap.put(area.getName(), Long.parseLong(area.getCode()));
+        }
+
+        List<BaseStudentSchoolRoll> baseStudentSchoolRolls = schoolRollService.selectJoinList(BaseStudentSchoolRoll.class,
+                new MPJLambdaWrapper<BaseStudentSchoolRoll>()
+                        .leftJoin(BaseStudent.class, BaseStudent::getUserId, BaseStudentSchoolRoll::getUserId)
+                        .in(!userIds.isEmpty(), BaseStudentSchoolRoll::getUserId, userIds)
+        );
+        Map<Long, BaseStudentSchoolRoll> studentSchoolRollMap = new HashMap<>();
+        for (BaseStudentSchoolRoll schoolRoll : baseStudentSchoolRolls) {
+            studentSchoolRollMap.put(schoolRoll.getUserId(), schoolRoll);
+        }
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+
+        //查询年级
+        List<BaseGrade> gradeList = baseGradeMapper.selectList(new QueryWrapper<BaseGrade>().lambda().eq(BaseGrade::getDeleteMark, DeleteMark.NODELETE.getCode()));
+        Map<String, Long> gradeMap = new HashMap<>();
+        for (BaseGrade grade : gradeList) {
+            gradeMap.put(grade.getName(), grade.getId());
+        }
+        //查询班级
+        List<BaseClass> classList = baseClassMapper.selectList(new QueryWrapper<BaseClass>().lambda().eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode()));
+        Map<String, Long> classMap = new HashMap<>();
+        for (BaseClass grade : classList) {
+            classMap.put(grade.getName(), grade.getId());
+        }
+        //查询专业
+        List<BaseMajorSet> majorSetList = baseMajorSetMapper.selectList(new QueryWrapper<BaseMajorSet>().lambda().eq(BaseMajorSet::getDeleteMark, DeleteMark.NODELETE.getCode()));
+        Map<String, Long> majorSetMap = new HashMap<>();
+        for (BaseMajorSet baseMajorSet : majorSetList) {
+            majorSetMap.put(baseMajorSet.getName(), baseMajorSet.getId());
+        }
+        //查询资助
+        List<BaseStudentSubsidize> baseStudentSubsidizes = subsidizeService.list(null);
+        Map<Long, BaseStudentSubsidize> subsidizesMap = new HashMap<>();
+        for (BaseStudentSubsidize el : baseStudentSubsidizes) {
+            subsidizesMap.put(el.getUserId(), el);
+        }
+
+        //查询家庭
+        List<BaseStudentFamily> studentFamilies = familyMapper.selectList(null);
+        Map<Long, BaseStudentFamily> familyMap = new HashMap<>();
+        for (BaseStudentFamily el : studentFamilies) {
+            familyMap.put(el.getUserId(), el);
+        }
+
+        //查询联系信息
+        List<BaseStudentContact> contactList = studentContactService.list();
+        Map<Long, BaseStudentContact> contactMap = new HashMap<>();
+        for (BaseStudentContact el : contactList) {
+            contactMap.put(el.getUserId(), el);
+        }
 
         List<BaseStudentUser> updateStudentUserList = new ArrayList();
         List<BaseStudent> updateBaseStudentList = new ArrayList();
+        List<BaseStudentSchoolRoll> updateSchoolRollList = new ArrayList();
+        List<BaseStudentSubsidize> updateSubsidizeList = new ArrayList();
+        List<BaseStudentFamily> updateFamilyList = new ArrayList();
+        List<BaseStudentContact> updateContactList = new ArrayList();
+
+        List<BaseStudentUser> insertStudentUserList = new ArrayList();
+        List<BaseStudent> insertBaseStudentList = new ArrayList();
+        List<BaseStudentSchoolRoll> insertSchoolRollList = new ArrayList();
+        List<BaseStudentSubsidize> insertSubsidizeList = new ArrayList();
+        List<BaseStudentFamily> insertFamilyList = new ArrayList();
+        List<BaseStudentContact> insertContactList = new ArrayList();
+
+        long createUserId = StpUtil.getLoginIdAsLong();
+//        long createUserId = 1000000000000000000L;
+        int row = 3;
         for (Map<Integer, Object> dataMaps : excelDataList) {
+            if(dataMaps.get(0) == null){
+                throw new MyException("第" + row + "行数据身份证号为空,无法导入");
+            }
             String credentialNumber = dataMaps.get(0).toString();//身份证号
             //已存在,更新
-            BaseStudentUser user;
+            BaseStudentUser user = studentUserMap.get(credentialNumber);
             BaseStudent baseStudent;
-            if(studentUserMap.containsKey(credentialNumber)){
-                //更新用户数据
-                user = studentUserMap.get(credentialNumber);
-                baseStudent = baseStudentMap.get(user.getId());
+            BaseStudentSchoolRoll schoolRoll;
+            BaseStudentSubsidize subsidize;
+            BaseStudentFamily studentFamily;
+            BaseStudentContact contact;
+            long userId = IdUtil.getSnowflakeNextId();
+            if(user != null){
+                userId = user.getId();
+                user.setDeleteMark(DeleteMark.NODELETE.getCode());
 
-                updateStudentUserList.add(user);
-                updateBaseStudentList.add(baseStudent);
+                baseStudent = baseStudentMap.get(user.getId());
+                if(baseStudent == null){
+                    baseStudent = new BaseStudent();
+                    baseStudent.setUserId(userId);
+                    baseStudent.setCreateUserId(createUserId);
+                    baseStudent.setCreateDate(LocalDateTime.now());
+                }
+                baseStudent.setDeleteMark(DeleteMark.NODELETE.getCode());
+
+                schoolRoll = studentSchoolRollMap.get(user.getId());
+                if(schoolRoll == null){
+                    schoolRoll = new BaseStudentSchoolRoll();
+                    schoolRoll.setUserId(userId);
+                    schoolRoll.setCreateUserId(createUserId);
+                    schoolRoll.setCreateDate(LocalDateTime.now());
+                }
+                schoolRoll.setDeleteMark(DeleteMark.NODELETE.getCode());
+
+                subsidize = subsidizesMap.get(user.getId());
+                if(subsidize == null){
+                    subsidize = new BaseStudentSubsidize();
+                    subsidize.setUserId(userId);
+                    subsidize.setCreateUserId(createUserId);
+                    subsidize.setCreateDate(LocalDateTime.now());
+                }
+                subsidize.setDeleteMark(DeleteMark.NODELETE.getCode());
+
+                studentFamily = familyMap.get(user.getId());
+                if(studentFamily == null){
+                    studentFamily = new BaseStudentFamily();
+                    studentFamily.setUserId(userId);
+                    studentFamily.setCreateUserId(createUserId);
+                    studentFamily.setCreateDate(LocalDateTime.now());
+                }
+                studentFamily.setDeleteMark(DeleteMark.NODELETE.getCode());
+
+                contact = contactMap.get(user.getId());
+                if(contact == null){
+                    contact = new BaseStudentContact();
+                    contact.setUserId(userId);
+                    contact.setCreateUserId(createUserId);
+                    contact.setCreateDate(LocalDateTime.now());
+                }
+                contact.setDeleteMark(DeleteMark.NODELETE.getCode());
             }else{
                 user = new BaseStudentUser();
+                user.setId(userId);
+                user.setUserName(credentialNumber);
+                user.setCredentialNumber(credentialNumber);
+                user.setCreateUserId(createUserId);
+                user.setCreateDate(LocalDateTime.now());
+
                 baseStudent = new BaseStudent();
+                baseStudent.setUserId(userId);
+                baseStudent.setCreateUserId(createUserId);
+                baseStudent.setCreateDate(LocalDateTime.now());
+
+                schoolRoll = new BaseStudentSchoolRoll();
+                schoolRoll.setUserId(userId);
+                schoolRoll.setCreateUserId(createUserId);
+                schoolRoll.setCreateDate(LocalDateTime.now());
+
+                subsidize = new BaseStudentSubsidize();
+                subsidize.setUserId(userId);
+                subsidize.setCreateUserId(createUserId);
+                subsidize.setCreateDate(LocalDateTime.now());
+
+                studentFamily = new BaseStudentFamily();
+                studentFamily.setUserId(userId);
+                studentFamily.setCreateUserId(createUserId);
+                studentFamily.setCreateDate(LocalDateTime.now());
+
+                contact = new BaseStudentContact();
+                contact.setUserId(userId);
+                contact.setCreateUserId(createUserId);
+                contact.setCreateDate(LocalDateTime.now());
             }
             //设置字段值
-            if(dataMaps.get(1).toString() != null && "".equals(dataMaps.get(1).toString())){
+            if(dataMaps.get(1) != null && !"".equals(dataMaps.get(1).toString())){
                 baseStudent.setStudentId(dataMaps.get(1).toString());//学号
             }
-            if(dataMaps.get(3).toString() != null && "".equals(dataMaps.get(3).toString())){
+            if(dataMaps.get(2) != null && !"".equals(dataMaps.get(2).toString())){
+                schoolRoll.setCandidateNumber(dataMaps.get(2).toString());//考号
+            }
+            if(dataMaps.get(3) != null && !"".equals(dataMaps.get(3).toString())){
                 user.setName(dataMaps.get(3).toString());//姓名
             }
-            if(dataMaps.get(4).toString() != null && "".equals(dataMaps.get(4).toString())){
+            if(dataMaps.get(4) != null && !"".equals(dataMaps.get(4).toString())){
                 user.setGender(GenderDictionaryEnum.getCode(dataMaps.get(4).toString()));//性别
             }
-            if(dataMaps.get(5).toString() != null && "".equals(dataMaps.get(5).toString())){
+            if(dataMaps.get(5) != null && !"".equals(dataMaps.get(5).toString())){
                 user.setMobile(dataMaps.get(5).toString());//手机号
             }
-            if(dataMaps.get(6).toString() != null && "".equals(dataMaps.get(6).toString())){
+            if(dataMaps.get(6) != null && !"".equals(dataMaps.get(6).toString())){
                 user.setEmail(dataMaps.get(6).toString());//邮箱
             }
-            if(dataMaps.get(7).toString() != null && "".equals(dataMaps.get(7).toString())){
+            if(dataMaps.get(7) != null && !"".equals(dataMaps.get(7).toString())){
                 baseStudent.setAsName(dataMaps.get(7).toString());//别名
             }
-            if(dataMaps.get(8).toString() != null && "".equals(dataMaps.get(8).toString())){
+            if(dataMaps.get(8) != null && !"".equals(dataMaps.get(8).toString())){
                 baseStudent.setEnName(dataMaps.get(8).toString());//英文名
             }
-            if(dataMaps.get(9).toString() != null && "".equals(dataMaps.get(9).toString())){
+            if(dataMaps.get(9) != null && !"".equals(dataMaps.get(9).toString())){
                 baseStudent.setPyName(dataMaps.get(9).toString());//姓名拼音
             }
-            if(dataMaps.get(10).toString() != null && "".equals(dataMaps.get(10).toString())){
-                baseStudent.setPyName(dataMaps.get(10).toString());//曾用名
+            if(dataMaps.get(10) != null && !"".equals(dataMaps.get(10).toString())){
+                baseStudent.setFormerName(dataMaps.get(10).toString());//曾用名
             }
-            if(dataMaps.get(11).toString() != null && "".equals(dataMaps.get(11).toString())){
-                user.setCredentialType(dictionary.get(dataMaps.get(11).toString()));//证件类型
+            if(dataMaps.get(11) != null && !"".equals(dataMaps.get(11).toString())){
+                user.setCredentialType(dictionary.get("credential_type" + dataMaps.get(11).toString()));//证件类型
             }
-            if(dataMaps.get(12).toString() != null && "".equals(dataMaps.get(12).toString())){
-                LocalDateTime birthday = LocalDateTime.parse(dataMaps.get(12).toString());
+            if(dataMaps.get(12) != null && !"".equals(dataMaps.get(12).toString())){
+                LocalDateTime birthday = parseLocalDateTime(dataMaps.get(12).toString());
                 user.setBirthDate(birthday);//出生日期
-                baseStudent.setDayOfBirth(birthday);//出生日期
+                baseStudent.setDayOfBirth(birthday.toLocalDate());//出生日期
             }
-            if(dataMaps.get(13).toString() != null && "".equals(dataMaps.get(13).toString())){
-                baseStudent.setBirthType(dictionary.get(dataMaps.get(13).toString()));//生日类型
+            if(dataMaps.get(13) != null && !"".equals(dataMaps.get(13).toString())){
+                baseStudent.setBirthType(dictionary.get("date_type" + dataMaps.get(13).toString()));//生日类型
             }
-            if(dataMaps.get(14).toString() != null && "".equals(dataMaps.get(14).toString())){
-                baseStudent.setNation(dictionary.get(dataMaps.get(14).toString()));//民族
+            if(dataMaps.get(14) != null && !"".equals(dataMaps.get(14).toString())){
+                baseStudent.setNation(dictionary.get("nation" + dataMaps.get(14).toString()));//民族
             }
-            if(dataMaps.get(15).toString() != null && "".equals(dataMaps.get(15).toString())){
-                baseStudent.setNation(dictionary.get(dataMaps.get(15).toString()));//血型
+            if(dataMaps.get(15) != null && !"".equals(dataMaps.get(15).toString())){
+                baseStudent.setBloodType(dictionary.get("blood_type" + dataMaps.get(15).toString()));//血型
+            }
+            if(dataMaps.get(16) != null && !"".equals(dataMaps.get(16).toString())){
+                baseStudent.setHealth(dictionary.get("health" + dataMaps.get(16).toString()));//健康状况
+            }
+            if(dataMaps.get(17) != null && !"".equals(dataMaps.get(17).toString())){
+                baseStudent.setMaritalState(dictionary.get("marital_state" + dataMaps.get(17).toString()));//婚姻状况
+            }
+            if(dataMaps.get(18) != null && !"".equals(dataMaps.get(18).toString())){
+                baseStudent.setPoliticalState(dictionary.get("political_state" + dataMaps.get(18).toString()));//政治面貌
+            }
+            if(dataMaps.get(19) != null && !"".equals(dataMaps.get(19).toString())){
+                baseStudent.setNationality(dictionary.get("nationality" + dataMaps.get(19).toString()));//国籍地区
+            }
+            if(dataMaps.get(20) != null && !"".equals(dataMaps.get(20).toString())){
+                baseStudent.setChineseType(dictionary.get("chinese_type" + dataMaps.get(20).toString()));//港澳台侨外
+            }
+            if(dataMaps.get(21) != null && !"".equals(dataMaps.get(21).toString())){
+                baseStudent.setHouseHoldType(dictionary.get("house_hold_type" + dataMaps.get(21).toString()));//户口类别
+            }
+            if(dataMaps.get(22) != null && !"".equals(dataMaps.get(22).toString())){
+                baseStudent.setNativePlaceType(dataMaps.get(22).toString());//籍贯类型
+            }
+            if(dataMaps.get(23) != null && !"".equals(dataMaps.get(23).toString())){
+                baseStudent.setProvinces(areaMap.get(dataMaps.get(23).toString()));//省
+            }
+            if(dataMaps.get(24) != null && !"".equals(dataMaps.get(24).toString())){
+                baseStudent.setCity(areaMap.get(dataMaps.get(24).toString()));//市
+            }
+            if(dataMaps.get(25) != null && !"".equals(dataMaps.get(25).toString())){
+                baseStudent.setDistrict(areaMap.get(dataMaps.get(25).toString()));//区县
+            }
+            if(dataMaps.get(26) != null && !"".equals(dataMaps.get(26).toString())){
+                baseStudent.setHouseProvinces(areaMap.get(dataMaps.get(26).toString()));//户口所在地省
+            }
+            if(dataMaps.get(27) != null && !"".equals(dataMaps.get(27).toString())){
+                baseStudent.setHouseCity(areaMap.get(dataMaps.get(27).toString()));//户口所在地市
+            }
+            if(dataMaps.get(28) != null && !"".equals(dataMaps.get(28).toString())){
+                baseStudent.setHouseDistrict(areaMap.get(dataMaps.get(28).toString()));//户口所在地区/县
+            }
+            if(dataMaps.get(29) != null && !"".equals(dataMaps.get(29).toString())){
+                baseStudent.setBelongsPolice(dataMaps.get(29).toString());//户口所属派出所
+            }
+            if(dataMaps.get(30) != null && !"".equals(dataMaps.get(30).toString())){
+                baseStudent.setBirthProvinces(areaMap.get(dataMaps.get(30).toString()));//出生所在地省
+            }
+            if(dataMaps.get(31) != null && !"".equals(dataMaps.get(31).toString())){
+                baseStudent.setBirthCity(areaMap.get(dataMaps.get(31).toString()));//出生所在地市
+            }
+            if(dataMaps.get(32) != null && !"".equals(dataMaps.get(32).toString())){
+                baseStudent.setBirthDistrict(areaMap.get(dataMaps.get(32).toString()));//出生所在地/区县
+            }
+            if(dataMaps.get(33) != null && !"".equals(dataMaps.get(33).toString())){
+                baseStudent.setHouseHoldAddress(dataMaps.get(33).toString());//户籍地址
+            }
+            if(dataMaps.get(34) != null && !"".equals(dataMaps.get(34).toString())){
+                baseStudent.setResidenceType(dictionary.get("residence_type" + dataMaps.get(34).toString()));//学生居住地类型
+            }
+            if(dataMaps.get(35) != null && !"".equals(dataMaps.get(35).toString())){
+                baseStudent.setTrainInterval(dataMaps.get(35).toString());//乘火车区间
+            }
+            if(dataMaps.get(36) != null && !"".equals(dataMaps.get(36).toString())){
+                baseStudent.setIsMigrateChildren(YesOrNoEnum.getCode(dataMaps.get(36).toString()));//是否随迁子女
+            }
+            if(dataMaps.get(37) != null && !"".equals(dataMaps.get(37).toString())){
+                baseStudent.setIsFloatingPopulation(YesOrNoEnum.getCode(dataMaps.get(37).toString()));//是否流动人口
+            }
+            if(dataMaps.get(38) != null && !"".equals(dataMaps.get(38).toString())){
+                baseStudent.setHeight(Double.parseDouble(dataMaps.get(38).toString()));//身高
+            }
+            if(dataMaps.get(39) != null && !"".equals(dataMaps.get(39).toString())){
+                baseStudent.setWeight(Double.parseDouble(dataMaps.get(39).toString()));//体重
+            }
+            if(dataMaps.get(40) != null && !"".equals(dataMaps.get(40).toString())){
+                baseStudent.setVision(Double.parseDouble(dataMaps.get(40).toString()));//视力
+            }
+            if(dataMaps.get(41) != null && !"".equals(dataMaps.get(41).toString())){
+                baseStudent.setSpecialty(dataMaps.get(41).toString());//特长
+            }
+            if(dataMaps.get(42) != null && !"".equals(dataMaps.get(42).toString())){
+                user.setQqNumber(dataMaps.get(42).toString());//QQ&MSN
+                contact.setQqMsn(dataMaps.get(42).toString());//QQ&MSN
+            }
+            if(dataMaps.get(43) != null && !"".equals(dataMaps.get(43).toString())){
+                user.setWechatNumber(dataMaps.get(43).toString());//微信号码
+                contact.setWechat(dataMaps.get(43).toString());//微信号码
+            }
+            if(dataMaps.get(44) != null && !"".equals(dataMaps.get(44).toString())){
+                contact.setUserPage(dataMaps.get(44).toString());//个人主页
+            }
+            if(dataMaps.get(45) != null && !"".equals(dataMaps.get(45).toString())){
+                schoolRoll.setRollNumber(dataMaps.get(45).toString());//学籍号
+            }
+            if(dataMaps.get(46) != null && !"".equals(dataMaps.get(46).toString())){
+                schoolRoll.setArchivesNumber(dataMaps.get(46).toString());//学生档案编号
+            }
+            if(dataMaps.get(47) != null && !"".equals(dataMaps.get(47).toString())){
+                schoolRoll.setEnrollmentDate(sdf.parse(dataMaps.get(47).toString()));//入学年月
+            }
+            if(dataMaps.get(48) != null && !"".equals(dataMaps.get(48).toString())){
+                schoolRoll.setEnrollmentType(dictionary.get("enrollment_type" + dataMaps.get(48).toString()));//入学方式
+            }
+            if(dataMaps.get(49) != null && !"".equals(dataMaps.get(49).toString())){
+                schoolRoll.setGradeId(gradeMap.get(dataMaps.get(49).toString()));//入学年级
+            }
+            if(dataMaps.get(50) != null && !"".equals(dataMaps.get(50).toString())){
+                schoolRoll.setEnrollType(dictionary.get("enroll_type" + dataMaps.get(50).toString()));//入学招生类型
+            }
+            if(dataMaps.get(51) != null && !"".equals(dataMaps.get(51).toString())){
+                schoolRoll.setMajorSetId(majorSetMap.get(dataMaps.get(51).toString()));//在读专业方向
+            }
+            if(dataMaps.get(52) != null && !"".equals(dataMaps.get(52).toString())){
+                schoolRoll.setStudyYear(Double.parseDouble(dataMaps.get(52).toString()));//学制
+            }
+            if(dataMaps.get(53) != null && !"".equals(dataMaps.get(53).toString())){
+                schoolRoll.setClassId(classMap.get(dataMaps.get(53).toString()));//班级
+            }
+            if(dataMaps.get(54) != null && !"".equals(dataMaps.get(54).toString())){
+                schoolRoll.setStudentSource(dictionary.get("student_type" + dataMaps.get(54).toString()));//学生来源
+            }
+            if(dataMaps.get(55) != null && !"".equals(dataMaps.get(55).toString())){
+                schoolRoll.setStudentType(dictionary.get("student_type" + dataMaps.get(55).toString()));//学生类别
+            }
+            if(dataMaps.get(56) != null && !"".equals(dataMaps.get(56).toString())){
+                schoolRoll.setArchivesStatus(dictionary.get("archives_status" + dataMaps.get(56).toString()));//学籍状态
+            }
+            if(dataMaps.get(57) != null && !"".equals(dataMaps.get(57).toString())){
+                schoolRoll.setLearnStatus(dictionary.get("roll_modality" + dataMaps.get(57).toString()));//学习形式
+                schoolRoll.setRollModality(dictionary.get("roll_modality" + dataMaps.get(57).toString()));//学习形式
+            }
+            if(dataMaps.get(58) != null && !"".equals(dataMaps.get(58).toString())){
+                schoolRoll.setStduyStatus(dictionary.get("stduy_status" + dataMaps.get(58).toString()));//就读方式
+            }
+            if(dataMaps.get(59) != null && !"".equals(dataMaps.get(59).toString())){
+                schoolRoll.setChooseStatus(dictionary.get("choose_status" + dataMaps.get(59).toString()));//分流状态
+            }
+            if(dataMaps.get(60) != null && !"".equals(dataMaps.get(60).toString())){
+                schoolRoll.setFosterType(dictionary.get("foster_type" + dataMaps.get(60).toString()));//分段培养方式
+            }
+            if(dataMaps.get(61) != null && !"".equals(dataMaps.get(61).toString())){
+                schoolRoll.setRecruitType(dictionary.get("recruit_type" + dataMaps.get(61).toString()));//招生类型
+            }
+            if(dataMaps.get(62) != null && !"".equals(dataMaps.get(62).toString())){
+                schoolRoll.setRecruitTarget(dictionary.get("recruit_target" + dataMaps.get(62).toString()));//招生对象
+            }
+            if(dataMaps.get(63) != null && !"".equals(dataMaps.get(63).toString())){
+                schoolRoll.setHighestEducation(dictionary.get("education" + dataMaps.get(63).toString()));//入学前最高学历
+            }
+            if(dataMaps.get(64) != null && !"".equals(dataMaps.get(64).toString())){
+                schoolRoll.setGraduatedUniversity(dataMaps.get(64).toString());//入学前毕业院校
+            }
+            if(dataMaps.get(65) != null && !"".equals(dataMaps.get(65).toString())){
+                schoolRoll.setGraduatedScore(Double.parseDouble(dataMaps.get(65).toString()));//入学前毕业成绩
+            }
+            if(dataMaps.get(66) != null && !"".equals(dataMaps.get(66).toString())){
+                schoolRoll.setExamineeNumber(dataMaps.get(66).toString());//入学考试准考证号
+            }
+            if(dataMaps.get(67) != null && !"".equals(dataMaps.get(67).toString())){
+                schoolRoll.setTicketNumber(dataMaps.get(67).toString());//入学考试准考证号
+            }
+            if(dataMaps.get(68) != null && !"".equals(dataMaps.get(68).toString())){
+                schoolRoll.setAdmissionScores(Double.parseDouble(dataMaps.get(68).toString()));//入学考试成绩
+            }
+            if(dataMaps.get(69) != null && !"".equals(dataMaps.get(69).toString())){
+                schoolRoll.setRemark(dataMaps.get(69).toString());//备注
+            }
+            if(dataMaps.get(69) != null && !"".equals(dataMaps.get(69).toString())){
+                schoolRoll.setRemark(dataMaps.get(69).toString());//备注
             }
 
-
+            if(dataMaps.get(70) != null && !"".equals(dataMaps.get(70).toString())){
+                subsidize.setIsIndemnify(YesOrNoEnum.getCode(dataMaps.get(70).toString()));//是否低保户
+            }
+            if(dataMaps.get(71) != null && !"".equals(dataMaps.get(71).toString())){
+                subsidize.setIsStipend(YesOrNoEnum.getCode(dataMaps.get(71).toString()));//是否享受国家助学金
+            }
+            if(dataMaps.get(72) != null && !"".equals(dataMaps.get(72).toString())){
+                subsidize.setStipendStand(Double.parseDouble(dataMaps.get(72).toString()));//助学金发放标准(元)
+            }
+            if(dataMaps.get(73) != null && !"".equals(dataMaps.get(73).toString())){
+                subsidize.setStipendNumber(dataMaps.get(73).toString());//学生资助卡号
+            }
+            if(dataMaps.get(74) != null && !"".equals(dataMaps.get(74).toString())){
+                subsidize.setIsFree(YesOrNoEnum.getCode(dataMaps.get(74).toString()));//是否免学费
+            }
+            if(dataMaps.get(75) != null && !"".equals(dataMaps.get(75).toString())){
+                subsidize.setIsFilingCard(YesOrNoEnum.getCode(dataMaps.get(75).toString()));//是否建档立卡
+            }
+            if(dataMaps.get(76) != null && !"".equals(dataMaps.get(76).toString())){
+                studentFamily.setZipCode(dataMaps.get(76).toString());//家庭邮编
+            }
+            if(dataMaps.get(77) != null && !"".equals(dataMaps.get(77).toString())){
+                studentFamily.setTelephone(dataMaps.get(77).toString());//家庭电话
+            }
+            if(dataMaps.get(78) != null && !"".equals(dataMaps.get(78).toString())){
+                studentFamily.setContact(dataMaps.get(76).toString());//联系人姓名
+            }
+            if(dataMaps.get(79) != null && !"".equals(dataMaps.get(79).toString())){
+                studentFamily.setPopulation(Integer.parseInt(dataMaps.get(79).toString()));//家庭人口
+            }
+            if(dataMaps.get(80) != null && !"".equals(dataMaps.get(80).toString())){
+                studentFamily.setAddress(dataMaps.get(80).toString());//家庭地址
+            }
+            if(dataMaps.get(81) != null && !"".equals(dataMaps.get(81).toString())){
+                studentFamily.setIncomeSource(dataMaps.get(81).toString());//家庭主要收入来源
+            }
+            if(dataMaps.get(82) != null && !"".equals(dataMaps.get(82).toString())){
+                studentFamily.setIncomeNumber(Double.parseDouble(dataMaps.get(82).toString()));//家庭月收入(元)
+            }
+            if(dataMaps.get(83) != null && !"".equals(dataMaps.get(83).toString())){
+                studentFamily.setRailwayStation(dataMaps.get(83).toString());//离家最近火车站
+            }
             if(studentUserMap.containsKey(credentialNumber)){
                 updateStudentUserList.add(user);
                 updateBaseStudentList.add(baseStudent);
+                updateSchoolRollList.add(schoolRoll);
+                updateSubsidizeList.add(subsidize);
+                updateFamilyList.add(studentFamily);
+                updateContactList.add(contact);
             }else{
-                user = new BaseStudentUser();
-                baseStudent = new BaseStudent();
+                insertStudentUserList.add(user);
+                insertBaseStudentList.add(baseStudent);
+                if(schoolRoll.getClassId() != null && schoolRoll.getGradeId() != null && schoolRoll.getMajorSetId() != null){
+                    insertSchoolRollList.add(schoolRoll);
+                }
+                insertSubsidizeList.add(subsidize);
+                insertFamilyList.add(studentFamily);
+                insertContactList.add(contact);
             }
+            row ++;
         }
-        return null;
+        //批量修改
+        if(!updateStudentUserList.isEmpty()){
+            this.updateBatchById(updateStudentUserList);
+        }
+        if(!updateSchoolRollList.isEmpty()){
+            schoolRollService.updateBatchById(updateSchoolRollList);
+        }
+        if(!updateSubsidizeList.isEmpty()){
+            subsidizeService.updateBatchById(updateSubsidizeList);
+        }
+        if(!updateFamilyList.isEmpty()){
+            familyService.updateBatchById(updateFamilyList);
+        }
+        if(!updateBaseStudentList.isEmpty()){
+            baseStudentService.updateBatchById(updateBaseStudentList);
+        }
+        if(!updateContactList.isEmpty()){
+            studentContactService.updateBatchById(updateContactList);
+        }
+        //批量新增
+        if(!insertStudentUserList.isEmpty()){
+            this.saveBatch(insertStudentUserList);
+        }
+        if(!insertBaseStudentList.isEmpty()){
+            baseStudentService.saveBatch(insertBaseStudentList);
+        }
+        if(!insertSubsidizeList.isEmpty()){
+            subsidizeService.saveBatch(insertSubsidizeList);
+        }
+        if(!insertFamilyList.isEmpty()){
+            familyService.saveBatch(insertFamilyList);
+        }
+        if(!insertSchoolRollList.isEmpty()){
+            schoolRollService.saveBatch(insertSchoolRollList);
+        }
+        if(!insertContactList.isEmpty()){
+            studentContactService.saveBatch(insertContactList);
+        }
+        return true;
     }
 
     /**
@@ -449,15 +892,62 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     private Map<String, String> initDictionary(){
         List<String> codeList = new ArrayList<>();
         codeList.add("credential_type");codeList.add("nation");
-        codeList.add("blood_type");
+        codeList.add("blood_type");codeList.add("health");
+        codeList.add("marital_state");codeList.add("political_state");
+        codeList.add("nationality");codeList.add("chinese_type");
+        codeList.add("house_hold_type");codeList.add("residence_type");
+        codeList.add("enrollment_type");codeList.add("enroll_type");
+        codeList.add("student_type");codeList.add("archives_status");
+        codeList.add("roll_modality");codeList.add("stduy_status");
+        codeList.add("choose_status");codeList.add("foster_type");
+        codeList.add("recruit_type");codeList.add("recruit_target");
+        codeList.add("education");codeList.add("recruit_target");
+        codeList.add("date_type");
         List<DictionaryDetail> detailList = dictionarydetailMapper.selectJoinList(DictionaryDetail.class,
             new MPJLambdaWrapper<DictionaryDetail>()
             .leftJoin(DictionaryItem.class, DictionaryItem::getId, DictionaryDetail::getItemId)
+            .in(DictionaryItem::getCode, codeList)
         );
+
+        List<DictionaryItem> dictionaryItemList = dictionaryitemMapper.selectList(
+                new QueryWrapper<DictionaryItem>().lambda()
+                        .eq(DictionaryItem::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        Map<Long, String> itemMap = new HashMap<>();
+        for (DictionaryItem dictionaryItem : dictionaryItemList) {
+            itemMap.put(dictionaryItem.getId(), dictionaryItem.getCode());
+        }
+
         Map<String, String> resultMap = new HashMap<>();
         for (DictionaryDetail dictionaryDetail : detailList) {
-            resultMap.put(dictionaryDetail.getName(), dictionaryDetail.getCode());
+            resultMap.put(itemMap.get(dictionaryDetail.getItemId()) + dictionaryDetail.getName(), dictionaryDetail.getCode());
         }
         return resultMap;
     }
+
+    private LocalDateTime parseLocalDateTime(String dateStr){
+        LocalDate time = null;
+
+        try {
+            time = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+        }catch (DateTimeParseException e){
+            try {
+                time = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy/MM/dd"));
+            }catch (DateTimeParseException e2){
+                try {
+                    time = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
+                }catch (DateTimeParseException e3){
+                    try {
+                        time = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyyMMdd"));
+                    }catch (DateTimeParseException e4){
+                        throw new MyException("日期格式不正确");
+                    }
+                }
+            }
+        }
+        if(time != null){
+            return time.atStartOfDay();
+        }
+        return null;
+    }
 }

+ 35 - 3
src/main/java/com/xjrsoft/module/system/controller/SystemUpdateMessageController.java

@@ -10,7 +10,7 @@ import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.module.student.entity.BaseStudentCadre;
+import com.xjrsoft.module.concat.service.IXjrUserService;
 import com.xjrsoft.module.system.dto.AddSystemUpdateMessageDto;
 import com.xjrsoft.module.system.dto.SystemUpdateMessagePageDto;
 import com.xjrsoft.module.system.dto.SystemUpdateMessageReleaseDto;
@@ -21,6 +21,7 @@ import com.xjrsoft.module.system.service.ISystemUpdateMessageNoticeService;
 import com.xjrsoft.module.system.service.ISystemUpdateMessageService;
 import com.xjrsoft.module.system.vo.SystemUpdateMessagePageVo;
 import com.xjrsoft.module.system.vo.SystemUpdateMessageVo;
+import com.xjrsoft.module.teacher.entity.XjrUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
@@ -37,6 +38,7 @@ import javax.validation.Valid;
 import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -53,6 +55,7 @@ public class SystemUpdateMessageController {
 
     private final ISystemUpdateMessageNoticeService systemUpdateMessageNoticeService;
     private final ISystemUpdateMessageService systemUpdateMessageService;
+    private final IXjrUserService xjrUserService;
 
     @GetMapping(value = "/page")
     @ApiOperation(value="系统消息列表(分页)")
@@ -72,7 +75,10 @@ public class SystemUpdateMessageController {
         if (systemUpdateMessage == null) {
            return RT.error("找不到此数据!");
         }
-        return RT.ok(BeanUtil.toBean(systemUpdateMessage, SystemUpdateMessageVo.class));
+        SystemUpdateMessageVo bean = BeanUtil.toBean(systemUpdateMessage, SystemUpdateMessageVo.class);
+        XjrUser xjrUser = xjrUserService.getById(systemUpdateMessage.getCreateUserId());
+        bean.setCreateUserName(xjrUser.getName());
+        return RT.ok(bean);
     }
 
 
@@ -81,8 +87,10 @@ public class SystemUpdateMessageController {
     @SaCheckPermission("systemupdatemessage:add")
     public RT<Boolean> add(@Valid @RequestBody AddSystemUpdateMessageDto dto){
         SystemUpdateMessage systemUpdateMessage = BeanUtil.toBean(dto, SystemUpdateMessage.class);
+        systemUpdateMessage.setCreateDate(new Date());
+        systemUpdateMessage.setCreateUserId(StpUtil.getLoginIdAsLong());
         boolean isSuccess = systemUpdateMessageService.save(systemUpdateMessage);
-    return RT.ok(isSuccess);
+        return RT.ok(isSuccess);
     }
 
     @PutMapping
@@ -91,6 +99,8 @@ public class SystemUpdateMessageController {
     public RT<Boolean> update(@Valid @RequestBody UpdateSystemUpdateMessageDto dto){
 
         SystemUpdateMessage systemUpdateMessage = BeanUtil.toBean(dto, SystemUpdateMessage.class);
+        systemUpdateMessage.setModifyDate(new Date());
+        systemUpdateMessage.setModifyUserId(StpUtil.getLoginIdAsLong());
         return RT.ok(systemUpdateMessageService.updateById(systemUpdateMessage));
 
     }
@@ -156,4 +166,26 @@ public class SystemUpdateMessageController {
         return RT.ok(pageOutput);
     }
 
+    @GetMapping(value = "/personal-list")
+    @ApiOperation(value="个人未读系统消息列表(分页)")
+    @SaCheckPermission("systemupdatemessage:detail")
+    public RT<List<SystemUpdateMessagePageVo>> personalList(@Valid SystemUpdateMessagePageDto dto){
+        List<SystemUpdateMessagePageVo> systemUpdateMessagePageVos = systemUpdateMessageService.selectJoinList(SystemUpdateMessagePageVo.class,
+                MPJWrappers.<SystemUpdateMessage>lambdaJoin()
+                        .leftJoin(SystemUpdateMessageNotice.class, SystemUpdateMessageNotice::getSystemUpdateMessageId, SystemUpdateMessage::getId)
+                        .eq(SystemUpdateMessageNotice::getUserId, StpUtil.getLoginIdAsLong())
+                        .eq(SystemUpdateMessage::getDeleteMark, DeleteMark.NODELETE.getCode())
+                        .eq(SystemUpdateMessage::getStatus, 1)
+                        .eq(SystemUpdateMessageNotice::getStatus, 0)
+        );
+        return RT.ok(systemUpdateMessagePageVos);
+    }
+
+    @GetMapping(value = "/read-msg")
+    @ApiOperation(value = "阅读系统消息")
+    @SaCheckPermission("systemupdatemessage:read-msg")
+    public RT<Boolean> readMsg(@Valid SystemUpdateMessageReleaseDto dto) {
+        return RT.ok(systemUpdateMessageNoticeService.updateStatus(dto.getId(), StpUtil.getLoginIdAsLong()));
+    }
+
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/system/dto/AddMenuDto.java

@@ -109,4 +109,7 @@ public class AddMenuDto implements Serializable {
 
     @ApiModelProperty("菜单部门关联表")
     private List<AddXjrMenuDeptRelationDto> menuDeptRelations;
+
+    @ApiModelProperty("是否显示在服务中心(0:否 1:是)")
+    private Integer isShowServce;
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/system/dto/MenuTreeDto.java

@@ -33,4 +33,7 @@ public class MenuTreeDto {
 
     // 菜单是否显示 0=隐藏 1=显示
     private Integer display = 1;
+
+    @ApiModelProperty("是否显示在服务中心(0:否 1:是)")
+    private Integer isShowServce;
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/system/entity/Menu.java

@@ -90,4 +90,7 @@ public class Menu extends AuditEntity implements Serializable {
     @ApiModelProperty("关联表单id(自定义表单 以及 代码生成器 生成的菜单才会有关联。)")
     private Long formId;
 
+    @ApiModelProperty("是否显示在服务中心(0:否 1:是)")
+    private Integer isShowServce;
+
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/system/mapper/SystemUpdateMessageNoticeMapper.java

@@ -5,6 +5,7 @@ import com.xjrsoft.module.system.entity.SystemUpdateMessageNotice;
 import com.xjrsoft.module.system.vo.SystemUpdateMessagePageTempVo;
 import com.xjrsoft.module.system.vo.SystemUpdateMessagePageVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Update;
 
 import java.util.List;
 
@@ -20,4 +21,7 @@ public interface SystemUpdateMessageNoticeMapper extends MPJBaseMapper<SystemUpd
     List<SystemUpdateMessagePageTempVo> GetTeacherUserID();
 
     List<SystemUpdateMessagePageTempVo> GetStudentUserID();
+
+    @Update("UPDATE system_update_message_notice SET STATUS = 1 WHERE system_update_message_id = #{messageId} AND user_id = #{userId}")
+    Boolean updateStatus(Long messageId, Long userId);
 }

+ 2 - 0
src/main/java/com/xjrsoft/module/system/service/ISystemUpdateMessageNoticeService.java

@@ -17,4 +17,6 @@ public interface ISystemUpdateMessageNoticeService extends MPJBaseService<System
     String[] getTeacherUserId();
 
     String[] getStudentUserId();
+
+    Boolean updateStatus(Long messageId, Long userId);
 }

+ 3 - 1
src/main/java/com/xjrsoft/module/system/service/impl/MenuServiceImpl.java

@@ -192,6 +192,8 @@ public class MenuServiceImpl extends MPJBaseServiceImpl<MenuMapper, Menu> implem
             }
             authMenuIdList = authorizeList.stream().map(Authorize::getObjectId).collect(Collectors.toList());
         }
+        List<String> orderList = new ArrayList<>();
+        orderList.add("t1.sort_code");orderList.add("t.sort_code");
         List<MenuVo> menuVos = this.selectJoinList(MenuVo.class,
             MPJWrappers.<Menu>lambdaJoin()
             .like(StrUtil.isNotBlank(dto.getTitle()), Menu::getTitle, dto.getTitle())
@@ -206,7 +208,7 @@ public class MenuServiceImpl extends MPJBaseServiceImpl<MenuMapper, Menu> implem
             .select(Menu.class, x -> VoToColumnUtil.fieldsToColumns(MenuTreeVo.class).contains(x.getProperty()))
             .leftJoin(Subsystem.class, Subsystem::getId, Menu::getSystemId)
             .eq(Menu::getEnabledMark, EnabledMark.ENABLED.getCode())
-            .orderByAsc(Menu::getSortCode)
+            .orderByAscStr(orderList)
         );
         List<XjrMentDeptGroupVo> menuDept = menuDeptRelationMapper.getMenuDept();
         Map<Long, String> deptNameMap = new HashMap<>();

+ 5 - 0
src/main/java/com/xjrsoft/module/system/service/impl/SystemUpdateMessageNoticeServiceImpl.java

@@ -45,4 +45,9 @@ public class SystemUpdateMessageNoticeServiceImpl extends MPJBaseServiceImpl<Sys
         String[] studentTeacherIds = temp.stream().map(SystemUpdateMessagePageTempVo::getUserId).toArray(String[]::new);
         return studentTeacherIds;
     }
+
+    @Override
+    public Boolean updateStatus(Long messageId, Long userId) {
+        return systemUpdateMessageNoticeMapper.updateStatus(messageId, userId);
+    }
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/system/vo/MenuTreeVo.java

@@ -188,4 +188,7 @@ public class MenuTreeVo implements ITreeNode<MenuTreeVo,Long>, Serializable {
 
     @ApiModelProperty("是否有权限(1:是 0:否)")
     private Integer authorized;
+
+    @ApiModelProperty("是否显示在服务中心(0:否 1:是)")
+    private Integer isShowServce;
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/system/vo/MenuVo.java

@@ -96,4 +96,7 @@ public class MenuVo implements Serializable {
     @ApiModelProperty("部门名称")
     private String deptName;
 
+    @ApiModelProperty("是否显示在服务中心(0:否 1:是)")
+    private Integer isShowServce;
+
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/system/vo/SystemUpdateMessageVo.java

@@ -49,6 +49,9 @@ public class SystemUpdateMessageVo {
     @ApiModelProperty("状态(0:未发布 1:已发布)")
     private Integer status;
 
+    @ApiModelProperty("发布人")
+    private String createUserName;
+
 
 
 }

+ 2 - 0
src/main/java/com/xjrsoft/module/workflow/controller/WorkflowExecuteController.java

@@ -343,6 +343,8 @@ public class WorkflowExecuteController {
         return RT.ok(userDefinedProcessRecordListVos);
     }
 
+
+
     @GetMapping("/audit-approve-record-list")
     @ApiOperation(value = "审核用自定义流程记录列表")
     public RT<List<UserDefinedProcessRecordListVo>> auditApproveRecordList(@Valid ApproveRecordListDto dto) {

+ 45 - 12
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -30,6 +30,7 @@ import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.RedisUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.module.form.dto.FormExecuteWorkflowAddDto;
 import com.xjrsoft.module.form.dto.FormExecuteWorkflowUpdateDto;
 import com.xjrsoft.module.form.entity.FormTemplate;
@@ -134,6 +135,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
 
     private final IWorkflowExtraService extraService;
 
+    private final CommonPropertiesConfig commonPropertiesConfig;
 
     private final IFileService fileService;
 
@@ -1544,6 +1546,27 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                     vo.setCurrentProgress(x.getCurrentProgress());
                     vo.setProcessName(x.getProcessName());
                 });
+                //查询审批记录中的驳回记录是否有驳回(最后一条)或者自动驳回(倒数第二条)
+                List<WorkflowRecord> recordList = workflowRecordMapper.selectList(
+                    new QueryWrapper<WorkflowRecord>().lambda()
+                    .eq(WorkflowRecord::getProcessId, task.getProcessInstanceId())
+                );
+                if(!recordList.isEmpty() && recordList.size() > 1){
+                    String comment = recordList.get(recordList.size() - 1).getMessage();
+                    if(comment.contains("【驳回】")){
+                        User rejectUser = userService.getById(recordList.get(recordList.size() - 1).getCreateUserId());
+                        vo.setRejectState(rejectUser.getName() + "驳回");
+                    }else if(comment.contains("自动驳回")){
+                        vo.setRejectState("系统自动驳回");
+                    }
+                }
+                if(!recordList.isEmpty() && recordList.size() > 2){
+                    String comment2 = recordList.get(recordList.size() - 2).getMessage();
+                    if(comment2.contains("自动驳回")){
+                        vo.setRejectState("系统自动驳回");
+                    }
+                }
+
                 vo.setProcessId(task.getProcessInstanceId());
                 vo.setTaskId(task.getId());
                 vo.setTaskName(task.getName());
@@ -4883,13 +4906,14 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                         variableInstanceOptional.ifPresent(var -> {
                             vo.setApproveUserIds(Convert.toStr(var.getValue()));
                         });
+                        vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                         voList.add(vo);
 
 
                         //如果是需要指定审批人 默认设置变量
                         taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.YES.getCode());
                         //默认定时2分钟  如果不指定审批人 就会使用原审批人
-                        redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), 2 * 60);
+                        redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), commonPropertiesConfig.getApprovalTime());
 //                            redisUtil.set(GlobalConstant.CAPTCHA + StringPool.UNDERSCORE + mobile, code, 6000L);
                         continue;
                     }
@@ -4903,7 +4927,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                             vo.setIsAppoint(Boolean.TRUE);
                             vo.setIsMultiInstance(Boolean.FALSE);
                             vo.setProvisionalApprover(userTaskConfig.getProvisionalApprover());
-
+                            vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                             variableInstanceOptional.ifPresent(var -> {
                                 vo.setApproveUserIds(Convert.toStr(var.getValue()));
                             });
@@ -4912,7 +4936,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                             //如果是需要指定审批人 默认设置变量
                             taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.YES.getCode());
                             //默认定时2分钟  如果不指定审批人 就会使用原审批人
-                            redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), 2 * 60);
+                            redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), commonPropertiesConfig.getApprovalTime());
                             continue;
                         } else {
                             List<UserRoleRelation> userRoleRelations = redisUtil.get(GlobalConstant.USER_ROLE_RELATION_CACHE_KEY, new TypeReference<List<UserRoleRelation>>() {
@@ -4928,6 +4952,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                     vo.setIsMultiInstance(Boolean.FALSE);
                     vo.setProvisionalApprover(userTaskConfig.getProvisionalApprover());
                     taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.NO.getCode());
+                    vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                     voList.add(vo);
 
                 } else {
@@ -4937,6 +4962,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                     vo.setIsMultiInstance(Boolean.TRUE);
                     vo.setProvisionalApprover(userTaskConfig.getProvisionalApprover());
                     taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.NO.getCode());
+                    vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                     voList.add(vo);
                 }
 
@@ -4991,13 +5017,13 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                     } else {
                         vo.setProvisionalApprover(Boolean.TRUE);
                     }
-
+                    vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                     voList.add(vo);
 
                     //如果是需要指定审批人 默认设置变量
                     taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.YES.getCode());
                     //默认定时2分钟  如果不指定审批人 就会使用原审批人
-                    redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), 2 * 60);
+                    redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), commonPropertiesConfig.getApprovalTime());
                     return voList;
                 }
 
@@ -5011,7 +5037,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                         vo.setIsAppoint(Boolean.TRUE);
                         vo.setIsMultiInstance(Boolean.FALSE);
                         vo.setProvisionalApprover(userTaskConfig.getProvisionalApprover());
-
+                        vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                         if (variableInstance != null) {
                             vo.setApproveUserIds(Convert.toStr(variableInstance.getValue()));
                         } else {
@@ -5022,7 +5048,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                         //如果是需要指定审批人 默认设置变量
                         taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.YES.getCode());
                         //默认定时2分钟  如果不指定审批人 就会使用原审批人
-                        redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), 2 * 60);
+                        redisUtil.set(task.getId() + StringPool.UNDERSCORE + WorkflowConstant.TASK_IS_APPOINT_APPROVE, task.getId(), commonPropertiesConfig.getApprovalTime());
                         return voList;
                     } else {
                         List<UserRoleRelation> userRoleRelations = redisUtil.get(GlobalConstant.USER_ROLE_RELATION_CACHE_KEY, new TypeReference<List<UserRoleRelation>>() {
@@ -5037,6 +5063,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                 vo.setIsAppoint(Boolean.FALSE);
                 vo.setIsMultiInstance(Boolean.FALSE);
                 vo.setProvisionalApprover(userTaskConfig.getProvisionalApprover());
+                vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                 voList.add(vo);
                 taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.NO.getCode());
 
@@ -5046,6 +5073,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                 vo.setTaskId(task.getId());
                 vo.setIsAppoint(Boolean.FALSE);
                 vo.setIsMultiInstance(Boolean.TRUE);
+                vo.setApproveTime(commonPropertiesConfig.getApprovalTime());
                 vo.setProvisionalApprover(userTaskConfig.getProvisionalApprover());
                 voList.add(vo);
                 taskService.setVariableLocal(task.getId(), WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.NO.getCode());
@@ -5649,7 +5677,9 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                 record.setRecordTime(LocalDateTime.now().minusSeconds(+1));//时间设置提前1秒钟,好排序
 
 //                    record.setMessage("【审批人:" + user.getName() + "】 将 【任务:" + task.getName() + "】 驳回到 【任务:" + rejectUserTaskConfig.getName() + "】");
-                record.setMessage("审批信息:由于审批超时,【系统】【自动驳回】审批,审批意见为:“系统自动驳回审批”,由【" + task.getName() + "】 流转到【" + rejectUserTaskConfig.getName() + "】");
+//                record.setMessage("审批信息:由于审批超时,【系统】【自动驳回】审批,审批意见为:“系统自动驳回审批”,由【" + task.getName() + "】 流转到【" + rejectUserTaskConfig.getName() + "】");
+                String message = "【审阅】后未选择【" + task.getName() + "】,系统已自动驳回,请重新【审阅】并选择【" + task.getName() + "】";
+                record.setMessage(message);
                 workflowRecordMapper.insert(record);
 
                 //新增流程发起流程记录
@@ -5663,7 +5693,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                 operateRecord.setRecordTime(LocalDateTime.now().minusSeconds(+1));//时间设置提前1秒钟,好排序
                 operateRecord.setUsageScenario(1);
 
-                operateRecord.setOperateInfo("审批人:" + task.getName() + ", 审批结果:驳回, 审批内容:由于审批超时,系统自动驳回审批");
+                operateRecord.setOperateInfo(message);
                 xjrWorkflowOperateRecordMapper.insert(operateRecord);
 
 
@@ -5750,11 +5780,14 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
             if (commentArr.length > 1) {
                 String[] approveUserNameArr = commentArr[0].split(":");
                 String[] approveResultArr = commentArr[1].split(":");
+                UserDefinedProcessRecordListVo recordListVo = new UserDefinedProcessRecordListVo();
+                recordListVo.setIsReject(0);
                 if (approveResultArr.length > 1 && "驳回".equals(approveResultArr[1])) {
-                    continue;
+                    recordListVo.setIsReject(1);
+                }else if(comment.contains("自动驳回")){
+                    recordListVo.setIsReject(1);
                 }
-                String[] approveCommentArr = commentArr[2].split(":");
-                UserDefinedProcessRecordListVo recordListVo = new UserDefinedProcessRecordListVo();
+
                 recordListVo.setNodeType(p.getNodeType());
                 recordListVo.setShowNode(p.getShowNode());
                 recordListVo.setNodeName(p.getNodeName());

+ 4 - 0
src/main/java/com/xjrsoft/module/workflow/vo/LaunchAndApproveVo.java

@@ -1,5 +1,6 @@
 package com.xjrsoft.module.workflow.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 /**
@@ -42,4 +43,7 @@ public class LaunchAndApproveVo {
      */
     private String approveUserIds;
 
+    @ApiModelProperty("审批超时时间")
+    private Integer approveTime;
+
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/workflow/vo/PendingTaskVo.java

@@ -57,4 +57,7 @@ public class PendingTaskVo {
 
     @ApiModelProperty("审批人id")
     private String approveUserIds;
+
+    @ApiModelProperty("驳回状态")
+    private String rejectState;
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/workflow/vo/UserDefinedProcessRecordListVo.java

@@ -23,4 +23,7 @@ public class UserDefinedProcessRecordListVo extends ProcessRecordListVo{
     @ApiModelProperty("审批人姓名")
     @TableField(exist = false)
     private String approveUserName;
+
+    @ApiModelProperty("是否是驳回信息(0:是 1:否)")
+    private Integer isReject;
 }

+ 1 - 0
src/main/resources/application-dev.yml

@@ -111,6 +111,7 @@ xjrsoft:
       - /system/check-QR-code-login
       - /system/loginQRCode
       - /system/QR-code-login
+    approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>
     port:  # 邮件服务器的SMTP端口,可选,默认25

+ 1 - 0
src/main/resources/application-pre.yml

@@ -95,6 +95,7 @@ xjrsoft:
       - /system/check-QR-code-login
       - /system/loginQRCode
       - /system/QR-code-login
+    approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>
     port:  # 邮件服务器的SMTP端口,可选,默认25

+ 1 - 0
src/main/resources/application-prod.yml

@@ -91,6 +91,7 @@ xjrsoft:
       - /system/check-QR-code-login
       - /system/loginQRCode
       - /system/QR-code-login
+    approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>
     port:  # 邮件服务器的SMTP端口,可选,默认25

+ 9 - 0
src/main/resources/mapper/dataexpert/DataExpertSourceMapper.xml

@@ -0,0 +1,9 @@
+<?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.xjrsoft.module.dataexpert.mapper.DataExpertSourceMapper">
+    <select id="getSourceTypeList"  resultType="java.lang.String">
+        SELECT DISTINCT data_group FROM data_expert_source_field WHERE delete_mark = 0
+    </select>
+</mapper>

+ 9 - 0
src/main/resources/mapper/dataexpert/DataExpertTemplateMapper.xml

@@ -0,0 +1,9 @@
+<?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.xjrsoft.module.dataexpert.mapper.DataExpertTemplateMapper">
+<!--    <select id="getDataList" parameterType="" resultType="java.util.List<java.lang.String>">-->
+<!--        SELECT DISTINCT data_group FROM data_expert_source_field WHERE delete_mark = 0-->
+<!--    </select>-->
+</mapper>

+ 1 - 1
src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml

@@ -54,7 +54,7 @@
             AND t4.grade_id = #{dto.gradeId}
         </if>
         <if test="dto.majorSetId != null">
-            AND t3.major_set_id = #{dto.majorSetId }
+            AND t3.major_set_id = #{dto.majorSetId}
         </if>
         <if test="dto.classId != null">
             AND t4.id = #{dto.classId}