优化
This commit is contained in:
@@ -100,7 +100,7 @@ public class MaterialbaseServiceImpl implements MaterialbaseService {
|
|||||||
map.put("idssql", "1=1");
|
map.put("idssql", "1=1");
|
||||||
}
|
}
|
||||||
map.put("flag", "2");
|
map.put("flag", "2");
|
||||||
JSONObject allmaterialIds = WQL.getWO("QMD_ME_MATERIAL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "material_id");
|
JSONObject allmaterialIds = WQL.getWO("QMD_ME_MATERIAL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_code");
|
||||||
JSONArray array = allmaterialIds.getJSONArray("content");
|
JSONArray array = allmaterialIds.getJSONArray("content");
|
||||||
String allmaterialId = " ";
|
String allmaterialId = " ";
|
||||||
if (ObjectUtil.isNotEmpty(array)){
|
if (ObjectUtil.isNotEmpty(array)){
|
||||||
|
|||||||
@@ -146,6 +146,7 @@
|
|||||||
OPTION 输入.materialIds <> ""
|
OPTION 输入.materialIds <> ""
|
||||||
mb.material_id in 输入.materialIds
|
mb.material_id in 输入.materialIds
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
order by mb.material_code
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class LibraryqueryServiceImpl implements LibraryqueryService {
|
|||||||
map.put("status", MapUtil.getStr(whereJson,"status"));
|
map.put("status", MapUtil.getStr(whereJson,"status"));
|
||||||
map.put("available", MapUtil.getStr(whereJson,"available"));
|
map.put("available", MapUtil.getStr(whereJson,"available"));
|
||||||
|
|
||||||
JSONObject json = WQL.getWO("QLK01").setDbname("dataSource2").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "inputtime DESC");
|
JSONObject json = WQL.getWO("QLK01").setDbname("dataSource2").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "material_code,pcsn");
|
||||||
return json;
|
return json;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
|
|||||||
}
|
}
|
||||||
map.put("inspection_type", MapUtil.getStr(whereJson, "inspection_type"));
|
map.put("inspection_type", MapUtil.getStr(whereJson, "inspection_type"));
|
||||||
map.put("bill_status", MapUtil.getStr(whereJson, "bill_status"));
|
map.put("bill_status", MapUtil.getStr(whereJson, "bill_status"));
|
||||||
JSONObject json = WQL.getWO("QL_TEST_INSPECTIONSHEET001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.update_time desc");
|
JSONObject json = WQL.getWO("QL_TEST_INSPECTIONSHEET001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mater.material_code,mater.material_name");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,10 +90,18 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
}
|
}
|
||||||
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bill_code desc");
|
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bill_code desc");
|
||||||
JSONArray json = jo.getJSONArray("content");
|
JSONArray json = jo.getJSONArray("content");
|
||||||
map.put("flag", "11");
|
map.put("flag", "01");
|
||||||
JSONObject jo2 = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).process().uniqueResult(0);
|
JSONArray jo2 = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).process().getResultJSONArray(1);
|
||||||
jo2.put("bill_code","合计");
|
|
||||||
json.add(jo2);
|
if(jo2.size()!=0){
|
||||||
|
JSONObject jo3 = jo2.getJSONObject(0);
|
||||||
|
jo3.put("bill_code","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}else{
|
||||||
|
JSONObject jo3 = new JSONObject();
|
||||||
|
jo3.put("stor_name","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}
|
||||||
jo.put("content",json);
|
jo.put("content",json);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "11"
|
IF 输入.flag = "01"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
sum(outq.total_qty) AS total_qty
|
sum(outq.total_qty) AS total_qty
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class IostordailyServiceImpl implements IostordailyService {
|
|||||||
map.put("material_code", "%" + material_code + "%");
|
map.put("material_code", "%" + material_code + "%");
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%" + pcsn + "%");
|
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%" + pcsn + "%");
|
||||||
JSONObject json = WQL.getWO("SendReceiveQuery_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "da.sect_date desc");
|
JSONObject json = WQL.getWO("SendReceiveQuery_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mater.material_code");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -85,17 +85,16 @@ public class IostordailyServiceImpl implements IostordailyService {
|
|||||||
JSONObject jsonWork = workTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn_1 + "' and is_delete ='0'").uniqueResult(0);
|
JSONObject jsonWork = workTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn_1 + "' and is_delete ='0'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonWork)) {
|
if (ObjectUtil.isEmpty(jsonWork)) {
|
||||||
ja.add(jsonObject);
|
ja.add(jsonObject);
|
||||||
continue;
|
}else{
|
||||||
|
JSONObject jsonDept = deptTab.query("dept_id = '" + jsonWork.getString("org_id") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonDept)) {
|
||||||
|
jsonObject.put("dept_name", jsonDept.getString("name"));
|
||||||
|
ja.add(jsonObject);
|
||||||
|
}else{
|
||||||
|
ja.add(jsonObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}else if (is_rf) {
|
||||||
JSONObject jsonDept = deptTab.query("dept_id = '" + jsonWork.getString("org_id") + "'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isNotEmpty(jsonDept)) {
|
|
||||||
jsonObject.put("dept_name", jsonDept.getString("name"));
|
|
||||||
ja.add(jsonObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_rf) {
|
|
||||||
// 截取 "-" 最后出现的前面的字符串
|
// 截取 "-" 最后出现的前面的字符串
|
||||||
String material_code_1 = jsonObject.getString("material_code");
|
String material_code_1 = jsonObject.getString("material_code");
|
||||||
int lastIndexOf = material_code_1.lastIndexOf('-');
|
int lastIndexOf = material_code_1.lastIndexOf('-');
|
||||||
@@ -104,24 +103,36 @@ public class IostordailyServiceImpl implements IostordailyService {
|
|||||||
JSONArray workArr = WQL.getWO("SendReceiveQuery_query_01").addParam("flag", "3").addParam("material_code", material_code_sub).process().getResultJSONArray(0);
|
JSONArray workArr = WQL.getWO("SendReceiveQuery_query_01").addParam("flag", "3").addParam("material_code", material_code_sub).process().getResultJSONArray(0);
|
||||||
if (ObjectUtil.isEmpty(workArr)) {
|
if (ObjectUtil.isEmpty(workArr)) {
|
||||||
ja.add(jsonObject);
|
ja.add(jsonObject);
|
||||||
continue;
|
}else{
|
||||||
}
|
if (workArr.size() > 1) {
|
||||||
if (workArr.size() > 1) {
|
jsonObject.put("is_yellow", "1");
|
||||||
jsonObject.put("is_yellow", "1");
|
JSONObject json_1 = workArr.getJSONObject(0);
|
||||||
JSONObject json_1 = workArr.getJSONObject(0);
|
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
||||||
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
ja.add(jsonObject);
|
||||||
ja.add(jsonObject);
|
} else if (workArr.size() == 1) {
|
||||||
} else {
|
JSONObject json_1 = workArr.getJSONObject(0);
|
||||||
JSONObject json_1 = workArr.getJSONObject(0);
|
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
||||||
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
ja.add(jsonObject);
|
||||||
ja.add(jsonObject);
|
}else{
|
||||||
|
ja.add(jsonObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
ja.add(jsonObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("flag", "11");
|
map.put("flag", "01");
|
||||||
JSONObject jo2 = WQL.getWO("SendReceiveQuery_query_01").addParamMap(map).process().uniqueResult(0);
|
JSONArray jo2 = WQL.getWO("SendReceiveQuery_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||||
jo2.put("stor_name","合计");
|
if(jo2.size()!=0){
|
||||||
ja.add(jo2);
|
JSONObject jo3 = jo2.getJSONObject(0);
|
||||||
|
jo3.put("stor_name","合计");
|
||||||
|
ja.add(jo3);
|
||||||
|
}else{
|
||||||
|
JSONObject jo3 = new JSONObject();
|
||||||
|
jo3.put("stor_name","合计");
|
||||||
|
ja.add(jo3);
|
||||||
|
}
|
||||||
|
|
||||||
json.put("content",ja);
|
json.put("content",ja);
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,12 +65,20 @@ public class IvtQueryServiceImpl implements IvtQueryService {
|
|||||||
map.put("sects",str);
|
map.put("sects",str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JSONObject jo = WQL.getWO("Qivt_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt.instorage_time desc");
|
JSONObject jo = WQL.getWO("Qivt_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "me.material_code,me.material_name");
|
||||||
JSONArray json = jo.getJSONArray("content");
|
JSONArray json = jo.getJSONArray("content");
|
||||||
map.put("flag", "11");
|
map.put("flag", "01");
|
||||||
JSONObject jo2 = WQL.getWO("Qivt_query_01").addParamMap(map).process().uniqueResult(0);
|
JSONArray jo2 = WQL.getWO("Qivt_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||||
jo2.put("stor_name","合计");
|
|
||||||
json.add(jo2);
|
if(jo2.size()!=0){
|
||||||
|
JSONObject jo3 = jo2.getJSONObject(0);
|
||||||
|
jo3.put("stor_name","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}else{
|
||||||
|
JSONObject jo3 = new JSONObject();
|
||||||
|
jo3.put("stor_name","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}
|
||||||
jo.put("content",json);
|
jo.put("content",json);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,12 +50,20 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
JSONObject jo = WQL.getWO("statistical_report_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time desc");
|
JSONObject jo = WQL.getWO("statistical_report_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "material_code");
|
||||||
JSONArray json = jo.getJSONArray("content");
|
JSONArray json = jo.getJSONArray("content");
|
||||||
map.put("flag", "11");
|
map.put("flag", "01");
|
||||||
JSONObject jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().uniqueResult(0);
|
JSONArray jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||||
jo2.put("material_code","合计");
|
|
||||||
json.add(jo2);
|
if(jo2.size()!=0){
|
||||||
|
JSONObject jo3 = jo2.getJSONObject(0);
|
||||||
|
jo3.put("material_code","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}else{
|
||||||
|
JSONObject jo3 = new JSONObject();
|
||||||
|
jo3.put("material_code","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}
|
||||||
jo.put("content",json);
|
jo.put("content",json);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
@@ -82,12 +90,19 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
if (StrUtil.isNotEmpty(map.get("material_code"))) {
|
if (StrUtil.isNotEmpty(map.get("material_code"))) {
|
||||||
map.put("material_code", "%" + map.get("material_code") + "%");
|
map.put("material_code", "%" + map.get("material_code") + "%");
|
||||||
}
|
}
|
||||||
JSONObject jo = WQL.getWO("statistical_report_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bill_code desc");
|
JSONObject jo = WQL.getWO("statistical_report_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_name");
|
||||||
JSONArray json = jo.getJSONArray("content");
|
JSONArray json = jo.getJSONArray("content");
|
||||||
map.put("flag", "22");
|
map.put("flag", "02");
|
||||||
JSONObject jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().uniqueResult(0);
|
JSONArray jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||||
jo2.put("biz_date","合计");
|
if(jo2.size()!=0){
|
||||||
json.add(jo2);
|
JSONObject jo3 = jo2.getJSONObject(0);
|
||||||
|
jo3.put("biz_date","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}else{
|
||||||
|
JSONObject jo3 = new JSONObject();
|
||||||
|
jo3.put("biz_date","合计");
|
||||||
|
json.add(jo3);
|
||||||
|
}
|
||||||
jo.put("content",json);
|
jo.put("content",json);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "11"
|
IF 输入.flag = "01"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
sum(outq.bucket_num) AS bucket_num,
|
sum(outq.bucket_num) AS bucket_num,
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "11"
|
IF 输入.flag = "01"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
sum(outq.start_num) AS start_num,
|
sum(outq.start_num) AS start_num,
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "11"
|
IF 输入.flag = "01"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
sum(outq.qty) AS qty
|
sum(outq.qty) AS qty
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "22"
|
IF 输入.flag = "02"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
sum(outq.out_qty) AS out_qty,
|
sum(outq.out_qty) AS out_qty,
|
||||||
|
|||||||
Reference in New Issue
Block a user