Browse Source

调整billno取数方式

wangjun 3 days ago
parent
commit
cd5ddd0ae0

+ 1 - 1
code/jyyy/nckd-jimin-jyyy-fi/src/main/java/nckd/jimin/jyyy/fi/webapi/AttachmentFileUtil.java

@@ -159,7 +159,7 @@ public class AttachmentFileUtil {
             result.put("url", actUrl);
             attachments.add(attachItem);
             //绑定单据
-            //AttachmentServiceHelper.upload(entity, pk, attachKey, attachments);
+            AttachmentServiceHelper.upload(entity, pk, attachKey, attachments);
 
         }catch(Exception e1){
             logger.info("FTP 附件上传失败,堆栈信息e1:",e1.getMessage());

+ 3 - 1
code/jyyy/nckd-jimin-jyyy-fi/src/main/java/nckd/jimin/jyyy/fi/webapi/TransDetailApiPlugin.java

@@ -20,6 +20,7 @@ import kd.bos.orm.query.QFilter;
 import kd.bos.servicehelper.BusinessDataServiceHelper;
 import kd.bos.servicehelper.operation.DeleteServiceHelper;
 import kd.bos.servicehelper.operation.SaveServiceHelper;
+import kd.data.rsa.helper.CodeRuleHelper;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -317,8 +318,9 @@ public class TransDetailApiPlugin implements Serializable {
             long Id = DB.genLongId("t_bei_elecreceipt");
             elecreceiptDyn.set("id", Id);
 
+            String billNo = CodeRuleHelper.generateNumber(BeiElecreceiptConstantInfo.ENTITYID, elecreceiptDyn, null, null);
             elecreceiptDyn.set(BeiElecreceiptConstantInfo.DETAILID, transDetail.get(BeiTransdetailConstantInfo.DETAILID));
-            elecreceiptDyn.set(BeiElecreceiptConstantInfo.BILLNO, transDetail.get(BeiTransdetailConstantInfo.BILLNO));
+            elecreceiptDyn.set(BeiElecreceiptConstantInfo.BILLNO, billNo);
             elecreceiptDyn.set(BeiElecreceiptConstantInfo.COMPANY, transDetail.get(BeiTransdetailConstantInfo.COMPANY));
             elecreceiptDyn.set(BeiElecreceiptConstantInfo.ACCOUNTBANK, transDetail.get(BeiTransdetailConstantInfo.ACCOUNTBANK));
             elecreceiptDyn.set(BeiElecreceiptConstantInfo.CURRENCY, transDetail.get(BeiTransdetailConstantInfo.CURRENCY));