This commit is contained in:
zds
2022-07-11 00:44:25 +08:00
parent c57c5b9292
commit 10c1477c5b
5 changed files with 357 additions and 0 deletions

View File

@@ -38,6 +38,14 @@ public class CheckOutBillController {
return new ResponseEntity<>(checkOutBillService.queryAddDtl(whereJson,page), HttpStatus.OK);
}
@GetMapping("/queryDtl")
@Log("查询出库单")
@ApiOperation("查询出库单")
//@PreAuthorize("@el.check('checkoutbill:list')")
public ResponseEntity<Object> queryDtl(@RequestParam Map whereJson, Pageable page){
return new ResponseEntity<>(checkOutBillService.queryDtl(whereJson,page), HttpStatus.OK);
}
@GetMapping("/getOutBillDtl")
@Log("查询出库单")
@ApiOperation("查询出库单")

View File

@@ -24,6 +24,14 @@ public interface CheckOutBillService {
* @return Map<String, Object>
*/
Map<String, Object> queryAddDtl(Map whereJson, Pageable page);
/**
* 查询数据分页
*
* @param whereJson 条件
* @param page 分页参数
* @return Map<String, Object>
*/
Map<String, Object> queryDtl(Map whereJson, Pageable page);
/**
* 多选删除

View File

@@ -81,6 +81,29 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
return jo;
}
@Override
public Map<String, Object> queryDtl(Map whereJson, Pageable page) {
HashMap<String, String> map = new HashMap<>(whereJson);
map.put("flag", "12");
if (StrUtil.isNotEmpty(map.get("material_code"))) {
map.put("material_code", "%" + map.get("material_code") + "%");
}
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
map.put("pcsn", "%" + map.get("pcsn") + "%");
}
String begin_time = map.get("begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = map.get("end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "iosdtl2.material_id");
return jo;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {

View File

@@ -16,6 +16,8 @@
输入.flag TYPEAS s_string
输入.bill_status TYPEAS s_string
输入.bill_code TYPEAS s_string
输入.source_bill_code TYPEAS s_string
输入.username TYPEAS s_string
输入.create_mode TYPEAS s_string
输入.bill_type TYPEAS s_string
输入.stor_id TYPEAS s_string
@@ -598,5 +600,80 @@
ENDQUERY
ENDIF
IF 输入.flag = "12"
PAGEQUERY
SELECT
SUM( iosdtl2.real_qty ) AS sum_real_qty,
SUM( iosdtl2.plan_qty ) AS sum_plan_qty,
iosdtl2.qty_unit_id,
iosdtl2.qty_unit_name,
iosdtl2.material_name,
iosdtl2.material_code,
iosdtl2.material_id,
iosdtl2.pcsn,
iosdtl2.is_active,
iosdtl2.ivt_level,
iosdtl2.quality_scode
FROM
(
SELECT
iosdtl.material_id,
iosdtl.pcsn,
iosdtl.quality_scode,
iosdtl.ivt_level,
iosdtl.is_active,
iosdtl.plan_qty,
iosdtl.real_qty,
iosdtl.qty_unit_id,
iosdtl.qty_unit_name,
mb.material_name,
mb.material_code
FROM
ST_IVT_IOStorInvDtl iosdtl
LEFT JOIN md_me_materialbase mb ON mb.material_id = iosdtl.material_id
LEFT JOIN ST_IVT_IOStorInv ios ON ios.iostorinv_id = iosdtl.iostorinv_id
WHERE
1 = 1
AND ios.is_delete = '0'
OPTION 输入.remark <> ""
(mb.material_code like 输入.remark or mb.material_name like 输入.remark)
ENDOPTION
OPTION 输入.username <> ""
(ios.input_optid = 输入.username or ios.input_optname = 输入.username)
ENDOPTION
OPTION 输入.pcsn <> ""
iosdtl.pcsn like 输入.pcsn
ENDOPTION
OPTION 输入.source_bill_code <> ""
iosdtl.source_bill_code = 输入.source_bill_code
ENDOPTION
OPTION 输入.begin_time <> ""
ios.biz_date >= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
ios.biz_date <= 输入.end_time
ENDOPTION
OPTION 输入.bill_type <> ""
ios.bill_type = 输入.bill_type
ENDOPTION
OPTION 输入.stor_id <> ""
ios.stor_id = 输入.stor_id
ENDOPTION
) iosdtl2
where 1=1
GROUP BY
iosdtl2.material_id,
iosdtl2.pcsn,
iosdtl2.is_active,
iosdtl2.ivt_level,
iosdtl2.quality_scode,
iosdtl2.material_name,
iosdtl2.material_code,
iosdtl2.qty_unit_id,
iosdtl2.qty_unit_name
ENDSELECT
ENDPAGEQUERY
ENDIF