Kaynağa Gözat

20230419 17:01

wangzhuo 2 yıl önce
ebeveyn
işleme
16fe74c493

+ 14 - 0
ruoyi-anpin/src/main/java/com/ruoyi/anpin/domain/TContractManagement.java

@@ -107,6 +107,12 @@ public class TContractManagement extends BaseEntity
     private String storageLocation;
 
     /**
+     * 到期提醒天数
+     */
+    @Excel(name = "到期提醒(天数)")
+    private Integer expirationReminderDays;
+
+    /**
      * 建立日期检索区间
      */
     private List<String> creationDateList;
@@ -116,6 +122,14 @@ public class TContractManagement extends BaseEntity
      */
     private List<String> archiveTimeList;
 
+    public Integer getExpirationReminderDays() {
+        return expirationReminderDays;
+    }
+
+    public void setExpirationReminderDays(Integer expirationReminderDays) {
+        this.expirationReminderDays = expirationReminderDays;
+    }
+
     public String getFileTypeName() {
         return fileTypeName;
     }

+ 39 - 0
ruoyi-anpin/src/main/java/com/ruoyi/anpin/domain/TCostManagement.java

@@ -111,6 +111,45 @@ public class TCostManagement extends BaseEntity
     @Excel(name = "状态名称")
     private String fStatusName;
 
+    /**
+     * 提交人
+     */
+    private String presenterName;
+
+    /**
+     * 一级审核人
+     */
+    private String firstLevelReviewerName;
+
+    /**
+     * 二级审核人
+     */
+    private String secondaryReviewerName;
+
+    public String getPresenterName() {
+        return presenterName;
+    }
+
+    public void setPresenterName(String presenterName) {
+        this.presenterName = presenterName;
+    }
+
+    public String getFirstLevelReviewerName() {
+        return firstLevelReviewerName;
+    }
+
+    public void setFirstLevelReviewerName(String firstLevelReviewerName) {
+        this.firstLevelReviewerName = firstLevelReviewerName;
+    }
+
+    public String getSecondaryReviewerName() {
+        return secondaryReviewerName;
+    }
+
+    public void setSecondaryReviewerName(String secondaryReviewerName) {
+        this.secondaryReviewerName = secondaryReviewerName;
+    }
+
     public Long getApplicantId() {
         return applicantId;
     }

+ 21 - 1
ruoyi-anpin/src/main/java/com/ruoyi/anpin/service/impl/TCostManagementServiceImpl.java

@@ -11,6 +11,7 @@ import com.ruoyi.anpin.mapper.TCostManagementItemMapper;
 import com.ruoyi.anpin.mapper.TCostManagementMapper;
 import com.ruoyi.anpin.service.ITCostManagementService;
 import com.ruoyi.approvalFlow.domain.AuditItems;
+import com.ruoyi.approvalFlow.mapper.AuditItemsMapper;
 import com.ruoyi.approvalFlow.service.impl.AuditItemsServiceImpl;
 import com.ruoyi.basicData.mapper.TCorpsMapper;
 import com.ruoyi.basicData.mapper.TFeesMapper;
@@ -69,6 +70,9 @@ public class TCostManagementServiceImpl implements ITCostManagementService
     @Autowired
     private SysUserMapper userMapper;
 
+    @Autowired
+    private AuditItemsMapper auditItemsMapper;
+
 
     /**
      * 查询费用管理
@@ -83,6 +87,22 @@ public class TCostManagementServiceImpl implements ITCostManagementService
         //查询费用管理主表数据
         TCostManagement tCostManagement = tCostManagementMapper.selectTCostManagementById(fId);
 
+        //获得审批流程审核人
+        AuditItems item = new AuditItems();
+        item.setBillId(tCostManagement.getfId());
+        item.setActId(560L);
+        List<AuditItems> auditItemsList = auditItemsMapper.selectAuditItemsUser(item);
+        if (StringUtils.isNotNull(auditItemsList)){
+            //提交人
+            tCostManagement.setPresenterName(userMapper.selectUserById(auditItemsList.get(0).getAuditUserId()).getNickName());
+            if (auditItemsList.size() >= 2){//一级审核人
+                tCostManagement.setFirstLevelReviewerName(userMapper.selectUserById(auditItemsList.get(1).getAuditUserId()).getNickName());
+            }
+            if (auditItemsList.size() >= 3){//二级审核人
+                tCostManagement.setSecondaryReviewerName(userMapper.selectUserById(auditItemsList.get(2).getAuditUserId()).getNickName());
+            }
+        }
+
         //查询明细信息
         TCostManagementItem tCostManagementItem = new TCostManagementItem();
         tCostManagementItem.setfPid(tCostManagement.getfId());
@@ -372,7 +392,7 @@ public class TCostManagementServiceImpl implements ITCostManagementService
             auditItems.setIffinalItem("F");
             auditItems.setBillNo(detailed.getfNo());
             // 存储业务类型(业务类型)
-            auditItems.setRefno1(sysDeptMapper.selectDeptById(detailed.getDeptId()).getDeptName());
+            auditItems.setRefno1(String.valueOf(itemList.get(0).getBelongsProjectId()));
             auditItems.setRefno2(billType);
             auditItems.setRefno3(detailed.getfNo());
             auditItems.setSendUserId(loginUser.getUser().getUserId());

+ 6 - 2
ruoyi-anpin/src/main/resources/mapper/anpin/TContractManagementMapper.xml

@@ -30,12 +30,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="custodianName"    column="custodian_name"    />
         <result property="storageLocation"    column="storage_location"    />
         <result property="issuingUnitName"     column="issuing_unit_name"/>
+        <result property="expirationReminderDays"     column="expiration_reminder_days"/>
     </resultMap>
 
     <sql id="selectTContractManagementVo">
         select f_id, f_no, contract_no, create_by, create_time, update_by, update_time, remark, del_flag, f_status, content, copies, creation_date, file_type,
                submission_method, submitting_department_id, submitting_department_name, issuing_unit_id, issuing_unit_name, archive_time, validity_month, storage_period_time,
-               custodian_id, custodian_name, storage_location
+               custodian_id, custodian_name, storage_location, expiration_reminder_days
         from t_contract_management
     </sql>
 
@@ -107,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="custodianName != null">custodian_name,</if>
             <if test="storageLocation != null">storage_location,</if>
             <if test="issuingUnitName != null">issuing_unit_name,</if>
+            <if test="expirationReminderDays != null">expiration_reminder_days,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fNo != null">#{fNo},</if>
@@ -133,6 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="custodianName != null">#{custodianName},</if>
             <if test="storageLocation != null">#{storageLocation},</if>
             <if test="issuingUnitName != null">#{issuingUnitName},</if>
+            <if test="expirationReminderDays != null">#{expirationReminderDays},</if>
          </trim>
     </insert>
 
@@ -163,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="custodianName != null">custodian_name = #{custodianName},</if>
             <if test="storageLocation != null">storage_location = #{storageLocation},</if>
             <if test="issuingUnitName != null">issuing_unit_name = #{issuingUnitName},</if>
+            <if test="expirationReminderDays != null">expiration_reminder_days = #{expirationReminderDays},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -186,7 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             TCM.f_id, TCM.f_no, TCM.contract_no, TCM.create_by, TCM.create_time, TCM.update_by, TCM.update_time, TCM.remark, TCM.del_flag, TCM.f_status,
             TCM.content, TCM.copies, TCM.creation_date, TCM.file_type,TCM.submission_method, TCM.submitting_department_id, TCM.submitting_department_name,
             TCM.issuing_unit_id, TCM.issuing_unit_name, TCM.archive_time,TCM.validity_month, TCM.storage_period_time,TCM.custodian_id, TCM.custodian_name,
-            TCM.storage_location, pro.dict_label AS fileTypeName, sd.dict_label AS submissionMethodName
+            TCM.storage_location, pro.dict_label AS fileTypeName, sd.dict_label AS submissionMethodName, TCM.expiration_reminder_days
         FROM
             t_contract_management TCM
         LEFT JOIN sys_dict_data pro ON pro.dict_value = TCM.file_type

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/approvalFlow/mapper/AuditItemsMapper.java

@@ -118,4 +118,9 @@ public interface AuditItemsMapper {
      * @return 结果
      */
     List<Map<String, Object>> selectOrderAuditItems(AuditItems auditItems);
+
+    /**
+     * 获得审批流程的审核人
+     */
+    public List<AuditItems> selectAuditItemsUser(AuditItems auditItems);
 }

+ 26 - 1
ruoyi-warehouse/src/main/resources/mapper/approvalFlow/AuditItemsMapper.xml

@@ -418,5 +418,30 @@
         ORDER BY
         CONVERT(item.audit_status USING GBK) DESC,item.send_time DESC
     </select>
-
+    <select id="selectAuditItemsUser" parameterType="AuditItems" resultMap="AuditItemsResult">
+        <include refid="selectAuditItemsVo"/>
+        <where>
+            <if test="billNo != null  and billNo != ''">and bill_no = #{billNo}</if>
+            <if test="billId != null ">and bill_id = #{billId}</if>
+            <if test="actId != null ">and act_id = #{actId}</if>
+            <if test="pathId != null ">and path_id = #{pathId}</if>
+            <if test="levelId != null ">and level_id = #{levelId}</if>
+            <if test="refno1 != null  and refno1 != ''">and refno1 = #{refno1}</if>
+            <if test="iffinalItem != null  and iffinalItem != ''">and iffinal_item = #{iffinalItem}</if>
+            <if test="refno2 != null  and refno2 != ''">and refno2 = #{refno2}</if>
+            <if test="refno3 != null  and refno3 != ''">and refno3 = #{refno3}</if>
+            <if test="branchId != null ">and branch_id = #{branchId}</if>
+            <if test="sendUserId != null ">and send_user_id = #{sendUserId}</if>
+            <if test="sendName != null  and sendName != ''">and send_name like concat('%', #{sendName}, '%')</if>
+            <if test="sendTime != null ">and send_time = #{sendTime}</if>
+            <if test="sendMsg != null  and sendMsg != ''">and send_msg = #{sendMsg}</if>
+            <if test="auditUserId != null ">and audit_user_id = #{auditUserId}</if>
+            <if test="auditItem != null ">and audit_item = #{auditItem}</if>
+            <if test="auditOpTime != null ">and audit_op_time = #{auditOpTime}</if>
+            <if test="auditMsg != null  and auditMsg != ''">and audit_msg = #{auditMsg}</if>
+            <if test="auditStatus != null  and auditStatus != ''">and audit_status = #{auditStatus}</if>
+            <if test="billTime != null ">and bill_time = #{billTime},</if>
+        </where>
+        ORDER BY level_id ASC
+    </select>
 </mapper>

BIN
ruoyi-warehouse/target/classes/com/ruoyi/approvalFlow/mapper/AuditItemsMapper.class


BIN
ruoyi-warehouse/target/classes/com/ruoyi/approvalFlow/service/impl/AuditPathsServiceImpl.class


BIN
ruoyi-warehouse/target/classes/com/ruoyi/warehouseBusiness/mapper/TWarehouseBillsMapper.class


BIN
ruoyi-warehouse/target/classes/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.class


+ 26 - 1
ruoyi-warehouse/target/classes/mapper/approvalFlow/AuditItemsMapper.xml

@@ -418,5 +418,30 @@
         ORDER BY
         CONVERT(item.audit_status USING GBK) DESC,item.send_time DESC
     </select>
-
+    <select id="selectAuditItemsUser" parameterType="AuditItems" resultMap="AuditItemsResult">
+        <include refid="selectAuditItemsVo"/>
+        <where>
+            <if test="billNo != null  and billNo != ''">and bill_no = #{billNo}</if>
+            <if test="billId != null ">and bill_id = #{billId}</if>
+            <if test="actId != null ">and act_id = #{actId}</if>
+            <if test="pathId != null ">and path_id = #{pathId}</if>
+            <if test="levelId != null ">and level_id = #{levelId}</if>
+            <if test="refno1 != null  and refno1 != ''">and refno1 = #{refno1}</if>
+            <if test="iffinalItem != null  and iffinalItem != ''">and iffinal_item = #{iffinalItem}</if>
+            <if test="refno2 != null  and refno2 != ''">and refno2 = #{refno2}</if>
+            <if test="refno3 != null  and refno3 != ''">and refno3 = #{refno3}</if>
+            <if test="branchId != null ">and branch_id = #{branchId}</if>
+            <if test="sendUserId != null ">and send_user_id = #{sendUserId}</if>
+            <if test="sendName != null  and sendName != ''">and send_name like concat('%', #{sendName}, '%')</if>
+            <if test="sendTime != null ">and send_time = #{sendTime}</if>
+            <if test="sendMsg != null  and sendMsg != ''">and send_msg = #{sendMsg}</if>
+            <if test="auditUserId != null ">and audit_user_id = #{auditUserId}</if>
+            <if test="auditItem != null ">and audit_item = #{auditItem}</if>
+            <if test="auditOpTime != null ">and audit_op_time = #{auditOpTime}</if>
+            <if test="auditMsg != null  and auditMsg != ''">and audit_msg = #{auditMsg}</if>
+            <if test="auditStatus != null  and auditStatus != ''">and audit_status = #{auditStatus}</if>
+            <if test="billTime != null ">and bill_time = #{billTime},</if>
+        </where>
+        ORDER BY level_id ASC
+    </select>
 </mapper>

+ 1 - 1
ruoyi-warehouse/target/classes/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -2643,7 +2643,7 @@
 
     <update id="updateCostMessage">
         update t_cost_management
-        set f_status = #{fBillstatus}
+        set f_status = #{status},f_billstatus = #{fBillstatus},f_review_date = #{fAuditTime}
         where f_id = #{fId}
     </update>