Quellcode durchsuchen

Merge branch 'master' of http://47.110.251.215:3000/java_org/bladex

huangtf vor 2 Jahren
Ursprung
Commit
0797b9deb8
50 geänderte Dateien mit 1234 neuen und 104 gelöschten Zeilen
  1. 0 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/LargeFileEndpoint.java
  2. 34 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/CorporationInfoDTO.java
  3. 34 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/UserpayInfoDTO.java
  4. 73 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/CorporationInfo.java
  5. 1 1
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/ProjectCostBudget.java
  6. 149 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserpayInfo.java
  7. 34 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/CorporationInfoVO.java
  8. 4 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/EMInvoiceInfoVO.java
  9. 6 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/EMPayInfoVO.java
  10. 4 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/ProjectCostBudgetVO2.java
  11. 34 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/UserpayInfoVO.java
  12. 3 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/ArchiveTreeContractClient.java
  13. 19 7
      blade-service/blade-control/src/main/java/org/springblade/control/controller/ContractInfoController.java
  14. 12 0
      blade-service/blade-control/src/main/java/org/springblade/control/controller/DictInfoController.java
  15. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/controller/ExMaTwoController.java
  16. 118 0
      blade-service/blade-control/src/main/java/org/springblade/control/controller/UserpayInfoController.java
  17. 5 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractInfoMapper.java
  18. 9 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractInfoMapper.xml
  19. 2 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractReturnedInfoMapper.java
  20. 4 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractReturnedInfoMapper.xml
  21. 43 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/CorporationInfoMapper.java
  22. 30 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/CorporationInfoMapper.xml
  23. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectCostBudgetMapper.java
  24. 8 4
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectCostBudgetMapper.xml
  25. 4 4
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectInfoMapper.xml
  26. 43 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserpayInfoMapper.java
  27. 38 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserpayInfoMapper.xml
  28. 4 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/IContractInfoService.java
  29. 2 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/IContractReturnedInfoService.java
  30. 41 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/ICorporationInfoService.java
  31. 41 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/IUserpayInfoService.java
  32. 74 17
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/AnnualBudgetServiceImpl.java
  33. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/AttendanceTripServiceImpl.java
  34. 33 2
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractInfoServiceImpl.java
  35. 14 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractReturnedInfoServiceImpl.java
  36. 41 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/CorporationInfoServiceImpl.java
  37. 2 2
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMFinancialReimbursementServiceImpl.java
  38. 2 2
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMInvoiceServiceImpl.java
  39. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMLoanServiceImpl.java
  40. 2 2
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMOutsourcingPayServiceImpl.java
  41. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMPayServiceImpl.java
  42. 2 2
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMPurchaseServiceImpl.java
  43. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMUseCarServiceImpl.java
  44. 10 11
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/LogHistoryServiceImpl.java
  45. 38 3
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ProjectCostBudgetServiceImpl.java
  46. 1 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ProjectInfoServiceImpl.java
  47. 162 40
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/TaskProcessServiceImpl.java
  48. 41 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/UserpayInfoServiceImpl.java
  49. 5 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ArchiveTreeContractImpl.java
  50. 2 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeContractService.java

+ 0 - 1
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/LargeFileEndpoint.java

@@ -388,7 +388,6 @@ public class LargeFileEndpoint {
             } else if (param.getFilename().contains("docx")) {
                 newBladeFile = this.commonFileClient.wordToPdf(multipartFile);
             } else if (param.getFilename().contains("png") || param.getFilename().contains("jpg")) {
-
                 newBladeFile = this.commonFileClient.pngOrJpgToPdf(multipartFile);
             }
             BeanUtils.copyProperties(bladeFile, newBladeFile);

+ 34 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/CorporationInfoDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.dto;
+
+import org.springblade.control.entity.CorporationInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 公司制度信息表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CorporationInfoDTO extends CorporationInfo {
+    private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/UserpayInfoDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.dto;
+
+import org.springblade.control.entity.UserpayInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 薪酬管理数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UserpayInfoDTO extends UserpayInfo {
+    private static final long serialVersionUID = 1L;
+
+}

+ 73 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/CorporationInfo.java

@@ -0,0 +1,73 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 公司制度信息表实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@TableName("c_corporation_info")
+@EqualsAndHashCode(callSuper = true)
+public class CorporationInfo extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 制度pdf地址
+     */
+    @ApiModelProperty(value = "制度pdf地址")
+    private String link;
+    /**
+     * 制度域名
+     */
+    @ApiModelProperty(value = "制度域名")
+    private String domainUrl;
+    /**
+     * 制度名称
+     */
+    @ApiModelProperty(value = "制度名称")
+    private String name;
+    /**
+     * 制度原名
+     */
+    @ApiModelProperty(value = "制度原名")
+    private String originalName;
+    /**
+     * 制度拓展名
+     */
+    @ApiModelProperty(value = "制度拓展名")
+    private String extension;
+    /**
+     * 制度文件大小
+     */
+    @ApiModelProperty(value = "制度文件大小")
+    private Long attachSize;
+
+
+}

+ 1 - 1
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/ProjectCostBudget.java

@@ -50,7 +50,7 @@ public class ProjectCostBudget extends BaseEntity {
     private BigDecimal budgetDays;
 
     @ApiModelProperty(value = "岗位类型")
-    private Integer postType;
+    private Long postType;
 
     @ApiModelProperty(value = "投入人员数量")
     private BigDecimal staffCount;

+ 149 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserpayInfo.java

@@ -0,0 +1,149 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 薪酬管理实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@TableName("c_userpay_info")
+@EqualsAndHashCode(callSuper = true)
+public class UserpayInfo extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户id主键
+     */
+    @ApiModelProperty(value = "用户id主键")
+    private Long userId;
+    /**
+     * yyyy-mm 格式
+     */
+    @ApiModelProperty(value = "时间yyyy-mm")
+    private String costTime;
+    /**
+     * 应出勤天数
+     */
+    @ApiModelProperty(value = "应出勤天数")
+    private Integer yAllDays;
+    /**
+     * 实际出勤天数
+     */
+    @ApiModelProperty(value = "实际出勤天数")
+    private Integer sAllDays;
+    /**
+     * 年假
+     */
+    @ApiModelProperty(value = "年假")
+    private Integer yearDays;
+    /**
+     * 调休假
+     */
+    @ApiModelProperty(value = "调休假")
+    private Integer cLeaveDays;
+    /**
+     * 病假
+     */
+    @ApiModelProperty(value = "病假")
+    private Integer sickLeaveDays;
+    /**
+     * 事假
+     */
+    @ApiModelProperty(value = "事假")
+    private Integer absenceDays;
+    /**
+     * 基础工资
+     */
+    @ApiModelProperty(value = "基础工资")
+    private BigDecimal basicSalary;
+    /**
+     * 岗位工资
+     */
+    @ApiModelProperty(value = "岗位工资")
+    private BigDecimal postSalary;
+    /**
+     * 绩效工资
+     */
+    @ApiModelProperty(value = "绩效工资")
+    private BigDecimal meritSalary;
+    /**
+     * 奖金
+     */
+    @ApiModelProperty(value = "奖金")
+    private BigDecimal bonusSalary;
+    /**
+     * 伙食补贴
+     */
+    @ApiModelProperty(value = "伙食补贴")
+    private BigDecimal mealWance;
+    /**
+     * 其他补贴
+     */
+    @ApiModelProperty(value = "其他补贴")
+    private BigDecimal otherWance;
+    /**
+     * 考勤扣款
+     */
+    @ApiModelProperty(value = "考勤扣款")
+    private BigDecimal attendDuction;
+    /**
+     * 其他扣款
+     */
+    @ApiModelProperty(value = "其他扣款")
+    private BigDecimal otherDuction;
+    /**
+     * 应发工资
+     */
+    @ApiModelProperty(value = "应发工资")
+    private BigDecimal grossPay;
+    /**
+     * 代缴个税
+     */
+    @ApiModelProperty(value = "代缴个税")
+    private BigDecimal personalTax;
+    /**
+     * 代缴社保
+     */
+    @ApiModelProperty(value = "代缴社保")
+    private BigDecimal socialSec;
+    /**
+     * 实发工资
+     */
+    @ApiModelProperty(value = "实发工资")
+    private BigDecimal netSalary;
+    /**
+     * 描述
+     */
+    @ApiModelProperty(value = "描述")
+    private String desc;
+
+
+}

+ 34 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/CorporationInfoVO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.vo;
+
+import org.springblade.control.entity.CorporationInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 公司制度信息表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CorporationInfoVO extends CorporationInfo {
+    private static final long serialVersionUID = 1L;
+
+}

+ 4 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/EMInvoiceInfoVO.java

@@ -25,4 +25,8 @@ public class EMInvoiceInfoVO extends EMInvoiceInfo {
     @ApiModelProperty(value = "关联项目")
     private String projectName;
 
+    @ApiModelProperty(value = "发票抬头")
+    private String invoiceHead;
+
+
 }

+ 6 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/EMPayInfoVO.java

@@ -16,4 +16,10 @@ public class EMPayInfoVO extends EMPayInfo {
     @ApiModelProperty(value = "审批结果")
     private String approvalResultName;
 
+    @ApiModelProperty(value = "关联项目名称")
+    private String projectName;
+
+    @ApiModelProperty(value = "申请人名称")
+    private String afUserName;
+
 }

+ 4 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/ProjectCostBudgetVO2.java

@@ -44,4 +44,8 @@ public class ProjectCostBudgetVO2 extends ProjectCostBudget {
     @ApiModelProperty(value = "项目名称")
     private String projectName;
 
+    @ApiModelProperty(value = "0不显示分解子计划,1显示分解子计划")
+    private Integer isShowChildren;
+
+
 }

+ 34 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/UserpayInfoVO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.vo;
+
+import org.springblade.control.entity.UserpayInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 薪酬管理视图实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UserpayInfoVO extends UserpayInfo {
+    private static final long serialVersionUID = 1L;
+
+}

+ 3 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/ArchiveTreeContractClient.java

@@ -47,4 +47,7 @@ public interface ArchiveTreeContractClient {
 
     @PostMapping(API_PREFIX + "/getArchiveTreeContractByContractId")
     ArchiveTreeContract getArchiveTreeContractByContractId(@RequestParam Long contractId);
+
+    @PostMapping(API_PREFIX + "/writeBusinessData")
+    Integer writeBusinessData(@RequestParam Long keyId,@RequestParam Long contractId,@RequestParam String formDataId);
 }

+ 19 - 7
blade-service/blade-control/src/main/java/org/springblade/control/controller/ContractInfoController.java

@@ -11,9 +11,11 @@ import org.springblade.control.dto.ControlProjectInfoDTO;
 import org.springblade.control.entity.ControlContractInfo;
 import org.springblade.control.entity.ControlProjectInfo;
 import org.springblade.control.entity.DictInfo;
+import org.springblade.control.entity.EMInvoiceInfo;
 import org.springblade.control.service.IContractInfoService;
 import org.springblade.control.service.IProjectInfoService;
 import org.springblade.control.vo.ControlContractInfoVO;
+import org.springblade.control.vo.EMInvoiceInfoVO;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springframework.web.bind.annotation.*;
@@ -36,7 +38,7 @@ public class ContractInfoController {
      * 新增合同
      */
     @PostMapping("/addContractInfo")
-    @ApiOperationSupport(order = 1)
+    @ApiOperationSupport(order = 2)
     @ApiOperation(value = "新增合同")
     public R addContractInfo(@RequestBody ControlContractInfoDTO dto) {
         contractInfoService.addContractInfo(dto);
@@ -47,7 +49,7 @@ public class ContractInfoController {
      * 删除合同
      */
     @GetMapping("/deleteContractInfoById")
-    @ApiOperationSupport(order = 1)
+    @ApiOperationSupport(order = 3)
     @ApiOperation(value = "删除合同")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "id", value = "合同id", required = true),
@@ -61,7 +63,7 @@ public class ContractInfoController {
      * 修改合同
      */
     @PostMapping("/updateContractInfo")
-    @ApiOperationSupport(order = 1)
+    @ApiOperationSupport(order = 4)
     @ApiOperation(value = "修改合同")
     public R updateContractInfo(@RequestBody ControlContractInfoDTO dto) {
         contractInfoService.updateContractInfo(dto);
@@ -85,7 +87,7 @@ public class ContractInfoController {
      * 合同列表,分页查询
      */
     @GetMapping("/getPage")
-    @ApiOperationSupport(order = 3)
+    @ApiOperationSupport(order = 1)
     @ApiOperation(value = "合同列表,分页查询")
     public R<List<ControlContractInfoVO>> getPage(ControlContractInfoDTO dto, Query query) {
         return R.data(contractInfoService.getPage(dto,query));
@@ -95,7 +97,7 @@ public class ContractInfoController {
      * 合同列表,回款更新
      */
     @GetMapping("/getList")
-    @ApiOperationSupport(order = 3)
+    @ApiOperationSupport(order = 5)
     @ApiOperation(value = "合同列表,回款更新")
     public R<List<ControlContractInfo>> getList() {
         return R.data(contractInfoService.getList());
@@ -105,7 +107,7 @@ public class ContractInfoController {
      * 获取合同类型字典
      */
     @GetMapping("/getContractTypeDict")
-    @ApiOperationSupport(order = 2)
+    @ApiOperationSupport(order = 6)
     @ApiOperation(value = "获取合同类型字典")
     public R<List<DictInfo>> getContractTypeDict() {
         return R.data(contractInfoService.getContractTypeDict());
@@ -115,10 +117,20 @@ public class ContractInfoController {
      * 获取未被关联的项目
      */
     @GetMapping("getNoConnectionProject")
-    @ApiOperationSupport(order = 2)
+    @ApiOperationSupport(order = 7)
     @ApiOperation(value = "获取未被关联的项目")
     public R<List<ControlProjectInfo>> getNoConnectionProject(Integer type){
         return R.data(contractInfoService.getNoConnectionProject(type));
     }
 
+    /**
+     * 获取合同开票信息
+     */
+    @GetMapping("getContractInvoiceList")
+    @ApiOperationSupport(order = 8)
+    @ApiOperation(value = "获取合同开票信息",notes = "传入合同id")
+    public R<List<EMInvoiceInfoVO>> getContractInvoiceList(Long contractId){
+        return R.data(contractInfoService.getContractInvoiceList(contractId));
+    }
+
 }

+ 12 - 0
blade-service/blade-control/src/main/java/org/springblade/control/controller/DictInfoController.java

@@ -22,10 +22,12 @@ import lombok.AllArgsConstructor;
 
 import javax.validation.Valid;
 
+import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.system.entity.DictBiz;
 import org.springblade.system.vo.DictBizVO;
 import org.springframework.web.bind.annotation.*;
@@ -61,6 +63,12 @@ public class DictInfoController extends BladeController {
     @ApiOperationSupport(order = 1)
     @ApiOperation(value = "新增或修改", notes = "传入dictInfo")
     public R submit(@Valid @RequestBody DictInfo dictInfo) {
+        if (ObjectUtil.isNotEmpty(dictInfo.getId())) {
+            DictInfo dictInfo1 = dictInfoService.getBaseMapper().selectById(dictInfo.getId());
+            if (dictInfo1 != null && dictInfo1.getType().equals(6)) {
+                throw new ServiceException("没有权限,请联系管理员");
+            }
+        }
         return R.status(dictInfoService.saveOrUpdate(dictInfo));
     }
 
@@ -72,6 +80,10 @@ public class DictInfoController extends BladeController {
     @ApiOperationSupport(order = 2)
     @ApiOperation(value = "逻辑删除", notes = "传入ids")
     public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        DictInfo dictInfo1 = dictInfoService.getBaseMapper().selectById(ids);
+        if (dictInfo1 != null && dictInfo1.getType().equals(6)) {
+            throw new ServiceException("没有权限,请联系管理员");
+        }
         return R.status(dictInfoService.removeBatchByIds(Func.toLongList(ids)));
     }
 

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/controller/ExMaTwoController.java

@@ -121,7 +121,7 @@ public class ExMaTwoController extends BladeController {
     @ApiOperation(value = "获取项目合同段回款数据列表", notes = "传入项目id")
     public R<List<ExMaByContractReturnedInfoVO>> getProjectContractMoneyList(@RequestParam Long projectId) {
         List<ContractReturnedInfo> contractReturnedInfos = contractReturnedInfoService.getBaseMapper().selectList(Wrappers.<ContractReturnedInfo>lambdaQuery().eq(ContractReturnedInfo::getProjectId, projectId));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         List<ExMaByContractReturnedInfoVO> collect = contractReturnedInfos.stream().map(obj -> {
             ExMaByContractReturnedInfoVO vo = new ExMaByContractReturnedInfoVO();
             vo.setId(obj.getId());

+ 118 - 0
blade-service/blade-control/src/main/java/org/springblade/control/controller/UserpayInfoController.java

@@ -0,0 +1,118 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.control.entity.UserpayInfo;
+import org.springblade.control.vo.UserpayInfoVO;
+import org.springblade.control.service.IUserpayInfoService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 薪酬管理 控制器
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/userpayinfo")
+@Api(value = "薪酬管理", tags = "薪酬管理接口")
+public class UserpayInfoController extends BladeController {
+
+    private final IUserpayInfoService userpayInfoService;
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入userpayInfo")
+    public R<UserpayInfo> detail(UserpayInfo userpayInfo) {
+        UserpayInfo detail = userpayInfoService.getOne(Condition.getQueryWrapper(userpayInfo));
+        return R.data(detail);
+    }
+
+
+    /**
+     * 自定义分页 薪酬管理
+     */
+    @GetMapping("/page")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页薪酬管理", notes = "传入userpayInfo")
+    public R<IPage<UserpayInfoVO>> page(UserpayInfoVO userpayInfo, Query query) {
+        IPage<UserpayInfoVO> pages = userpayInfoService.selectUserpayInfoPage(Condition.getPage(query), userpayInfo);
+        return R.data(pages);
+    }
+
+    /**
+     * 新增 薪酬管理
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入userpayInfo")
+    public R save(@Valid @RequestBody UserpayInfo userpayInfo) {
+        return R.status(userpayInfoService.save(userpayInfo));
+    }
+
+    /**
+     * 修改 薪酬管理
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入userpayInfo")
+    public R update(@Valid @RequestBody UserpayInfo userpayInfo) {
+        return R.status(userpayInfoService.updateById(userpayInfo));
+    }
+
+    /**
+     * 新增或修改 薪酬管理
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入userpayInfo")
+    public R submit(@Valid @RequestBody UserpayInfo userpayInfo) {
+        return R.status(userpayInfoService.saveOrUpdate(userpayInfo));
+    }
+
+
+    /**
+     * 删除 薪酬管理
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入ids")
+    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return R.status(userpayInfoService.deleteLogic(Func.toLongList(ids)));
+    }
+
+
+}

+ 5 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractInfoMapper.java

@@ -10,6 +10,7 @@ import org.springblade.control.entity.ControlProjectInfo;
 import org.springblade.control.entity.DictInfo;
 import org.springblade.control.vo.ControlContractInfoVO;
 import org.springblade.control.vo.ControlProjectInfoVO;
+import org.springblade.control.vo.EMInvoiceInfoVO;
 import org.springblade.system.entity.DictBiz;
 
 import java.math.BigDecimal;
@@ -35,4 +36,8 @@ public interface ContractInfoMapper extends BaseMapper<ControlContractInfo> {
     List<ControlContractInfo> getList();
 
     BigDecimal getYearContractMoney(@Param("year") int year);
+
+    List<EMInvoiceInfoVO> getContractInvoiceList(@Param("contractId") Long contractId);
+
+    void realDeleteById(@Param("id") Long id);
 }

+ 9 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractInfoMapper.xml

@@ -2,6 +2,10 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.springblade.control.mapper.ContractInfoMapper">
 
+    <delete id="realDeleteById">
+        delete from c_control_contract_info
+        where id = #{id}
+    </delete>
 
     <select id="getNoConnectionProject" resultType="org.springblade.control.entity.ControlProjectInfo">
         select pi.id,pi.name from c_control_project_info pi left join c_control_contract_info ci on pi.id = ci.project_id WHERE pi.is_deleted = 0 and  ci.id is null
@@ -41,4 +45,9 @@
             and DATE_FORMAT(contract_sign_time ,'%Y') = #{year}
         </if>
     </select>
+    <select id="getContractInvoiceList" resultType="org.springblade.control.vo.EMInvoiceInfoVO">
+        select cci.invoice_head ,eii.invoice_date ,eii.invoice_money ,eii.invoice_pdf_url
+        from c_control_contract_info cci left join c_expense_invoice_info eii on eii.project_id = cci.project_id
+        WHERE  cci.id = #{contractId}
+    </select>
 </mapper>

+ 2 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractReturnedInfoMapper.java

@@ -28,4 +28,6 @@ public interface ContractReturnedInfoMapper extends BaseMapper<ContractReturnedI
     BigDecimal getYearReturned(@Param("year") int year);
 
     List<ContractReturnedInfo> getProjectReturnedByMonth(@Param("date") String date);
+
+    void deleteByContractId(@Param("contractId") Long contractId);
 }

+ 4 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/ContractReturnedInfoMapper.xml

@@ -7,6 +7,10 @@
         delete from c_contract_returned_info
         where contract_id = #{contractId} and  practical_returned_time is null and practical_returned_money is null
     </delete>
+    <delete id="deleteByContractId">
+        delete from c_contract_returned_info
+        where contract_id = #{contractId}
+    </delete>
     <select id="getListByContractId" resultType="org.springblade.control.vo.ContractReturnedInfoVO">
         select
             ri.*,

+ 43 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/CorporationInfoMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.mapper;
+
+import org.springblade.control.entity.CorporationInfo;
+import org.springblade.control.vo.CorporationInfoVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 公司制度信息表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+public interface CorporationInfoMapper extends BaseMapper<CorporationInfo> {
+
+    /**
+     * 自定义分页
+     *
+     * @param page
+     * @param corporationInfo
+     * @return
+     */
+    List<CorporationInfoVO> selectCorporationInfoPage(IPage page, CorporationInfoVO corporationInfo);
+
+}

+ 30 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/CorporationInfoMapper.xml

@@ -0,0 +1,30 @@
+<?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="org.springblade.control.mapper.CorporationInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="corporationInfoResultMap" type="org.springblade.control.entity.CorporationInfo">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="link" property="link"/>
+        <result column="domain_url" property="domainUrl"/>
+        <result column="name" property="name"/>
+        <result column="original_name" property="originalName"/>
+        <result column="extension" property="extension"/>
+        <result column="attach_size" property="attachSize"/>
+    </resultMap>
+
+
+    <select id="selectCorporationInfoPage" resultMap="corporationInfoResultMap">
+        select *
+        from c_corporation_info
+        where is_deleted = 0
+    </select>
+
+</mapper>

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectCostBudgetMapper.java

@@ -51,7 +51,7 @@ public interface ProjectCostBudgetMapper extends BaseMapper<ProjectCostBudget> {
 
     List<ProjectCostBudget> MonthOfYearPlanOverview(@Param("user") Long user,@Param("year") int year);
 
-    Integer getPostMoney(@Param("type") Integer postType);
+    Double getPostMoney(@Param("type") Long postType);
 
     List<ProjectCostBudget> getAllBudgetByProjectId(@Param("id") Long id);
 

+ 8 - 4
blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectCostBudgetMapper.xml

@@ -85,6 +85,9 @@
                    when 4 then '已完成'
                    end  as statusValue,
                (select cpi.name from c_control_project_info cpi WHERE cpi.id = pcb.project_id) as projectName,
+               (select di.dict_name from c_dict_info di where di.type = 1 and di.dict_value = pcb.budget_type and di.parent_id = 0) as budgetTypeValue,
+               (select di.dict_name from c_dict_info di where di.type = 1 and di.dict_value = pcb.task_detail and di.parent_id =
+                   (select di.id from c_dict_info di where di.type = 1 and di.dict_value = pcb.budget_type and di.parent_id = 0)) as taskDetailValue,
                (select cpp.name from c_project_process cpp WHERE cpp.id = pcb.project_process) as projectProcessValue
         from c_project_cost_budget pcb
         WHERE pcb.cost_type = #{type}
@@ -137,10 +140,7 @@
         where pcb.task_user = #{user} and pcb.is_deleted = 0
             and (DATE_FORMAT(pcb.plan_start_time,'%Y') = #{year} or DATE_FORMAT(pcb.plan_end_time,'%Y') = #{year})
     </select>
-    <select id="getPostMoney" resultType="java.lang.Integer">
-        select dict_value
-        from c_dict_info where `type` = 3 and code = #{type}
-    </select>
+
     <select id="getAllBudgetByProjectId" resultType="org.springblade.control.entity.ProjectCostBudget">
         select * from c_project_cost_budget pcb WHERE  pcb.is_deleted =0 and pcb.project_id = #{id} and pcb.parent_id = 0
     </select>
@@ -246,6 +246,10 @@
     <select id="getUnitType" resultType="org.springblade.control.entity.DictInfo">
         select * from c_dict_info WHERE code = 'unit_type' order by sort
     </select>
+    <select id="getPostMoney" resultType="java.lang.Double">
+        select dict_value
+        from c_dict_info where `type` = 3 and id = #{type}
+    </select>
 
 
 </mapper>

+ 4 - 4
blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectInfoMapper.xml

@@ -55,10 +55,10 @@
     </select>
     <select id="allProjectStats" resultType="org.springblade.control.vo.AllProjectStatsVO">
         select
-            (select sum(cci.contract_money)  from c_control_contract_info cci WHERE cci.is_deleted = 0) as allContractMoney,
-            (select SUM(cbs.project_cost_total)  from c_project_cost_budget_stats cbs WHERE cbs.is_deleted = 0) as allProjectCost,
-            (select SUM(pcb.actual_total_money)  from c_project_cost_budget pcb WHERE  pcb.is_deleted =0 and pcb.task_approve = 1)as "allPracticalDisburse",
-            (select SUM(cri.practical_returned_money)  from c_contract_returned_info cri WHERE cri.is_deleted = 0) as allReturned
+            IFNULL((select sum(cci.contract_money)  from c_control_contract_info cci WHERE cci.is_deleted = 0),0) as allContractMoney,
+            IFNULL((select SUM(cbs.project_cost_total)  from c_project_cost_budget_stats cbs WHERE cbs.is_deleted = 0),0) as allProjectCost,
+            IFNULL((select SUM(pcb.actual_total_money)  from c_project_cost_budget pcb WHERE  pcb.is_deleted =0 and pcb.task_approve = 1),0) as "allPracticalDisburse",
+            IFNULL((select SUM(cri.practical_returned_money)  from c_contract_returned_info cri WHERE cri.is_deleted = 0),0) as allReturned
     </select>
     <select id="ProjectListStats" resultType="org.springblade.control.vo.AllProjectStatsVO">
         select

+ 43 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserpayInfoMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.mapper;
+
+import org.springblade.control.entity.UserpayInfo;
+import org.springblade.control.vo.UserpayInfoVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 薪酬管理 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+public interface UserpayInfoMapper extends BaseMapper<UserpayInfo> {
+
+    /**
+     * 自定义分页
+     *
+     * @param page
+     * @param userpayInfo
+     * @return
+     */
+    List<UserpayInfoVO> selectUserpayInfoPage(IPage page, UserpayInfoVO userpayInfo);
+
+}

+ 38 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserpayInfoMapper.xml

@@ -0,0 +1,38 @@
+<?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="org.springblade.control.mapper.UserpayInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="userpayInfoResultMap" type="org.springblade.control.entity.UserpayInfo">
+        <result column="id" property="id"/>
+        <result column="user_id" property="userId"/>
+        <result column="cost_time" property="costTime"/>
+        <result column="y_all_days" property="yAllDays"/>
+        <result column="s_all_days" property="sAllDays"/>
+        <result column="year_days" property="yearDays"/>
+        <result column="c_leave_days" property="cLeaveDays"/>
+        <result column="sick_leave_days" property="sickLeaveDays"/>
+        <result column="absence_days" property="absenceDays"/>
+        <result column="basic_salary" property="basicSalary"/>
+        <result column="post_salary" property="postSalary"/>
+        <result column="merit_salary" property="meritSalary"/>
+        <result column="bonus_salary" property="bonusSalary"/>
+        <result column="meal_wance" property="mealWance"/>
+        <result column="other_wance" property="otherWance"/>
+        <result column="attend_duction" property="attendDuction"/>
+        <result column="other_duction" property="otherDuction"/>
+        <result column="gross_pay" property="grossPay"/>
+        <result column="personal_tax" property="personalTax"/>
+        <result column="social_sec" property="socialSec"/>
+        <result column="net_salary" property="netSalary"/>
+        <result column="desc" property="desc"/>
+    </resultMap>
+
+
+    <select id="selectUserpayInfoPage" resultMap="userpayInfoResultMap">
+        select *
+        from c_userpay_info
+        where is_deleted = 0
+    </select>
+
+</mapper>

+ 4 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/IContractInfoService.java

@@ -6,8 +6,10 @@ import org.springblade.control.dto.ControlProjectInfoDTO;
 import org.springblade.control.entity.ControlContractInfo;
 import org.springblade.control.entity.ControlProjectInfo;
 import org.springblade.control.entity.DictInfo;
+import org.springblade.control.entity.EMInvoiceInfo;
 import org.springblade.control.vo.ControlContractInfoVO;
 import org.springblade.control.vo.ControlProjectInfoVO;
+import org.springblade.control.vo.EMInvoiceInfoVO;
 import org.springblade.core.mp.base.BaseService;
 import org.springblade.core.mp.support.Query;
 import org.springblade.system.entity.DictBiz;
@@ -40,4 +42,6 @@ public interface IContractInfoService extends BaseService<ControlContractInfo> {
     List<ControlContractInfo> getList();
 
     BigDecimal getYearContractMoney(int year);
+
+    List<EMInvoiceInfoVO> getContractInvoiceList(Long contractId);
 }

+ 2 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/IContractReturnedInfoService.java

@@ -38,4 +38,6 @@ public interface IContractReturnedInfoService extends BaseService<ContractReturn
     BigDecimal getYearReturned(int year);
 
     List<ContractReturnedInfo> getProjectReturnedByMonth(String date);
+
+    void deleteByContractId(Long id);
 }

+ 41 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/ICorporationInfoService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.service;
+
+import org.springblade.control.entity.CorporationInfo;
+import org.springblade.control.vo.CorporationInfoVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 公司制度信息表 服务类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+public interface ICorporationInfoService extends BaseService<CorporationInfo> {
+
+    /**
+     * 自定义分页
+     *
+     * @param page
+     * @param corporationInfo
+     * @return
+     */
+    IPage<CorporationInfoVO> selectCorporationInfoPage(IPage<CorporationInfoVO> page, CorporationInfoVO corporationInfo);
+
+}

+ 41 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/IUserpayInfoService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.service;
+
+import org.springblade.control.entity.UserpayInfo;
+import org.springblade.control.vo.UserpayInfoVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 薪酬管理 服务类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+public interface IUserpayInfoService extends BaseService<UserpayInfo> {
+
+    /**
+     * 自定义分页
+     *
+     * @param page
+     * @param userpayInfo
+     * @return
+     */
+    IPage<UserpayInfoVO> selectUserpayInfoPage(IPage<UserpayInfoVO> page, UserpayInfoVO userpayInfo);
+
+}

+ 74 - 17
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/AnnualBudgetServiceImpl.java

@@ -184,6 +184,9 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
             if (incomeList != null && incomeList.size() >0){
                 for (AnnualBudgetIncomeVO vo : incomeList) {
                     if (vo.getReturnTime().getMonthValue() == i) {
+                        if (vo.getReturnMoney() == null){
+                            vo.setReturnMoney(new BigDecimal(0));
+                        }
                         incomeTotal = incomeTotal.add(vo.getReturnMoney());
                         list1.add(vo);
                     }
@@ -320,10 +323,23 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
         AnnualBudgetVO3 vo3 = new AnnualBudgetVO3();
         //获取今年
         int year = LocalDate.now().getYear();
+        //获取今年的已收入:合同回款
+        BigDecimal yearReturned = returnedInfoService.getYearReturned(year);
+        vo3.setYearReturned(yearReturned);
+
+        //统计今年的已盈利:已收入-支出 ,目前已支出只统计闭环的计划
+        //获取一年人工支出
+        BigDecimal yearStaffDisburse = budgetService.getYearStaffDisburse(year);
+        vo3.setYearProfit(yearReturned.subtract(yearStaffDisburse));
+
         //获取今年的年度预算
         AnnualBudget annualBudget = baseMapper.getThisYearBudget(year);
         if (annualBudget == null){
-            throw new ServiceException("请先做年度预算");
+            vo3.setAnnualProfitTarget(new BigDecimal(0));
+            vo3.setAnnualContractTarget(new BigDecimal(0));
+            vo3.setContractSchedule(0);
+            vo3.setProfitSchedule(0);
+            return vo3;
         }
         //年度利润指标
         if (annualBudget.getAnnualContractTarget() == null){
@@ -335,13 +351,6 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
         vo3.setAnnualProfitTarget(annualBudget.getAnnualProfitTarget());
         //年度合同指标
         vo3.setAnnualContractTarget(annualBudget.getAnnualContractTarget());
-        //获取今年的已收入:合同回款
-        BigDecimal yearReturned = returnedInfoService.getYearReturned(year);
-        vo3.setYearReturned(yearReturned);
-        //统计今年的已盈利:已收入-支出 ,目前已支出只统计闭环的计划
-        //获取一年人工支出
-        BigDecimal yearStaffDisburse = budgetService.getYearStaffDisburse(year);
-        vo3.setYearProfit(yearReturned.subtract(yearStaffDisburse));
         //合同进度统计
         if (vo3.getAnnualContractTarget() == null || vo3.getAnnualContractTarget().compareTo(BigDecimal.ZERO) == 0 || vo3.getYearReturned().compareTo(BigDecimal.ZERO) == 0){
             vo3.setContractSchedule(0);
@@ -552,12 +561,12 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
         //获取所有风险计划
         List<ProjectCostBudget> riskPlan = budgetService.getRiskPlan(null,null);
         if (riskPlan == null || riskPlan.size() <= 0) {
-            throw new ServiceException("暂无风险计划");
+            return null;
         }
         List<AllProjectStatsVO> vos = new ArrayList<>();
         //获取部门映射值
         List<DictInfo> costTypeDict = monthPlanService.getDepartmentDict();
-        Map<Integer, List<DictInfo>> collect = costTypeDict.parallelStream()
+        Map<Double, List<DictInfo>> collect = costTypeDict.parallelStream()
                 .collect(Collectors.groupingBy(DictInfo::getDictValue));
         //风险计划按项目分组,再按照部门分组,再统计计划总数
         Map<Long, List<ProjectCostBudget>> map = riskPlan.parallelStream()
@@ -689,15 +698,26 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
     public List<ProjectServiceProcessVO> portalProjectProcess(Long projectId) {
         //获取当前项目所有进程
         List<ProjectProcessVO> projectProcess = processService.getProjectProcess(projectId);
+        //获取项目所有计划
+        List<ProjectCostBudget> list = budgetService.list(new LambdaQueryWrapper<ProjectCostBudget>()
+                .eq(ProjectCostBudget::getProjectId, projectId).eq(ProjectCostBudget::getApprove,1));
+        Map<Long, List<ProjectCostBudget>> collect2 = new HashMap<>();
+        boolean isPlan2 = true ;
+        if (list != null && list.size() > 0){
+            collect2 = list.parallelStream()
+                    .collect(Collectors.groupingBy(ProjectCostBudget::getProjectProcess));
+        }else {
+            isPlan2 = false;
+        }
         //获取项目所有已经闭环的计划
         List<ProjectCostBudget> finishedTask = budgetService.getProjectAllFinishedTask(projectId, null);
         Map<Long, List<ProjectCostBudget>> collect = new HashMap<>();
         boolean isPlan = false ;
-        if (finishedTask == null || finishedTask.size() <= 0){
-                isPlan = true;
-        }else {
+        if (finishedTask != null && finishedTask.size() > 0){
             collect = finishedTask.parallelStream()
                     .collect(Collectors.groupingBy(ProjectCostBudget::getProjectProcess));
+        }else {
+            isPlan = true;
         }
         //把计划根据进程分组
         //为每个进程设置值
@@ -714,8 +734,25 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
                     //已闭环
                     vo.setProcessProgressBar(100);
                 }else {
-                    //进行中
-                    vo.setProcessProgressBar(50);
+                    //进行中,进行中则查看该环节下所有计划和计划完成度
+                    if (isPlan2) {
+                        List<ProjectCostBudget> budgets = collect2.get(process.getId());
+                        if (budgets != null && budgets.size() > 0) {
+                            BigDecimal allPlan = new BigDecimal(0);
+                            BigDecimal finishPlan = new BigDecimal(0);
+                            for (ProjectCostBudget budget : budgets) {
+                                allPlan = allPlan.add(new BigDecimal(1));
+                                if (budget.getTaskApprove() == 1) {
+                                    finishPlan = finishPlan.add(new BigDecimal(1));
+                                }
+                            }
+                            vo.setProcessProgressBar(finishPlan.divide(allPlan, 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).intValue());
+                        } else {
+                            vo.setProcessProgressBar(100);
+                        }
+                    }else {
+                        vo.setProcessProgressBar(100);
+                    }
                 }
             }else {
                 //未设置时间默认未开始
@@ -737,8 +774,28 @@ public class AnnualBudgetServiceImpl extends BaseServiceImpl<AnnualBudgetMapper,
                     vo.setProcessCostCount(new BigDecimal(0));
                 }
             }
-            //设置进程支出金额百分比
-            vo.setProcessCostProgressBar(40);
+            //设置进程支出金额百分比,统计实际支出和预算的百分比
+            if (isPlan2){
+                List<ProjectCostBudget> budgets = collect2.get(process.getId());
+                if (budgets != null && budgets.size() > 0) {
+                    BigDecimal allMoney = new BigDecimal(0);
+                    BigDecimal costMoney = new BigDecimal(0);
+                    for (ProjectCostBudget budget : budgets) {
+                        if (budget.getBudgetCountMoney() == null){
+                            budget.setBudgetCountMoney(new BigDecimal(0));
+                        }
+                        allMoney = allMoney.add(budget.getBudgetCountMoney());
+                        if (budget.getTaskApprove() == 1) {
+                            costMoney = costMoney.add(budget.getActualTotalMoney());
+                        }
+                    }
+                    vo.setProcessCostProgressBar(costMoney.divide(allMoney, 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).intValue());
+                } else {
+                    vo.setProcessCostProgressBar(0);
+                }
+            }else {
+                vo.setProcessCostProgressBar(0);
+            }
             vos.add(vo);
         }
         return vos;

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/AttendanceTripServiceImpl.java

@@ -44,7 +44,7 @@ public class AttendanceTripServiceImpl extends BaseServiceImpl<AttendanceTripMap
         QueryWrapper<AttendanceTripInfo> queryWrapper = Condition.getQueryWrapper(dto);
         queryWrapper.lambda().eq(AttendanceTripInfo::getIsTemp, 1); //提交的数据
         IPage<AttendanceTripInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, AttendanceTripInfo::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         return pages.convert(obj -> {
             AttendanceTripInfoVO vo = new AttendanceTripInfoVO();
             BeanUtils.copyProperties(obj, vo);

+ 33 - 2
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractInfoServiceImpl.java

@@ -10,14 +10,18 @@ import org.springblade.control.dto.ControlProjectInfoDTO;
 import org.springblade.control.entity.ControlContractInfo;
 import org.springblade.control.entity.ControlProjectInfo;
 import org.springblade.control.entity.DictInfo;
+import org.springblade.control.entity.EMInvoiceInfo;
 import org.springblade.control.mapper.ContractInfoMapper;
 import org.springblade.control.mapper.ProjectInfoMapper;
 import org.springblade.control.service.IContractInfoService;
 import org.springblade.control.service.IContractReturnedInfoService;
 import org.springblade.control.service.IProjectInfoService;
 import org.springblade.control.service.IProjectProcessService;
+import org.springblade.control.vo.ContractReturnedInfoVO;
 import org.springblade.control.vo.ControlContractInfoVO;
 import org.springblade.control.vo.ControlProjectInfoVO;
+import org.springblade.control.vo.EMInvoiceInfoVO;
+import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.mp.support.Query;
 import org.springblade.system.entity.DictBiz;
@@ -29,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @Param
@@ -48,6 +53,9 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
      */
     @Override
     public void addContractInfo(ControlContractInfoDTO dto) {
+        if (dto.getProjectId() == null || dto.getName() == null || dto.getContractMoney() == null){
+            throw new ServiceException("请填入必填信息");
+        }
         ControlContractInfo contractInfo = new ControlContractInfo();
         Long id = SnowFlakeUtil.getId();
         dto.setId(id);
@@ -89,8 +97,23 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
     @Override
     @Transactional
     public void deleteContractInfoById(Long id) {
-        //合同回款记录和合同开票记录一起删除
-        baseMapper.deleteById(id);
+        //如果已经有回款信息则不能删除
+        List<ContractReturnedInfoVO> list = returnedInfoService.getListByContractId(id);
+        if (list != null && list.size() > 0){
+            list = list.stream().filter(l -> {
+                if (l.getPracticalReturnedMoney() != null) {
+                    return true;
+                } else {
+                    return false;
+                }
+            }).collect(Collectors.toList());
+            if (list != null && list.size() >0){
+                throw new ServiceException("合同存在已回款信息,不能删除");
+            }
+        }
+        //合同回款记录一起删除
+        returnedInfoService.deleteByContractId(id);
+        baseMapper.realDeleteById(id);
     }
 
     /**
@@ -156,4 +179,12 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
         }
         return decimal;
     }
+
+    /**
+     * 获取合同开票信息
+     */
+    @Override
+    public List<EMInvoiceInfoVO> getContractInvoiceList(Long contractId) {
+        return baseMapper.getContractInvoiceList(contractId);
+    }
 }

+ 14 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractReturnedInfoServiceImpl.java

@@ -20,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @Param
@@ -42,6 +43,14 @@ public class ContractReturnedInfoServiceImpl extends BaseServiceImpl<ContractRet
         baseMapper.deleteOldInfo(dto.getId());
         List<ContractReturnedInfo> list = dto.getList();
         if (list != null && list.size() >0) {
+            //删除为空的数据
+            list = list.stream().filter(l -> {
+                if (l.getReturnedCondition() == null || l.getShouldReturnedTime() == null || l.getShouldReturnedMoney() == null) {
+                    return false;
+                }else {
+                    return true;
+                }
+            }).collect(Collectors.toList());
             for (ContractReturnedInfo info : list) {
                 info.setProjectId(dto.getProjectId());
                 info.setContractId(dto.getId());
@@ -107,4 +116,9 @@ public class ContractReturnedInfoServiceImpl extends BaseServiceImpl<ContractRet
     public List<ContractReturnedInfo> getProjectReturnedByMonth(String date) {
         return baseMapper.getProjectReturnedByMonth(date);
     }
+
+    @Override
+    public void deleteByContractId(Long contractId) {
+        baseMapper.deleteByContractId(contractId);
+    }
 }

+ 41 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/CorporationInfoServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.service.impl;
+
+import org.springblade.control.entity.CorporationInfo;
+import org.springblade.control.vo.CorporationInfoVO;
+import org.springblade.control.mapper.CorporationInfoMapper;
+import org.springblade.control.service.ICorporationInfoService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 公司制度信息表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Service
+public class CorporationInfoServiceImpl extends BaseServiceImpl<CorporationInfoMapper, CorporationInfo> implements ICorporationInfoService {
+
+    @Override
+    public IPage<CorporationInfoVO> selectCorporationInfoPage(IPage<CorporationInfoVO> page, CorporationInfoVO corporationInfo) {
+        return page.setRecords(baseMapper.selectCorporationInfoPage(page, corporationInfo));
+    }
+
+}

+ 2 - 2
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMFinancialReimbursementServiceImpl.java

@@ -48,7 +48,7 @@ public class EMFinancialReimbursementServiceImpl extends BaseServiceImpl<ExMFina
         queryWrapper.lambda().eq(EMFinancialReimbursementInfo::getIsTemp, 1); //提交的数据
         IPage<EMFinancialReimbursementInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, EMFinancialReimbursementInfo::getCreateTime));
         List<DictInfo> dictInfoList = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'expense_fr_type'", new BeanPropertyRowMapper<>(DictInfo.class));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
         return pages.convert(reimbursementInfo -> {
             EMFinancialReimbursementInfoVO vo = new EMFinancialReimbursementInfoVO();
@@ -58,7 +58,7 @@ public class EMFinancialReimbursementServiceImpl extends BaseServiceImpl<ExMFina
             vo.setApprovalStatusName(vo.getStatus().equals(1) ? "待审批" : (vo.getStatus().equals(2) ? "已审批" : (vo.getStatus().equals(3) ? "已驳回" : "未上报")));
             vo.setApprovalResultName(vo.getApprovalStatusName().equals("已审批") || vo.getApprovalStatusName().equals("已驳回") ? "已通过" : "未通过");
             for (DictInfo dictInfo : dictInfoList) {
-                if (dictInfo.getDictValue().equals(vo.getFrType())) {
+                if ((vo.getFrType().equals(dictInfo.getDictValue().intValue()))) {
                     vo.setFrTypeName(dictInfo.getDictName());
                     break;
                 }

+ 2 - 2
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMInvoiceServiceImpl.java

@@ -45,7 +45,7 @@ public class EMInvoiceServiceImpl extends BaseServiceImpl<ExMInvoiceMapper, EMIn
         QueryWrapper<EMInvoiceInfo> queryWrapper = Condition.getQueryWrapper(dto);
         queryWrapper.lambda().eq(EMInvoiceInfo::getIsTemp, 1); //提交的数据
         IPage<EMInvoiceInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, EMInvoiceInfo::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         List<DictInfo> dictInfoList1 = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'invoice_type'", new BeanPropertyRowMapper<>(DictInfo.class));
         List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
         return pages.convert(obj -> {
@@ -55,7 +55,7 @@ public class EMInvoiceServiceImpl extends BaseServiceImpl<ExMInvoiceMapper, EMIn
             vo.setApprovalStatusName(vo.getStatus().equals(1) ? "待审批" : (vo.getStatus().equals(2) ? "已审批" : (vo.getStatus().equals(3) ? "已驳回" : "未上报")));
             vo.setApprovalResultName(vo.getApprovalStatusName().equals("已审批") || vo.getApprovalStatusName().equals("已驳回") ? "已通过" : "未通过");
             for (DictInfo dictInfo : dictInfoList1) {
-                if (dictInfo.getDictValue().equals(vo.getInvoiceType())) {
+                if (vo.getInvoiceType().equals(dictInfo.getDictValue().intValue())) {
                     vo.setInvoiceTypeName(dictInfo.getDictName());
                     break;
                 }

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMLoanServiceImpl.java

@@ -46,7 +46,7 @@ public class EMLoanServiceImpl extends BaseServiceImpl<ExMLoanMapper, EMLoanInfo
         QueryWrapper<EMLoanInfo> queryWrapper = Condition.getQueryWrapper(dto);
         queryWrapper.lambda().eq(EMLoanInfo::getIsTemp, 1);
         IPage<EMLoanInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, EMLoanInfo::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         return pages.convert(obj -> {
             EMLoanInfoVO vo = new EMLoanInfoVO();
             BeanUtils.copyProperties(obj, vo);

+ 2 - 2
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMOutsourcingPayServiceImpl.java

@@ -44,7 +44,7 @@ public class EMOutsourcingPayServiceImpl extends BaseServiceImpl<ExMOutsourcingP
         QueryWrapper<EMOutsourcingPayInfo> queryWrapper = Condition.getQueryWrapper(dto);
         queryWrapper.lambda().eq(EMOutsourcingPayInfo::getIsTemp, 1);
         IPage<EMOutsourcingPayInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, EMOutsourcingPayInfo::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         List<DictInfo> dictInfoList = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'outsourcing_type'", new BeanPropertyRowMapper<>(DictInfo.class));
         List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
         return pages.convert(obj -> {
@@ -55,7 +55,7 @@ public class EMOutsourcingPayServiceImpl extends BaseServiceImpl<ExMOutsourcingP
             vo.setApprovalResultName(vo.getApprovalStatusName().equals("已审批") || vo.getApprovalStatusName().equals("已驳回") ? "已通过" : "未通过");
 
             for (DictInfo dictInfo : dictInfoList) {
-                if (dictInfo.getDictValue().equals(vo.getOutsourcingType())) {
+                if (vo.getOutsourcingType().equals(dictInfo.getDictValue().intValue())) {
                     vo.setOutsourcingTypeName(dictInfo.getDictName());
                     break;
                 }

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMPayServiceImpl.java

@@ -43,7 +43,7 @@ public class EMPayServiceImpl extends BaseServiceImpl<ExMPayMapper, EMPayInfo> i
         QueryWrapper<EMPayInfo> queryWrapper = Condition.getQueryWrapper(dto);
         queryWrapper.lambda().eq(EMPayInfo::getIsTemp, 1);
         IPage<EMPayInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, EMPayInfo::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         return pages.convert(obj -> {
             EMPayInfoVO vo = new EMPayInfoVO();
             BeanUtils.copyProperties(obj, vo);

+ 2 - 2
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMPurchaseServiceImpl.java

@@ -44,13 +44,13 @@ public class EMPurchaseServiceImpl extends BaseServiceImpl<ExMPurchaseMapper, EM
         QueryWrapper<EMPurchaseInfo> queryWrapper = Condition.getQueryWrapper(dto);
         queryWrapper.lambda().eq(EMPurchaseInfo::getIsTemp, 1);
         IPage<EMPurchaseInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, EMPurchaseInfo::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         List<DictInfo> dictInfoList = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'purchase_type'", new BeanPropertyRowMapper<>(DictInfo.class));
         return pages.convert(obj -> {
             EMPurchaseInfoVO vo = new EMPurchaseInfoVO();
             BeanUtils.copyProperties(obj, vo);
             for (DictInfo dictInfo : dictInfoList) {
-                if (dictInfo.getDictValue().equals(vo.getPurType())) {
+                if (vo.getPurType().equals(dictInfo.getDictValue().intValue())) {
                     vo.setPurTypeName(dictInfo.getDictName());
                     break;
                 }

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMUseCarServiceImpl.java

@@ -49,7 +49,7 @@ public class EMUseCarServiceImpl extends BaseServiceImpl<ExMUseCarMapper, EMUseC
         QueryWrapper<EMUseCarInfo> queryWrapper = Condition.getQueryWrapper(dto);
         queryWrapper.lambda().eq(EMUseCarInfo::getIsTemp, 1);
         IPage<EMUseCarInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, EMUseCarInfo::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         List<Dept> deptList = jdbcTemplate.query("select id,dept_name from blade_dept where tenant_id = " + SecureUtil.getUser().getTenantId() + " and dept_type = 2", new BeanPropertyRowMapper<>(Dept.class));
         return pages.convert(obj -> {
             EMUseCarInfoVO vo = new EMUseCarInfoVO();

+ 10 - 11
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/LogHistoryServiceImpl.java

@@ -128,16 +128,14 @@ public class LogHistoryServiceImpl extends BaseServiceImpl<LogHistoryMapper, Log
                                 "昨天",
                                 "前天");
                     }, LinkedHashMap::new, Collectors.toList()));
-            //把当前用户放在今日日志首位
+            //把当前用户每天日志首位
             for (Map.Entry<String, List<LogHistoryInfoVO>> stringListEntry : collect.entrySet()) {
-                if (stringListEntry.getKey().equals("今天")) {
-                    List<LogHistoryInfoVO> value = stringListEntry.getValue();
-                    List<LogHistoryInfoVO> filteredList = value.stream()
-                            .filter(vo -> vo.getUserId().equals(SecureUtil.getUserId()))
-                            .collect(Collectors.toList());
-                    value.removeAll(filteredList);
-                    value.addAll(0, filteredList);
-                }
+                List<LogHistoryInfoVO> value = stringListEntry.getValue();
+                List<LogHistoryInfoVO> filteredList = value.stream()
+                        .filter(vo -> vo.getUserId().equals(SecureUtil.getUserId()))
+                        .collect(Collectors.toList());
+                value.removeAll(filteredList);
+                value.addAll(0, filteredList);
             }
             return collect;
         }
@@ -433,7 +431,7 @@ public class LogHistoryServiceImpl extends BaseServiceImpl<LogHistoryMapper, Log
             taskProcessInfo.setStatus(1); //待审批
             taskProcessInfo.setReportDate(new Date());
             taskProcessInfo.setTaskType(1); //任务审批
-            taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】向您发起【任务审批】审批");
+            taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】向您发起【任务完成】审批");
 
             //上报人
             taskProcessInfo.setReportUserId(SecureUtil.getUserId());
@@ -444,7 +442,8 @@ public class LogHistoryServiceImpl extends BaseServiceImpl<LogHistoryMapper, Log
 
             List<String> nonEmptyAuditUserIds = new LinkedList<>();
             for (String userId : auditUserIds) {
-                if (StringUtils.isNotEmpty(userId)) {
+                //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
+                if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
                     nonEmptyAuditUserIds.add(userId);
                 }
             }

+ 38 - 3
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ProjectCostBudgetServiceImpl.java

@@ -21,6 +21,7 @@ import org.springblade.control.service.IProjectCostBudgetService;
 import org.springblade.control.service.IProjectInfoService;
 import org.springblade.control.service.IProjectProcessService;
 import org.springblade.control.vo.*;
+import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.SecureUtil;
@@ -60,6 +61,15 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         //施工单位
         if (dto.getBuildUnit() != null && dto.getBuildUnit().size() > 0){
             dto.getBuildUnit().stream().forEach(l->{
+                if (l.getDeptId() == null){
+                    throw new ServiceException("请选择费用分摊部门");
+                }
+                if (l.getCostType() == null){
+                    throw new ServiceException("请选择费用分类");
+                }
+                if (l.getProjectProcess() == null){
+                    throw new ServiceException("请选择项目环节");
+                }
               l.setProjectId(dto.getProjectId());
               l.setUnitType(1);
               countMoney(l);
@@ -69,6 +79,15 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         //监理单位
         if (dto.getSupervisorUnit() != null && dto.getSupervisorUnit().size() > 0){
             dto.getSupervisorUnit().stream().forEach(l->{
+                if (l.getDeptId() == null){
+                    throw new ServiceException("请选择费用分摊部门");
+                }
+                if (l.getCostType() == null){
+                    throw new ServiceException("请选择费用分类");
+                }
+                if (l.getProjectProcess() == null){
+                    throw new ServiceException("请选择项目环节");
+                }
                 l.setProjectId(dto.getProjectId());
                 l.setUnitType(2);
                 countMoney(l);
@@ -78,6 +97,15 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         //建设单位
         if (dto.getConstructUnit() != null && dto.getConstructUnit().size() > 0){
             dto.getConstructUnit().stream().forEach(l->{
+                if (l.getDeptId() == null){
+                    throw new ServiceException("请选择费用分摊部门");
+                }
+                if (l.getCostType() == null){
+                    throw new ServiceException("请选择费用分类");
+                }
+                if (l.getProjectProcess() == null){
+                    throw new ServiceException("请选择项目环节");
+                }
                 l.setProjectId(dto.getProjectId());
                 l.setUnitType(3);
                 countMoney(l);
@@ -142,6 +170,13 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         vo.setProjectId(id);
         //获取项目下所有已审批的计划
         List<ProjectCostBudgetVO2> list = baseMapper.getApprovePlan(id);
+        list.stream().forEach(l->{
+            if (l.getPlanTaskType() != null || l.getPlanTaskDesc() != null || l.getPlanDays() != null){
+                l.setIsShowChildren(0);
+            }else {
+                l.setIsShowChildren(1);
+            }
+        });
         //获取项目下所有的子计划
         List<ProjectCostBudgetVO2> childrenList = baseMapper.getAllChildrenPlan(id);
         if (childrenList != null && childrenList.size() >0) {
@@ -710,7 +745,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         List<DictInfo> costType = baseMapper.getCostType();
         DictInfo dictInfo = new DictInfo();
         dictInfo.setDictName("所有");
-        dictInfo.setDictValue(-1);
+        dictInfo.setDictValue(-1.00);
         costType.add(dictInfo);
         return costType;
     }
@@ -723,7 +758,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         List<DictInfo> unitType = baseMapper.getUnitType();
         DictInfo dictInfo = new DictInfo();
         dictInfo.setDictName("所有");
-        dictInfo.setDictValue(-1);
+        dictInfo.setDictValue(-1.0);
         unitType.add(dictInfo);
         return unitType;
     }
@@ -734,7 +769,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
     public void countMoney(ProjectCostBudget budget){
         BigDecimal postMoney;
         if (budget.getPostType() != null && budget.getPostType() > 0){
-            Integer money = baseMapper.getPostMoney(budget.getPostType());
+            Double money = baseMapper.getPostMoney(budget.getPostType());
             postMoney = new BigDecimal(money);
         }else {
             postMoney = new BigDecimal("0");

+ 1 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ProjectInfoServiceImpl.java

@@ -179,6 +179,7 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, C
                     .collect(Collectors.groupingBy(ProjectCostBudget::getCostType));
             for (int i = 1; i <= 6; i++) {
                 AllProjectStatsVO vo = new AllProjectStatsVO();
+                vo.setProjectId(id);
                 vo.setCostType(i);
                 vo.setCostTypeValue(costTypeDict.get(i-1).getDictName());
                 List<ProjectCostBudget> costBudgets = budgetMap.get(i-1);

+ 162 - 40
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/TaskProcessServiceImpl.java

@@ -68,21 +68,26 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
             throw new ServiceException("未获取到当前用户信息,请联系管理员");
         }
         QueryWrapper<TaskProcessInfo> queryWrapper = Condition.getQueryWrapper(dto);
-        if (dto.getSelectType().equals("1")) { //待审批为待办任务
-            queryWrapper.lambda().like(TaskProcessInfo::getAuditUserIds, SecureUtil.getUserId());
-            queryWrapper.lambda().eq(TaskProcessInfo::getStatus, 1);
-        } else if (dto.getSelectType().equals("2")) { //已审核、已驳回为已办任务
-            queryWrapper.lambda().apply("(audit_user_ids_complete LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS IN ( 2, 3 )) OR (audit_user_ids LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS = 3)");
-        } else if (dto.getSelectType().equals("3")) { //我发起的任务
-            if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
-                queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
-            }
-            queryWrapper.lambda().eq(TaskProcessInfo::getReportUserId, SecureUtil.getUserId());
-        } else if (dto.getSelectType().equals("4")) { //抄送给我的
-            if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
-                queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
-            }
-            queryWrapper.lambda().like(TaskProcessInfo::getCcUserIds, SecureUtil.getUserId());
+        switch (dto.getSelectType()) {
+            case "1":  //待审批为待办任务
+                queryWrapper.lambda().like(TaskProcessInfo::getAuditUserIds, SecureUtil.getUserId());
+                queryWrapper.lambda().eq(TaskProcessInfo::getStatus, 1);
+                break;
+            case "2":  //已审核、已驳回为已办任务
+                queryWrapper.lambda().apply("(audit_user_ids_complete LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS IN ( 2, 3 )) OR (audit_user_ids LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS = 3)");
+                break;
+            case "3":  //我发起的任务
+                if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
+                    queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
+                }
+                queryWrapper.lambda().eq(TaskProcessInfo::getReportUserId, SecureUtil.getUserId());
+                break;
+            case "4":  //抄送给我的
+                if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
+                    queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
+                }
+                queryWrapper.lambda().like(TaskProcessInfo::getCcUserIds, SecureUtil.getUserId());
+                break;
         }
         if (StringUtils.isNotEmpty(dto.getStartTime()) && StringUtils.isNotEmpty(dto.getEndTime())) {
             String endTime = dto.getEndTime();
@@ -93,12 +98,25 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
 
         List<DictInfo> dictInfoList = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'report_type'", new BeanPropertyRowMapper<>(DictInfo.class));
 
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
 
         return pages.convert((obj -> {
             TaskProcessInfoVO vo = new TaskProcessInfoVO();
             BeanUtils.copyProperties(obj, vo);
 
+            if (dto.getSelectType().equals("3") && vo.getReportUserId().equals(SecureUtil.getUserId())) {
+                //如果是本身,也就是我发起的任务,那么替换任务名称
+                String taskName = vo.getTaskName();
+                String re = taskName.replace("向您发起", "我发起的");
+                vo.setTaskName(re);
+            }
+            if (dto.getSelectType().equals("4")) {
+                //抄送给我的
+                String taskName = vo.getTaskName();
+                String re = taskName.replace("向您发起", "抄送给您的");
+                vo.setTaskName(re);
+            }
+
             vo.setReportUserName(userMap.get(vo.getReportUserId()));
 
             if (StringUtils.isNotEmpty(vo.getAuditUserIds())) {
@@ -118,7 +136,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
             vo.setStatusName(vo.getStatus().equals(1) ? "待审批" : (vo.getStatus().equals(2) ? "已审批" : "已驳回"));
 
             for (DictInfo dictInfo : dictInfoList) {
-                if ((vo.getTaskType()).equals(dictInfo.getDictValue())) {
+                if ((vo.getTaskType()).equals(dictInfo.getDictValue().intValue())) {
                     vo.setReportTypeName(dictInfo.getDictName());
                     break;
                 }
@@ -133,15 +151,14 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
         TaskProcessInfo taskProcessInfo = baseMapper.selectById(id);
         if (taskProcessInfo != null) {
             //构造基础信息
-            Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
-            List<DictInfo> dictInfoList1 = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'report_type'", new BeanPropertyRowMapper<>(DictInfo.class));
-            List<DictInfo> dictInfoList2 = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'expense_fr_type'", new BeanPropertyRowMapper<>(DictInfo.class));
+            Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
+            List<DictInfo> dictInfoListBasics = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'report_type'", new BeanPropertyRowMapper<>(DictInfo.class));
             List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
             TaskProcessDetailBasicsVO basicsVO = new TaskProcessDetailBasicsVO();
             basicsVO.setTaskId(taskProcessInfo.getId());
             basicsVO.setTaskName(taskProcessInfo.getTaskName());
-            for (DictInfo dictInfo : dictInfoList1) {
-                if ((taskProcessInfo.getTaskType()).equals(dictInfo.getDictValue())) {
+            for (DictInfo dictInfo : dictInfoListBasics) {
+                if ((taskProcessInfo.getTaskType()).equals(dictInfo.getDictValue().intValue())) {
                     basicsVO.setReportTypeName(dictInfo.getDictName());
                     break;
                 }
@@ -173,8 +190,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                                     voRW.setTransferObjectName(userMap.get(voRW.getTransferObject()));
                                     data = voRW;
                                 }
-
                                 break;
+
                             case 2: //财务
                                 data = jdbcTemplate.query("select * from c_expense_financial_reimbursement_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMFinancialReimbursementInfo.class)).stream().findAny().orElse(null);
                                 EMFinancialReimbursementInfoVO voCW = BeanUtil.copyProperties(data, EMFinancialReimbursementInfoVO.class);
@@ -185,8 +202,9 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                                             vo.setPlanTaskInfoList(Collections.singletonList(planTaskInfoList2));
                                         }
                                     }
-                                    for (DictInfo dictInfo : dictInfoList2) {
-                                        if (dictInfo.getDictValue().equals(voCW.getFrType())) {
+                                    List<DictInfo> dictInfoListCW = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'expense_fr_type'", new BeanPropertyRowMapper<>(DictInfo.class));
+                                    for (DictInfo dictInfo : dictInfoListCW) {
+                                        if (voCW.getFrType().equals(dictInfo.getDictValue().intValue())) {
                                             voCW.setFrTypeName(dictInfo.getDictName());
                                             break;
                                         }
@@ -209,37 +227,114 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
 
                             case 3: //支付
                                 data = jdbcTemplate.query("select * from c_expense_pay_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMPayInfo.class)).stream().findAny().orElse(null);
+                                EMPayInfoVO voZF = BeanUtil.copyProperties(data, EMPayInfoVO.class);
+                                if (voZF != null) {
+                                    ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voZF.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
+                                    if (projectInfo != null) {
+                                        voZF.setProjectName(projectInfo.getName());
+                                    }
+                                    voZF.setAfUserName(userMap.get(voZF.getAfUserId()));
+
+                                    data = voZF;
+                                }
                                 break;
+
                             case 4: //借款
                                 data = jdbcTemplate.query("select * from c_expense_loan_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMLoanInfo.class)).stream().findAny().orElse(null);
                                 break;
+
                             case 5: //采购
                                 data = jdbcTemplate.query("select * from c_expense_purchase_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMPurchaseInfo.class)).stream().findAny().orElse(null);
+                                EMPurchaseInfoVO voCG = BeanUtil.copyProperties(data, EMPurchaseInfoVO.class);
+                                if (voCG != null) {
+                                    List<DictInfo> dictInfoListCG = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'purchase_type'", new BeanPropertyRowMapper<>(DictInfo.class));
+                                    for (DictInfo dictInfo : dictInfoListCG) {
+                                        if (voCG.getPurType().equals(dictInfo.getDictValue().intValue())) {
+                                            voCG.setPurTypeName(dictInfo.getDictName());
+                                            break;
+                                        }
+                                    }
+                                    data = voCG;
+                                }
                                 break;
+
                             case 6: //用车
                                 data = jdbcTemplate.query("select * from c_expense_use_car_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMUseCarInfo.class)).stream().findAny().orElse(null);
                                 break;
+
                             case 7: //发票
                                 data = jdbcTemplate.query("select * from c_expense_invoice_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMInvoiceInfo.class)).stream().findAny().orElse(null);
+                                EMInvoiceInfoVO voFP = BeanUtil.copyProperties(data, EMInvoiceInfoVO.class);
+                                if (voFP != null) {
+                                    ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voFP.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
+                                    if (projectInfo != null) {
+                                        voFP.setProjectName(projectInfo.getName());
+                                    }
+                                    List<DictInfo> dictInfoListFP = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'invoice_type'", new BeanPropertyRowMapper<>(DictInfo.class));
+                                    for (DictInfo dictInfo : dictInfoListFP) {
+                                        if (voFP.getInvoiceType().equals(dictInfo.getDictValue().intValue())) {
+                                            voFP.setInvoiceTypeName(dictInfo.getDictName());
+                                            break;
+                                        }
+                                    }
+                                    voFP.setInvoiceUserName(userMap.get(voFP.getInvoiceUserId()));
+                                    //TODO 发票抬头等信息
 
+                                    data = voFP;
+                                }
                                 break;
+
                             case 8: //外包
                                 data = jdbcTemplate.query("select * from c_expense_outsourcing_pay_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMOutsourcingPayInfo.class)).stream().findAny().orElse(null);
+                                EMOutsourcingPayInfoVO voWB = BeanUtil.copyProperties(data, EMOutsourcingPayInfoVO.class);
+                                if (voWB != null) {
+                                    ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voWB.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
+                                    if (projectInfo != null) {
+                                        voWB.setProjectName(projectInfo.getName());
+                                    }
+                                    List<DictInfo> dictInfoListWB = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'outsourcing_type'", new BeanPropertyRowMapper<>(DictInfo.class));
+                                    for (DictInfo dictInfo : dictInfoListWB) {
+                                        if (voWB.getOutsourcingType().equals(dictInfo.getDictValue().intValue())) {
+                                            voWB.setOutsourcingTypeName(dictInfo.getDictName());
+                                            break;
+                                        }
+                                    }
+                                    data = voWB;
+                                }
                                 break;
+
                             case 9: //出差
                                 data = jdbcTemplate.query("select * from c_attendance_trip_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(AttendanceTripInfo.class)).stream().findAny().orElse(null);
-
                                 AttendanceTripInfoVO voCC = BeanUtil.copyProperties(data, AttendanceTripInfoVO.class);
                                 if (voCC != null) {
-                                    if (ObjectUtil.isNotEmpty(voCC.getProjectId()) && ObjectUtil.isNotEmpty(voCC.getBudgetPlanIds())) { //如果预算ids不为空,那么证明有关联计划任务(单关联)
-                                        TaskPlanInfoVO planTaskInfoList2 = this.getPlanTaskInfoList(voCC.getBudgetPlanIds(), controlProjectInfos);
-                                        if (planTaskInfoList2 != null) {
-                                            vo.setPlanTaskInfoList(Collections.singletonList(planTaskInfoList2));
+                                    if (ObjectUtil.isNotEmpty(voCC.getProjectId())) {
+                                        ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voCC.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
+                                        if (projectInfo != null) {
+                                            voCC.setProjectName(projectInfo.getName());
+                                        }
+                                        if (ObjectUtil.isNotEmpty(voCC.getBudgetPlanIds())) { //如果预算ids不为空,那么证明有关联计划任务(单关联)
+                                            TaskPlanInfoVO planTaskInfoList2 = this.getPlanTaskInfoList(voCC.getBudgetPlanIds(), controlProjectInfos);
+                                            if (planTaskInfoList2 != null) {
+                                                vo.setPlanTaskInfoList(Collections.singletonList(planTaskInfoList2));
+                                            }
                                         }
                                     }
+
+                                    if (ObjectUtil.isNotEmpty(voCC.getFellowTravelerUserIds())) {
+                                        List<String> userIds = Func.toStrList(voCC.getFellowTravelerUserIds());
+                                        List<String> names = new ArrayList<>();
+                                        for (String userId : userIds) {
+                                            String name = userMap.getOrDefault(Long.parseLong(userId), null);
+                                            if (name != null) {
+                                                names.add(name);
+                                            }
+                                        }
+                                        voCC.setFellowTravelerUserNames(StringUtils.join(names, "、"));
+                                    }
                                     data = voCC;
                                 }
                                 break;
+
                             case 10: //成本测算
                                 List<ProjectCostBudget> query = jdbcTemplate.query("select project_id from c_project_cost_budget where id in(" + record.getExpenseInfoId() + ")", new BeanPropertyRowMapper<>(ProjectCostBudget.class));
                                 if (query.size() > 0) {
@@ -252,6 +347,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                                     }
                                 }
                                 break;
+
                         }
                     }
                 }
@@ -444,7 +540,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
             queryWrapper.lambda().ge(ProjectCostBudget::getPlanStartTime, dto.getStartTime()).le(ProjectCostBudget::getPlanEndTime, dto.getEndTime());
         }
         IPage<ProjectCostBudget> pages = projectCostBudgetService.page(page, queryWrapper.lambda().orderBy(true, true, ProjectCostBudget::getCreateTime));
-        Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
+        Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
         List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
 
         //封装page对象
@@ -511,6 +607,14 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
         List<ProjectCostBudget> taskList = projectCostBudgetService.getBaseMapper().selectBatchIds(Func.toStrList(ids));
         List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
         List<TaskPlanInfoVO> vos = new ArrayList<>();
+
+        //获取所有审批任务与计划任务关系
+        Map<String, ExpenseTaskRecord> taskRecordMaps = new LinkedHashMap<>();
+        if (ObjectUtil.isNotEmpty(ids)) {
+            List<ExpenseTaskRecord> expenseTaskRecords = jdbcTemplate.query("select task_id,expense_info_id from c_expense_task_record where expense_info_type = 1 and expense_info_id in(" + ids + ")", new BeanPropertyRowMapper<>(ExpenseTaskRecord.class));
+            taskRecordMaps = expenseTaskRecords.stream().collect(Collectors.toMap(ExpenseTaskRecord::getExpenseInfoId, Function.identity()));
+        }
+
         for (ProjectCostBudget obj : taskList) {
             TaskPlanInfoVO vo = new TaskPlanInfoVO();
             vo.setId(obj.getId());
@@ -521,7 +625,21 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                     break;
                 }
             }
-            vo.setStatusName(""); //TODO 任务状态 多种
+
+            //判断任务状态
+            ExpenseTaskRecord record = taskRecordMaps.getOrDefault(String.valueOf(vo.getId()), null);
+            if (record != null) {
+                TaskProcessInfo task = jdbcTemplate.query("select status from c_task_process_info where id = " + record.getTaskId(), new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
+                if (task != null) {
+                    vo.setStatus(task.getStatus());
+                    vo.setStatusName(task.getStatus().equals(1) ? "待审批" : (task.getStatus().equals(2) ? "已审批" : (task.getStatus().equals(3) ? "已驳回" : "未提交审批")));
+                }
+            }
+            if (StringUtils.isEmpty(vo.getStatusName())) {
+                vo.setStatus(0);
+                vo.setStatusName("未提交审批");
+            }
+
             vos.add(vo);
         }
         return vos;
@@ -545,7 +663,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                         taskProcessInfo.setStatus(1); //待审批
                         taskProcessInfo.setReportDate(new Date());
                         taskProcessInfo.setTaskType(1); //任务审批
-                        taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】向您发起【任务审批】审批");
+                        taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】向您发起【计划完成】审批");
 
                         //上报人
                         taskProcessInfo.setReportUserId(SecureUtil.getUserId());
@@ -556,7 +674,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
 
                         List<String> nonEmptyAuditUserIds = new LinkedList<>();
                         for (String userId : auditUserIds) {
-                            if (StringUtils.isNotEmpty(userId)) {
+                            //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
+                            if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
                                 nonEmptyAuditUserIds.add(userId);
                             }
                         }
@@ -578,7 +697,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                         taskProcessInfo.setStatus(1); //待审批
                         taskProcessInfo.setReportDate(new Date());
                         taskProcessInfo.setTaskType(1); //任务审批
-                        taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】向您发起【任务转移】审批");
+                        taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】向您发起【任务转移】审批");
 
                         //上报人
                         taskProcessInfo.setReportUserId(SecureUtil.getUserId());
@@ -589,7 +708,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
 
                         List<String> nonEmptyAuditUserIds = new LinkedList<>();
                         for (String userId : auditUserIds) {
-                            if (StringUtils.isNotEmpty(userId)) {
+                            //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
+                            if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
                                 nonEmptyAuditUserIds.add(userId);
                             }
                         }
@@ -694,13 +814,14 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                 taskProcessInfo.setStatus(1); //待审批
                 taskProcessInfo.setReportDate(new Date());
                 taskProcessInfo.setTaskType(10); //成本测算审批
-                taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】向您发起【成本测算】审批");
+                taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】向您发起【成本测算】审批");
                 //上报人
                 taskProcessInfo.setReportUserId(SecureUtil.getUserId());
 
                 List<String> nonEmptyAuditUserIds = new LinkedList<>();
                 for (String userId : auditUserIds) {
-                    if (StringUtils.isNotEmpty(userId)) {
+                    //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
+                    if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
                         nonEmptyAuditUserIds.add(userId);
                     }
                 }
@@ -869,7 +990,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
         taskProcessInfo.setTaskType(type);
         String taskNameByType = this.taskNameByType(type);
         if (StringUtils.isNotEmpty(taskNameByType)) {
-            taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】" + taskNameByType);
+            taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】" + taskNameByType);
         }
         //上报人
         taskProcessInfo.setReportUserId(SecureUtil.getUserId());
@@ -899,7 +1020,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
 
         List<String> nonEmptyAuditUserIds = new LinkedList<>();
         for (String userId : auditUserIds) {
-            if (StringUtils.isNotEmpty(userId)) {
+            //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
+            if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
                 nonEmptyAuditUserIds.add(userId);
             }
         }

+ 41 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/UserpayInfoServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.service.impl;
+
+import org.springblade.control.entity.UserpayInfo;
+import org.springblade.control.vo.UserpayInfoVO;
+import org.springblade.control.mapper.UserpayInfoMapper;
+import org.springblade.control.service.IUserpayInfoService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 薪酬管理 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Service
+public class UserpayInfoServiceImpl extends BaseServiceImpl<UserpayInfoMapper, UserpayInfo> implements IUserpayInfoService {
+
+    @Override
+    public IPage<UserpayInfoVO> selectUserpayInfoPage(IPage<UserpayInfoVO> page, UserpayInfoVO userpayInfo) {
+        return page.setRecords(baseMapper.selectUserpayInfoPage(page, userpayInfo));
+    }
+
+}

+ 5 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ArchiveTreeContractImpl.java

@@ -102,5 +102,10 @@ public class ArchiveTreeContractImpl implements ArchiveTreeContractClient {
         return archiveTreeContractMapper.getArchiveTreeContractByContractId(contractId);
     }
 
+    @Override
+    public Integer writeBusinessData(Long keyId, Long contractId, String formDataId) {
+        return archiveTreeContractService.writeBusinessData(keyId,contractId,formDataId);
+    }
+
 
 }

+ 2 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeContractService.java

@@ -116,4 +116,6 @@ public interface IArchiveTreeContractService extends BaseService<ArchiveTreeCont
     List<ArchiveTreeContract> getWbsAssociatedNodes(String contractId);
 
     void updateAllSonNodeIdsForArchiveAutoRule(ArchiveTreeContract archiveTreeContract);
+
+    Integer writeBusinessData(Long keyId, Long contractId, String formDataId);
 }