优化
This commit is contained in:
@@ -40,7 +40,9 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
map.put("pcsn", MapUtil.getStr(whereJson, "pcsn"));
|
map.put("pcsn", MapUtil.getStr(whereJson, "pcsn"));
|
||||||
if (!StrUtil.isEmpty(material_code)) {
|
if (!StrUtil.isEmpty(material_code)) {
|
||||||
//处理转义字符
|
//处理转义字符
|
||||||
if (material_code.contains("\\")) material_code = material_code.replace("\\", "\\\\\\");
|
if (material_code.contains("\\")) {
|
||||||
|
material_code = material_code.replace("\\", "\\\\\\");
|
||||||
|
}
|
||||||
map.put("material_code", "%" + material_code + "%");
|
map.put("material_code", "%" + material_code + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,26 +151,22 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
|
|
||||||
//3、待检入库量:sum(此物料未确认的到货单的单据数-入库数)
|
//3、待检入库量:sum(此物料未确认的到货单的单据数-入库数)
|
||||||
JSONObject num_jo = WQL.getWO("statistical_report_query_01").addParam("flag", "7").addParam("material_id", material_id).process().uniqueResult(0);
|
JSONObject num_jo = WQL.getWO("statistical_report_query_01").addParam("flag", "7").addParam("material_id", material_id).process().uniqueResult(0);
|
||||||
//订单数量
|
|
||||||
double proc_qty = 0;
|
//3、待检入库量:sum(此物料未确认的到货单的单据数-入库数)
|
||||||
//到货重量
|
JSONObject noin_jo = WQL.getWO("statistical_report_query_01").addParam("flag", "77").addParam("material_id", material_id).process().uniqueResult(0);
|
||||||
double allqty = 0;
|
|
||||||
//合同在途
|
//合同在途
|
||||||
double notqty = 0;
|
double notqty = 0;
|
||||||
//待检重量
|
|
||||||
double noqty = 0;
|
|
||||||
//待检+未入库数量
|
//待检+未入库数量
|
||||||
double noin_qty = 0;
|
double noin_qty = 0;
|
||||||
if (ObjectUtil.isNotEmpty(num_jo)) {
|
if (ObjectUtil.isNotEmpty(num_jo)) {
|
||||||
proc_qty = num_jo.getDoubleValue("qty");
|
|
||||||
allqty = num_jo.getDoubleValue("allqty");
|
|
||||||
notqty = num_jo.getDoubleValue("notqty");
|
notqty = num_jo.getDoubleValue("notqty");
|
||||||
noqty = num_jo.getDoubleValue("noqty");
|
|
||||||
noin_qty = num_jo.getDoubleValue("noin_qty");
|
|
||||||
if (notqty < 0) {
|
if (notqty < 0) {
|
||||||
notqty = 0;
|
notqty = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(noin_jo)) {
|
||||||
|
noin_qty = noin_jo.getDoubleValue("noin_qty");
|
||||||
|
}
|
||||||
jo4.put(material_id, String.format("%.3f", noin_qty));
|
jo4.put(material_id, String.format("%.3f", noin_qty));
|
||||||
|
|
||||||
//4、合同在途:订单量-到货量
|
//4、合同在途:订单量-到货量
|
||||||
|
|||||||
@@ -417,6 +417,26 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "77"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
sum( a.receive_qty - a.instor_qty ) AS noin_qty,
|
||||||
|
a.material_id
|
||||||
|
FROM
|
||||||
|
PCS_RC_ReceiveDtl a
|
||||||
|
LEFT JOIN pcs_rc_receivemst mst ON mst.receive_id = a.receive_id
|
||||||
|
WHERE
|
||||||
|
mst.is_delete = '0'
|
||||||
|
AND mst.STATUS <> '99'
|
||||||
|
AND a.STATUS <> '99'
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
a.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
GROUP BY a.material_id
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "8"
|
IF 输入.flag = "8"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.nowstart_date"
|
v-model="query.nowstart_date"
|
||||||
type="date"
|
type="date"
|
||||||
value-format=“yyyy-MM-dd”
|
value-format="yyyy-MM-dd"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
placeholder="选择日期">
|
placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
v-model="query.nowstart_date"
|
v-model="query.nowstart_date"
|
||||||
type="date"
|
type="date"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
value-format=“yyyy-MM-dd”
|
value-format="yyyy-MM-dd"
|
||||||
placeholder="选择日期">
|
placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<el-checkbox v-model="query.checked">启用</el-checkbox>
|
<el-checkbox v-model="query.checked">启用</el-checkbox>
|
||||||
|
|||||||
@@ -372,7 +372,6 @@ export default {
|
|||||||
this.Depts = res
|
this.Depts = res
|
||||||
})
|
})
|
||||||
this.crud.query.createTime = [new Date(), new Date().daysLater(2)]
|
this.crud.query.createTime = [new Date(), new Date().daysLater(2)]
|
||||||
//this.crud.toQuery()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
canUd(row) {
|
canUd(row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user