优化
This commit is contained in:
@@ -100,7 +100,7 @@ public class MaterialbaseServiceImpl implements MaterialbaseService {
|
||||
map.put("idssql", "1=1");
|
||||
}
|
||||
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");
|
||||
String allmaterialId = " ";
|
||||
if (ObjectUtil.isNotEmpty(array)){
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
OPTION 输入.materialIds <> ""
|
||||
mb.material_id in 输入.materialIds
|
||||
ENDOPTION
|
||||
order by mb.material_code
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -50,7 +50,7 @@ public class LibraryqueryServiceImpl implements LibraryqueryService {
|
||||
map.put("status", MapUtil.getStr(whereJson,"status"));
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
|
||||
}
|
||||
map.put("inspection_type", MapUtil.getStr(whereJson, "inspection_type"));
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
JSONArray json = jo.getJSONArray("content");
|
||||
map.put("flag", "11");
|
||||
JSONObject jo2 = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).process().uniqueResult(0);
|
||||
jo2.put("bill_code","合计");
|
||||
json.add(jo2);
|
||||
map.put("flag", "01");
|
||||
JSONArray jo2 = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).process().getResultJSONArray(1);
|
||||
|
||||
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);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
IF 输入.flag = "01"
|
||||
QUERY
|
||||
SELECT
|
||||
sum(outq.total_qty) AS total_qty
|
||||
|
||||
@@ -58,7 +58,7 @@ public class IostordailyServiceImpl implements IostordailyService {
|
||||
map.put("material_code", "%" + material_code + "%");
|
||||
}
|
||||
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);
|
||||
if (ObjectUtil.isEmpty(jsonWork)) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
}else if (is_rf) {
|
||||
// 截取 "-" 最后出现的前面的字符串
|
||||
String material_code_1 = jsonObject.getString("material_code");
|
||||
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);
|
||||
if (ObjectUtil.isEmpty(workArr)) {
|
||||
ja.add(jsonObject);
|
||||
continue;
|
||||
}
|
||||
if (workArr.size() > 1) {
|
||||
jsonObject.put("is_yellow", "1");
|
||||
JSONObject json_1 = workArr.getJSONObject(0);
|
||||
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
||||
ja.add(jsonObject);
|
||||
} else {
|
||||
JSONObject json_1 = workArr.getJSONObject(0);
|
||||
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
||||
ja.add(jsonObject);
|
||||
}else{
|
||||
if (workArr.size() > 1) {
|
||||
jsonObject.put("is_yellow", "1");
|
||||
JSONObject json_1 = workArr.getJSONObject(0);
|
||||
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
||||
ja.add(jsonObject);
|
||||
} else if (workArr.size() == 1) {
|
||||
JSONObject json_1 = workArr.getJSONObject(0);
|
||||
jsonObject.put("dept_name",json_1.getString("dept_name"));
|
||||
ja.add(jsonObject);
|
||||
}else{
|
||||
ja.add(jsonObject);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ja.add(jsonObject);
|
||||
}
|
||||
}
|
||||
map.put("flag", "11");
|
||||
JSONObject jo2 = WQL.getWO("SendReceiveQuery_query_01").addParamMap(map).process().uniqueResult(0);
|
||||
jo2.put("stor_name","合计");
|
||||
ja.add(jo2);
|
||||
map.put("flag", "01");
|
||||
JSONArray jo2 = WQL.getWO("SendReceiveQuery_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||
if(jo2.size()!=0){
|
||||
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);
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -65,12 +65,20 @@ public class IvtQueryServiceImpl implements IvtQueryService {
|
||||
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");
|
||||
map.put("flag", "11");
|
||||
JSONObject jo2 = WQL.getWO("Qivt_query_01").addParamMap(map).process().uniqueResult(0);
|
||||
jo2.put("stor_name","合计");
|
||||
json.add(jo2);
|
||||
map.put("flag", "01");
|
||||
JSONArray jo2 = WQL.getWO("Qivt_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||
|
||||
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);
|
||||
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");
|
||||
map.put("flag", "11");
|
||||
JSONObject jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().uniqueResult(0);
|
||||
jo2.put("material_code","合计");
|
||||
json.add(jo2);
|
||||
map.put("flag", "01");
|
||||
JSONArray jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||
|
||||
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);
|
||||
return jo;
|
||||
}
|
||||
@@ -82,12 +90,19 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
if (StrUtil.isNotEmpty(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");
|
||||
map.put("flag", "22");
|
||||
JSONObject jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().uniqueResult(0);
|
||||
jo2.put("biz_date","合计");
|
||||
json.add(jo2);
|
||||
map.put("flag", "02");
|
||||
JSONArray jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().getResultJSONArray(1);
|
||||
if(jo2.size()!=0){
|
||||
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);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
IF 输入.flag = "01"
|
||||
QUERY
|
||||
SELECT
|
||||
sum(outq.bucket_num) AS bucket_num,
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
IF 输入.flag = "01"
|
||||
QUERY
|
||||
SELECT
|
||||
sum(outq.start_num) AS start_num,
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
IF 输入.flag = "01"
|
||||
QUERY
|
||||
SELECT
|
||||
sum(outq.qty) AS qty
|
||||
@@ -231,7 +231,7 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "22"
|
||||
IF 输入.flag = "02"
|
||||
QUERY
|
||||
SELECT
|
||||
sum(outq.out_qty) AS out_qty,
|
||||
|
||||
Reference in New Issue
Block a user