Forráskód Böngészése

发票申请 添加 签约合同附件上传

huangguoce 3 hete
szülő
commit
40f072e89e

+ 12 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml

@@ -54,7 +54,8 @@
             <collection property="financeInvoiceReceivablesDTOList" column="id" select="getFirList" ofType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceReceivablesDTO"></collection>
             <collection property="financeInvoiceBaseDTOList" column="id" select="getBaseList" ofType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceBaseDTO"></collection>
             <collection property="financeInvoiceDetailDTOList" column="id" select="getFidList" ofType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDetailDTO"></collection>
-            <collection property="workAttachmentDtoList" ofType="com.jeeplus.sys.domain.WorkAttachmentInfo" column="id" select="getFileList"></collection>
+        <collection property="workAttachmentDtoList" ofType="com.jeeplus.sys.domain.WorkAttachmentInfo" column="id" select="getFileList"></collection>
+        <collection property="workAttachmenSignContract" ofType="com.jeeplus.sys.domain.WorkAttachmentInfo" column="id" select="getFileListSignContarct"></collection>
     </resultMap>
     <resultMap id="BaseExportResultMap" type="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDTO">
             <id property="id" column="id" jdbcType="VARCHAR"/>
@@ -247,7 +248,16 @@
         su.name as create_name
         from work_attachment wa
         left join sys_user su on su.id = wa.create_by_id and su.del_flag = '0'
-        where wa.del_flag = '0' and wa.attachment_id = #{id}
+        where wa.del_flag = '0' and wa.attachment_id = #{id} and wa.attachment_flag = 'cw_invoice'
+    </select>
+
+    <select id="getFileListSignContarct" resultMap="AttachmentMap">
+        select
+        <include refid="File_Column_List"></include>,
+        su.name as create_name
+        from work_attachment wa
+        left join sys_user su on su.id = wa.create_by_id and su.del_flag = '0'
+        where wa.del_flag = '0' and wa.attachment_id = #{id} and wa.attachment_flag = 'cw_invoice_sign_contract'
     </select>
 
     <select id="getFii" resultType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceInvalidDTO">

+ 12 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/CwFinanceInvoiceService.java

@@ -770,7 +770,18 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
             map.put("attachmentId",attachmentId);
             map.put("attachmentFlag",attachmentFlag);
             map.put("currentToken", TokenProvider.getCurrentToken ( ));
-            SpringUtil.getBean ( IWorkAttachmentApi.class ).saveOrUpdateFileList(map);
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).saveOrUpdateFileListFlag(map);
+
+            // 签约合同附件
+            Map<String,String> map1 = new HashMap<>();
+            String fileList1 = JSON.toJSONString((cwFinanceInvoiceDTO.getWorkAttachmenSignContract()));
+            String attachmentId1 = cwFinanceInvoice.getId();
+            String attachmentFlag1 = "cw_invoice_sign_contract";
+            map1.put("fileList",fileList1);
+            map1.put("attachmentId",attachmentId1);
+            map1.put("attachmentFlag",attachmentFlag1);
+            map1.put("currentToken", TokenProvider.getCurrentToken ( ));
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).saveOrUpdateFileListFlag(map1);
 
             // 发票明细保存
             if(CollectionUtil.isNotEmpty(cwFinanceInvoiceDTO.getFinanceInvoiceDetailDTOList())){

+ 5 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/dto/CwFinanceInvoiceDTO.java

@@ -258,6 +258,11 @@ public class CwFinanceInvoiceDTO extends BaseDTO {
     private List<WorkAttachmentInfo> workAttachmentDtoList;
 
     /**
+     * 签约合同信息
+     */
+    private List<WorkAttachmentInfo> workAttachmenSignContract;
+
+    /**
      * 发票明细
      */
     private List<CwFinanceInvoiceDetailDTO> financeInvoiceDetailDTOList;