代码更新
This commit is contained in:
@@ -169,6 +169,9 @@ public class SectattrServiceImpl implements SectattrService {
|
||||
String is_productstore = (String) whereJson.get("is_productstore");
|
||||
String is_attachment = (String) whereJson.get("is_attachment");
|
||||
String is_reversed = (String) whereJson.get("is_reversed");
|
||||
String stor_id = (String) whereJson.get("stor_id");
|
||||
stor_map.put("stor_id", stor_id);
|
||||
|
||||
if (!StrUtil.isEmpty(is_materialstore)) {
|
||||
stor_map.put("is_materialstore", is_materialstore);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
输入.is_productstore TYPEAS s_string
|
||||
输入.is_attachment TYPEAS s_string
|
||||
输入.is_reversed TYPEAS s_string
|
||||
输入.stor_id TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -95,6 +96,9 @@
|
||||
ENDOPTION
|
||||
OPTION 输入.is_reversed <> ""
|
||||
stor.is_reversed = 输入.is_reversed
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
stor.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.sch.rest;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -79,5 +80,12 @@ public class RegionController {
|
||||
return new ResponseEntity<>(regionService.getPointTypeSelectByCode(region_code), HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/getRegionSelect")
|
||||
@Log("获取区域下拉框")
|
||||
@ApiOperation("获取区域下拉框")
|
||||
public ResponseEntity<Object> getRegionSelect(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(regionService.getRegionSelect(whereJson), HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.sch.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.sch.service.dto.RegionDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
@@ -74,4 +75,11 @@ public interface RegionService {
|
||||
* @return
|
||||
*/
|
||||
JSONArray getPointTypeSelectByCode(String region_code);
|
||||
|
||||
/**
|
||||
* 获取区域类型下拉框
|
||||
* @param
|
||||
* @return JSONObject
|
||||
*/
|
||||
JSONObject getRegionSelect(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public class PointServiceImpl implements PointService {
|
||||
@Override
|
||||
public JSONArray getPoint(Map wherJson) {
|
||||
String area_type = (String) wherJson.get("area_type");
|
||||
JSONArray point_rows = WQLObject.getWQLObject("sch_base_point").query("area_type IN (" + area_type + ") AND is_used = '1' AND is_delete = '0' order by point_code").getResultJSONArray(0);
|
||||
JSONArray point_rows = WQLObject.getWQLObject("sch_base_point").query("region_code = '"+area_type+"' and is_used = '1' and is_delete = '0'").getResultJSONArray(0);
|
||||
return point_rows;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,4 +166,38 @@ public class RegionServiceImpl implements RegionService {
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getRegionSelect(JSONObject whereJson) {
|
||||
String stor_id = whereJson.getString("stor_id");
|
||||
JSONArray prodArr = WQL.getWO("QSCH_REGION_01").addParam("flag", "2").addParam("value",stor_id).process().getResultJSONArray(0);
|
||||
|
||||
JSONArray new_ja = new JSONArray();
|
||||
for (int i = 0; i < prodArr.size(); i++) {
|
||||
JSONObject json = prodArr.getJSONObject(i);
|
||||
|
||||
JSONObject jsonMst = new JSONObject();
|
||||
jsonMst.put("value",json.getString("value"));
|
||||
jsonMst.put("label",json.getString("label"));
|
||||
|
||||
// 查询子类
|
||||
JSONArray DtlArr = WQL.getWO("QSCH_REGION_01").addParam("flag", "3").addParam("product_area", json.getString("value")).process().getResultJSONArray(0);
|
||||
if (DtlArr.size() > 0) {
|
||||
JSONArray sect_ja = new JSONArray();
|
||||
|
||||
for (int j = 0; j < DtlArr.size(); j++) {
|
||||
JSONObject json2 = DtlArr.getJSONObject(j);
|
||||
JSONObject sect_cas = new JSONObject();
|
||||
sect_cas.put("value", json2.getString("region_code"));
|
||||
sect_cas.put("label", json2.getString("region_name"));
|
||||
sect_ja.add(sect_cas);
|
||||
}
|
||||
jsonMst.put("children", sect_ja);
|
||||
}
|
||||
new_ja.add(jsonMst);
|
||||
}
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("content", new_ja);
|
||||
return jo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
输入.flag TYPEAS s_string
|
||||
输入.region_code TYPEAS s_string
|
||||
输入.product_area TYPEAS s_string
|
||||
输入.value TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -57,3 +58,35 @@
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sys_dict
|
||||
WHERE
|
||||
code = 'product_area'
|
||||
|
||||
OPTION 输入.value <> ""
|
||||
value = 输入.value
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sch_base_region
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
OPTION 输入.product_area <> ""
|
||||
product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -0,0 +1,204 @@
|
||||
package org.nl.wms.st.in.rest;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.wms.st.in.service.ProductInService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "成品入库")
|
||||
@RequestMapping("/api/in/productIn")
|
||||
@Slf4j
|
||||
public class ProductInController {
|
||||
|
||||
private final ProductInService productInService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询入库单据")
|
||||
@ApiOperation("查询入库单据")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(productInService.pageQuery(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("删除出入库单")
|
||||
@ApiOperation("删除出入库单")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
productInService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getBillDtl")
|
||||
@Log("查询入库单来源")
|
||||
@ApiOperation("查询入库单来源")
|
||||
public ResponseEntity<Object> getBillDtl(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(productInService.getBillDtl(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping()
|
||||
@Log("新增入库单")
|
||||
@ApiOperation("新增入库单")
|
||||
public ResponseEntity<Object> insertDtl(@RequestBody JSONObject whereJson) {
|
||||
productInService.insertDtl(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改入库单")
|
||||
@ApiOperation("修改入库单")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
|
||||
productInService.update(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/queryStor")
|
||||
@Log("查询仓库")
|
||||
@ApiOperation("查询仓库")
|
||||
public ResponseEntity<Object> queryStor() {
|
||||
return new ResponseEntity<>(productInService.queryStor(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getIODtl")
|
||||
@Log("查询出入库单明细")
|
||||
@ApiOperation("查询出入库单明细")
|
||||
public ResponseEntity<Object> getIODtl(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(productInService.getIODtl(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/commit")
|
||||
@Log("出入单提交")
|
||||
@ApiOperation("出入单提交")
|
||||
public ResponseEntity<Object> commit(@RequestBody Map whereJson) {
|
||||
productInService.commit(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/getDisDtl")
|
||||
@Log("查询入库分配明细")
|
||||
@ApiOperation("查询入库分配明细")
|
||||
public ResponseEntity<Object> getDisDtl(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(productInService.getDisDtl(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/divStruct")
|
||||
@Log("分配货位")
|
||||
@ApiOperation("分配货位")
|
||||
public ResponseEntity<Object> divStruct(@RequestBody Map whereJson) {
|
||||
productInService.divStruct(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/unDivStruct")
|
||||
@Log("取消分配货位")
|
||||
@ApiOperation("取消分配货位")
|
||||
public ResponseEntity<Object> unDivStruct(@RequestBody Map whereJson) {
|
||||
productInService.unDivStruct(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/divPoint")
|
||||
@Log("设置起点")
|
||||
@ApiOperation("设置起点")
|
||||
public ResponseEntity<Object> divPoint(@RequestBody Map whereJson) {
|
||||
productInService.divPoint(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/queryTask")
|
||||
@Log("查询任务")
|
||||
@ApiOperation("查询任务")
|
||||
public ResponseEntity<Object> queryTask(@RequestBody Map whereJson) {
|
||||
return new ResponseEntity<>(productInService.queryTask(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/delDis")
|
||||
@Log("删除分配")
|
||||
@ApiOperation("删除分配")
|
||||
public ResponseEntity<Object> delDis(@RequestBody JSONObject whereJson) {
|
||||
productInService.delDis(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryBoxMater")
|
||||
@Log("查询箱内子卷")
|
||||
@ApiOperation("查询箱内子卷")
|
||||
public ResponseEntity<Object> queryBoxMater(@RequestBody JSONArray whereJson) {
|
||||
|
||||
return new ResponseEntity<>(productInService.queryBoxMater(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/updateTask")
|
||||
@Log("变更任务")
|
||||
@ApiOperation("变更任务")
|
||||
public ResponseEntity<Object> updateTask(@RequestBody Map whereJson) {
|
||||
productInService.updateTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/delTask")
|
||||
@Log("删除任务")
|
||||
@ApiOperation("删除任务")
|
||||
public ResponseEntity<Object> delTask(@RequestBody Map whereJson) {
|
||||
productInService.delTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/reIssueTask")
|
||||
@Log("下发")
|
||||
@ApiOperation("下发")
|
||||
public ResponseEntity<Object> reIssueTask(@RequestBody Map whereJson) {
|
||||
productInService.reIssueTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmTask")
|
||||
@Log("完成任务")
|
||||
@ApiOperation("完成任务")
|
||||
public ResponseEntity<Object> confirmTask(@RequestBody Map whereJson) {
|
||||
productInService.confirmTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/cancelTask")
|
||||
@Log("取消完成任务")
|
||||
@ApiOperation("取消完成任务")
|
||||
public ResponseEntity<Object> cancelTask(@RequestBody Map whereJson) {
|
||||
productInService.cancelTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/confirm")
|
||||
@Log("完成单据")
|
||||
@ApiOperation("完成单据")
|
||||
public ResponseEntity<Object> confirm(@RequestBody Map whereJson) {
|
||||
productInService.confirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/backConfirm")
|
||||
@Log("完成入库负单")
|
||||
@ApiOperation("完成入库负单")
|
||||
public ResponseEntity<Object> backConfirm(@RequestBody Map whereJson) {
|
||||
productInService.backConfirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/autoDis")
|
||||
@Log("自动分配")
|
||||
@ApiOperation("自动分配")
|
||||
public ResponseEntity<Object> autoDis(@RequestBody JSONObject whereJson) {
|
||||
productInService.autoDis(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package org.nl.wms.st.in.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ProductInService {
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> pageQuery(Map whereJson, Pageable page);
|
||||
|
||||
Map<String, Object> getBillDtl(Map whereJson,Pageable page);
|
||||
|
||||
/**
|
||||
* 新增单据
|
||||
* @param whereJson /
|
||||
* @return iostorinv_id
|
||||
*/
|
||||
String insertDtl (JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 删除单据
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
void delDis(JSONObject whereJson);
|
||||
|
||||
JSONArray queryBoxMater(JSONArray rows);
|
||||
|
||||
/**
|
||||
* 修改单据
|
||||
* @param whereJson /
|
||||
*/
|
||||
void update(JSONObject whereJson);
|
||||
|
||||
void commit(Map whereJson);
|
||||
|
||||
/**
|
||||
* 查询出入库单明细
|
||||
* @param whereJson /
|
||||
* @return JSONArray
|
||||
*/
|
||||
JSONArray getIODtl(JSONObject whereJson);
|
||||
|
||||
void divStruct(Map whereJson);
|
||||
|
||||
void unDivStruct(Map whereJson);
|
||||
|
||||
void divPoint(Map whereJson);
|
||||
|
||||
void updateTask(Map whereJson);
|
||||
|
||||
void delTask(Map whereJson);
|
||||
|
||||
void reIssueTask(Map whereJson);
|
||||
|
||||
void confirmTask(Map whereJson);
|
||||
|
||||
void cancelTask(Map whereJson);
|
||||
|
||||
void confirm(Map whereJson);
|
||||
|
||||
void backConfirm(Map whereJson);
|
||||
|
||||
/**
|
||||
* 查询入库分配明细
|
||||
* @param whereJson /
|
||||
* @return JSONArray
|
||||
*/
|
||||
JSONArray getDisDtl(JSONObject whereJson);
|
||||
|
||||
JSONArray queryTask(Map whereJson);
|
||||
|
||||
JSONObject autoDis(JSONObject whereJson);
|
||||
|
||||
JSONObject autoDisMove(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询仓库
|
||||
* @return JSONArray
|
||||
*/
|
||||
JSONArray queryStor();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,134 @@
|
||||
[交易说明]
|
||||
交易名: 成品入库分页查询
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.stor_id TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.bill_status TYPEAS s_string
|
||||
输入.bill_type TYPEAS s_string
|
||||
输入.bill_code TYPEAS s_string
|
||||
输入.iostorinvdtl_id TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
ST_IVT_IOStorInv
|
||||
WHERE
|
||||
io_type = '0'
|
||||
AND is_delete = '0'
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
input_time <= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
input_time >= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_status <> ""
|
||||
bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_type <> ""
|
||||
bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
bill_code LIKE 输入.bill_code
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
dtl.*,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
mater.material_spec
|
||||
FROM
|
||||
ST_IVT_IOStorInvDtl dtl
|
||||
LEFT JOIN ST_IVT_IOStorInv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = dtl.material_id
|
||||
WHERE
|
||||
mst.io_type = '0'
|
||||
AND mst.is_delete = '0'
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
mst.bill_code = 输入.bill_code
|
||||
ENDOPTION
|
||||
|
||||
order by dtl.seq_no ASC
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
QUERY
|
||||
SELECT
|
||||
dis.*,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
mater.material_spec,
|
||||
point.point_code
|
||||
FROM
|
||||
ST_IVT_IOStorInvDis dis
|
||||
LEFT JOIN sch_base_point point ON point.point_id = dis.point_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
|
||||
WHERE
|
||||
IFNULL(dis.task_id,'') = ''
|
||||
|
||||
OPTION 输入.iostorinvdtl_id <> ""
|
||||
dis.iostorinvdtl_id = 输入.iostorinvdtl_id
|
||||
ENDOPTION
|
||||
|
||||
order by dis.seq_no ASC
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
Reference in New Issue
Block a user