郭齐峰 3 лет назад
Родитель
Сommit
bad246c968
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/custom/restcontroller/webmanage/sale/paybill/Paybill.java

+ 3 - 2
src/custom/restcontroller/webmanage/sale/paybill/Paybill.java

@@ -171,7 +171,7 @@ public class Paybill extends Controller {
     public String check() throws YosException {
         ArrayList<String> sqlList = new ArrayList<>();
         Long sa_paybillid = content.getLong("sa_paybillid");
-        Rows rows = dbConnect.runSqlQuery("select sys_enterpriseid,status from sa_paybill where siteid='" + siteid + "' and sa_paybillid=" + sa_paybillid);
+        Rows rows = dbConnect.runSqlQuery("select sys_enterpriseid,status,billno from sa_paybill where siteid='" + siteid + "' and sa_paybillid=" + sa_paybillid);
         Rows accountclassRows = dbConnect.runSqlQuery("select sa_accountclassid,amount from sa_paybilldetail where siteid='" + siteid + "' and sa_paybillid=" + sa_paybillid);
         if (rows.isEmpty()) {
             return getErrReturnObject().setErrMsg("未选择打款凭证").toString();
@@ -191,11 +191,12 @@ public class Paybill extends Controller {
         sqlList.add(sqlFactory.getSQL());
         sqlList.add(DataContrlLog.createLog(this, "sa_paybill", sa_paybillid, "审核", "打款凭证审核").getSQL());
         long sys_enterpriseid = rows.get(0).getLong("sys_enterpriseid");
+        String billno = rows.get(0).getString("billno");
         CashbillEntity cashbillEntity = new CashbillEntity();
         cashbillEntity.setOwnerid(sa_paybillid);
         cashbillEntity.setOwnertable("sa_paybill");
         cashbillEntity.setSource("打款凭证");
-        cashbillEntity.setSourcenote("打款凭证");
+        cashbillEntity.setSourcenote(billno);
         cashbillEntity.setRemarks("");
         for (Row row : accountclassRows) {
             cashbillEntity.setAmount(row.getBigDecimal("amount"));