rev:页面增加查询条件,提升响应速度;出库管理界面增加显示内容、导出增加显示内容
This commit is contained in:
@@ -16,7 +16,7 @@ public interface CheckOutBillService {
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> pageQuery(Map whereJson, Pageable page);
|
||||
Map<String, Object> pageQuery(Map whereJson, Pageable page,String[] stor_id, String[] bill_status, String[] bill_type);
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
@@ -294,5 +294,5 @@ public interface CheckOutBillService {
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(Map map, HttpServletResponse response) throws IOException;
|
||||
void download(Map map, HttpServletResponse response, String[] stor_id, String[] bill_status, String[] bill_type) throws IOException;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@ public class OutChargeServiceImpl implements OutChargeService {
|
||||
String start_region_code = MapUtil.getStr(whereJson, "start_region_code");
|
||||
String end_region_code = MapUtil.getStr(whereJson, "end_region_code");
|
||||
String sap_pcsn = MapUtil.getStr(whereJson, "sap_pcsn");
|
||||
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "15");
|
||||
map.put("bill_status", MapUtil.getStr(whereJson, "bill_status"));
|
||||
@@ -89,6 +90,12 @@ public class OutChargeServiceImpl implements OutChargeService {
|
||||
if (ObjectUtil.isNotEmpty(in_stor_id)) {
|
||||
map.put("in_stor_id", in_stor_id);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(begin_time)) {
|
||||
map.put("begin_time",begin_time);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(end_time)) {
|
||||
map.put("end_time",end_time);
|
||||
}
|
||||
|
||||
JSONObject json = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ios.iostorinv_id DESC");
|
||||
return json;
|
||||
|
||||
@@ -64,7 +64,9 @@ public class CheckServiceImpl implements CheckService {
|
||||
|
||||
JSONObject jo = WQL.getWO("QST_IVT_CHECK").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "check_code desc");
|
||||
JSONArray content = jo.getJSONArray("content");
|
||||
|
||||
if (content.isEmpty()){
|
||||
return jo;
|
||||
}
|
||||
// 拼接主表id
|
||||
String check_id = content.stream()
|
||||
.map(row -> (JSONObject) row)
|
||||
|
||||
@@ -28,8 +28,8 @@ public class CheckOutBillController {
|
||||
@Log("查询出库单")
|
||||
@ApiOperation("查询出库单")
|
||||
//@PreAuthorize("@el.check('checkoutbill:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(checkOutBillService.pageQuery(whereJson, page), HttpStatus.OK);
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page, String[] stor_id, String[] bill_status, String[] bill_type) {
|
||||
return new ResponseEntity<>(checkOutBillService.pageQuery(whereJson, page,stor_id , bill_status, bill_type), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/addDtl")
|
||||
@@ -311,7 +311,7 @@ public class CheckOutBillController {
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void download(@RequestParam Map map, HttpServletResponse response) throws IOException {
|
||||
checkOutBillService.download(map, response);
|
||||
public void download(@RequestParam Map map, HttpServletResponse response,String[] stor_id, String[] bill_status, String[] bill_type) throws IOException {
|
||||
checkOutBillService.download(map, response, stor_id, bill_status, bill_type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
private final HandMoveStorAcsTask moveStorAcsTask;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
|
||||
public Map<String, Object> pageQuery(Map whereJson, Pageable page, String[] stor_id, String[] bill_status, String[] bill_type) {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
map.put("flag", "1");
|
||||
|
||||
@@ -105,6 +105,41 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (ObjectUtil.isNotEmpty(in_stor_id)) {
|
||||
map.put("in_stor_id", in_stor_id);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(stor_id)) {
|
||||
String storIds = "(";
|
||||
for (int i = 0; i < stor_id.length; i++) {
|
||||
if (i != stor_id.length - 1) {
|
||||
storIds += "'" + stor_id[i] + "',";
|
||||
} else {
|
||||
storIds += "'" + stor_id[i] + "')";
|
||||
}
|
||||
}
|
||||
map.put("storIds", storIds);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(bill_status)) {
|
||||
String billStatuses = "(";
|
||||
for (int i = 0; i < bill_status.length; i++) {
|
||||
if (i != bill_status.length - 1) {
|
||||
billStatuses += "'" + bill_status[i] + "',";
|
||||
} else {
|
||||
billStatuses += "'" + bill_status[i] + "')";
|
||||
}
|
||||
}
|
||||
map.put("billStatuses", billStatuses);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(bill_type)) {
|
||||
String billTypes = "(";
|
||||
for (int i = 0; i < bill_type.length; i++) {
|
||||
if (i != bill_type.length - 1) {
|
||||
billTypes += "'" + bill_type[i] + "',";
|
||||
} else {
|
||||
billTypes += "'" + bill_type[i] + "')";
|
||||
}
|
||||
}
|
||||
map.put("billTypes", billTypes);
|
||||
}
|
||||
|
||||
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "iostorinv_id desc");
|
||||
return jo;
|
||||
@@ -682,7 +717,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||
public void download(Map whereJson, HttpServletResponse response, String[] stor_id, String[] bill_status, String[] bill_type) throws IOException {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
map.put("flag", "111");
|
||||
|
||||
@@ -719,6 +754,41 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (StrUtil.isNotEmpty(map.get("cust_code"))) {
|
||||
map.put("cust_code", "%" + map.get("cust_code") + "%");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(stor_id)) {
|
||||
String storIds = "(";
|
||||
for (int i = 0; i < stor_id.length; i++) {
|
||||
if (i != stor_id.length - 1) {
|
||||
storIds += "'" + stor_id[i] + "',";
|
||||
} else {
|
||||
storIds += "'" + stor_id[i] + "')";
|
||||
}
|
||||
}
|
||||
map.put("storIds", storIds);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(bill_status)) {
|
||||
String billStatuses = "(";
|
||||
for (int i = 0; i < bill_status.length; i++) {
|
||||
if (i != bill_status.length - 1) {
|
||||
billStatuses += "'" + bill_status[i] + "',";
|
||||
} else {
|
||||
billStatuses += "'" + bill_status[i] + "')";
|
||||
}
|
||||
}
|
||||
map.put("billStatuses", billStatuses);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(bill_type)) {
|
||||
String billTypes = "(";
|
||||
for (int i = 0; i < bill_type.length; i++) {
|
||||
if (i != bill_type.length - 1) {
|
||||
billTypes += "'" + bill_type[i] + "',";
|
||||
} else {
|
||||
billTypes += "'" + bill_type[i] + "')";
|
||||
}
|
||||
}
|
||||
map.put("billTypes", billTypes);
|
||||
}
|
||||
|
||||
JSONArray resultJSONArray = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).process().getResultJSONArray(0);
|
||||
|
||||
@@ -748,8 +818,19 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (StrUtil.equals(jsonObject.getString("bill_type"), "1009")) {
|
||||
mp.put("业务类型", "手工出库");
|
||||
}
|
||||
//计划重量、实际重量、实际毛重、车号、箱数、收货地址(调拨显示到货仓库)、单据状态
|
||||
mp.put("业务日期", jsonObject.getString("biz_date"));
|
||||
mp.put("总重量", jsonObject.getString("qty"));
|
||||
mp.put("计划重量", jsonObject.getString("qty"));
|
||||
mp.put("实际重量", jsonObject.getString("plan_qty"));
|
||||
mp.put("实际毛重", jsonObject.getString("box_weight"));
|
||||
mp.put("车号", jsonObject.getString("carno"));
|
||||
mp.put("箱数", jsonObject.getString("box_count"));
|
||||
if (StrUtil.equals(jsonObject.getString("bill_type"), "1004")){
|
||||
mp.put("收货地址", jsonObject.getString("stor_name"));
|
||||
}else {
|
||||
mp.put("收货地址", jsonObject.getString("receiptaddress"));
|
||||
}
|
||||
mp.put("单据状态", jsonObject.getString("bill_status"));
|
||||
mp.put("客户编码", jsonObject.getString("cust_code"));
|
||||
mp.put("客户名称", jsonObject.getString("cust_name"));
|
||||
mp.put("交货单号", jsonObject.getString("vbeln"));
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
输入.task_group_id TYPEAS s_string
|
||||
输入.in_stor_id TYPEAS f_string
|
||||
输入.struct_codes TYPEAS f_string
|
||||
输入.storIds TYPEAS f_string
|
||||
输入.billStatuses TYPEAS f_string
|
||||
输入.billTypes TYPEAS f_string
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
@@ -87,7 +90,8 @@
|
||||
cu.shd_dtl_num,
|
||||
cu.cust_name,
|
||||
IFNULL(dtl.vbeln,'') as vbeln,
|
||||
cu.cust_simple_name
|
||||
cu.cust_simple_name,
|
||||
dtl.plan_qty
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
LEFT JOIN md_cs_customerbase cu ON ios.cust_code = cu.cust_code
|
||||
@@ -132,20 +136,20 @@
|
||||
dtl.width like 输入.width
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
OPTION 输入.billTypes <> ""
|
||||
ios.bill_type in 输入.billTypes
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
OPTION 输入.storIds <> ""
|
||||
ios.stor_id in 输入.storIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
OPTION 输入.billStatuses <> ""
|
||||
ios.bill_status in 输入.billStatuses
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
@@ -174,7 +178,13 @@
|
||||
sub.sale_order_name,
|
||||
CONCAT( sub.thickness_request, '*', sub.width_standard ) AS spec,
|
||||
MAX(tr.cust_name) AS wl_cust_name,
|
||||
MAX(ios.estimated_freight) AS estimated_freight
|
||||
MAX(ios.estimated_freight) AS estimated_freight,
|
||||
MAX(dtl.plan_qty) AS plan_qty,
|
||||
MAX(sub.box_weight) AS box_weight,
|
||||
MAX(ios.carno) AS carno,
|
||||
MAX(ios.receiptaddress) AS receiptaddress,
|
||||
MAX( sd.label ) AS bill_status,
|
||||
count(DISTINCT(dis.box_no)) as box_count
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN st_ivt_iostorinvdtl dtl ON dis.iostorinvdtl_id = dtl.iostorinvdtl_id
|
||||
@@ -182,6 +192,7 @@
|
||||
LEFT JOIN md_cs_customerbase cu ON ios.cust_code = cu.cust_code
|
||||
LEFT JOIN md_cs_transportationbase tr ON ios.trans_code = tr.cust_code
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.package_box_sn = dis.box_no AND dis.pcsn = sub.container_name AND dis.iostorinv_id = sub.bill_id
|
||||
LEFT JOIN sys_dict sd on ios.bill_status = sd.`value` and sd.`code` = 'io_bill_status'
|
||||
WHERE
|
||||
ios.io_type = '1'
|
||||
AND ios.is_delete = '0'
|
||||
@@ -219,20 +230,20 @@
|
||||
dtl.width like 输入.width
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
OPTION 输入.billTypes <> ""
|
||||
ios.bill_type in 输入.billTypes
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
OPTION 输入.storIds <> ""
|
||||
ios.stor_id in 输入.storIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
OPTION 输入.billStatuses <> ""
|
||||
ios.bill_status in 输入.billStatuses
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
|
||||
Reference in New Issue
Block a user