|
@@ -277,12 +277,14 @@ public class ERPServiceImpl implements ERPService {
|
|
|
if (bool) {
|
|
if (bool) {
|
|
|
return ApiResponse.failRsp("102",type + " 单据日期所属期间已结账,不允许进行当前操作!");
|
|
return ApiResponse.failRsp("102",type + " 单据日期所属期间已结账,不允许进行当前操作!");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ if (accountRegisterMain.getDate() == null){
|
|
|
|
|
+ return ApiResponse.failRsp("102",type + " 参数单据日期为空!");
|
|
|
|
|
+ }
|
|
|
String Sql="insert into AccountRegister(ar_id,ar_code,ar_date,ar_type,ar_currencytype,ar_accountcode,ar_accountname,ar_accountcurrency,ar_accountrate" +
|
|
String Sql="insert into AccountRegister(ar_id,ar_code,ar_date,ar_type,ar_currencytype,ar_accountcode,ar_accountname,ar_accountcurrency,ar_accountrate" +
|
|
|
",ar_payment,ar_departmentcode,ar_departmentname,ar_cateid,ar_emid,ar_recordman,ar_status,ar_statuscode,ar_poststatus,ar_poststatuscode)" +
|
|
",ar_payment,ar_departmentcode,ar_departmentname,ar_cateid,ar_emid,ar_recordman,ar_status,ar_statuscode,ar_poststatus,ar_poststatuscode)" +
|
|
|
"values("+ar_id+",'"+code+"',to_date('"+accountRegisterMain.getDate()+"','yyyy-mm-dd'),'"+accountRegisterMain.getType() == null ? "" : accountRegisterMain.getType()+"','"+accountRegisterMain.getCurrencytype() == null ? "" : accountRegisterMain.getCurrencytype() +"','"+accountRegisterMain.getAccountcode() == null ? "" : accountRegisterMain.getAccountcode()+"'," +
|
|
"values("+ar_id+",'"+code+"',to_date('"+accountRegisterMain.getDate()+"','yyyy-mm-dd'),'"+accountRegisterMain.getType() == null ? "" : accountRegisterMain.getType()+"','"+accountRegisterMain.getCurrencytype() == null ? "" : accountRegisterMain.getCurrencytype() +"','"+accountRegisterMain.getAccountcode() == null ? "" : accountRegisterMain.getAccountcode()+"'," +
|
|
|
"'"+accountRegisterMain.getAccountname() == null ? "" : accountRegisterMain.getAccountname()+"','"+accountRegisterMain.getAccountcurrency() == null ? "" : accountRegisterMain.getAccountcurrency()+"','"+accountRegisterMain.getAccountrate() == null ? "" : accountRegisterMain.getAccountrate()+"'," +
|
|
"'"+accountRegisterMain.getAccountname() == null ? "" : accountRegisterMain.getAccountname()+"','"+accountRegisterMain.getAccountcurrency() == null ? "" : accountRegisterMain.getAccountcurrency()+"','"+accountRegisterMain.getAccountrate() == null ? "" : accountRegisterMain.getAccountrate()+"'," +
|
|
|
- accountRegisterMain.getPayment() == null ? "''''" : accountRegisterMain.getPayment() +",'"+accountRegisterMain.getDepartmentcode() == null ? "" : accountRegisterMain.getDepartmentcode()+"','"+accountRegisterMain.getDepartmentname() == null ? "" : accountRegisterMain.getDepartmentname()+"',"+accountRegisterMain.getCateid() == null ? "''''" : accountRegisterMain.getCateid()+"," +
|
|
|
|
|
|
|
+ accountRegisterMain.getPayment() +",'"+accountRegisterMain.getDepartmentcode() == null ? "" : accountRegisterMain.getDepartmentcode()+"','"+accountRegisterMain.getDepartmentname() == null ? "" : accountRegisterMain.getDepartmentname()+"',"+accountRegisterMain.getCateid() +"," +
|
|
|
"1033922,'管理员','在录入','ENTERING','未过账','UNPOST')";
|
|
"1033922,'管理员','在录入','ENTERING','未过账','UNPOST')";
|
|
|
|
|
|
|
|
sqls.add(Sql);
|
|
sqls.add(Sql);
|
|
@@ -293,7 +295,7 @@ public class ERPServiceImpl implements ERPService {
|
|
|
int ard_id = baseDao.getSeqId("ACCOUNTREGISTERDETAIL_SEQ");
|
|
int ard_id = baseDao.getSeqId("ACCOUNTREGISTERDETAIL_SEQ");
|
|
|
Sql="insert into AccountRegisterDetail(ard_id,ard_arid,ard_detno,ard_explanation,ard_catecode,ard_catedesc,ard_currency,ard_rate,ard_doubledebit,ard_debit,ard_doublecredit,ard_credit)" +
|
|
Sql="insert into AccountRegisterDetail(ard_id,ard_arid,ard_detno,ard_explanation,ard_catecode,ard_catedesc,ard_currency,ard_rate,ard_doubledebit,ard_debit,ard_doublecredit,ard_credit)" +
|
|
|
"values("+ard_id+","+ar_id+","+accountRegisterDetail1.getDetno()+",'"+accountRegisterDetail1.getExplanation()+"','"+accountRegisterDetail1.getCatecode()+"','"+
|
|
"values("+ard_id+","+ar_id+","+accountRegisterDetail1.getDetno()+",'"+accountRegisterDetail1.getExplanation()+"','"+accountRegisterDetail1.getCatecode()+"','"+
|
|
|
- accountRegisterDetail1.getCatedesc()+"','"+accountRegisterDetail1.getCurrency()+"',"+accountRegisterDetail1.getRate()+","+accountRegisterDetail1.getDoubledebit()+","+accountRegisterDetail1.getDebit()+","+accountRegisterDetail1.getDoublecredit() == null ? "''''" : accountRegisterDetail1.getDoublecredit()+","+accountRegisterDetail1.getCredit() == null ? "''''" : accountRegisterDetail1.getCredit()+")";
|
|
|
|
|
|
|
+ accountRegisterDetail1.getCatedesc()+"','"+accountRegisterDetail1.getCurrency()+"',"+accountRegisterDetail1.getRate()+","+accountRegisterDetail1.getDoubledebit()+","+accountRegisterDetail1.getDebit()+","+accountRegisterDetail1.getDoublecredit()+","+accountRegisterDetail1.getCredit() +")";
|
|
|
sqls.add(Sql);
|
|
sqls.add(Sql);
|
|
|
|
|
|
|
|
for (AccountRegisterDetail2 accountRegisterDetail2: accountRegisterDetail2s) {
|
|
for (AccountRegisterDetail2 accountRegisterDetail2: accountRegisterDetail2s) {
|