|
@@ -116,16 +116,16 @@ public class invbal extends Controller {
|
|
|
|
|
|
|
|
@API(title = "查询Erp库存列表", apiversion = R.ID20230408091703.v1.class)
|
|
@API(title = "查询Erp库存列表", apiversion = R.ID20230408091703.v1.class)
|
|
|
public String queryErpInvbalList() throws YosException, IOException {
|
|
public String queryErpInvbalList() throws YosException, IOException {
|
|
|
- boolean isExport = content.getBooleanValue("isExport");
|
|
|
|
|
|
|
+// boolean isExport = content.getBooleanValue("isExport");
|
|
|
//String iteminfo = content.getStringValue("iteminfo");
|
|
//String iteminfo = content.getStringValue("iteminfo");
|
|
|
//String agentinfo = content.getStringValue("agentinfo");
|
|
//String agentinfo = content.getStringValue("agentinfo");
|
|
|
//boolean all = content.getBooleanValue("all");
|
|
//boolean all = content.getBooleanValue("all");
|
|
|
//JSONArray itemclassids = content.getJSONArray("itemclassids");
|
|
//JSONArray itemclassids = content.getJSONArray("itemclassids");
|
|
|
String where = " 1=1 ";
|
|
String where = " 1=1 ";
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "商品列表", pageSize, pageNumber, pageSorting);
|
|
SQLFactory sqlFactory = new SQLFactory(this, "商品列表", pageSize, pageNumber, pageSorting);
|
|
|
- if (isExport) {
|
|
|
|
|
- sqlFactory = new SQLFactory(this, "商品列表");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (isExport) {
|
|
|
|
|
+// sqlFactory = new SQLFactory(this, "商品列表");
|
|
|
|
|
+// }
|
|
|
if (content.containsKey("where")) {
|
|
if (content.containsKey("where")) {
|
|
|
JSONObject whereObject = content.getJSONObject("where");
|
|
JSONObject whereObject = content.getJSONObject("where");
|
|
|
if (whereObject.containsKey("iteminfo")) {
|
|
if (whereObject.containsKey("iteminfo")) {
|
|
@@ -157,9 +157,9 @@ public class invbal extends Controller {
|
|
|
if (whereObject.containsKey("agentinfo")) {
|
|
if (whereObject.containsKey("agentinfo")) {
|
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
|
sqlFactory = new SQLFactory(this, "订单明细未发商品列表", pageSize, pageNumber, pageSorting);
|
|
sqlFactory = new SQLFactory(this, "订单明细未发商品列表", pageSize, pageNumber, pageSorting);
|
|
|
- if (isExport) {
|
|
|
|
|
- sqlFactory = new SQLFactory(this, "订单明细未发商品列表");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (isExport) {
|
|
|
|
|
+// sqlFactory = new SQLFactory(this, "订单明细未发商品列表");
|
|
|
|
|
+// }
|
|
|
//System.out.println(StringUtils.isBlank(itemname) && StringUtils.isBlank(itemno) && itemclassids.size()==0);
|
|
//System.out.println(StringUtils.isBlank(itemname) && StringUtils.isBlank(itemno) && itemclassids.size()==0);
|
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
|
where = where + " and (t6.agentnum like '%" + whereObject.getStringValue("agentinfo") + "%' or t5.enterprisename like '%" + whereObject.getStringValue("agentinfo") + "%') ";
|
|
where = where + " and (t6.agentnum like '%" + whereObject.getStringValue("agentinfo") + "%' or t5.enterprisename like '%" + whereObject.getStringValue("agentinfo") + "%') ";
|
|
@@ -279,39 +279,39 @@ public class invbal extends Controller {
|
|
|
// System.out.println(row.toJsonObject().toJSONString());
|
|
// System.out.println(row.toJsonObject().toJSONString());
|
|
|
// }
|
|
// }
|
|
|
}
|
|
}
|
|
|
- if (isExport) {
|
|
|
|
|
- //去除不需要导出项
|
|
|
|
|
- rows.getFieldList().remove("itemid");
|
|
|
|
|
- rows.getFieldList().remove("packageqty");
|
|
|
|
|
- rows.getFieldList().remove("qty");
|
|
|
|
|
-// for (Row row : rows) {
|
|
|
|
|
-// if (row.getString("itemno").equals("10901371")) {
|
|
|
|
|
-// System.out.println(row.getString("canbesent"));
|
|
|
|
|
-// System.out.println(row.getString("canbesale"));
|
|
|
|
|
-// System.out.println(row.toJsonObject().toJSONString());
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
- Rows uploadRows = uploadExcelToObs("invbal", "库存列表", rows, getTitleMap());
|
|
|
|
|
- return getSucReturnObject().setData(uploadRows).toString();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (isExport) {
|
|
|
|
|
+// //去除不需要导出项
|
|
|
|
|
+// rows.getFieldList().remove("itemid");
|
|
|
|
|
+// rows.getFieldList().remove("packageqty");
|
|
|
|
|
+// rows.getFieldList().remove("qty");
|
|
|
|
|
+//// for (Row row : rows) {
|
|
|
|
|
+//// if (row.getString("itemno").equals("10901371")) {
|
|
|
|
|
+//// System.out.println(row.getString("canbesent"));
|
|
|
|
|
+//// System.out.println(row.getString("canbesale"));
|
|
|
|
|
+//// System.out.println(row.toJsonObject().toJSONString());
|
|
|
|
|
+//// }
|
|
|
|
|
+////
|
|
|
|
|
+//// }
|
|
|
|
|
+// Rows uploadRows = uploadExcelToObs("invbal", "库存列表", rows, getTitleMap());
|
|
|
|
|
+// return getSucReturnObject().setData(uploadRows).toString();
|
|
|
|
|
+// }
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//返回导出的标题
|
|
//返回导出的标题
|
|
|
- public HashMap<String, String> getTitleMap() {
|
|
|
|
|
- HashMap<String, String> titleMap = new HashMap<>();
|
|
|
|
|
- titleMap.put("itemname", "产品名称");
|
|
|
|
|
- titleMap.put("itemno", "产品编号");
|
|
|
|
|
- titleMap.put("undelqty", "未发数量");
|
|
|
|
|
- titleMap.put("invbalqty", "库存数");
|
|
|
|
|
- titleMap.put("canbesent", "预计可发量");
|
|
|
|
|
- titleMap.put("canbesale", "预计可售量");
|
|
|
|
|
- titleMap.put("unitname", "单位");
|
|
|
|
|
- titleMap.put("itemclass", "营销分类");
|
|
|
|
|
- titleMap.put("isonsale", "是否上架");
|
|
|
|
|
- return titleMap;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// public HashMap<String, String> getTitleMap() {
|
|
|
|
|
+// HashMap<String, String> titleMap = new HashMap<>();
|
|
|
|
|
+// titleMap.put("itemname", "产品名称");
|
|
|
|
|
+// titleMap.put("itemno", "产品编号");
|
|
|
|
|
+// titleMap.put("undelqty", "未发数量");
|
|
|
|
|
+// titleMap.put("invbalqty", "库存数");
|
|
|
|
|
+// titleMap.put("canbesent", "预计可发量");
|
|
|
|
|
+// titleMap.put("canbesale", "预计可售量");
|
|
|
|
|
+// titleMap.put("unitname", "单位");
|
|
|
|
|
+// titleMap.put("itemclass", "营销分类");
|
|
|
|
|
+// titleMap.put("isonsale", "是否上架");
|
|
|
|
|
+// return titleMap;
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
@API(title = "查询指定商品对应的未发货订单明细", apiversion = R.ID20230408101803.v1.class)
|
|
@API(title = "查询指定商品对应的未发货订单明细", apiversion = R.ID20230408101803.v1.class)
|
|
|
public String queryOrderDetailList() throws YosException {
|
|
public String queryOrderDetailList() throws YosException {
|
|
@@ -336,7 +336,7 @@ public class invbal extends Controller {
|
|
|
|
|
|
|
|
@API(title = "商品补货分析", apiversion = R.ID20231228102402.v1.class)
|
|
@API(title = "商品补货分析", apiversion = R.ID20231228102402.v1.class)
|
|
|
public String queryItemSalesList() throws YosException, IOException {
|
|
public String queryItemSalesList() throws YosException, IOException {
|
|
|
- boolean isExport = content.getBooleanValue("isExport");
|
|
|
|
|
|
|
+// boolean isExport = content.getBooleanValue("isExport");
|
|
|
int year = content.getIntValue("year");
|
|
int year = content.getIntValue("year");
|
|
|
if (year <= 0) {
|
|
if (year <= 0) {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
@@ -348,9 +348,9 @@ public class invbal extends Controller {
|
|
|
|
|
|
|
|
String where = " 1=1 ";
|
|
String where = " 1=1 ";
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "商品列表", pageSize, pageNumber, pageSorting);
|
|
SQLFactory sqlFactory = new SQLFactory(this, "商品列表", pageSize, pageNumber, pageSorting);
|
|
|
- if (isExport) {
|
|
|
|
|
- sqlFactory = new SQLFactory(this, "商品列表");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (isExport) {
|
|
|
|
|
+// sqlFactory = new SQLFactory(this, "商品列表");
|
|
|
|
|
+// }
|
|
|
if (content.containsKey("where")) {
|
|
if (content.containsKey("where")) {
|
|
|
JSONObject whereObject = content.getJSONObject("where");
|
|
JSONObject whereObject = content.getJSONObject("where");
|
|
|
if (whereObject.containsKey("iteminfo")) {
|
|
if (whereObject.containsKey("iteminfo")) {
|
|
@@ -381,9 +381,9 @@ public class invbal extends Controller {
|
|
|
if (whereObject.containsKey("agentinfo")) {
|
|
if (whereObject.containsKey("agentinfo")) {
|
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
|
sqlFactory = new SQLFactory(this, "订单明细未发商品列表", pageSize, pageNumber, pageSorting);
|
|
sqlFactory = new SQLFactory(this, "订单明细未发商品列表", pageSize, pageNumber, pageSorting);
|
|
|
- if (isExport) {
|
|
|
|
|
- sqlFactory = new SQLFactory(this, "订单明细未发商品列表");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (isExport) {
|
|
|
|
|
+// sqlFactory = new SQLFactory(this, "订单明细未发商品列表");
|
|
|
|
|
+// }
|
|
|
//System.out.println(StringUtils.isBlank(itemname) && StringUtils.isBlank(itemno) && itemclassids.size()==0);
|
|
//System.out.println(StringUtils.isBlank(itemname) && StringUtils.isBlank(itemno) && itemclassids.size()==0);
|
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
if (!StringUtils.isBlank(whereObject.getStringValue("agentinfo"))) {
|
|
|
where = where + " and (t6.agentnum like '%" + whereObject.getStringValue("agentinfo") + "%' or t5.enterprisename like '%" + whereObject.getStringValue("agentinfo") + "%') ";
|
|
where = where + " and (t6.agentnum like '%" + whereObject.getStringValue("agentinfo") + "%' or t5.enterprisename like '%" + whereObject.getStringValue("agentinfo") + "%') ";
|
|
@@ -542,14 +542,14 @@ public class invbal extends Controller {
|
|
|
row.replace(key, row.getBigDecimal(key).subtract(closeRow.getBigDecimal("qty")));
|
|
row.replace(key, row.getBigDecimal(key).subtract(closeRow.getBigDecimal("qty")));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (isExport) {
|
|
|
|
|
- //去除不需要导出项
|
|
|
|
|
- rows.getFieldList().remove("itemid");
|
|
|
|
|
- rows.getFieldList().remove("packageqty");
|
|
|
|
|
- rows.getFieldList().remove("qty");
|
|
|
|
|
- Rows uploadRows = uploadExcelToObs("invbal", "商品补货分析", rows, getTitleMap());
|
|
|
|
|
- return getSucReturnObject().setData(uploadRows).toString();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (isExport) {
|
|
|
|
|
+// //去除不需要导出项
|
|
|
|
|
+// rows.getFieldList().remove("itemid");
|
|
|
|
|
+// rows.getFieldList().remove("packageqty");
|
|
|
|
|
+// rows.getFieldList().remove("qty");
|
|
|
|
|
+// Rows uploadRows = uploadExcelToObs("invbal", "商品补货分析", rows, getTitleMap());
|
|
|
|
|
+// return getSucReturnObject().setData(uploadRows).toString();
|
|
|
|
|
+// }
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
}
|
|
|
|
|
|