|
|
@@ -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)" +
|