瀏覽代碼

收入和支出凭证增加修改分类功能(审核状态下可修改)

hu 1 年之前
父節點
當前提交
53c8a79408
共有 2 個文件被更改,包括 22 次插入0 次删除
  1. 4 0
      src/custom/restcontroller/R.java
  2. 18 0
      src/custom/restcontroller/sale/cashbill/cashbill.java

+ 4 - 0
src/custom/restcontroller/R.java

@@ -5374,6 +5374,10 @@ public class R {
         public static class v1 {
         }
     }
+    public static class ID20231205134103 {
+        public static class v1 {
+        }
+    }
 
 }
 

+ 18 - 0
src/custom/restcontroller/sale/cashbill/cashbill.java

@@ -27,6 +27,7 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
+import static beans.order.Order.getOrderRows;
 import static restcontroller.webmanage.saletool.orderclue.orderclue.isBigDecimal;
 
 public class cashbill extends Controller {
@@ -399,6 +400,23 @@ public class cashbill extends Controller {
 //		return getSucReturnObject().setData(rows).toString();
 //	}
 
+    @API(title = "更新收支凭证明细分类", apiversion = R.ID20231205134103.v1.class)
+    public String updateTypemx() throws YosException {
+
+        Long sa_cashbillid = content.getLong("sa_cashbillid");
+        String subclass = content.getStringValue("subclass");
+
+        Rows cashbillRows = dbConnect.runSqlQuery("select * from sa_cashbill where siteid='"+siteid+"' and sa_cashbillid="+sa_cashbillid);
+        if (cashbillRows.isEmpty()) {
+            return getErrReturnObject().setErrMsg("收支凭证不存在").toString();
+        }
+
+        dbConnect.runSqlUpdate("update sa_cashbill set subclass='"+subclass+"' where sa_cashbillid="+sa_cashbillid);
+
+
+        return queryCashbillMain();
+    }
+
     @API(title = "收入凭证列表", apiversion = R.ID20221009102903.v1.class)
     @CACHEING
     public String queryIncomeCashbillList() throws YosException, IOException {