Procházet zdrojové kódy

增加工厂发退明细导出

hu před 2 roky
rodič
revize
8197fb900b

+ 29 - 20
src/custom/restcontroller/webmanage/sale/dispatch/dispatchItems.java

@@ -458,30 +458,39 @@ public class dispatchItems extends Controller {
 
 
         if (isExport) {
-//            //去除不需要导出项
-//            rows.getFieldList().remove("sa_dispatch_itemsid");
-//            rows.getFieldList().remove("sa_dispatchid");
-//            rows.getFieldList().remove("sa_orderitemsid");
-//            rows.getFieldList().remove("sa_orderid");
-//            rows.getFieldList().remove("sys_enterpriseid");
-//            rows.getFieldList().remove("isclose");
-//            rows.getFieldList().remove("rowno");
-//            rows.getFieldList().remove("itemid");
-//            rows.getFieldList().remove("batchno");
-//            Rows rowsrolename= dbConnect.runSqlQuery("select * from sys_userrole t1 inner join sys_role t2 on t1.roleid=t2.roleid and t1.siteid=t2.siteid where t2.rolename='经销商员工' and t1.userid="+userid);
-//            if(!rowsrolename.isEmpty()){
-//                rows.getFieldList().remove("price");
-//                rows.getFieldList().remove("amount");
-//            }
-//            rows.getFieldList().remove("undeliqty");
-//            rows.getFieldList().remove("deliedqty");
-//            rows.getFieldList().remove("outwarehousedate");
-//            Rows uploadRows = uploadExcelToObs("dispatch", "发货单明细列表", rows, getTitleMap());
-//            return getSucReturnObject().setData(uploadRows).toString();
+            //去除不需要导出项
+            rows.getFieldList().remove("detailid");
+            rows.getFieldList().remove("id");
+            rows.getFieldList().remove("sa_orderitemsid");
+            rows.getFieldList().remove("sa_orderid");
+            Rows uploadRows = uploadExcelToObs("dispatch", "工厂发货及退货明细列表", rows, getTitleMap1());
+            return getSucReturnObject().setData(uploadRows).toString();
         }
         return getSucReturnObject().setData(rows).toString();
     }
 
+
+    //返回导出的标题
+    public HashMap<String, String> getTitleMap1() throws YosException {
+        HashMap<String, String> titleMap = new HashMap<>();
+        titleMap.put("billno", "单据编号");
+        titleMap.put("sonum", "订单号");
+        titleMap.put("status", "状态");
+        titleMap.put("type", "类型");
+        titleMap.put("agentnum", "经销商编号");
+        titleMap.put("billdate", "单据日期");
+        titleMap.put("itemno", "产品编码");
+        titleMap.put("itemname", "产品名称");
+        titleMap.put("qty", "数量");
+        titleMap.put("unitname", "单位");
+        titleMap.put("price", "单价");
+        titleMap.put("amount", "金额");
+        titleMap.put("packageqty", "包装数量");
+        titleMap.put("remarks", "备注");
+
+        return titleMap;
+    }
+
     //返回导出的标题
     public HashMap<String, String> getTitleMap() throws YosException {
         HashMap<String, String> titleMap = new HashMap<>();