mdf:历史开单添加组织过滤
This commit is contained in:
@@ -260,6 +260,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
JSONArray dtlJa2 = WQL.getWO("statistical_report_query_02").addParam("flag", "4")
|
||||
.addParam("begin_time", begin_time)
|
||||
.addParam("end_time", end_time)
|
||||
.addParam("org_ids",org_ids_new)
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
for (int i = 0; i < dtlJa2.size(); i++) {
|
||||
@@ -339,17 +340,17 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
//JSONObject num_jo = null;
|
||||
|
||||
|
||||
JSONObject num_jo = WQL.getWO("QL_ERP").addParamMap(map).setDbname("dataSource1").process().uniqueResult(0);
|
||||
// JSONObject num_jo = WQL.getWO("QL_ERP").addParamMap(map).setDbname("dataSource1").process().uniqueResult(0);
|
||||
|
||||
|
||||
//合同在途
|
||||
double notqty = 0;
|
||||
if (ObjectUtil.isNotEmpty(num_jo)) {
|
||||
notqty = num_jo.getDoubleValue("notqty");
|
||||
if (notqty < 0) {
|
||||
notqty = 0;
|
||||
}
|
||||
}
|
||||
// if (ObjectUtil.isNotEmpty(num_jo)) {
|
||||
// notqty = num_jo.getDoubleValue("notqty");
|
||||
// if (notqty < 0) {
|
||||
// notqty = 0;
|
||||
// }
|
||||
// }
|
||||
jo6.put(material_id, String.format("%.2f", notqty));
|
||||
|
||||
//5、库/需差额量 :库存现存量-排产需求量
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
输入.send_name TYPEAS s_string
|
||||
输入.is_send0 TYPEAS s_string
|
||||
输入.is_send12 TYPEAS s_string
|
||||
输入.org_ids TYPEAS f_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -177,6 +178,7 @@
|
||||
SUM( FormulaDtl.formula_qty ) AS qty
|
||||
FROM PDM_BI_Formula Formula
|
||||
inner JOIN PDM_BI_FormulaDtl FormulaDtl ON FormulaDtl.formula_id = Formula.formula_id
|
||||
left JOIN pdm_bi_workorder ON Formula.workorder_code = pdm_bi_workorder.workorder_code
|
||||
where 1=1
|
||||
and Formula.is_delete='0'
|
||||
OPTION 输入.begin_time <> ""
|
||||
@@ -184,6 +186,9 @@
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
Formula.create_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
OPTION 输入.org_ids <> ""
|
||||
pdm_bi_workorder.org_id in 输入.org_ids
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
FormulaDtl.material_id
|
||||
|
||||
Reference in New Issue
Block a user