Browse Source

Merge remote-tracking branch 'origin/dev' into dev

大数据与最优化研究所 1 year ago
parent
commit
ef0c567bde
30 changed files with 1363 additions and 23 deletions
  1. 89 0
      src/main/java/com/xjrsoft/module/ledger/controller/WfSubscriptionController.java
  2. 54 0
      src/main/java/com/xjrsoft/module/ledger/dto/AddWfSubscriptionDto.java
  3. 72 0
      src/main/java/com/xjrsoft/module/ledger/dto/AddWfSubscriptionListDto.java
  4. 24 0
      src/main/java/com/xjrsoft/module/ledger/dto/UpdateWfSubscriptionDto.java
  5. 25 0
      src/main/java/com/xjrsoft/module/ledger/dto/WfSubscriptionListDto.java
  6. 43 0
      src/main/java/com/xjrsoft/module/ledger/dto/WfSubscriptionPageDto.java
  7. 69 0
      src/main/java/com/xjrsoft/module/ledger/entity/WfSubscription.java
  8. 83 0
      src/main/java/com/xjrsoft/module/ledger/entity/WfSubscriptionList.java
  9. 16 0
      src/main/java/com/xjrsoft/module/ledger/mapper/WfSubscriptionListMapper.java
  10. 43 0
      src/main/java/com/xjrsoft/module/ledger/mapper/WfSubscriptionMapper.java
  11. 63 0
      src/main/java/com/xjrsoft/module/ledger/service/IWfSubscriptionService.java
  12. 164 0
      src/main/java/com/xjrsoft/module/ledger/service/impl/WfSubscriptionServiceImpl.java
  13. 58 0
      src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionExcelVo.java
  14. 65 0
      src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionListInfoVo.java
  15. 69 0
      src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionListVo.java
  16. 65 0
      src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionPageVo.java
  17. 56 0
      src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionVo.java
  18. 35 0
      src/main/java/com/xjrsoft/module/ledger/vo/WorkflowRecordVo.java
  19. 2 2
      src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java
  20. 2 1
      src/main/java/com/xjrsoft/module/teacher/controller/TeacherbaseManagerController.java
  21. 1 1
      src/main/java/com/xjrsoft/module/teacher/dto/XjrUserPageDto.java
  22. 6 0
      src/main/java/com/xjrsoft/module/textbook/service/impl/SubjectGroupServiceImpl.java
  23. 7 0
      src/main/java/com/xjrsoft/module/workflow/controller/WorkflowExecuteController.java
  24. 4 8
      src/main/resources/application-pre.yml
  25. 4 9
      src/main/resources/application-prod.yml
  26. 47 0
      src/main/resources/mapper/ledger/WfSubscriptionMapper.xml
  27. 1 1
      src/main/resources/mapper/personnel/LaborManagementMapper.xml
  28. 1 1
      src/main/resources/sqlScript/20240112_sql.sql
  29. 39 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java
  30. 156 0
      src/test/java/com/xjrsoft/xjrsoftboot/TextBookTest.java

+ 89 - 0
src/main/java/com/xjrsoft/module/ledger/controller/WfSubscriptionController.java

@@ -0,0 +1,89 @@
+package com.xjrsoft.module.ledger.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.module.ledger.dto.AddWfSubscriptionDto;
+import com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto;
+import com.xjrsoft.module.ledger.entity.WfSubscription;
+import com.xjrsoft.module.ledger.service.IWfSubscriptionService;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionExcelVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+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 javax.validation.Valid;
+import java.io.ByteArrayOutputStream;
+import java.util.List;
+
+/**
+* @title: 物品申购
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/ledger" + "/wfSubscription")
+@Api(value = "/ledger"  + "/wfSubscription",tags = "物品申购代码")
+@AllArgsConstructor
+public class WfSubscriptionController {
+
+
+    private final IWfSubscriptionService wfSubscriptionService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="物品申购台账列表(分页)")
+    @SaCheckPermission("wfsubscription:detail")
+    public RT<PageOutput<WfSubscriptionPageVo>> page(@Valid WfSubscriptionPageDto dto){
+        IPage<WfSubscriptionPageVo> page = wfSubscriptionService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        PageOutput<WfSubscriptionPageVo> pageOutput = ConventPage.getPageOutput(page, WfSubscriptionPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/subscription-list")
+    @ApiOperation(value="查看物品清单")
+    @SaCheckPermission("wfsubscription:detail")
+    public RT<WfSubscriptionListInfoVo> subscriptionPage(@RequestParam Long id){
+        WfSubscriptionListInfoVo wfSubscription = wfSubscriptionService.getSubscriptionList(id);
+        if (wfSubscription == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(wfSubscription);
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增物品申购")
+    @SaCheckPermission("wfsubscription:add")
+    public RT<Boolean> add(@Valid @RequestBody AddWfSubscriptionDto dto){
+        WfSubscription wfSubscription = BeanUtil.toBean(dto, WfSubscription.class);
+        boolean isSuccess = wfSubscriptionService.add(wfSubscription);
+        return RT.ok(isSuccess);
+    }
+
+
+    @PostMapping("/export-query")
+    @ApiOperation(value = "导出")
+    public ResponseEntity<byte[]> exportData(@Valid WfSubscriptionPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
+        List<WfSubscriptionExcelVo> customerList = wfSubscriptionService.getList(dto);
+        ByteArrayOutputStream bot = new ByteArrayOutputStream();
+        EasyExcel.write(bot, WfSubscriptionExcelVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
+
+        return RT.fileStream(bot.toByteArray(), "WfSubscription" + ExcelTypeEnum.XLSX.getValue());
+    }
+}

+ 54 - 0
src/main/java/com/xjrsoft/module/ledger/dto/AddWfSubscriptionDto.java

@@ -0,0 +1,54 @@
+package com.xjrsoft.module.ledger.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+
+
+/**
+* @title: 物品申购
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class AddWfSubscriptionDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 申请部门
+    */
+    @ApiModelProperty("申请部门")
+    private String applicationDepartment;
+    /**
+    * 申请日期
+    */
+    @ApiModelProperty("申请日期")
+    private Date shenQingRiQi4752;
+    /**
+    * 申请人
+    */
+    @ApiModelProperty("申请人")
+    private String userId;
+    /**
+    * 预估总额(元)
+    */
+    @ApiModelProperty("预估总额(元)")
+    private Double totalAmount;
+    /**
+    * 附件
+    */
+    @ApiModelProperty("附件")
+    private String annex;
+
+    /**
+    * wfSubscriptionList
+    */
+    @ApiModelProperty("wfSubscriptionList子表")
+    private List<AddWfSubscriptionListDto> wfSubscriptionListList;
+}

+ 72 - 0
src/main/java/com/xjrsoft/module/ledger/dto/AddWfSubscriptionListDto.java

@@ -0,0 +1,72 @@
+package com.xjrsoft.module.ledger.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+
+/**
+* @title: 物品申购子表
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class AddWfSubscriptionListDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 申购物品名称
+    */
+    @ApiModelProperty("申购物品名称")
+    private String nameOfThePurchasedItem;
+    /**
+    * 品牌
+    */
+    @ApiModelProperty("品牌")
+    private String brand;
+    /**
+    * 规格型号
+    */
+    @ApiModelProperty("规格型号")
+    private String specificationAndModel;
+    /**
+    * 估计单价
+    */
+    @ApiModelProperty("估计单价")
+    private Double estimatedUnitPrice;
+    /**
+    * 申购物品数量
+    */
+    @ApiModelProperty("申购物品数量")
+    private Double amount;
+    /**
+    * 单位
+    */
+    @ApiModelProperty("单位")
+    private String unit;
+    /**
+    * 合计金额
+    */
+    @ApiModelProperty("合计金额")
+    private Double totalAmount;
+    /**
+    * 物品类型
+    */
+    @ApiModelProperty("物品类型")
+    private String itemType;
+    /**
+    * 用途
+    */
+    @ApiModelProperty("用途")
+    private String yongTu8748;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long parentId;
+
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/ledger/dto/UpdateWfSubscriptionDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.ledger.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+/**
+* @title: 物品申购
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class UpdateWfSubscriptionDto extends AddWfSubscriptionDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+}

+ 25 - 0
src/main/java/com/xjrsoft/module/ledger/dto/WfSubscriptionListDto.java

@@ -0,0 +1,25 @@
+package com.xjrsoft.module.ledger.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 物品申购分页查询入参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class WfSubscriptionListDto extends PageInput {
+
+    /**
+     * 物品申购id
+     */
+    @ApiModelProperty("物品申购id")
+    private Long parentId;
+
+}

+ 43 - 0
src/main/java/com/xjrsoft/module/ledger/dto/WfSubscriptionPageDto.java

@@ -0,0 +1,43 @@
+package com.xjrsoft.module.ledger.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 物品申购分页查询入参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class WfSubscriptionPageDto extends PageInput {
+
+    /**
+     * 开始时间
+     */
+    @ApiModelProperty("开始时间")
+    private String startDate;
+
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty("结束时间")
+    private String endDate;
+
+    /**
+     * 部门id
+     */
+    @ApiModelProperty("部门id")
+    private Long orgId;
+
+    /**
+     * 申请人
+     */
+    @ApiModelProperty("申请人")
+    private String userName;
+
+}

+ 69 - 0
src/main/java/com/xjrsoft/module/ledger/entity/WfSubscription.java

@@ -0,0 +1,69 @@
+package com.xjrsoft.module.ledger.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+* @title: 物品申购
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+@TableName("wf_subscription")
+@ApiModel(value = "wf_subscription", description = "物品申购")
+public class WfSubscription implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 申请部门
+    */
+    @ApiModelProperty("申请部门")
+    private String applicationDepartment;
+    /**
+    * 申请日期
+    */
+    @ApiModelProperty("申请日期")
+    private Date shenQingRiQi4752;
+    /**
+    * 申请人
+    */
+    @ApiModelProperty("申请人")
+    private String userId;
+    /**
+    * 预估总额(元)
+    */
+    @ApiModelProperty("预估总额(元)")
+    private Double totalAmount;
+    /**
+    * 附件
+    */
+    @ApiModelProperty("附件")
+    private String folderId;
+
+    /**
+    * wfSubscriptionList
+    */
+    @ApiModelProperty("wfSubscriptionList子表")
+    @TableField(exist = false)
+    @EntityMapping(thisField = "id", joinField = "parentId")
+    private List<WfSubscriptionList> wfSubscriptionListList;
+
+}

+ 83 - 0
src/main/java/com/xjrsoft/module/ledger/entity/WfSubscriptionList.java

@@ -0,0 +1,83 @@
+package com.xjrsoft.module.ledger.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+* @title: 物品申购子表
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+@TableName("wf_subscription_list")
+@ApiModel(value = "wf_subscription_list", description = "物品申购子表")
+public class WfSubscriptionList implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 申购物品名称
+    */
+    @ApiModelProperty("申购物品名称")
+    private String nameOfThePurchasedItem;
+    /**
+    * 品牌
+    */
+    @ApiModelProperty("品牌")
+    private String brand;
+    /**
+    * 规格型号
+    */
+    @ApiModelProperty("规格型号")
+    private String specificationAndModel;
+    /**
+    * 估计单价
+    */
+    @ApiModelProperty("估计单价")
+    private Double estimatedUnitPrice;
+    /**
+    * 申购物品数量
+    */
+    @ApiModelProperty("申购物品数量")
+    private Double amount;
+    /**
+    * 单位
+    */
+    @ApiModelProperty("单位")
+    private String unit;
+    /**
+    * 合计金额
+    */
+    @ApiModelProperty("合计金额")
+    private Double totalAmount;
+    /**
+    * 物品类型
+    */
+    @ApiModelProperty("物品类型")
+    private String itemType;
+    /**
+    * 用途
+    */
+    @ApiModelProperty("用途")
+    private String yongTu8748;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long parentId;
+
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/ledger/mapper/WfSubscriptionListMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.ledger.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.ledger.entity.WfSubscriptionList;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 物品申购子表
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Mapper
+public interface WfSubscriptionListMapper extends MPJBaseMapper<WfSubscriptionList> {
+
+}

+ 43 - 0
src/main/java/com/xjrsoft/module/ledger/mapper/WfSubscriptionMapper.java

@@ -0,0 +1,43 @@
+package com.xjrsoft.module.ledger.mapper;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto;
+import com.xjrsoft.module.ledger.entity.WfSubscription;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionExcelVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+* @title: 物品申购
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Mapper
+public interface WfSubscriptionMapper extends MPJBaseMapper<WfSubscription> {
+
+    /**
+     * 列表查询
+     * @param page
+     * @param dto
+     * @return
+     */
+    Page<WfSubscriptionPageVo> getPage(Page<WfSubscriptionPageVo> page, WfSubscriptionPageDto dto);
+
+    /**
+     * 根据id查询详情信息
+     * @param id
+     * @return
+     */
+    WfSubscriptionListInfoVo getInfoById(Long id);
+
+    /**
+     * 列表查询
+     */
+    List<WfSubscriptionExcelVo> getList(@Param("dto") WfSubscriptionPageDto dto);
+}

+ 63 - 0
src/main/java/com/xjrsoft/module/ledger/service/IWfSubscriptionService.java

@@ -0,0 +1,63 @@
+package com.xjrsoft.module.ledger.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto;
+import com.xjrsoft.module.ledger.entity.WfSubscription;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionExcelVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionListVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo;
+
+import java.util.List;
+
+/**
+* @title: 物品申购
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+
+public interface IWfSubscriptionService extends MPJBaseService<WfSubscription> {
+    /**
+    * 新增
+    *
+    * @param wfSubscription
+    * @return
+    */
+    Boolean add(WfSubscription wfSubscription);
+
+    /**
+    * 更新
+    *
+    * @param wfSubscription
+    * @return
+    */
+    Boolean update(WfSubscription wfSubscription);
+
+    /**
+    * 删除
+    *
+    * @param ids
+    * @return
+    */
+    Boolean delete(List<Long> ids);
+
+    /**
+     * 列表查询
+     * @param page
+     * @param dto
+     */
+    Page<WfSubscriptionPageVo> getPage(Page<WfSubscriptionPageVo> page, WfSubscriptionPageDto dto);
+
+    /**
+     * 物品清单列表查询
+     * @param id
+     */
+    WfSubscriptionListInfoVo getSubscriptionList(Long id);
+
+    /**
+     * 列表查询
+     */
+    List<WfSubscriptionExcelVo> getList(WfSubscriptionPageDto dto);
+}

+ 164 - 0
src/main/java/com/xjrsoft/module/ledger/service/impl/WfSubscriptionServiceImpl.java

@@ -0,0 +1,164 @@
+package com.xjrsoft.module.ledger.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto;
+import com.xjrsoft.module.ledger.entity.WfSubscription;
+import com.xjrsoft.module.ledger.entity.WfSubscriptionList;
+import com.xjrsoft.module.ledger.mapper.WfSubscriptionListMapper;
+import com.xjrsoft.module.ledger.mapper.WfSubscriptionMapper;
+import com.xjrsoft.module.ledger.service.IWfSubscriptionService;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionExcelVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionListVo;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo;
+import com.xjrsoft.module.ledger.vo.WorkflowRecordVo;
+import com.xjrsoft.module.system.entity.File;
+import com.xjrsoft.module.system.service.IFileService;
+import com.xjrsoft.module.workflow.entity.WorkflowExtra;
+import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
+import com.xjrsoft.module.workflow.entity.WorkflowRecord;
+import com.xjrsoft.module.workflow.mapper.WorkflowExtraMapper;
+import com.xjrsoft.module.workflow.mapper.WorkflowFormRelationMapper;
+import com.xjrsoft.module.workflow.mapper.WorkflowRecordMapper;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+* @title: 物品申购
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class WfSubscriptionServiceImpl extends MPJBaseServiceImpl<WfSubscriptionMapper, WfSubscription> implements IWfSubscriptionService {
+    private final WfSubscriptionMapper wfSubscriptionMapper;
+
+    private final WfSubscriptionListMapper wfSubscriptionListMapper;
+
+    private IFileService fileService;
+
+    private WorkflowRecordMapper workflowRecordMapper;
+
+    private WorkflowExtraMapper workflowExtraMapper;
+
+    private WorkflowFormRelationMapper workflowFormRelationMapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean add(WfSubscription wfSubscription) {
+        wfSubscriptionMapper.insert(wfSubscription);
+        for (WfSubscriptionList wfSubscriptionList : wfSubscription.getWfSubscriptionListList()) {
+            wfSubscriptionList.setParentId(wfSubscription.getId());
+            wfSubscriptionListMapper.insert(wfSubscriptionList);
+        }
+
+        return true;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean update(WfSubscription wfSubscription) {
+        wfSubscriptionMapper.updateById(wfSubscription);
+        //********************************* WfSubscriptionList  增删改  开始 *******************************************/
+        {
+            // 查出所有子级的id
+            List<WfSubscriptionList> wfSubscriptionListList = wfSubscriptionListMapper.selectList(Wrappers.lambdaQuery(WfSubscriptionList.class).eq(WfSubscriptionList::getParentId, wfSubscription.getId()).select(WfSubscriptionList::getId));
+            List<Long> wfSubscriptionListIds = wfSubscriptionListList.stream().map(WfSubscriptionList::getId).collect(Collectors.toList());
+            //原有子表单 没有被删除的主键
+            List<Long> wfSubscriptionListOldIds = wfSubscription.getWfSubscriptionListList().stream().map(WfSubscriptionList::getId).filter(Objects::nonNull).collect(Collectors.toList());
+            //找到需要删除的id
+            List<Long> wfSubscriptionListRemoveIds = wfSubscriptionListIds.stream().filter(item -> !wfSubscriptionListOldIds.contains(item)).collect(Collectors.toList());
+
+            for (WfSubscriptionList wfSubscriptionList : wfSubscription.getWfSubscriptionListList()) {
+                //如果不等于空则修改
+                if (wfSubscriptionList.getId() != null) {
+                    wfSubscriptionListMapper.updateById(wfSubscriptionList);
+                }
+                //如果等于空 则新增
+                else {
+                    //已经不存在的id 删除
+                    wfSubscriptionList.setParentId(wfSubscription.getId());
+                    wfSubscriptionListMapper.insert(wfSubscriptionList);
+                }
+            }
+            //已经不存在的id 删除
+            if(wfSubscriptionListRemoveIds.size() > 0){
+                wfSubscriptionListMapper.deleteBatchIds(wfSubscriptionListRemoveIds);
+            }
+        }
+        //********************************* WfSubscriptionList  增删改  结束 *******************************************/
+
+        return true;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(List<Long> ids) {
+        wfSubscriptionMapper.deleteBatchIds(ids);
+        wfSubscriptionListMapper.delete(Wrappers.lambdaQuery(WfSubscriptionList.class).in(WfSubscriptionList::getParentId, ids));
+
+        return true;
+    }
+
+    @Override
+    public Page<WfSubscriptionPageVo> getPage(Page<WfSubscriptionPageVo> page, WfSubscriptionPageDto dto) {
+        Page<WfSubscriptionPageVo> voPage = wfSubscriptionMapper.getPage(page, dto);
+        for (WfSubscriptionPageVo record : voPage.getRecords()) {
+            List<File> list = fileService.list(Wrappers.lambdaQuery(File.class).eq(File::getFolderId, record.getFolderId()));
+            record.setFileInfos(list);
+        }
+        return voPage;
+    }
+
+    @Override
+    public WfSubscriptionListInfoVo getSubscriptionList(Long id) {
+        WfSubscriptionListInfoVo info = wfSubscriptionMapper.getInfoById(id);
+        List<WfSubscriptionList> subscriptionListList = wfSubscriptionListMapper.selectList(
+            new QueryWrapper<WfSubscriptionList>().lambda().eq(WfSubscriptionList::getParentId, id)
+        );
+        info.setSubscriptionList(BeanUtil.copyToList(subscriptionListList, WfSubscriptionListVo.class));
+
+        List<WorkflowRecord> recordList = workflowRecordMapper.selectList(
+            new MPJLambdaWrapper<WorkflowRecord>()
+            .select(WorkflowRecord.class, x -> VoToColumnUtil.fieldsToColumns(WorkflowRecordVo.class).contains(x.getProperty()))
+            .innerJoin(WorkflowFormRelation.class, WorkflowFormRelation::getProcessId, WorkflowRecord::getProcessId)
+            .eq(WorkflowFormRelation::getFormKeyValue, id)
+        );
+        info.setWorkflowRecordList(BeanUtil.copyToList(recordList, WorkflowRecordVo.class));
+        List<WorkflowFormRelation> relations = workflowFormRelationMapper.selectList(new QueryWrapper<WorkflowFormRelation>().lambda().eq(WorkflowFormRelation::getFormKeyValue, id));
+
+        if(!relations.isEmpty()){
+            info.setProcessId(relations.get(0).getProcessId());
+        }
+
+
+        //查询最后一个节点的taskId
+        List<WorkflowExtra> taskList = workflowExtraMapper.selectList(
+            new QueryWrapper<WorkflowExtra>().lambda()
+            .eq(WorkflowExtra::getProcessId, info.getProcessId())
+            .orderByDesc(WorkflowExtra::getStartTime)
+        );
+        if(!taskList.isEmpty()){
+            info.setTaskId(taskList.get(0).getTaskId());
+        }
+
+        return info;
+    }
+
+    @Override
+    public List<WfSubscriptionExcelVo> getList(WfSubscriptionPageDto dto) {
+        return wfSubscriptionMapper.getList(dto);
+    }
+}

+ 58 - 0
src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionExcelVo.java

@@ -0,0 +1,58 @@
+package com.xjrsoft.module.ledger.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.xjrsoft.module.system.entity.File;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 物品申购分页列表出参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class WfSubscriptionExcelVo {
+
+    /**
+    * 
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("主键编号")
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 申请部门
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请部门")
+    @ApiModelProperty("申请部门")
+    private String orgName;
+    /**
+    * 申请日期
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请日期")
+    @ApiModelProperty("申请日期")
+    private String shenQingRiQi4752;
+    /**
+    * 申请人
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请人")
+    @ApiModelProperty("申请人")
+    private String userName;
+    /**
+    * 附件
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("编号")
+    @ApiModelProperty("编号")
+    private String number;
+
+
+}

+ 65 - 0
src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionListInfoVo.java

@@ -0,0 +1,65 @@
+package com.xjrsoft.module.ledger.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.xjrsoft.module.system.entity.File;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 物品申购子表表单出参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class WfSubscriptionListInfoVo {
+
+    /**
+     * 申请部门
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请部门")
+    @ApiModelProperty("申请部门")
+    private String orgName;
+    /**
+     * 申请日期
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请日期")
+    @ApiModelProperty("申请日期")
+    private Date shenQingRiQi4752;
+    /**
+     * 申请人
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请人")
+    @ApiModelProperty("申请人")
+    private String userName;
+    /**
+     * 附件
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("附件")
+    @ApiModelProperty("附件")
+    private String folderId;
+
+    @ApiModelProperty("附件列表")
+    private List<File> fileInfos;
+
+    @ApiModelProperty("物品清单")
+    private List<WfSubscriptionListVo> subscriptionList;
+
+    @ApiModelProperty("流程信息")
+    private List<WorkflowRecordVo> workflowRecordList;
+
+    @ApiModelProperty("流程id")
+    private String processId;
+
+    @ApiModelProperty("任务id")
+    private String taskId;
+
+}

+ 69 - 0
src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionListVo.java

@@ -0,0 +1,69 @@
+package com.xjrsoft.module.ledger.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 物品申购子表表单出参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class WfSubscriptionListVo {
+
+
+    /**
+    * 申购物品名称
+    */
+    @ApiModelProperty("申购物品名称")
+    private String nameOfThePurchasedItem;
+    /**
+    * 品牌
+    */
+    @ApiModelProperty("品牌")
+    private String brand;
+    /**
+    * 规格型号
+    */
+    @ApiModelProperty("规格型号")
+    private String specificationAndModel;
+    /**
+    * 估计单价
+    */
+    @ApiModelProperty("估计单价")
+    private Double estimatedUnitPrice;
+    /**
+    * 申购物品数量
+    */
+    @ApiModelProperty("申购物品数量")
+    private Double amount;
+    /**
+    * 单位
+    */
+    @ApiModelProperty("单位")
+    private String unit;
+    /**
+    * 合计金额
+    */
+    @ApiModelProperty("合计金额")
+    private Double totalAmount;
+    /**
+    * 物品类型
+    */
+    @ApiModelProperty("物品类型")
+    private String itemType;
+    /**
+    * 用途
+    */
+    @ApiModelProperty("用途")
+    private String yongTu8748;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long parentId;
+
+
+
+}

+ 65 - 0
src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionPageVo.java

@@ -0,0 +1,65 @@
+package com.xjrsoft.module.ledger.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.xjrsoft.module.system.entity.File;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 物品申购分页列表出参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class WfSubscriptionPageVo {
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("主键编号")
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 申请部门
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请部门")
+    @ApiModelProperty("申请部门")
+    private String orgName;
+    /**
+    * 申请日期
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请日期")
+    @ApiModelProperty("申请日期")
+    private Date shenQingRiQi4752;
+    /**
+    * 申请人
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("申请人")
+    @ApiModelProperty("申请人")
+    private String userName;
+    /**
+    * 附件
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("附件")
+    @ApiModelProperty("附件")
+    private String folderId;
+
+    @ApiModelProperty("附件列表")
+    private List<File> fileInfos;
+
+    /**
+     * 申请人
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("编号")
+    @ApiModelProperty("编号")
+    private String number;
+
+}

+ 56 - 0
src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionVo.java

@@ -0,0 +1,56 @@
+package com.xjrsoft.module.ledger.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 物品申购表单出参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class WfSubscriptionVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 申请部门
+    */
+    @ApiModelProperty("申请部门")
+    private String applicationDepartment;
+    /**
+    * 申请日期
+    */
+    @ApiModelProperty("申请日期")
+    private Date shenQingRiQi4752;
+    /**
+    * 申请人
+    */
+    @ApiModelProperty("申请人")
+    private String userId;
+    /**
+    * 预估总额(元)
+    */
+    @ApiModelProperty("预估总额(元)")
+    private Double totalAmount;
+    /**
+    * 附件
+    */
+    @ApiModelProperty("附件")
+    private String annex;
+
+
+    /**
+    * wfSubscriptionList
+    */
+    @ApiModelProperty("wfSubscriptionList子表")
+    private List<WfSubscriptionListVo> wfSubscriptionListList;
+
+}

+ 35 - 0
src/main/java/com/xjrsoft/module/ledger/vo/WorkflowRecordVo.java

@@ -0,0 +1,35 @@
+package com.xjrsoft.module.ledger.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 物品申购表单出参
+* @Author dzx
+* @Date: 2024-02-19
+* @Version 1.0
+*/
+@Data
+public class WorkflowRecordVo {
+
+    /**
+    * 申请部门
+    */
+    @ApiModelProperty("节点名称")
+    private String nodeName;
+    /**
+    * 申请日期
+    */
+    @ApiModelProperty("操作信息")
+    private String message;
+    /**
+    * 申请人
+    */
+    @ApiModelProperty("操作时间")
+    private Date recordTime;
+
+    @ApiModelProperty("流程id")
+    private String processId;
+}

+ 2 - 2
src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java

@@ -247,9 +247,9 @@ public class DataUtil {
             paramJson.addProperty("schoolYear", Integer.parseInt(sdfYear.format(semester.getStartDate())));
             Integer period = null;
             if(semester.getName().contains(spring)){
-                period = 2;
-            }else if(semester.getName().contains(autumn)){
                 period = 1;
+            }else if(semester.getName().contains(autumn)){
+                period = 2;
             }
             //获取时间戳
             long timestamp = System.currentTimeMillis();

+ 2 - 1
src/main/java/com/xjrsoft/module/teacher/controller/TeacherbaseManagerController.java

@@ -2,6 +2,7 @@ package com.xjrsoft.module.teacher.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -63,7 +64,7 @@ public class TeacherbaseManagerController {
                 .like(StrUtil.isNotBlank(dto.getMobile()),XjrUser::getMobile,dto.getMobile())
                 .like(StrUtil.isNotBlank(dto.getName()),XjrUser::getName,dto.getName())
                 .like(StrUtil.isNotBlank(dto.getEmail()),XjrUser::getEmail,dto.getEmail())
-                .eq(UserDeptRelation::getDeptId, dto.getOrgId())
+                .eq(ObjectUtil.isNotNull(dto.getDepartmentId()), UserDeptRelation::getDeptId, dto.getDepartmentId())
                 .orderByDesc(XjrUser::getId)
                 .select(XjrUser::getId)
                 .select(XjrUser.class,x -> VoToColumnUtil.fieldsToColumns(XjrUserPageVo.class).contains(x.getProperty()))

+ 1 - 1
src/main/java/com/xjrsoft/module/teacher/dto/XjrUserPageDto.java

@@ -41,6 +41,6 @@ public class XjrUserPageDto extends PageInput {
      * 机构id
      */
     @ApiModelProperty("机构id")
-    private Long orgId;
+    private Long departmentId;
 
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/textbook/service/impl/SubjectGroupServiceImpl.java

@@ -1,5 +1,6 @@
 package com.xjrsoft.module.textbook.service.impl;
 
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -17,6 +18,7 @@ import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -35,6 +37,8 @@ public class SubjectGroupServiceImpl extends MPJBaseServiceImpl<SubjectGroupMapp
     @Transactional
     public Boolean add(AddSubjectGroupDto dto) {
         SubjectGroup subjectGroup = BeanUtil.toBean(dto, SubjectGroup.class);
+        subjectGroup.setCreateDate(new Date());
+        subjectGroup.setCreateUserId(StpUtil.getLoginIdAsLong());
         boolean isSuccess = this.save(subjectGroup);
 
         LambdaQueryWrapper<SubjectGroup> queryWrapper = new LambdaQueryWrapper<>();
@@ -49,6 +53,8 @@ public class SubjectGroupServiceImpl extends MPJBaseServiceImpl<SubjectGroupMapp
                 SubjectGroupCourse subjectGroupCourse = new SubjectGroupCourse();
                 subjectGroupCourse.setSubjectGroupId(result.getId());
                 subjectGroupCourse.setCourseSubjectId(subjectGroupCourseId);
+                subjectGroupCourse.setCreateDate(new Date());
+                subjectGroupCourse.setCreateUserId(StpUtil.getLoginIdAsLong());
                 isSuccess = subjectGroupCourseService.save(subjectGroupCourse);
                 if(!isSuccess){
                     throw new MyException("出现未知错误,联系管理员");

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

@@ -3,6 +3,7 @@ package com.xjrsoft.module.workflow.controller;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.model.result.R;
+import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.module.workflow.dto.AddOrSubSignDto;
 import com.xjrsoft.module.workflow.dto.ApproveDto;
 import com.xjrsoft.module.workflow.dto.ApproveMultiDto;
@@ -348,5 +349,11 @@ public class WorkflowExecuteController {
         return R.ok(workflowExecuteService.getCount());
     }
 
+    @GetMapping("/my-examine")
+    @ApiOperation(value = "我的审批")
+    public RT myExamine(){
+        return RT.ok();
+    }
+
 
 }

+ 4 - 8
src/main/resources/application-pre.yml

@@ -4,14 +4,10 @@ spring:
     exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
-    dynamic:
-      primary: master
-      datasource:
-        master:
-          driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://10.150.10.137:3306/tl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
-          username: root
-          password: Zwr~-f6H,u6QE^]C-AD_
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://10.150.10.137:3306/tl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
+    username: root
+    password: Zwr~-f6H,u6QE^]C-AD_
 
 
 

+ 4 - 9
src/main/resources/application-prod.yml

@@ -4,14 +4,10 @@ spring:
     exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
-    dynamic:
-      primary: master
-      datasource:
-        master:
-          driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://219.153.208.35:3306/smart_campus?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
-          username: root
-          password: xzNDL3dcx#TyEz^a
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://219.153.208.35:3306/smart_campus?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
+    username: root
+    password: xzNDL3dcx#TyEz^a
 
 
   redis:
@@ -91,7 +87,6 @@ xjrsoft:
       - /oauth2/* # oauth2
       - /system/bindOpenid # 绑定openid
       - /schedule/schedule/receive-msg
-
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>
     port:  # 邮件服务器的SMTP端口,可选,默认25

+ 47 - 0
src/main/resources/mapper/ledger/WfSubscriptionMapper.xml

@@ -0,0 +1,47 @@
+<?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.ledger.mapper.WfSubscriptionMapper">
+    <select id="getPage" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id,t1.number from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where 1 = 1
+        <if test="dto.orgId != null">
+            and t2.id = #{dto.orgId}
+        </if>
+        <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
+            and t2.shen_qing_ri_qi4752 between #{dto.startDate} and #{dto.endDate}
+        </if>
+        <if test="dto.userName != null and dto.userName != ''">
+            and t3.name like concat('%', #{dto.userName}, '%')
+        </if>
+        order by t1.shen_qing_ri_qi4752 desc
+    </select>
+
+    <select id="getList" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionExcelVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,DATE_FORMAT(t1.shen_qing_ri_qi4752, '%Y年%m月%d日') as shen_qing_ri_qi4752, t1.folder_id,t1.number from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where 1 = 1
+        <if test="dto.orgId != null">
+            and t2.id = #{dto.orgId}
+        </if>
+        <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
+            and t2.shen_qing_ri_qi4752 between #{dto.startDate} and #{dto.endDate}
+        </if>
+        <if test="dto.userName != null and dto.userName != ''">
+            and t3.name like concat('%', #{dto.userName}, '%')
+        </if>
+        order by t1.shen_qing_ri_qi4752 desc
+    </select>
+
+    <select id="getInfoById" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where t1.id = #{id}
+    </select>
+
+</mapper>

+ 1 - 1
src/main/resources/mapper/personnel/LaborManagementMapper.xml

@@ -7,7 +7,7 @@
         SELECT
         t.id, t.user_name, t.name, t1.name AS gender, t2.start_work_time, t3.name AS jobState, t4.nature_organization, t5.name, t6.name AS job
         FROM xjr_user t
-        LEFT JOIN base_teacher t2 ON t2.user_id = t.id
+        inner JOIN base_teacher t2 ON t2.user_id = t.id
         LEFT JOIN xjr_dictionary_detail t1 ON t1.item_id = (SELECT id FROM xjr_dictionary_item WHERE code = 'gender') AND t1.code = (CASE t.gender
             WHEN 1 THEN 'SB10001'
             WHEN 2 THEN 'SB10002'

+ 1 - 1
src/main/resources/sqlScript/20240112_sql.sql

@@ -131,7 +131,7 @@ CREATE TABLE evaluate_executer
     `user_id` BIGINT NULL DEFAULT NULL COMMENT '参加评价的人id',
     PRIMARY KEY (`id`)
 ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '评价执行人';
-ALTER TABLE `tl`.`evaluate_executer`
+ALTER TABLE `evaluate_executer`
     ADD COLUMN `status` INT DEFAULT 0  NULL   COMMENT '状态(1:已评分,0:未评分)' AFTER `user_id`;
 
 -- ----------------------------

+ 39 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -2215,4 +2215,43 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+
+    /**
+     * 评价项
+     * @throws IOException
+     */
+    @Test
+    public void gcWfSubscription() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("wf_subscription");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        mainTable = new TableConfig();
+        mainTable.setTableName("wf_subscription_list");//init_sql中的表名
+        mainTable.setIsMain(false);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        mainTable.setRelationField("parent_id");//设置外键
+        mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("ledger");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(true);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+
+    }
 }

+ 156 - 0
src/test/java/com/xjrsoft/xjrsoftboot/TextBookTest.java

@@ -0,0 +1,156 @@
+package com.xjrsoft.xjrsoftboot;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.db.Db;
+import cn.hutool.db.Entity;
+import com.alibaba.excel.EasyExcel;
+import com.xjrsoft.XjrSoftApplication;
+import com.xjrsoft.common.constant.GlobalConstant;
+import com.xjrsoft.common.utils.DatasourceUtil;
+import com.xjrsoft.module.base.entity.BaseClass;
+import com.xjrsoft.module.base.entity.BaseCourseSubject;
+import com.xjrsoft.module.base.entity.BaseGrade;
+import com.xjrsoft.module.base.entity.BaseSemester;
+import com.xjrsoft.module.courseTable.service.ICourseTableService;
+import com.xjrsoft.module.textbook.entity.SubjectGroup;
+import com.xjrsoft.module.textbook.entity.Textbook;
+import com.xjrsoft.module.textbook.entity.TextbookClassRelation;
+import com.xjrsoft.module.textbook.service.ITextbookService;
+import com.yomahub.liteflow.util.JsonUtil;
+import org.junit.jupiter.api.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.sql.DataSource;
+import java.io.File;
+import java.math.BigDecimal;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author dzx
+ * @date 2024/2/17
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = XjrSoftApplication.class)
+public class TextBookTest {
+    @Autowired
+    private ITextbookService textbookService;
+    @Test
+    void test() throws SQLException {
+        String filePath = "D:\\workspace\\其他\\教材管理\\副本2024年春期教材征订表(2024.1.22)交书店改.xlsx";
+        File file = new File(filePath);
+        List<Map<Integer, Object>> excelDataList = EasyExcel.read(file).sheet().headRowNumber(1).doReadSync();
+        DataSource datasource = DatasourceUtil.getDataSource(GlobalConstant.DEFAULT_DATASOURCE_KEY);
+        Db use = Db.use(datasource);
+
+        // 班级
+        String sql = "SELECT * FROM base_class WHERE delete_mark = 0";
+        List<BaseClass> classList = use.query(sql, BaseClass.class);
+        Map<String, Long> classMap = new HashMap<>();
+        for (BaseClass baseClass : classList) {
+            classMap.put(baseClass.getName(), baseClass.getId());
+        }
+
+        //学科组
+        sql = "SELECT * FROM subject_group WHERE delete_mark = 0";
+        List<SubjectGroup> subjectGroupList = use.query(sql, SubjectGroup.class);
+        Map<String, Long> subjectGroupMap = new HashMap<>();
+        for (SubjectGroup el : subjectGroupList) {
+            subjectGroupMap.put(el.getGroupName(), el.getId());
+        }
+
+        //课程 base_course_subject
+        sql = "SELECT * FROM base_course_subject WHERE delete_mark = 0";
+        List<BaseCourseSubject> courseSubjectList = use.query(sql, BaseCourseSubject.class);
+        Map<String, Long> courseSubjectMap = new HashMap<>();
+        for (BaseCourseSubject el : courseSubjectList) {
+            courseSubjectMap.put(el.getName(), el.getId());
+        }
+
+        //年级
+        sql = "SELECT * FROM base_grade WHERE delete_mark = 0";
+        List<BaseGrade> gaseGradeList = use.query(sql, BaseGrade.class);
+        Map<String, Long> gaseGradeMap = new HashMap<>();
+        for (BaseGrade el : gaseGradeList) {
+            gaseGradeMap.put(el.getName(), el.getId());
+        }
+
+        //学期
+        sql = "SELECT * FROM base_semester WHERE delete_mark = 0";
+        List<BaseSemester> baseSemesterList = use.query(sql, BaseSemester.class);
+        Map<String, Long> baseSemesterMap = new HashMap<>();
+        for (BaseSemester el : baseSemesterList) {
+            baseSemesterMap.put(el.getName(), el.getId());
+        }
+
+        Long id = 1758702787978899458L;
+        Long createUserId = 1000000000000000000L;
+        Date date = new Date();
+        for (Map<Integer, Object> dataMap : excelDataList) {
+            System.out.println(dataMap.toString());
+            Textbook textbook = new Textbook();
+//            textbook.setId(Long.parseLong(dataMap.get(1).toString()));
+            textbook.setIssn(dataMap.get(2).toString());
+            textbook.setBookName(dataMap.get(3).toString());
+            textbook.setTextbookType(dataMap.get(5).toString());
+            textbook.setPublishingHouse(dataMap.get(6).toString());
+            if(dataMap.get(7) != null){
+                textbook.setEditorInChief(dataMap.get(7).toString());
+            }
+
+            if(dataMap.get(8) != null){
+                textbook.setPrice(BigDecimal.valueOf(Double.valueOf(dataMap.get(8).toString())));
+            }
+
+            Object yesno = dataMap.get(9);
+            if(yesno != null){
+                textbook.setIsTextbookPlan(yesno.toString());
+            }
+            if(dataMap.get(13) != null){
+                textbook.setSubjectGroupId(subjectGroupMap.get(dataMap.get(13).toString()));
+            }
+            if(dataMap.get(11) != null){
+                textbook.setGradeId(gaseGradeMap.get(dataMap.get(11).toString()));
+            }
+
+            textbook.setBaseSemesterId(1754815042567057408L);
+            if(dataMap.get(10) != null){
+                textbook.setCourseSubjectId(courseSubjectMap.get(dataMap.get(10).toString()));
+            }
+
+            textbook.setCreateUserId(createUserId);
+            textbook.setCreateDate(date);
+            textbook.setDeleteMark(0);
+            textbook.setEnabledMark(1);
+
+            Object classObj = dataMap.get(12);
+            List<TextbookClassRelation> relationList = new ArrayList<>();
+            if(classObj != null){
+                String[] classNames = classObj.toString().split("、");
+
+                for (String className : classNames) {
+                    TextbookClassRelation classRelation = new TextbookClassRelation();
+                    classRelation.setCreateDate(date);
+                    classRelation.setCreateUserId(createUserId);
+                    classRelation.setDeleteMark(0);
+                    classRelation.setEnabledMark(1);
+                    classRelation.setClassId(classMap.get(className));
+                    relationList.add(classRelation);
+                }
+
+            }
+            textbook.setTextbookClassRelationList(relationList);
+            textbookService.add(textbook);
+
+        }
+    }
+}
+