瀏覽代碼

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

yangyj 2 年之前
父節點
當前提交
398e470c23
共有 60 個文件被更改,包括 1280 次插入103 次删除
  1. 6 0
      blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java
  2. 1 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/CommonFileClientImpl.java
  3. 6 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/EMFinancialReimbursementInfo.java
  4. 26 1
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserFilesInfo.java
  5. 0 1
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserpayInfo.java
  6. 3 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/ProjectCostBudgetVO2.java
  7. 17 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/UserFilesInfoVO.java
  8. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/TabBusstimeInfoDTO.java
  9. 62 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TabBusstimeInfo.java
  10. 6 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java
  11. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TabBusstimeInfoVO.java
  12. 4 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsFormElementVO.java
  13. 3 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.java
  14. 25 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml
  15. 3 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/IInformationQueryService.java
  16. 6 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java
  17. 6 3
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/MetadataClassificationServiceImpl.java
  18. 48 6
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java
  19. 22 0
      blade-service/blade-control/pom.xml
  20. 14 0
      blade-service/blade-control/src/main/java/org/springblade/control/controller/DictInfoController.java
  21. 22 2
      blade-service/blade-control/src/main/java/org/springblade/control/controller/ProjectCostBudgetController.java
  22. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/controller/TaskProcessController.java
  23. 50 12
      blade-service/blade-control/src/main/java/org/springblade/control/controller/UserFilesInfoController.java
  24. 25 1
      blade-service/blade-control/src/main/java/org/springblade/control/controller/UserpayInfoController.java
  25. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/DepartmentMonthPlanMapper.java
  26. 1 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/DepartmentMonthPlanMapper.xml
  27. 3 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectCostBudgetMapper.java
  28. 5 1
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/ProjectCostBudgetMapper.xml
  29. 3 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserFilesInfoMapper.java
  30. 34 2
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserFilesInfoMapper.xml
  31. 5 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/IProjectCostBudgetService.java
  32. 1 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/IUserFilesInfoService.java
  33. 0 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/IUserpayInfoService.java
  34. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/TaskProcessService.java
  35. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/AttendanceTripServiceImpl.java
  36. 16 4
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractInfoServiceImpl.java
  37. 3 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/DepartmentMonthPlanServiceImpl.java
  38. 2 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMFinancialReimbursementServiceImpl.java
  39. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMInvoiceServiceImpl.java
  40. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMLoanServiceImpl.java
  41. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMOutsourcingPayServiceImpl.java
  42. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMPayServiceImpl.java
  43. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMPurchaseServiceImpl.java
  44. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/EMUseCarServiceImpl.java
  45. 238 27
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ProjectCostBudgetServiceImpl.java
  46. 84 13
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/TaskProcessServiceImpl.java
  47. 5 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/UserFilesInfoServiceImpl.java
  48. 2 10
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/UserpayInfoServiceImpl.java
  49. 12 0
      blade-service/blade-control/src/main/java/org/springblade/control/utils/ByteArrayToMultipartFileConverter.java
  50. 48 0
      blade-service/blade-control/src/main/java/org/springblade/control/utils/PDFConverter.java
  51. 69 0
      blade-service/blade-control/src/main/java/org/springblade/control/wrapper/UserFilesWrapper.java
  52. 145 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TabBusstimeInfoController.java
  53. 6 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/feign/WbsTreeContractClientImpl.java
  54. 43 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TabBusstimeInfoMapper.java
  55. 29 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TabBusstimeInfoMapper.xml
  56. 3 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeMapper.xml
  57. 42 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/ITabBusstimeInfoService.java
  58. 46 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TabBusstimeInfoServiceImpl.java
  59. 0 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeContractServiceImpl.java
  60. 2 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java

+ 6 - 0
blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java

@@ -462,6 +462,12 @@ public class CommonUtil {
      * @return
      */
     public static int getWorkDays(LocalDate startTime,LocalDate endTime){
+        if (startTime.compareTo(endTime) > 0){
+            return -1;
+        }
+//        if (startTime.compareTo(endTime) == 0){
+//            return 1;
+//        }
         StringBuilder str = new StringBuilder();
         List<String> list = new ArrayList<>();
         while (!startTime.equals(endTime)){

+ 1 - 1
blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/CommonFileClientImpl.java

@@ -209,7 +209,7 @@ public class CommonFileClientImpl implements CommonFileClient {
     }
 
     /**
-     * excel 转 pdf
+     * 获取pdf 的页数
      */
     @Override
     public String getPdfNum(String url) {

+ 6 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/EMFinancialReimbursementInfo.java

@@ -37,9 +37,15 @@ public class EMFinancialReimbursementInfo extends BaseEntity {
     @ApiModelProperty(value = "电子发票url地址")
     private String frElectronicInvoiceUrl;
 
+    @ApiModelProperty(value = "电子发票url地址PNG格式")
+    private String frElectronicInvoiceUrlJpg;
+
     @ApiModelProperty(value = "附件url地址")
     private String frAttachmentUrl;
 
+    @ApiModelProperty(value = "附件url地址PNG格式")
+    private String frAttachmentUrlJpg;
+
     @ApiModelProperty(value = "所属项目id")
     private Long projectId;
 

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

@@ -18,6 +18,8 @@ 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;
@@ -38,90 +40,113 @@ public class UserFilesInfo extends BaseEntity {
 	/**
 	* 用户id主键
 	*/
+	@ApiModelProperty(value = "用户Id")
 		private Long userId;
 	/**
 	* 年龄
 	*/
+	@ApiModelProperty(value = "年龄")
 		private Integer userAge;
 	/**
 	* 身份证姓名
 	*/
+	@ApiModelProperty(value = "身份证姓名")
 		private String carName;
 	/**
 	* 民族
 	*/
+		@ApiModelProperty(value = "民族")
 		private String nation;
 	/**
 	* 试用期 单位月
 	*/
+	@ApiModelProperty(value = "试用期 单位月")
 		private Integer periodMoth;
 	/**
 	* 身份证地址
 	*/
+	@ApiModelProperty(value = "身份证地址")
 		private String carAddr;
 	/**
 	* 身份证照片路径(人面)
 	*/
+
+	@ApiModelProperty(value = "身份证照片路径(人面)")
 		private String carAimgUrl;
 	/**
 	* 身份证图片(国徽)
 	*/
+	@ApiModelProperty(value = "身份证图片(国徽)")
 		private String carBimgUrl;
 	/**
 	* 1 已婚 2未婚
 	*/
+	@ApiModelProperty(value = "1 已婚 2未婚")
 		private Integer marriageStatus;
 	/**
 	* 续签约次数
 	*/
+	@ApiModelProperty(value = "续签约次数")
 		private Integer renewalCount;
 	/**
 	* 户籍所在
 	*/
+	@ApiModelProperty(value = "户籍所在")
 		private String domicileAddr;
 	/**
 	* 1:小学/初中 2高中 3 专科 4 本科 5研究生 6 博士 7 硕士
 	*/
+	@ApiModelProperty(value = "1:小学/初中 2高中 3 专科 4 本科 5研究生 6 博士 7 硕士")
 		private Integer educationType;
 	/**
 	* 紧急联系人姓名
 	*/
+	@ApiModelProperty(value = "紧急联系人姓名")
 		private String emergencyName;
 	/**
 	* 紧急联系人电话
 	*/
+	@ApiModelProperty(value = "紧急联系人电话")
 		private String emergencyPhone;
 	/**
 	* 与紧急联系人关系
 	*/
+	@ApiModelProperty(value = "与紧急联系人关系")
 		private String emergencyRelation;
 	/**
 	* 专业
 	*/
+	@ApiModelProperty(value = "专业")
 		private String speciality;
 	/**
 	* 政治面貌
 	*/
+	@ApiModelProperty(value = "政治面貌")
 		private String political;
 	/**
 	* 开户行名称
 	*/
+	@ApiModelProperty(value = "开户行名称")
 		private String bankName;
 	/**
 	* 员工状态
 	*/
-		private String userStatus;
+	@ApiModelProperty(value = "员工状态")
+		private Integer userStatus;
 	/**
 	* 银行卡号
 	*/
+	@ApiModelProperty(value = "银行卡号")
 		private String bankNum;
 	/**
 	* 员工类型
 	*/
+	@ApiModelProperty(value = "员工类型")
 		private Integer userType;
 	/**
 	* 员工照片路径
 	*/
+	@ApiModelProperty(value = "员工照片路径")
 		private String userImgUrl;
 
 

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

@@ -18,7 +18,6 @@ package org.springblade.control.entity;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 
-import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 

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

@@ -56,4 +56,7 @@ public class ProjectCostBudgetVO2 extends ProjectCostBudget {
     @ApiModelProperty(value = "超出预算提示信息")
     private String outMoneyTips;
 
+    @ApiModelProperty(value = "0不显示子计划删除按钮,1显示")
+    private Integer isShowDelete;
+
 }

+ 17 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/UserFilesInfoVO.java

@@ -99,4 +99,21 @@ public class UserFilesInfoVO extends UserFilesInfo {
 
 	@ApiModelProperty(value = "直接主管")
 	private String leaderName;
+
+	@ApiModelProperty(value = "员工类型名称")
+	private String userTypeName;
+
+	@ApiModelProperty(value = "婚姻状况名称")
+	private String marriageStatusName;
+
+	@ApiModelProperty(value = "员工状态名称")
+	private String userStatusName;
+
+	@ApiModelProperty(value = "政治面貌名称")
+	private String politicalName;
+
+	@ApiModelProperty(value = "合同期限")
+	private Integer conYear;
+
+
 }

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/TabBusstimeInfoDTO.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.manager.dto;
+
+import org.springblade.manager.entity.TabBusstimeInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 元素业务时间表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-07-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TabBusstimeInfoDTO extends TabBusstimeInfo {
+	private static final long serialVersionUID = 1L;
+
+}

+ 62 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TabBusstimeInfo.java

@@ -0,0 +1,62 @@
+/*
+ *      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.manager.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-11
+ */
+@Data
+@TableName("m_tab_busstime_info")
+@EqualsAndHashCode(callSuper = true)
+public class TabBusstimeInfo extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 元素表主键
+	*/
+	@ApiModelProperty("元素表主键")
+		private Long tableId;
+	/**
+	* 元素列表主键
+	*/
+	@ApiModelProperty("元素列表主键")
+		private Long colId;
+	/**
+	* 元素表英文名称
+	*/
+	@ApiModelProperty("元素表英文名称")
+		private String tabEnName;
+	/**
+	* 列字段key
+	*/
+	@ApiModelProperty("列字段key")
+		private String colKey;
+
+
+}

+ 6 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java

@@ -1,7 +1,9 @@
 package org.springblade.manager.feign;
 
+import org.springblade.core.tool.api.R;
 import org.springblade.manager.entity.ContractRelationJlyz;
 import org.springblade.manager.entity.WbsTreeContract;
+import org.springblade.manager.vo.AppWbsTreeContractVO;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -177,4 +179,8 @@ public interface WbsTreeContractClient {
     @GetMapping(API_PREFIX + "/getNextPkeyIdByNodeType")
     Long getNextPkeyIdByNodeType(@RequestParam Long pkeyId, @RequestParam Integer nodeType);
 
+
+    //获取 节点下表单
+    @GetMapping(API_PREFIX + "/searchNodeAllTable")
+    List<AppWbsTreeContractVO> searchNodeAllTable(String primaryKeyId, String type, String contractId, String projectId);
 }

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TabBusstimeInfoVO.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.manager.vo;
+
+import org.springblade.manager.entity.TabBusstimeInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 元素业务时间表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-07-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TabBusstimeInfoVO extends TabBusstimeInfo {
+	private static final long serialVersionUID = 1L;
+
+}

+ 4 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsFormElementVO.java

@@ -30,4 +30,8 @@ public class WbsFormElementVO extends WbsFormElement {
      */
     private Long nodeId;
 
+    /**
+     * 是否保存业务时间 '0'否 '1'是
+     */
+    private Integer isBussTime;
 }

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.java

@@ -26,6 +26,7 @@ import java.util.Map;
 
 import org.apache.ibatis.annotations.Param;
 import org.springblade.business.vo.QueryProcessDataVO;
+import org.springblade.manager.entity.TabBusstimeInfo;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
 
@@ -129,4 +130,6 @@ public interface InformationQueryMapper extends BaseMapper<InformationQuery> {
     List<InformationQuery> selectChildrenNodeInfo(@Param("node") WbsTreeContract node);
 
     List<InformationQuery> getInformationByContractId(@Param("contractId") Long contractId);
+
+    List<TabBusstimeInfo> getTabussTimeInfo(@Param("tables") List<String> tables);
 }

+ 25 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -73,6 +73,22 @@
         <result column="submitCounts" property="submitCounts"/>
     </resultMap>
 
+    <!-- 通用查询映射结果 -->
+    <resultMap id="tabBusstimeInfoResultMap" type="org.springblade.manager.entity.TabBusstimeInfo">
+        <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="table_id" property="tableId"/>
+        <result column="col_id" property="colId"/>
+        <result column="tab_en_name" property="tabEnName"/>
+        <result column="col_key" property="colKey"/>
+    </resultMap>
+
     <resultMap id="intResultMap" type="java.lang.Integer"/>
 
     <update id="updateBatchByPKeyId">
@@ -882,4 +898,13 @@
           and contract_id = #{contractId} and is_deleted = 0;
     </select>
 
+    <select id="getTabussTimeInfo" resultMap="tabBusstimeInfoResultMap">
+        select * from m_tab_busstime_info where is_deleted = 0 and
+        <if test="tables != null">
+            and tab_en_name in
+            <foreach collection="tables" item="wbsIdc" open="(" separator="," close=")">
+                #{wbsIdc}
+            </foreach>
+        </if>
+    </select>
 </mapper>

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/IInformationQueryService.java

@@ -23,6 +23,7 @@ import org.springblade.business.vo.InformationQueryVO;
 import org.springblade.business.vo.QueryProcessDataVO;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.entity.TabBusstimeInfo;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
 import org.springframework.scheduling.annotation.Async;
@@ -153,4 +154,6 @@ public interface IInformationQueryService extends BaseService<InformationQuery>
 
     List<QueryProcessDataVO> getNodeChildTabColsWithValueByTabName(String initTabName, String pKeyId);
 
+    //获取表单是否配置 业务时间字段
+    List<TabBusstimeInfo> getTabussTimeInfo(List<String> tables);
 }

+ 6 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java

@@ -25,6 +25,7 @@ import org.springblade.core.secure.BladeUser;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.utils.*;
 import org.springblade.manager.entity.ContractInfo;
+import org.springblade.manager.entity.TabBusstimeInfo;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.feign.ContractClient;
 import org.springblade.manager.feign.WbsTreeContractClient;
@@ -888,4 +889,9 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
         return baseMapper.getNodeChildTabColsWithValueByTabName(initTabName,pKeyId);
     }
 
+    @Override
+    public List<TabBusstimeInfo> getTabussTimeInfo(List<String> tables) {
+        return baseMapper.getTabussTimeInfo(tables);
+    }
+
 }

+ 6 - 3
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/MetadataClassificationServiceImpl.java

@@ -420,8 +420,9 @@ public class MetadataClassificationServiceImpl
                         valueBuild.append(" NULL ");
                     }
                 }
+                //注意,user有可能获取不到,出错关注一下这个
                 sqlBuild.append("(id,tenant_id, create_user, create_time, update_user, update_time, status, is_deleted,contract_id, file_id " + fieldBuild.toString() + " ) ");
-                sqlBuild.append("values('" + SnowFlakeUtil.getId() + "','" + user.getTenantId() + "','" + user.getUserId() + "', '" + DateUtil.formatDateTime(new Date()) + "', '" + user.getUserId() + "', '" + DateUtil.formatDateTime(new Date()) + "', '0', '0','" + byId.getContractId() + "', '" + fileId + "' " + valueBuild.toString() + ")");
+                sqlBuild.append("values('" + SnowFlakeUtil.getId() + "','" +user==null?-1:user.getTenantId() + "','" + user==null?-1:user.getUserId() + "', '" + DateUtil.formatDateTime(new Date()) + "', '" + user==null?-1:user.getUserId() + "', '" + DateUtil.formatDateTime(new Date()) + "', '0', '0','" + byId.getContractId() + "', '" + fileId + "' " + valueBuild.toString() + ")");
             } else {
                 sqlBuild.append("update u_metadata_file set ");
                 for (MetadataClassification key : metadataClassifications) {
@@ -429,11 +430,13 @@ public class MetadataClassificationServiceImpl
                         sqlBuild.append(" " + key.getFieldKey() + " = '" + keyValue.get(key.getContainerName()) + "' , ");
                     }
                 }
-                sqlBuild.append(" update_user = '" + user.getUserId() + "' , ");
+                if(user != null && user.getUserId()!=null) {
+                    sqlBuild.append(" update_user = '" + user==null?-1:user.getUserId() + "' , ");
+                }
                 sqlBuild.append(" update_time = '" + DateUtil.formatDateTime(new Date()) + "' ");
                 sqlBuild.append(" where id = " + metadataMap.get("id"));
             }
-            jdbcTemplate.execute(sqlBuild.toString());
+            jdbcTemplate.execute(sqlBuild.toString().replaceAll("\\\\",""));
         }
     }
 }

+ 48 - 6
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -15,6 +15,7 @@ import org.springblade.business.entity.*;
 import org.springblade.business.mapper.TaskMapper;
 import org.springblade.business.service.*;
 import org.springblade.business.vo.*;
+import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.FileUtils;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.log.exception.ServiceException;
@@ -38,11 +39,14 @@ import org.springblade.flow.core.utils.TaskUtil;
 import org.springblade.flow.core.vo.FlowProcessVO;
 import org.springblade.manager.entity.ContractInfo;
 import org.springblade.manager.entity.ProjectInfo;
+import org.springblade.manager.entity.TabBusstimeInfo;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.feign.ArchiveTreeContractClient;
 import org.springblade.manager.feign.ContractClient;
 import org.springblade.manager.feign.ProjectClient;
 import org.springblade.manager.feign.WbsTreeContractClient;
+import org.springblade.manager.vo.AppWbsTreeContractVO;
+import org.springblade.resource.feign.CommonFileClient;
 import org.springblade.system.user.cache.UserCache;
 import org.springblade.system.user.entity.User;
 import org.springframework.beans.BeanUtils;
@@ -108,7 +112,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
 
     private final WbsTreeContractClient wbsTreeContractClient;
 
-    private final ArchiveTreeContractClient archiveTreeContractClient;
+    private final CommonFileClient commonFileClient;
+
 
     @Autowired
     StringRedisTemplate RedisTemplate;
@@ -966,11 +971,48 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
      */
     @Transactional
     public void updateWriteBusinessDataStatus(String formDataId, Integer status, String newFileUrl) {
-        this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status)
-                .set(InformationQuery::getEVisaPdfUrl, newFileUrl)
-                .set(InformationQuery::getReportNumber, null)
-                .set(InformationQuery::getAuditUserIdAndName, null)
-                .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
+
+        try {
+            String pdfPage = commonFileClient.getPdfNum(newFileUrl);
+            Long pdfSize = CommonUtil.getResourceLength(newFileUrl);
+            List<String> list = Arrays.asList(formDataId.split(","));
+            for(String iId : list){
+                //获取
+                String dateInfo = "";
+                InformationQuery queryinfo = informationQueryService.getById(iId);
+                List<AppWbsTreeContractVO> WbsTreeContract = wbsTreeContractClient.searchNodeAllTable(queryinfo.getWbsId() + "", queryinfo.getClassify() + "", queryinfo.getContractId() + "", queryinfo.getProjectId() + "");
+                List<String> collect = new ArrayList<>();
+                Map<String,String> idMap = new HashMap<>();
+                for(AppWbsTreeContractVO appWbsTreeContractVO : WbsTreeContract){
+                    collect.add(appWbsTreeContractVO.getInitTableName());
+                    idMap.put(appWbsTreeContractVO.getInitTableName(),appWbsTreeContractVO.getPKeyId()+"");
+                }
+                List<TabBusstimeInfo> tabussTimeInfo = informationQueryService.getTabussTimeInfo(collect);
+                if(tabussTimeInfo!=null && tabussTimeInfo.size()>=1){
+                    TabBusstimeInfo tabBusstimeInfo = tabussTimeInfo.get(0);
+                    String querySql = "select "+tabBusstimeInfo.getColKey()+" from "+tabBusstimeInfo.getTabEnName()+" where p_key_id="+idMap.get(tabBusstimeInfo.getTabEnName());
+                    Map<String, Object> maps = jdbcTemplate.queryForMap(querySql);
+                    if(maps!=null){
+                        dateInfo = maps.get(tabBusstimeInfo.getColKey())+"";
+                    }
+                }
+
+                this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status)
+                        .set(InformationQuery::getEVisaPdfUrl, newFileUrl)
+                        .set(InformationQuery::getReportNumber, null)
+                        .set(InformationQuery::getAuditUserIdAndName, null)
+                        .set(InformationQuery::getEVisaPdfPage, pdfPage)
+                        .set(InformationQuery::getEVisaPdfSize, pdfSize)
+                        .set(InformationQuery::getBusinessTime, dateInfo)
+                        .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
+            }
+        }catch (Exception e){
+            this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status)
+                    .set(InformationQuery::getEVisaPdfUrl, newFileUrl)
+                    .set(InformationQuery::getReportNumber, null)
+                    .set(InformationQuery::getAuditUserIdAndName, null)
+                    .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
+        }
 
         //TODO 测试完成后打开
 //        InformationQuery query = this.informationQueryService.getById(formDataId);

+ 22 - 0
blade-service/blade-control/pom.xml

@@ -48,10 +48,32 @@
             <version>2.9.1.RELEASE</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-starter-excel</artifactId>
         </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>2.9.9</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.pdfbox</groupId>
+            <artifactId>pdfbox</artifactId>
+            <version>2.0.20</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+        </dependency>
+
     </dependencies>
     <build>
         <plugins>

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

@@ -22,13 +22,19 @@ import lombok.AllArgsConstructor;
 
 import javax.validation.Valid;
 
+import org.springblade.core.cache.utils.CacheUtil;
 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.tenant.annotation.NonDS;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.support.Kv;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.core.tool.utils.StringUtil;
+import org.springblade.system.cache.DictCache;
 import org.springblade.system.entity.DictBiz;
+import org.springblade.system.enums.DictEnum;
 import org.springblade.system.vo.DictBizVO;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -42,12 +48,17 @@ import springfox.documentation.annotations.ApiIgnore;
 import java.util.List;
 import java.util.Map;
 
+import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE;
+import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
+
 /**
  * 参数信息表 控制器
  *
  * @author BladeX
  * @since 2023-06-05
  */
+
+
 @RestController
 @AllArgsConstructor
 @RequestMapping("/dictinfo")
@@ -69,7 +80,9 @@ public class DictInfoController extends BladeController {
                 throw new ServiceException("没有权限,请联系管理员");
             }
         }
+        CacheUtil.clear(DICT_CACHE, Boolean.FALSE);
         return R.status(dictInfoService.saveOrUpdate(dictInfo));
+
     }
 
 
@@ -84,6 +97,7 @@ public class DictInfoController extends BladeController {
         if (dictInfo1 != null && dictInfo1.getType().equals(6)) {
             throw new ServiceException("没有权限,请联系管理员");
         }
+        CacheUtil.clear(DICT_CACHE, Boolean.FALSE);
         return R.status(dictInfoService.removeBatchByIds(Func.toLongList(ids)));
     }
 

+ 22 - 2
blade-service/blade-control/src/main/java/org/springblade/control/controller/ProjectCostBudgetController.java

@@ -85,8 +85,8 @@ public class ProjectCostBudgetController {
             @ApiImplicitParam(name = "endDate", value = "结束日期", required = true),
     })
     public R<Integer> getWorkDays(@RequestParam("startDate") @DateTimeFormat(pattern="yyyy-MM-dd")LocalDate startDate,
-                         @RequestParam("endDate") @DateTimeFormat(pattern="yyyy-MM-dd")LocalDate endDate){
-        return R.data(budgetService.getWorkDays(startDate,endDate));
+                         @RequestParam("endDate") @DateTimeFormat(pattern="yyyy-MM-dd")LocalDate endDate,@RequestParam("planTaskType")Long planTaskType){
+        return R.data(budgetService.getWorkDays(startDate,endDate,planTaskType));
     }
 
 //    /**
@@ -199,4 +199,24 @@ public class ProjectCostBudgetController {
         return R.data(budgetService.saveCountMoney(budget));
     }
 
+    /**
+     * 编辑主计划
+     */
+    @PostMapping("/updateMainPlan")
+    @ApiOperationSupport(order = 15)
+    @ApiOperation(value = "编辑项目计划预算-编辑主计划",notes = "传入主计划")
+    public R<ProjectCostBudgetVO2> updateMainPlan(@RequestBody ProjectCostBudgetVO2 vo2){
+        return R.data(budgetService.updateMainPlan(vo2));
+    }
+
+    /**
+     * 编辑子计划
+     */
+    @PostMapping("/updateChildrenPlan")
+    @ApiOperationSupport(order = 15)
+    @ApiOperation(value = "编辑项目计划预算-编辑子计划",notes = "传入主计划,和子计划")
+    public R<ProjectCostBudgetVO2> updateChildrenPlan(@RequestBody ProjectCostBudgetVO2 vo2){
+        return R.data(budgetService.updateChildrenPlan(vo2));
+    }
+
 }

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

@@ -42,7 +42,7 @@ public class TaskProcessController extends BladeController {
     @GetMapping("/task/detail")
     @ApiOperationSupport(order = 2)
     @ApiOperation(value = "审批管理任务详情", notes = "传入审批任务id")
-    public R<TaskProcessInfoDetailVO> taskDetail(@RequestParam String id) {
+    public R<TaskProcessInfoDetailVO> taskDetail(@RequestParam String id) throws Exception {
         return R.data(taskProcessService.taskDetail(id));
     }
 

+ 50 - 12
blade-service/blade-control/src/main/java/org/springblade/control/controller/UserFilesInfoController.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.control.controller;
 
+import com.alibaba.spring.util.BeanUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -23,9 +24,11 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
+import org.springblade.control.wrapper.UserFilesWrapper;
 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.BeanUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -49,9 +52,9 @@ public class UserFilesInfoController extends BladeController {
 
 	private final IUserFilesInfoService userFilesInfoService;
 
-	/**
+/*	*//**
 	 * 详情
-	 */
+	 *//*
 	@GetMapping("/detail")
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "详情", notes = "传入userFilesInfo")
@@ -61,9 +64,9 @@ public class UserFilesInfoController extends BladeController {
 	}
 
 
-	/**
+	*//**
 	 * 自定义分页 档案职工信息表
-	 */
+	 *//*
 	@GetMapping("/page")
 	@ApiOperationSupport(order = 3)
 	@ApiOperation(value = "分页", notes = "传入userFilesInfo")
@@ -72,9 +75,9 @@ public class UserFilesInfoController extends BladeController {
 		return R.data(pages);
 	}
 
-	/**
+	*//**
 	 * 新增 档案职工信息表
-	 */
+	 *//*
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "新增", notes = "传入userFilesInfo")
@@ -82,9 +85,9 @@ public class UserFilesInfoController extends BladeController {
 		return R.status(userFilesInfoService.save(userFilesInfo));
 	}
 
-	/**
+	*//**
 	 * 修改 档案职工信息表
-	 */
+	 *//*
 	@PostMapping("/update")
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "修改", notes = "传入userFilesInfo")
@@ -92,9 +95,9 @@ public class UserFilesInfoController extends BladeController {
 		return R.status(userFilesInfoService.updateById(userFilesInfo));
 	}
 
-	/**
+	*//**
 	 * 新增或修改 档案职工信息表
-	 */
+	 *//*
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入userFilesInfo")
@@ -103,15 +106,50 @@ public class UserFilesInfoController extends BladeController {
 	}
 
 	
+	*/
+
+
+	/**
+	 * 新增或修改 档案职工信息表
+	 */
+	@PostMapping("/submit-user-file")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入userFilesInfo")
+	public R submit(@Valid @RequestBody UserFilesInfoVO userFilesInfoVO) {
+		UserFilesInfo userFilesInfo = BeanUtil.copy(userFilesInfoVO,UserFilesInfo.class);
+		return R.status(userFilesInfoService.saveOrUpdate(userFilesInfo));
+	}
+
 	/**
 	 * 删除 档案职工信息表
 	 */
-	@PostMapping("/remove")
+	@PostMapping("/del-user-file-detail")
 	@ApiOperationSupport(order = 7)
 	@ApiOperation(value = "逻辑删除", notes = "传入ids")
 	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(userFilesInfoService.deleteLogic(Func.toLongList(ids)));
 	}
 
-	
+	/**
+	 * 详情
+	 */
+	@GetMapping("/get-user-file-detail")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "员工档案详情", notes = "传入userFilesInfo")
+	public R<UserFilesInfoVO> getUserFileDetail(@ApiParam(value = "主键集id", required = true) @RequestParam String  id) {
+		UserFilesInfoVO detail = userFilesInfoService.getUserFileDetail(id);
+		return R.data(UserFilesWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 档案职工信息表 分页
+	 */
+	@GetMapping("/get-user-file-page")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "分页档案职工信息表", notes = "传入userFilesInfo")
+	public R<IPage<UserFilesInfoVO>> page(UserFilesInfoVO userFilesInfo,Query query) {
+		IPage<UserFilesInfoVO> pages = userFilesInfoService.selectUserFilesInfoPage(Condition.getPage(query),userFilesInfo);
+		return R.data(UserFilesWrapper.build().pageVO(pages));
+	}
+
 }

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

@@ -29,6 +29,7 @@ import org.springblade.core.excel.util.ExcelUtil;
 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.BeanUtil;
 import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springframework.web.bind.annotation.*;
@@ -40,8 +41,14 @@ import org.springblade.control.service.IUserpayInfoService;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 薪酬管理 控制器
@@ -137,7 +144,24 @@ public class UserpayInfoController extends BladeController {
             @ApiImplicitParam(name = "dateInfo", value = "时间yyyy-mm", required = true)
     })
     public R importUserpayInfo(@RequestParam("file") MultipartFile file,String dateInfo) {
-        return userpayInfoService.importUserpayInfo(file,dateInfo);
+        userpayInfoService.delUserPayInoByDate(dateInfo);
+        List<UserpayExcel> list = ExcelUtil.read(file, UserpayExcel.class);
+        Date date = DateUtil.parse(dateInfo,"yyyy-MM");
+        ZoneId zoneId = ZoneId.systemDefault();
+        ZonedDateTime zonedDateTime = date.toInstant().atZone(zoneId);
+        LocalDate localDate = zonedDateTime.toLocalDate();
+        if(list!=null && list.size()>=1){
+            List<UserpayInfo> vos = list.stream().map(f -> {
+                UserpayInfo tag = new UserpayInfo();
+                BeanUtil.copy(f,tag);
+                tag.setCostTime(localDate);
+                return tag;
+            }).collect(Collectors.toList());
+            userpayInfoService.saveBatch(vos);
+            return R.success("导入成功");
+        }else {
+            return R.fail("没有一条数据");
+        }
     }
 
     /**

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

@@ -26,7 +26,7 @@ public interface DepartmentMonthPlanMapper extends BaseMapper<DepartmentMonthPla
 
     String getDepartmentName(@Param("departmentType") Integer departmentType);
 
-    List<DepartmentMonthPlanVO> getPage(IPage page,@Param("dto") ControlContractInfoDTO dto);
+    List<DepartmentMonthPlanVO> getPage(IPage page,@Param("dto") ControlContractInfoDTO dto,@Param("userId") Long userId);
 
     List<BladeUser> getDepartmentUserDict(@Param("type") Integer departmentType);
 

+ 1 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/DepartmentMonthPlanMapper.xml

@@ -27,6 +27,7 @@
                     or pcb.plan_end_time BETWEEN dmp.plan_start_date AND dmp.plan_end_date)) as 'beginPlanTotal',
                 (select bu.name from blade_user bu WHERE bu.id = dmp.plan_designer) as 'planDesignerName'
         FROM c_department_month_plan dmp
+        where dmp.plan_designer = #{userId} and dmp.is_deleted = 0
         order by dmp.plan_start_date desc
     </select>
     <select id="getDepartmentUserDict" resultType="org.springblade.core.secure.BladeUser">

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

@@ -9,6 +9,7 @@ import org.springblade.control.dto.ControlProjectInfoDTO;
 import org.springblade.control.entity.*;
 import org.springblade.control.vo.*;
 import org.springblade.core.mp.support.Query;
+import org.springblade.system.entity.Dict;
 import org.springblade.system.user.entity.User;
 
 import java.math.BigDecimal;
@@ -87,4 +88,6 @@ public interface ProjectCostBudgetMapper extends BaseMapper<ProjectCostBudget> {
     List<PlanRelationReturned> getAllRelationInfo(@Param("projectId") Long projectId);
 
     List<ContractReturnedInfo> getAllReturnedInfo(@Param("projectId") Long id);
+
+    DictInfo getTaskType(@Param("id") Long planTaskType);
 }

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

@@ -165,7 +165,7 @@
         </if>
     </select>
     <select id="getAllChildrenPlan" resultType="org.springblade.control.vo.ProjectCostBudgetVO2">
-        SELECT pcb.plan_task_type,pcb.plan_task_desc,pcb.plan_target,pcb.plan_start_time,pcb.plan_end_time,pcb.plan_days,id,parent_id,
+        SELECT pcb.plan_task_type,pcb.plan_task_desc,pcb.plan_target,pcb.plan_start_time,pcb.plan_end_time,pcb.plan_days,id,parent_id,status,task_approve,
                (select cpp.name from c_project_process cpp where cpp.id = pcb.project_process) as projectProcessValue,
                (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 =
@@ -266,6 +266,10 @@
     <select id="getAllReturnedInfo" resultType="org.springblade.control.entity.ContractReturnedInfo">
         select * from c_contract_returned_info WHERE project_id = #{projectId} and is_deleted = 0
     </select>
+    <select id="getTaskType" resultType="org.springblade.control.entity.DictInfo">
+        select * from c_dict_info
+        where `type` = 2 and  id = #{id}
+    </select>
 
 
 </mapper>

+ 3 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserFilesInfoMapper.java

@@ -39,4 +39,7 @@ public interface UserFilesInfoMapper extends BaseMapper<UserFilesInfo> {
 	 */
 	List<UserFilesInfoVO> selectUserFilesInfoPage(IPage page, UserFilesInfoVO userFilesInfo);
 
+	// 获取详情
+	UserFilesInfoVO getUserFileDetail(String id);
+
 }

+ 34 - 2
blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserFilesInfoMapper.xml

@@ -30,8 +30,40 @@
     </resultMap>
 
 
-    <select id="selectUserFilesInfoPage" resultMap="userFilesInfoResultMap">
-        select * from c_user_files_info where is_deleted = 0
+    <!-- 通用查询映射结果 -->
+    <resultMap id="userFilesInfoResultVoMap" type="org.springblade.control.vo.UserFilesInfoVO">
+        <result column="id" property="id"/>
+        <result column="user_id" property="userId"/>
+        <result column="user_age" property="userAge"/>
+        <result column="car_name" property="carName"/>
+        <result column="nation" property="nation"/>
+        <result column="period_moth" property="periodMoth"/>
+        <result column="car_addr" property="carAddr"/>
+        <result column="car_aimg_url" property="carAimgUrl"/>
+        <result column="car_bimg_url" property="carBimgUrl"/>
+        <result column="marriage_status" property="marriageStatus"/>
+        <result column="renewal_count" property="renewalCount"/>
+        <result column="domicile_addr" property="domicileAddr"/>
+        <result column="education_type" property="educationType"/>
+        <result column="emergency_name" property="emergencyName"/>
+        <result column="emergency_phone" property="emergencyPhone"/>
+        <result column="emergency_relation" property="emergencyRelation"/>
+        <result column="speciality" property="speciality"/>
+        <result column="political" property="political"/>
+        <result column="bank_name" property="bankName"/>
+        <result column="user_status" property="userStatus"/>
+        <result column="bank_num" property="bankNum"/>
+        <result column="user_type" property="userType"/>
+        <result column="user_img_url" property="userImgUrl"/>
+        <!--试图 -->
+
+    </resultMap>
+
+    <select id="selectUserFilesInfoPage" resultMap="userFilesInfoResultVoMap">
+        select * from c_view_user_files_info where is_deleted = 0
     </select>
 
+    <select id="getUserFileDetail" resultMap="userFilesInfoResultVoMap">
+        select * from c_view_user_files_info where is_deleted = 0 and id=#{id}
+    </select>
 </mapper>

+ 5 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/IProjectCostBudgetService.java

@@ -42,7 +42,7 @@ public interface IProjectCostBudgetService extends BaseService<ProjectCostBudget
     //根据id修改状态
     void updateStatus(Long id, int status);
 
-    Integer getWorkDays(LocalDate startDate, LocalDate endDate);
+    Integer getWorkDays(LocalDate startDate, LocalDate endDate,Long planTaskType);
 
     ProjectCostBudgetVO3 planOverview();
 
@@ -77,4 +77,8 @@ public interface IProjectCostBudgetService extends BaseService<ProjectCostBudget
     List<DictInfo> getUnitType();
 
     ProjectCostBudget saveCountMoney(ProjectCostBudget budget);
+
+    ProjectCostBudgetVO2 updateMainPlan(ProjectCostBudgetVO2 vo2);
+
+    ProjectCostBudgetVO2 updateChildrenPlan(ProjectCostBudgetVO2 vo2);
 }

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

@@ -38,4 +38,5 @@ public interface IUserFilesInfoService extends BaseService<UserFilesInfo> {
 	 */
 	IPage<UserFilesInfoVO> selectUserFilesInfoPage(IPage<UserFilesInfoVO> page, UserFilesInfoVO userFilesInfo);
 
+	UserFilesInfoVO getUserFileDetail(String id);
 }

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

@@ -42,5 +42,4 @@ public interface IUserpayInfoService extends BaseService<UserpayInfo> {
 
     boolean delUserPayInoByDate(String date);
 
-    R importUserpayInfo(MultipartFile file, String dateInfo);
 }

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

@@ -20,7 +20,7 @@ public interface TaskProcessService extends BaseService<TaskProcessInfo> {
 
     IPage<TaskProcessInfoVO> taskPage(IPage<TaskProcessInfo> page, TaskProcessInfoDTO dto);
 
-    TaskProcessInfoDetailVO taskDetail(String id);
+    TaskProcessInfoDetailVO taskDetail(String id) throws Exception;
 
     boolean taskReject(TaskProcessInfoDTO dto);
 

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

@@ -165,7 +165,7 @@ public class AttendanceTripServiceImpl extends BaseServiceImpl<AttendanceTripMap
 
                 //新增审批任务
                 TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-                taskProcessService.buildTaskProcessInfoImpl(9, taskProcessInfo);
+                taskProcessService.buildTaskProcessInfoImpl(9, taskProcessInfo, null);
 
                 //新增信息
                 dto.setIsTemp(1); //提交

+ 16 - 4
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractInfoServiceImpl.java

@@ -4,13 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.AllArgsConstructor;
+import org.apache.commons.lang.StringUtils;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.control.dto.ControlContractInfoDTO;
 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.entity.*;
 import org.springblade.control.mapper.ContractInfoMapper;
 import org.springblade.control.mapper.ProjectInfoMapper;
 import org.springblade.control.service.IContractInfoService;
@@ -122,6 +120,20 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
     @Override
     @Transactional
     public void updateContractInfo(ControlContractInfoDTO dto) {
+        List<ContractReturnedInfo> list = dto.getList();
+        if (list != null && list.size() > 0){
+            for (ContractReturnedInfo info : list) {
+                if (StringUtils.isBlank(info.getReturnedCondition()) ){
+                    throw new ServiceException("请填写回款条件");
+                }else if(info.getShouldReturnedMoney() == null){
+                    throw new ServiceException("请填写应收回款金额");
+                }else if (info.getShouldReturnedTime() == null){
+                    throw new ServiceException("请选择应收款时间");
+                }else if (info.getReminderUser() == null){
+                    throw new ServiceException("请选择催款执行人");
+                }
+            }
+        }
         ControlContractInfo contractInfo = new ControlContractInfo();
         BeanUtils.copyProperties(dto,contractInfo);
         if (dto.getStartTime() != null && dto.getEndTime() != null){

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

@@ -19,6 +19,7 @@ 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.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.secure.utils.SecureUtil;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -50,7 +51,8 @@ public class DepartmentMonthPlanServiceImpl extends BaseServiceImpl<DepartmentMo
     @Override
     public List<DepartmentMonthPlanVO> getPage(ControlContractInfoDTO dto, Query query) {
         IPage page = new Page(query.getCurrent(), query.getSize());
-        return baseMapper.getPage(page,dto);
+        BladeUser user = AuthUtil.getUser();
+        return baseMapper.getPage(page,dto,user.getUserId());
     }
 
     /**

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

@@ -29,6 +29,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -188,7 +189,7 @@ public class EMFinancialReimbursementServiceImpl extends BaseServiceImpl<ExMFina
 
                 //新增审批任务
                 TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-                taskProcessService.buildTaskProcessInfoImpl(2, taskProcessInfo);
+                taskProcessService.buildTaskProcessInfoImpl(2, taskProcessInfo, dto.getFrMoney());
 
                 //新增信息
                 dto.setIsTemp(1); //提交

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

@@ -154,7 +154,7 @@ public class EMInvoiceServiceImpl extends BaseServiceImpl<ExMInvoiceMapper, EMIn
 
             //新增审批任务
             TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-            taskProcessService.buildTaskProcessInfoImpl(7, taskProcessInfo);
+            taskProcessService.buildTaskProcessInfoImpl(7, taskProcessInfo, null);
 
             //新增信息
             dto.setIsTemp(1); //提交

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

@@ -155,7 +155,7 @@ public class EMLoanServiceImpl extends BaseServiceImpl<ExMLoanMapper, EMLoanInfo
 
             //新增审批任务
             TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-            taskProcessService.buildTaskProcessInfoImpl(4, taskProcessInfo);
+            taskProcessService.buildTaskProcessInfoImpl(4, taskProcessInfo, dto.getLoanMoney());
 
             //新增信息
             dto.setIsTemp(1); //提交

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

@@ -148,7 +148,7 @@ public class EMOutsourcingPayServiceImpl extends BaseServiceImpl<ExMOutsourcingP
 
             //新增审批任务
             TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-            taskProcessService.buildTaskProcessInfoImpl(8, taskProcessInfo);
+            taskProcessService.buildTaskProcessInfoImpl(8, taskProcessInfo, dto.getPayMoney());
 
             //新增信息
             dto.setIsTemp(1); //提交

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

@@ -130,7 +130,7 @@ public class EMPayServiceImpl extends BaseServiceImpl<ExMPayMapper, EMPayInfo> i
 
             //新增审批任务
             TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-            taskProcessService.buildTaskProcessInfoImpl(3, taskProcessInfo);
+            taskProcessService.buildTaskProcessInfoImpl(3, taskProcessInfo, dto.getAfMoney());
 
             //新增信息
             dto.setIsTemp(1); //提交

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

@@ -157,7 +157,7 @@ public class EMPurchaseServiceImpl extends BaseServiceImpl<ExMPurchaseMapper, EM
 
                 //新增审批任务
                 TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-                taskProcessService.buildTaskProcessInfoImpl(5, taskProcessInfo);
+                taskProcessService.buildTaskProcessInfoImpl(5, taskProcessInfo, dto.getPurPrice());
 
                 //新增信息
                 dto.setIsTemp(1); //提交

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

@@ -169,7 +169,7 @@ public class EMUseCarServiceImpl extends BaseServiceImpl<ExMUseCarMapper, EMUseC
 
                 //新增审批任务
                 TaskProcessInfo taskProcessInfo = new TaskProcessInfo();
-                taskProcessService.buildTaskProcessInfoImpl(6, taskProcessInfo);
+                taskProcessService.buildTaskProcessInfoImpl(6, taskProcessInfo, null);
 
                 //新增信息
                 dto.setIsTemp(1); //提交

+ 238 - 27
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ProjectCostBudgetServiceImpl.java

@@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.time.temporal.ChronoUnit;
 import java.time.temporal.TemporalAdjusters;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -67,6 +68,15 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                 if (l.getProjectProcess() == null){
                     throw new ServiceException("请选择项目环节");
                 }
+                if (l.getBudgetDays() == null){
+                    throw new ServiceException("请填写预计工作量");
+                }
+                if (l.getPostType() == null){
+                    throw new ServiceException("请选择岗位类型");
+                }
+                if (l.getStaffCount() == null){
+                    throw new ServiceException("请填写投入人员数量");
+                }
                 if (l.getApprove() != null && (l.getApprove() == 1 || l.getApprove() == 2)){
                     return;
                 }
@@ -251,8 +261,17 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                     LocalDate endDate = LocalDate.MIN;
                     StringBuilder descStr = new StringBuilder();
                     StringBuilder targetStr = new StringBuilder();
+                    Boolean isFinished = true;
                     int j = 1;
                     for (ProjectCostBudgetVO2 budgetVO2 : vo2List) {
+                        if (budgetVO2.getTaskApprove() != 1){
+                            isFinished = false;
+                        }
+                        if (budgetVO2.getStatus() == 1){
+                            budgetVO2.setIsShowDelete(1);
+                        }else {
+                            budgetVO2.setIsShowDelete(0);
+                        }
                         //计算总天数
                         if (budgetVO2.getPlanDays() != null) {
                             workDays = workDays.add(budgetVO2.getPlanDays());
@@ -270,12 +289,11 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                         targetStr.append(j+"."+budgetVO2.getPlanTarget()+"。");
                         j++;
                     }
-                    //如果计划已经完成,则不计算超预算
-                    if (vo2.getTaskFinishedStatus() == null) {
-                        if ((workDays.multiply(new BigDecimal((postMap.get(vo2.getPostType()).get(0).getDictValue())))).compareTo(vo2.getBudgetStaffCost()) == 1) {
-                            vo2.setTaskFinishedStatus(1);
-                        }
+                    //所有子计划完成,设置父计划为绿色
+                    if (isFinished){
+                        vo2.setTaskFinishedStatus(2);
                     }
+
                     //根据子计划设置父计划任务类型
                     vo2.setPlanTaskType(vo2List.get(0).getPlanTaskType());
                     //根据子计划设置父计划任务类型值
@@ -289,20 +307,28 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                     vo2.setPlanEndTime(endDate);
                     //根据任务类型设置父计划的工作天数,固定任务1,临时任务2
                     if (taskMap.get(vo2.getPlanTaskType()).get(0).getDictValue().intValue() == 1){
-                        vo2.setPlanDays(new BigDecimal(endDate.compareTo(startDate)));
+                        vo2.setPlanDays(new BigDecimal(endDate.compareTo(startDate) + 1));
                     }else {
-                        if (endDate.compareTo(startDate) > 35){
-                            //工作天数,工具只能获取50天之内的
-                            int i = 0;
-                            while (endDate.compareTo(startDate) > 0){
-                                i += CommonUtil.getWorkDays(startDate, startDate.plusDays(35L));
-                                startDate = startDate.plusDays(36L);
-                            }
-                            vo2.setPlanDays(new BigDecimal(i));
+                        if (startDate.until(endDate,ChronoUnit.DAYS) > 35){
+                            throw new ServiceException("请不要制定超过一个月的临时计划");
+//                            //工作天数,工具只能获取50天之内的
+//                            int i = 0;
+//                            while (endDate.compareTo(startDate) > 0){
+//                                i += CommonUtil.getWorkDays(startDate, startDate.plusDays(35L));
+//                                startDate = startDate.plusDays(36L);
+//                            }
+//                            vo2.setPlanDays(new BigDecimal(i));
                         }else {
                             vo2.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(startDate, endDate)));
                         }
                     }
+                    //如果计划已经完成,则不计算超预算
+                    if (vo2.getTaskFinishedStatus() == null && vo2.getPlanDays() != null && vo2.getBudgetDays() != null){
+                        if (workDays.intValue() > vo2.getBudgetDays().intValue()) {
+                            vo2.setTaskFinishedStatus(1);
+                            vo2.setOutMoneyTips("成本增加!该项计划完成时间超过当初测算时间工作时长("+(workDays.intValue() - vo2.getBudgetDays().intValue())+"天)");
+                        }
+                    }
                     vo2.setChildrenList(listMap.get(vo2.getId()));
                 }else {
                     //如果计划的status为2,3,4,或者计划有子计划,则不能编辑
@@ -312,9 +338,10 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                         vo2.setIsShowEdit(0);
                     }
                     //没有子计划,则计算父计划成本是否超过测算,如果计划没有完成,有选择日期,有员工支出,则判断
-                    if (vo2.getTaskFinishedStatus() == null && vo2.getPlanDays() != null && vo2.getBudgetStaffCost() != null){
-                        if (vo2.getPlanDays().compareTo(vo2.getBudgetDays()) == 1) {
+                    if (vo2.getTaskFinishedStatus() == null && vo2.getPlanDays() != null && vo2.getBudgetDays() != null){
+                        if (vo2.getPlanDays().intValue() > vo2.getBudgetDays().intValue()) {
                             vo2.setTaskFinishedStatus(1);
+                            vo2.setOutMoneyTips("成本增加!该项计划完成时间超过当初测算时间工作时长("+(vo2.getPlanDays().intValue() - vo2.getBudgetDays().intValue())+"天)");
                         }
                     }
                 }
@@ -340,7 +367,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                         //计算是否超过预算
                         if ((vo2.getPlanDays().multiply(new BigDecimal(postMap.get(vo2.getPostType()).get(0).getDictValue()))).compareTo(vo2.getBudgetStaffCost()) == 1){
                             vo2.setTaskFinishedStatus(1);
-//                            vo2.setOutMoneyTips("成本增加!该项计划完成时间超过当初测算时间工作时长("+vo2.getPlanDays().+"天)");
+                            vo2.setOutMoneyTips("成本增加!该项计划完成时间超过当初测算时间工作时长("+(vo2.getPlanDays().intValue() - vo2.getBudgetDays().intValue())+"天)");
                         }
                     }else {
                         vo2.setIsShowChildren(1);
@@ -378,8 +405,6 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
     @Override
     @Transactional
     public void updatePlan(ProjectCostBudgetVO vo) {
-        //获取数据库中原来的计划
-
         //把3个单位合成一个
         List<ProjectCostBudgetVO2> list = new ArrayList<>();
         Map<Integer, List<ProjectCostBudgetVO2>> buildUnit = vo.getBuildUnit();
@@ -402,9 +427,6 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         for (ProjectCostBudgetVO2 vo2 : list) {
             List<ProjectCostBudgetVO2> vo2ChildrenList = vo2.getChildrenList();
             if (vo2ChildrenList != null && vo2ChildrenList.size() > 0){
-                //有子计划,则判断父计划是否也设置了计划日期
-                //查询出数据库里当前项目所以的父计划,还有子计划,然后按id分组,在这里进行获取
-                //然后判断是否存在计划时间,如果存在则提示已做父计划,不能再做子计划
                 for (ProjectCostBudget budget : vo2ChildrenList) {
                     budget.setProjectId(vo.getProjectId());
                     budget.setParentId(vo2.getId());
@@ -413,13 +435,11 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                     budget.setDeptId(vo2.getDeptId());
                     budget.setBudgetType(vo2.getBudgetType());
                     budget.setProjectProcess(vo2.getProjectProcess());
+                    budget.setTaskDetail(vo2.getTaskDetail());
                 }
                 childrenList.addAll(vo2ChildrenList);
-                //把数据库里的父计划,添加进父计划中,因为有子计划,返回的父计划是有回显值的
             }else {
                 //无子计划
-                //先判断数据中有无子计划,有子计划,父计划的几个值应该为空
-                //如果数据中无子计划,则保存返回的值
                 ProjectCostBudget budget = new ProjectCostBudget();
                 BeanUtils.copyProperties(vo2, budget);
                 parentList.add(budget);
@@ -490,8 +510,13 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
      * 根据起止日期获取工作日
      */
     @Override
-    public Integer getWorkDays(LocalDate startDate, LocalDate endDate) {
-        return CommonUtil.getWorkDays(startDate,endDate);
+    public Integer getWorkDays(LocalDate startDate, LocalDate endDate,Long planTaskType) {
+        DictInfo info = baseMapper.getTaskType(planTaskType);
+        if (info.getDictValue().intValue() == 1){
+            return new BigDecimal(startDate.until(endDate,ChronoUnit.DAYS)).intValue() + 1 ;
+        }else {
+            return CommonUtil.getWorkDays(startDate, endDate);
+        }
     }
 
     /**
@@ -913,6 +938,192 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
         return budget;
     }
 
+    /**
+     * 编辑主计划
+     */
+    @Override
+    public ProjectCostBudgetVO2 updateMainPlan(ProjectCostBudgetVO2 vo2) {
+        //先判断如果数据都没填写,则设置可以分解子计划
+        if (vo2.getPlanTaskType() == null && StringUtils.isBlank(vo2.getPlanTaskDesc()) && StringUtils.isBlank(vo2.getPlanTarget())
+                && vo2.getPlanStartTime() == null && vo2.getPlanEndTime() == null){
+            vo2.setPlanTaskTypeValue(null);
+            vo2.setPlanDays(null);
+            vo2.setIsShowChildren(1);
+            return vo2;
+        }
+        //如果填写了数据,则检查数据是否填写完成
+        if (vo2.getPlanTaskType() == null){
+            throw new ServiceException("请选择任务类型");
+        }else if (StringUtils.isBlank(vo2.getPlanTaskDesc())){
+            throw new ServiceException("请填写任务描述");
+        }else if (StringUtils.isBlank(vo2.getPlanTarget())){
+            throw new ServiceException("请填写完成指标");
+        }else if (vo2.getPlanStartTime() == null || vo2.getPlanEndTime() == null){
+            throw new ServiceException("请选择计划起止日期");
+        }
+        //如果数据都填写完成,则根据任务类型,设置工作日,并且设置子计划不可分解
+        DictInfo taskType = baseMapper.getTaskType(vo2.getPlanTaskType());
+        //回显任务类型名
+        vo2.setPlanTaskTypeValue(taskType.getDictName());
+        int type = taskType.getDictValue().intValue();
+        //根据任务类型设置父计划的工作天数,固定任务1,临时任务2
+        if (type == 1){
+            vo2.setPlanDays(new BigDecimal(vo2.getPlanStartTime().until(vo2.getPlanEndTime(),ChronoUnit.DAYS) + 1));
+        }else {
+            if (vo2.getPlanStartTime().until(vo2.getPlanEndTime(),ChronoUnit.DAYS) > 35){
+                throw new ServiceException("请不要制定超过一个月的临时计划");
+//                //工作天数,工具只能获取50天之内的
+//                LocalDate startDate = vo2.getPlanStartTime();
+//                LocalDate endDate = vo2.getPlanEndTime();
+//                int i = 0;
+//                while (endDate.compareTo(startDate) > 0){
+//                    i += CommonUtil.getWorkDays(startDate, startDate.plusDays(35L));
+//                    startDate = startDate.plusDays(36L);
+//                }
+//                vo2.setPlanDays(new BigDecimal(i));
+            }else {
+                vo2.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(vo2.getPlanStartTime(), vo2.getPlanEndTime())));
+            }
+        }
+        if (vo2.getPlanDays().intValue() > vo2.getBudgetDays().intValue()){
+            vo2.setOutMoneyTips("成本增加!该项计划完成时间超过当初测算时间工作时长("+(vo2.getPlanDays().intValue() - vo2.getBudgetDays().intValue())+")天");
+            vo2.setTaskFinishedStatus(1);
+        }else {
+            vo2.setTaskFinishedStatus(0);
+        }
+        vo2.setIsShowChildren(0);
+        return vo2;
+    }
+
+    /**
+     * 编辑子计划
+     */
+    @Override
+    public ProjectCostBudgetVO2 updateChildrenPlan(ProjectCostBudgetVO2 vo2) {
+        //如果子计划为空,则清空父计划,然后修改可以编辑父计划
+        List<ProjectCostBudgetVO2> list = vo2.getChildrenList();
+        if (list != null && list.size() > 0){
+            //获取子计划任务类型,用于判断子计划类型是否一致
+            ProjectCostBudgetVO2 budgetVO2 = list.get(0);
+            Long taskType;
+            if (budgetVO2.getPlanTaskType() == null){
+                throw new ServiceException("请选择任务类型");
+            }else {
+                taskType = budgetVO2.getPlanTaskType();
+            }
+            DictInfo task = baseMapper.getTaskType(taskType);
+            //拼接父计划信息
+            BigDecimal workDays = new BigDecimal(0);
+            LocalDate startDate = LocalDate.MAX;
+            LocalDate endDate = LocalDate.MIN;
+            StringBuilder descStr = new StringBuilder();
+            StringBuilder targetStr = new StringBuilder();
+            int j = 1;
+            Boolean isFinished = true;
+            for (ProjectCostBudgetVO2 l : list) {
+                //校验数据
+                if (l.getPlanTaskType() == null){
+                    throw new ServiceException("请选择任务类型");
+                }else if (StringUtils.isBlank(l.getPlanTaskDesc())){
+                    throw new ServiceException("请填写任务描述");
+                }else if (StringUtils.isBlank(l.getPlanTarget())){
+                    throw new ServiceException("请填写完成指标");
+                }else if (l.getPlanStartTime() == null || l.getPlanEndTime() == null){
+                    throw new ServiceException("请选择计划起止日期");
+                }
+                //校验类型
+                if (!taskType.equals(l.getPlanTaskType())){
+                    throw new ServiceException("子计划任务类型不一致");
+                }
+                if (budgetVO2.getTaskApprove() == null || budgetVO2.getTaskApprove() != 1){
+                    isFinished = false;
+                }
+                //计算总天数
+                if (l.getPlanDays() != null) {
+                    workDays = workDays.add(l.getPlanDays());
+                }else {
+                    if (task.getDictValue().intValue() == 1) {
+                        l.setPlanDays(new BigDecimal(l.getPlanStartTime().until(l.getPlanEndTime(),ChronoUnit.DAYS) + 1));
+                    } else {
+                        if (l.getPlanStartTime().until(l.getPlanEndTime(), ChronoUnit.DAYS) > 35) {
+                            throw new ServiceException("请不要制定超过一个月的临时计划");
+                        }else {
+                            l.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(budgetVO2.getPlanStartTime(), budgetVO2.getPlanEndTime())));
+                        }
+                    }
+                }
+                //计算最大日期和最小日期
+                if (l.getPlanStartTime().isBefore(startDate)){
+                    startDate = l.getPlanStartTime();
+                }
+                if (l.getPlanEndTime().isAfter(endDate)){
+                    endDate = l.getPlanEndTime();
+                }
+                //拼接子计划的任务描述
+                descStr.append(j + "."+l.getPlanTaskDesc()+"。");
+                //拼接子计划的完成指标
+                targetStr.append(j+"."+l.getPlanTarget()+"。");
+                j++;
+            }
+
+            //所有子计划完成,设置父计划为绿色
+            if (isFinished){
+                vo2.setTaskFinishedStatus(2);
+            }
+            //计算是否超过预算
+            if (vo2.getTaskFinishedStatus() == null || vo2.getTaskFinishedStatus() != 2) {
+                if (workDays.intValue() > vo2.getBudgetDays().intValue()) {
+                    vo2.setTaskFinishedStatus(1);
+                    vo2.setOutMoneyTips("成本增加!该项计划完成时间超过当初测算时间工作时长(" + (workDays.intValue() - vo2.getBudgetDays().intValue()) + "天)");
+                } else {
+                    vo2.setTaskFinishedStatus(null);
+                }
+            }
+
+            //根据子计划设置父计划任务类型
+            vo2.setPlanTaskType(taskType);
+            //根据子计划设置父计划任务类型值
+            vo2.setPlanTaskTypeValue(task.getDictName());
+            //根据子计划设置父计划任务描述
+            vo2.setPlanTaskDesc(descStr.toString());
+            //根据子计划设置父计划完成指标
+            vo2.setPlanTarget(targetStr.toString());
+            //根据子计划设置父计划起止日期
+            vo2.setPlanStartTime(startDate);
+            vo2.setPlanEndTime(endDate);
+            //根据任务类型设置父计划的工作天数,固定任务1,临时任务2
+            if (task.getDictValue().intValue() == 1){
+                vo2.setPlanDays(new BigDecimal(startDate.until(endDate,ChronoUnit.DAYS)+ 1));
+            }else {
+                if (startDate.until(endDate,ChronoUnit.DAYS) > 35){
+                    throw new ServiceException("请不要制定超过一个月的临时计划");
+//                    //工作天数,工具只能获取50天之内的
+//                    int i = 0;
+//                    while (endDate.compareTo(startDate) > 0){
+//                        i += CommonUtil.getWorkDays(startDate, startDate.plusDays(35L));
+//                        startDate = startDate.plusDays(36L);
+//                    }
+//                    vo2.setPlanDays(new BigDecimal(i));
+                }else {
+                    vo2.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(startDate, endDate)));
+                }
+            }
+            vo2.setIsShowEdit(0);
+
+        }else {
+            vo2.setPlanTaskTypeValue(null);
+             vo2.setPlanTaskType(null);
+             vo2.setPlanTaskDesc(null);
+             vo2.setPlanTarget(null);
+             vo2.setPlanStartTime(null);
+             vo2.setPlanEndTime(null);
+             vo2.setPlanDays(null);
+             vo2.setIsShowEdit(1);
+             return vo2;
+        }
+        return vo2;
+    }
+
     /**
      * 统计一行的几个总金额
      */

+ 84 - 13
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/TaskProcessServiceImpl.java

@@ -11,15 +11,19 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.time.DateUtils;
+import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.control.dto.*;
 import org.springblade.control.entity.*;
 import org.springblade.control.mapper.TaskProcessMapper;
 import org.springblade.control.service.TaskProcessService;
+import org.springblade.control.utils.ByteArrayToMultipartFileConverter;
+import org.springblade.control.utils.PDFConverter;
 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.Condition;
+import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.secure.utils.SecureUtil;
 import org.springblade.core.tool.api.R;
@@ -27,6 +31,7 @@ import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.resource.feign.IOSSClient;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
 import org.springblade.system.user.entity.User;
@@ -36,7 +41,9 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.time.Duration;
@@ -58,6 +65,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
     private final ProjectCostBudgetServiceImpl projectCostBudgetService;
     private final ProjectInfoServiceImpl projectInfoServiceImpl;
     private final ProjectCostBudgetStatsServiceImpl projectCostBudgetStatsService;
+    private final IOSSClient iossClient;
 
     @Override
     public IPage<TaskProcessInfoVO> taskPage(IPage<TaskProcessInfo> page, TaskProcessInfoDTO dto) {
@@ -91,7 +99,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
             endTime = DateUtil.format(DateUtils.addDays(DateUtil.parse(endTime, "yyyy-MM-dd"), 1), "yyyy-MM-dd");
             queryWrapper.lambda().between(TaskProcessInfo::getReportDate, dto.getStartTime(), endTime);
         }
-        IPage<TaskProcessInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, true, TaskProcessInfo::getReportDate));
+        IPage<TaskProcessInfo> pages = this.page(page, queryWrapper.lambda().orderBy(true, false, TaskProcessInfo::getReportDate));
 
         List<DictInfo> dictInfoList = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'report_type'", new BeanPropertyRowMapper<>(DictInfo.class));
 
@@ -143,7 +151,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
     }
 
     @Override
-    public TaskProcessInfoDetailVO taskDetail(String id) {
+    public TaskProcessInfoDetailVO taskDetail(String id) throws Exception {
         TaskProcessInfoDetailVO vo = new TaskProcessInfoDetailVO();
         TaskProcessInfo taskProcessInfo = baseMapper.selectById(id);
         if (taskProcessInfo != null) {
@@ -193,6 +201,38 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                                 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);
                                 if (voCW != null) {
+                                    //pdf转jpg
+                                    if (ObjectUtil.isNotEmpty(voCW.getFrAttachmentUrl()) && ObjectUtil.isEmpty(voCW.getFrAttachmentUrlJpg())) {
+                                        InputStream ossInputStream = CommonUtil.getOSSInputStream(voCW.getFrAttachmentUrl());
+                                        byte[] bytes = PDFConverter.convertToJPG(ossInputStream);
+                                        if (bytes != null) {
+                                            MultipartFile convert = ByteArrayToMultipartFileConverter.convert(bytes, SnowFlakeUtil.get() + ".jpg", "text/plain");
+                                            R<BladeFile> bladeFileR = iossClient.addFileInfo(convert);
+                                            if (ObjectUtil.isNotEmpty(bladeFileR) && ObjectUtil.isNotEmpty(bladeFileR.getData())) {
+                                                jdbcTemplate.execute("update c_expense_financial_reimbursement_info set fr_electronic_invoice_url_jpg = '" + bladeFileR.getData().getLink() + "' where id = " + voCW.getId());
+                                                voCW.setFrAttachmentUrl(bladeFileR.getData().getLink());
+                                                voCW.setFrAttachmentUrlJpg(bladeFileR.getData().getLink());
+                                            }
+                                        }
+                                    } else if (ObjectUtil.isNotEmpty(voCW.getFrAttachmentUrlJpg())) {
+                                        voCW.setFrAttachmentUrl(voCW.getFrAttachmentUrlJpg());
+                                    }
+                                    if (ObjectUtil.isNotEmpty(voCW.getFrElectronicInvoiceUrl()) && ObjectUtil.isEmpty(voCW.getFrElectronicInvoiceUrlJpg())) {
+                                        InputStream ossInputStream = CommonUtil.getOSSInputStream(voCW.getFrElectronicInvoiceUrl());
+                                        byte[] bytes = PDFConverter.convertToJPG(ossInputStream);
+                                        if (bytes != null) {
+                                            MultipartFile convert = ByteArrayToMultipartFileConverter.convert(bytes, SnowFlakeUtil.get() + ".jpg", "text/plain");
+                                            R<BladeFile> bladeFileR = iossClient.addFileInfo(convert);
+                                            if (ObjectUtil.isNotEmpty(bladeFileR) && ObjectUtil.isNotEmpty(bladeFileR.getData())) {
+                                                jdbcTemplate.execute("update c_expense_financial_reimbursement_info set fr_attachment_url_jpg = '" + bladeFileR.getData().getLink() + "' where id = " + voCW.getId());
+                                                voCW.setFrElectronicInvoiceUrl(bladeFileR.getData().getLink());
+                                                voCW.setFrElectronicInvoiceUrlJpg(bladeFileR.getData().getLink());
+                                            }
+                                        }
+                                    } else if (ObjectUtil.isNotEmpty(voCW.getFrElectronicInvoiceUrlJpg())) {
+                                        voCW.setFrElectronicInvoiceUrl(voCW.getFrElectronicInvoiceUrlJpg());
+                                    }
+
                                     if (ObjectUtil.isNotEmpty(voCW.getProjectId()) && ObjectUtil.isNotEmpty(voCW.getBudgetPlanIds())) { //如果预算ids不为空,那么证明有关联计划任务(单关联)
                                         TaskPlanInfoVO planTaskInfoList2 = this.getPlanTaskInfoList(voCW.getBudgetPlanIds(), controlProjectInfos);
                                         if (planTaskInfoList2 != null) {
@@ -1061,8 +1101,9 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
      *
      * @param type            任务类型
      * @param taskProcessInfo 任务实体
+     * @param money           金额
      */
-    public void buildTaskProcessInfoImpl(int type, TaskProcessInfo taskProcessInfo) {
+    public void buildTaskProcessInfoImpl(int type, TaskProcessInfo taskProcessInfo, BigDecimal money) {
         taskProcessInfo.setId(SnowFlakeUtil.getId());
         taskProcessInfo.setStatus(1); //待审批
         taskProcessInfo.setReportDate(new Date());
@@ -1088,7 +1129,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
         }
 
         //获取审批人、抄送人信息
-        Map<String, List<User>> approveUserMaps = this.getApproveUserMaps(type);
+        Map<String, List<User>> approveUserMaps = this.getApproveUserMaps(type, money);
 
         //审批人
         List<User> spUserList = approveUserMaps.getOrDefault("SP", null);
@@ -1160,7 +1201,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
      */
     public User getDepartmentHead(Long deptId) {
         if (ObjectUtil.isNotEmpty(deptId)) {
-            List<User> leaderUser = jdbcTemplate.query("select * from blade_user where dept_id like '%" + deptId + "%' and is_leader like '%" + deptId + "%'", new BeanPropertyRowMapper<>(User.class));
+            List<User> leaderUser = jdbcTemplate.query("select * from blade_user where tenant_id = " + SecureUtil.getUser().getTenantId() + " and dept_id like '%" + deptId + "%' and is_leader like '%" + deptId + "%'", new BeanPropertyRowMapper<>(User.class));
             if (leaderUser.size() == 1) {
                 return leaderUser.get(0);
             }
@@ -1171,18 +1212,19 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
     /**
      * 根据审批类型获取审批人id信息(不包括部门负责人,单独处理)
      *
-     * @param type 数据类型
+     * @param type  数据类型
+     * @param money 报销金额
      * @return
      */
-    public Map<String, List<User>> getApproveUserMaps(int type) {
+    public Map<String, List<User>> getApproveUserMaps(int type, BigDecimal money) {
         if (ObjectUtil.isEmpty(SecureUtil.getUser())) {
             throw new ServiceException("获取当前用户信息失败,请联系管理员");
         }
         //tenant_id = SecureUtil.getUser().getTenantId()(管控平台) dept_type = 3(最底层为岗位信息)
         List<Dept> deptListControl = jdbcTemplate.query("select * from blade_dept where tenant_id = " + SecureUtil.getUser().getTenantId() + " and dept_type = 3", new BeanPropertyRowMapper<>(Dept.class));
         Map<String, List<User>> resultMaps = new LinkedHashMap<>();
-        List<String> spPostIds = new LinkedList<>();
-        List<String> zcPostIds = new LinkedList<>();
+        Set<String> spPostIds = new LinkedHashSet<>();
+        Set<String> zcPostIds = new LinkedHashSet<>();
         List<DictInfo> query = new ArrayList<>();
         switch (type) {
             case 2://财务报销
@@ -1221,10 +1263,23 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                 List<TaskProcessRecordDictInfo> zcRoleInfos = dictInfoList.stream().filter(f -> f.getType().equals(2))
                         .sorted(Comparator.comparingInt(TaskProcessRecordDictInfo::getSort))
                         .collect(Collectors.toList());
+
+                String generalManagerUserId = ""; //总经理id
+
                 for (TaskProcessRecordDictInfo spRoleInfo : spRoleInfos) {
                     for (Dept dept : deptListControl) {
                         if (spRoleInfo.getRoleName().equals(dept.getDeptName())) {
                             spPostIds.add(dept.getId() + "");
+
+                            if (dept.getDeptName().equals("总经理")) {
+                                if (ObjectUtil.isEmpty(money)) {
+                                    money = new BigDecimal("0");
+                                }
+                                if (money.compareTo(new BigDecimal("1000")) < 0) {
+                                    //money小于1000,总经理不审批
+                                    generalManagerUserId = dept.getId() + "";
+                                }
+                            }
                         }
                     }
                 }
@@ -1235,13 +1290,25 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
                         }
                     }
                 }
+
+                //money不超过1000移除总经理岗位
+                if (ObjectUtil.isNotEmpty(generalManagerUserId)) {
+                    Iterator<String> iterator = spPostIds.iterator();
+                    while (iterator.hasNext()) {
+                        String next = iterator.next();
+                        if (next.equals(generalManagerUserId)) {
+                            iterator.remove();
+                        }
+                    }
+                }
+
             }
         }
 
         if (spPostIds.size() > 0) {
             List<User> spUserListAll = new LinkedList<>();
             for (String spPostId : spPostIds) {
-                List<User> spUserList = jdbcTemplate.query("select * from blade_user where tenant_id = " + SecureUtil.getUser().getTenantId() + " and dept_id =" + spPostId, new BeanPropertyRowMapper<>(User.class));
+                List<User> spUserList = jdbcTemplate.query("select * from blade_user where tenant_id = " + SecureUtil.getUser().getTenantId() + " and role_id like '%" + spPostId + "%' and post_id like '%" + spPostId + "%'", new BeanPropertyRowMapper<>(User.class));
                 spUserListAll.addAll(spUserList);
             }
             if (spUserListAll.size() > 0) {
@@ -1249,9 +1316,13 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
             }
         }
         if (zcPostIds.size() > 0) {
-            List<User> zcUserList = jdbcTemplate.query("select * from blade_user where tenant_id = " + SecureUtil.getUser().getTenantId() + " and dept_id in(" + StringUtils.join(zcPostIds, ",") + ")", new BeanPropertyRowMapper<>(User.class));
-            if (zcUserList.size() > 0) {
-                resultMaps.put("ZC", zcUserList);
+            List<User> zcUserListAll = new LinkedList<>();
+            for (String zcPostId : zcPostIds) {
+                List<User> zcUserList = jdbcTemplate.query("select * from blade_user where tenant_id = " + SecureUtil.getUser().getTenantId() + " and role_id like '%" + zcPostId + "%' and post_id like '%" + zcPostId + "%'", new BeanPropertyRowMapper<>(User.class));
+                zcUserListAll.addAll(zcUserList);
+            }
+            if (zcUserListAll.size() > 0) {
+                resultMaps.put("ZC", zcUserListAll);
             }
         }
         return resultMaps;

+ 5 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/UserFilesInfoServiceImpl.java

@@ -38,4 +38,9 @@ public class UserFilesInfoServiceImpl extends BaseServiceImpl<UserFilesInfoMappe
 		return page.setRecords(baseMapper.selectUserFilesInfoPage(page, userFilesInfo));
 	}
 
+	@Override
+	public UserFilesInfoVO getUserFileDetail(String id) {
+		return baseMapper.getUserFileDetail(id);
+	}
+
 }

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

@@ -18,12 +18,14 @@ package org.springblade.control.service.impl;
 
 import org.springblade.control.entity.UserpayInfo;
 import org.springblade.control.excel.UserpayExcel;
+import org.springblade.control.vo.EMPurchaseInfoVO;
 import org.springblade.control.vo.UserpayInfoVO;
 import org.springblade.control.mapper.UserpayInfoMapper;
 import org.springblade.control.service.IUserpayInfoService;
 import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springframework.web.multipart.MultipartFile;
@@ -49,14 +51,4 @@ public class UserpayInfoServiceImpl extends BaseServiceImpl<UserpayInfoMapper, U
         return baseMapper.delUserPayInoByDate(date);
     }
 
-    @Override
-    public R importUserpayInfo(MultipartFile file, String dateInfo) {
-        List<UserpayExcel> list = ExcelUtil.read(file, UserpayExcel.class);
-        if(list!=null && list.size()>=1){
-            //list.stream().
-        }
-
-        return null;
-    }
-
 }

+ 12 - 0
blade-service/blade-control/src/main/java/org/springblade/control/utils/ByteArrayToMultipartFileConverter.java

@@ -0,0 +1,12 @@
+package org.springblade.control.utils;
+
+import org.springframework.mock.web.MockMultipartFile;
+import org.springframework.web.multipart.MultipartFile;
+
+public class ByteArrayToMultipartFileConverter {
+
+    public static MultipartFile convert(byte[] bytes, String filename, String contentType) {
+        return new MockMultipartFile(filename, filename, contentType, bytes);
+    }
+    
+}

+ 48 - 0
blade-service/blade-control/src/main/java/org/springblade/control/utils/PDFConverter.java

@@ -0,0 +1,48 @@
+package org.springblade.control.utils;
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import javax.imageio.ImageIO;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.rendering.PDFRenderer;
+
+public class PDFConverter {
+
+    private static Log log = LogFactory.getLog(PDFConverter.class);
+
+    /**
+     * @param pdfInputStream
+     * @return
+     */
+    public static byte[] convertToJPG(InputStream pdfInputStream) {
+        try (PDDocument document = PDDocument.load(pdfInputStream)) {
+            PDFRenderer renderer = new PDFRenderer(document);
+            int numPages = document.getNumberOfPages();
+
+            ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+
+            for (int i = 0; i < numPages; i++) {
+                // 渲染页面为BufferedImage
+                BufferedImage image = renderer.renderImageWithDPI(i, 300); // 设置dpi参数
+
+                // 将BufferedImage输出为JPG格式到ByteArrayOutputStream
+                ImageIO.write(image, "jpg", byteStream);
+            }
+
+            log.info("PDF转换为JPG图像成功!");
+
+            return byteStream.toByteArray();
+
+        } catch (IOException e) {
+            log.error("转换过程中发生IO错误:" + e.getMessage());
+            return null;
+        }
+    }
+
+}

+ 69 - 0
blade-service/blade-control/src/main/java/org/springblade/control/wrapper/UserFilesWrapper.java

@@ -0,0 +1,69 @@
+/*
+ *      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.wrapper;
+
+import com.alibaba.fastjson.JSON;
+import org.springblade.control.vo.UserFilesInfoVO;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.system.cache.DictCache;
+import org.springblade.system.cache.SysCache;
+import org.springblade.system.entity.Dict;
+import org.springblade.system.entity.Tenant;
+import org.springblade.system.enums.DictEnum;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.vo.DeptUserVO;
+import org.springblade.system.user.vo.UserVO;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class UserFilesWrapper extends BaseEntityWrapper<UserFilesInfoVO, UserFilesInfoVO> {
+
+    public static UserFilesWrapper build() {
+        return new UserFilesWrapper();
+    }
+
+    @Override
+    public UserFilesInfoVO entityVO(UserFilesInfoVO userFilesInfo) {
+
+
+        List<String> deptName = SysCache.getDeptNames(userFilesInfo.getDeptId()+"");
+        List<String> postName = SysCache.getPostNames(userFilesInfo.getPostId()+"");
+
+        userFilesInfo.setDeptName(Func.join(deptName));
+        userFilesInfo.setPostName(Func.join(postName));
+        userFilesInfo.setSexName(DictCache.getValue(DictEnum.SEX, userFilesInfo.getSex()));
+        userFilesInfo.setMarriageStatusName(DictCache.getValue("marriage_status", userFilesInfo.getMarriageStatus()));;
+        userFilesInfo.setEducationName(DictCache.getValue("education_type", userFilesInfo.getEducationType()));;
+        userFilesInfo.setUserTypeName(DictCache.getValue("user_type", userFilesInfo.getUserType()));
+        userFilesInfo.setConTypeName(DictCache.getValue("con_type", userFilesInfo.getConType()));
+        userFilesInfo.setUserStatusName(DictCache.getValue("user_status", userFilesInfo.getUserStatus()));
+        List<Dict> userStatus = DictCache.getList("user_status");
+        System.out.println(userStatus);
+        userFilesInfo.setPoliticalName(DictCache.getValue("political_type", userFilesInfo.getPolitical()));
+        return userFilesInfo;
+    }
+
+}

+ 145 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TabBusstimeInfoController.java

@@ -0,0 +1,145 @@
+/*
+ *      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.manager.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.springblade.core.tool.utils.StringUtil;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.entity.TabBusstimeInfo;
+import org.springblade.manager.vo.TabBusstimeInfoVO;
+import org.springblade.manager.service.ITabBusstimeInfoService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 元素业务时间表 控制器
+ *
+ * @author BladeX
+ * @since 2023-07-11
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/tabbusstimeinfo")
+@Api(value = "元素业务时间表", tags = "元素业务时间表接口")
+public class TabBusstimeInfoController extends BladeController {
+
+	private final ITabBusstimeInfoService tabBusstimeInfoService;
+
+/*	*//**
+	 * 详情
+	 *//*
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入tabBusstimeInfo")
+	public R<TabBusstimeInfo> detail(TabBusstimeInfo tabBusstimeInfo) {
+		TabBusstimeInfo detail = tabBusstimeInfoService.getOne(Condition.getQueryWrapper(tabBusstimeInfo));
+		return R.data(detail);
+	}
+
+	*//**
+	 * 分页 元素业务时间表
+	 *//*
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入tabBusstimeInfo")
+	public R<IPage<TabBusstimeInfo>> list(TabBusstimeInfo tabBusstimeInfo, Query query) {
+		IPage<TabBusstimeInfo> pages = tabBusstimeInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(tabBusstimeInfo));
+		return R.data(pages);
+	}
+
+	*//**
+	 * 自定义分页 元素业务时间表
+	 *//*
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入tabBusstimeInfo")
+	public R<IPage<TabBusstimeInfoVO>> page(TabBusstimeInfoVO tabBusstimeInfo, Query query) {
+		IPage<TabBusstimeInfoVO> pages = tabBusstimeInfoService.selectTabBusstimeInfoPage(Condition.getPage(query), tabBusstimeInfo);
+		return R.data(pages);
+	}
+
+	*//**
+	 * 新增 元素业务时间表
+	 *//*
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入tabBusstimeInfo")
+	public R save(@Valid @RequestBody TabBusstimeInfo tabBusstimeInfo) {
+		return R.status(tabBusstimeInfoService.save(tabBusstimeInfo));
+	}
+
+	*//**
+	 * 修改 元素业务时间表
+	 *//*
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入tabBusstimeInfo")
+	public R update(@Valid @RequestBody TabBusstimeInfo tabBusstimeInfo) {
+		return R.status(tabBusstimeInfoService.updateById(tabBusstimeInfo));
+	}
+
+	*//**
+	 * 新增或修改 元素业务时间表
+	 *//*
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入tabBusstimeInfo")
+	public R submit(@Valid @RequestBody TabBusstimeInfo tabBusstimeInfo) {
+		return R.status(tabBusstimeInfoService.saveOrUpdate(tabBusstimeInfo));
+	}
+
+	
+	*/
+
+
+	/**
+	 * 新增 元素业务时间表
+ 	*/
+	@PostMapping("/save-tabusstime-info")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "新增元素业务时间表", notes = "传入tabBusstimeInfo")
+	@Transactional
+	public R saveTabBusstimeInfo(@Valid @RequestBody TabBusstimeInfo tabBusstimeInfo) {
+		String [] keys = tabBusstimeInfo.getColKey().split(":");
+		tabBusstimeInfo.setColKey(keys[1]);
+		tabBusstimeInfo.setTabEnName(keys[0]);
+		tabBusstimeInfoService.delTabBussTimeByColId(tabBusstimeInfo.getColId()+"");
+		return R.status(tabBusstimeInfoService.save(tabBusstimeInfo));
+	}
+
+	/**
+	 * 删除 元素业务时间表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(tabBusstimeInfoService.delTabBussTimeByColId(ids));
+	}
+}

+ 6 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/WbsTreeContractClientImpl.java

@@ -419,4 +419,10 @@ public class WbsTreeContractClientImpl implements WbsTreeContractClient {
         return null; // 如果没有满足条件的节点,返回null
     }
 
+    @Override
+    public List<AppWbsTreeContractVO> searchNodeAllTable(String primaryKeyId, String type, String contractId, String projectId) {
+        List<AppWbsTreeContractVO> list = wbsTreeContractService.searchNodeAllTable(primaryKeyId, type, contractId, projectId);
+        return list;
+    }
+
 }

+ 43 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TabBusstimeInfoMapper.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.manager.mapper;
+
+import org.springblade.manager.entity.TabBusstimeInfo;
+import org.springblade.manager.vo.TabBusstimeInfoVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 元素业务时间表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-07-11
+ */
+public interface TabBusstimeInfoMapper extends BaseMapper<TabBusstimeInfo> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tabBusstimeInfo
+	 * @return
+	 */
+	List<TabBusstimeInfoVO> selectTabBusstimeInfoPage(IPage page, TabBusstimeInfoVO tabBusstimeInfo);
+
+	boolean delTabBussTimeByColId(String colId);
+}

+ 29 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TabBusstimeInfoMapper.xml

@@ -0,0 +1,29 @@
+<?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.manager.mapper.TabBusstimeInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="tabBusstimeInfoResultMap" type="org.springblade.manager.entity.TabBusstimeInfo">
+        <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="table_id" property="tableId"/>
+        <result column="col_id" property="colId"/>
+        <result column="tab_en_name" property="tabEnName"/>
+        <result column="col_key" property="colKey"/>
+    </resultMap>
+
+
+    <select id="selectTabBusstimeInfoPage" resultMap="tabBusstimeInfoResultMap">
+        select * from m_tab_busstime_info where is_deleted = 0
+    </select>
+
+    <delete id="delTabBussTimeByColId">
+        delete from m_tab_busstime_info where col_id = #{colId}
+    </delete>
+</mapper>

+ 3 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeMapper.xml

@@ -93,6 +93,7 @@
         <result column="initTableName" property="initTableName"/>
         <result column="nodeId" property="nodeId"/>
         <result column="globalFormula" property="globalFormula"/>
+        <result column="isBussTime" property="isBussTime"/>
     </resultMap>
 
     <insert id="addFormElement" parameterType="org.springblade.manager.dto.WbsFormElementDTO">
@@ -446,7 +447,8 @@
              , e_Inspection_method
              , CONCAT(a.tab_en_name, ':', e_key) as
                                                     tableElementKey
-             , a.tab_en_name                     as initTableName
+             , a.tab_en_name                     as initTableName,
+            if((SELECT count(d.tab_en_name) from  m_tab_busstime_info d where  b.id = d.col_id)>=1,2,0)  isBussTime
         from (select * from m_table_info where id = #{id}) a
                  INNER JOIN
              m_wbs_form_element b on a.id = b.f_id

+ 42 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/ITabBusstimeInfoService.java

@@ -0,0 +1,42 @@
+/*
+ *      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.manager.service;
+
+import org.springblade.manager.entity.TabBusstimeInfo;
+import org.springblade.manager.vo.TabBusstimeInfoVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 元素业务时间表 服务类
+ *
+ * @author BladeX
+ * @since 2023-07-11
+ */
+public interface ITabBusstimeInfoService extends BaseService<TabBusstimeInfo> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tabBusstimeInfo
+	 * @return
+	 */
+	IPage<TabBusstimeInfoVO> selectTabBusstimeInfoPage(IPage<TabBusstimeInfoVO> page, TabBusstimeInfoVO tabBusstimeInfo);
+
+	boolean delTabBussTimeByColId(String colId);
+}

+ 46 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TabBusstimeInfoServiceImpl.java

@@ -0,0 +1,46 @@
+/*
+ *      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.manager.service.impl;
+
+import org.springblade.manager.entity.TabBusstimeInfo;
+import org.springblade.manager.vo.TabBusstimeInfoVO;
+import org.springblade.manager.mapper.TabBusstimeInfoMapper;
+import org.springblade.manager.service.ITabBusstimeInfoService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 元素业务时间表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-07-11
+ */
+@Service
+public class TabBusstimeInfoServiceImpl extends BaseServiceImpl<TabBusstimeInfoMapper, TabBusstimeInfo> implements ITabBusstimeInfoService {
+
+	@Override
+	public IPage<TabBusstimeInfoVO> selectTabBusstimeInfoPage(IPage<TabBusstimeInfoVO> page, TabBusstimeInfoVO tabBusstimeInfo) {
+		return page.setRecords(baseMapper.selectTabBusstimeInfoPage(page, tabBusstimeInfo));
+	}
+
+	@Override
+	public boolean delTabBussTimeByColId(String colId) {
+		return baseMapper.delTabBussTimeByColId(colId);
+	}
+
+}

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

@@ -393,10 +393,8 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
             }
             tableOwnerList = Func.toStrList(tableOwners);
         }
-
         return baseMapper.selectWbsTreeContractList(tableOwnerNumbers, wbsTreeContract.getProjectId(), wbsTreeContract.getWbsId(),
                 wbsTreeContract.getContractId(), wbsTreeContract.getId(), wbsTreeContract.getContractIdRelation(), tableOwnerList);
-
     }
 
     @Override

+ 2 - 2
blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java

@@ -139,7 +139,7 @@ public class DictController extends BladeController {
     @ApiOperationSupport(order = 6)
     @ApiOperation(value = "新增或修改", notes = "传入dict")
     public R submit(@Valid @RequestBody Dict dict) {
-        CacheUtil.clear(DICT_CACHE, Boolean.FALSE);
+        CacheUtil.clear(DICT_CACHE);
         return R.status(dictService.submit(dict));
     }
 
@@ -151,7 +151,7 @@ public class DictController extends BladeController {
     @ApiOperationSupport(order = 7)
     @ApiOperation(value = "删除", notes = "传入ids")
     public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-        CacheUtil.clear(DICT_CACHE, Boolean.FALSE);
+        CacheUtil.clear(DICT_CACHE);
         return R.status(dictService.removeDict(ids));
     }