修改
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
输入.qzzno TYPEAS s_string
|
||||
输入.sort_seq TYPEAS s_string
|
||||
输入.point_location TYPEAS s_string
|
||||
输入.sql_str TYPEAS f_string
|
||||
输入.sql_str TYPEAS f_string
|
||||
|
||||
|
||||
[临时表]
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
package org.nl.wms.pda.st.rest;
|
||||
|
||||
|
||||
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.modules.logging.annotation.Log;
|
||||
import org.nl.wms.pda.st.service.CoolInService;
|
||||
import org.nl.wms.pda.st.service.ProductInstorService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "半成品入库")
|
||||
@RequestMapping("/api/pda/st")
|
||||
@Slf4j
|
||||
public class ProductInstorController {
|
||||
|
||||
private final ProductInstorService productInstorService;
|
||||
|
||||
@PostMapping("/boxQuery")
|
||||
@Log("查询子卷包装关系")
|
||||
@ApiOperation("查询子卷包装关系")
|
||||
public ResponseEntity<Object> boxQuery(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(productInstorService.boxQuery(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
package org.nl.wms.pda.st.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author gby
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
public interface ProductInstorService {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param whereJson /
|
||||
* @return JSONArray /
|
||||
*/
|
||||
JSONObject boxQuery(JSONObject whereJson);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
|
||||
package org.nl.wms.pda.st.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.pda.st.service.CoolInService;
|
||||
import org.nl.wms.pda.st.service.ProductInstorService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @description 服务实现
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
|
||||
@Override
|
||||
public JSONObject boxQuery(JSONObject whereJson) {
|
||||
String box_no = whereJson.getString("box_no");
|
||||
//1-报废入库;2-生产入库;3-退货入库
|
||||
String option = whereJson.getString("option");
|
||||
|
||||
JSONArray rows = new JSONArray();
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("box_no",box_no);
|
||||
if (option.equals("1")){
|
||||
map.put("flag","1");
|
||||
//如果是报废入库要查询对应的报废出库
|
||||
rows = WQL.getWO("PDA_ST_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
}else {
|
||||
map.put("flag","2");
|
||||
//查询状态为生成的子卷包装关系对应表
|
||||
rows = WQL.getWO("PDA_ST_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("data",rows);
|
||||
jo.put("message","查询成功!");
|
||||
return jo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
[交易说明]
|
||||
交易名: 手持接口
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.box_no TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
QUERY
|
||||
SELECT
|
||||
sub.package_box_SN,
|
||||
sub.container_name,
|
||||
sub.product_name,
|
||||
sub.product_description,
|
||||
sub.net_weight
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_SN = dis.box_no
|
||||
WHERE
|
||||
mst.bill_type = '1002'
|
||||
AND
|
||||
sub.package_box_SN = 输入.box_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
package_box_SN,
|
||||
container_name,
|
||||
product_name,
|
||||
product_description,
|
||||
net_weight
|
||||
FROM
|
||||
pdm_bi_subpackagerelation sub
|
||||
WHERE
|
||||
sub.status = '0'
|
||||
AND
|
||||
sub.package_box_SN = 输入.box_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
Binary file not shown.
Reference in New Issue
Block a user