This commit is contained in:
zds
2022-12-01 20:09:38 +08:00
parent 70fe17b48c
commit aced8be5a7
14 changed files with 287 additions and 104 deletions

View File

@@ -292,14 +292,18 @@ public class ReceivemstServiceImpl implements ReceivemstService {
@Override
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> queryOrder(Map whereJson, Pageable page) {
String begin_time = (String) whereJson.get("begin_time");
String end_time = (String) whereJson.get("end_time");
String receive_code = (String) whereJson.get("receive_code");
String material_code = (String) whereJson.get("material_code");
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
map.put("begin_time", begin_time);
map.put("end_time", end_time);
String begin_time =MapUtil.getStr(whereJson, "begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
map.put("receive_code", receive_code);
map.put("material_code", material_code);
//只能为原辅料

View File

@@ -60,8 +60,14 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
String begin_time =MapUtil.getStr(whereJson, "begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
map.put("is_pass", MapUtil.getStr(whereJson, "is_pass"));
String inspection_code = MapUtil.getStr(whereJson, "inspection_code");
String material_code = MapUtil.getStr(whereJson, "material_code");

View File

@@ -138,8 +138,15 @@ public class PowderProductionQueryServiceImpl implements PowderProductionQuerySe
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
String begin_time =MapUtil.getStr(whereJson, "begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%");

View File

@@ -3,6 +3,7 @@ package org.nl.wms.statistics.service.impl;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONArray;
@@ -32,8 +33,14 @@ public class ProductionDayQueryServiceImpl implements ProductionDayQueryService
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
String begin_time = MapUtil.getStr(whereJson, "begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%");

View File

@@ -90,7 +90,15 @@ 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), "mb.material_name");
String begin_time =MapUtil.getStr(whereJson, "begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
JSONObject jo = WQL.getWO("statistical_report_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_name,mst.biz_date desc");
JSONArray json = jo.getJSONArray("content");
map.put("flag", "02");
JSONArray jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().getResultJSONArray(1);