Browse Source

【泛微对接】【新增银行登记接口增加贷方,原币贷方字段】

wub 4 days ago
parent
commit
5efc34f083
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/main/java/com/uas/eis/service/Impl/ERPServiceImpl.java

+ 5 - 1
src/main/java/com/uas/eis/service/Impl/ERPServiceImpl.java

@@ -277,9 +277,12 @@ public class ERPServiceImpl implements ERPService {
             if (bool) {
                 return ApiResponse.failRsp("102",type + " 单据日期所属期间已结账,不允许进行当前操作!");
             }
-            if (accountRegisterMain.getDate() == null){
+            if (accountRegisterMain.getDate() == null || "".equals(accountRegisterMain.getDate())){
                 return ApiResponse.failRsp("102",type + " 参数单据日期为空!");
             }
+            if (accountRegisterMain.getAccountcode() == null || "".equals(accountRegisterMain.getAccountcode())){
+                return ApiResponse.failRsp("102",type + " 账户编号为空!");
+            }
             String ar_type = accountRegisterMain.getType() == null ? "" : accountRegisterMain.getType();
             String ar_currencytype = accountRegisterMain.getCurrencytype() == null ? "" : accountRegisterMain.getCurrencytype();
             String ar_accountcode = accountRegisterMain.getAccountcode() == null ? "" : accountRegisterMain.getAccountcode();
@@ -308,6 +311,7 @@ public class ERPServiceImpl implements ERPService {
                         accountRegisterDetail1.getCatedesc()+"','"+accountRegisterDetail1.getCurrency()+"',"+accountRegisterDetail1.getRate()+","+accountRegisterDetail1.getDoubledebit()+","+accountRegisterDetail1.getDebit()+","+accountRegisterDetail1.getDoublecredit()+","+accountRegisterDetail1.getCredit() +")";
                 sqls.add(Sql);
 
+
                 for (AccountRegisterDetail2 accountRegisterDetail2: accountRegisterDetail2s) {
                     if (accountRegisterDetail2.getDetailFkId().doubleValue() == accountRegisterDetail1.getDetailId().doubleValue()){
                         Sql="insert into ACCOUNTREGISTERDETAILASS(ARS_ID, ARS_ARDID, ARS_DETNO, ARS_ASSTYPE, ARS_ASSCODE, ARS_ASSNAME, ARS_TYPE)" +