代码更新
This commit is contained in:
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.logging.annotation.Log;
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.wms.pda.st.service.CoolInService;
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -33,7 +34,10 @@ public class CoolInController {
|
|||||||
@Log("半成品入库初始化查询")
|
@Log("半成品入库初始化查询")
|
||||||
@ApiOperation("半成品入库初始化查询")
|
@ApiOperation("半成品入库初始化查询")
|
||||||
public ResponseEntity<Object> create(@RequestBody JSONObject whereJson){
|
public ResponseEntity<Object> create(@RequestBody JSONObject whereJson){
|
||||||
return new ResponseEntity<>(coolInService.coolIOQuery(whereJson),HttpStatus.OK);
|
HttpContext ctx = new HttpContext("11");
|
||||||
|
ctx.setPage((String)(whereJson.get("page")));
|
||||||
|
ctx.setRows((String)(whereJson.get("size")));
|
||||||
|
return new ResponseEntity<>(coolInService.coolIOQuery(whereJson,ctx),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/confirmInstor")
|
@PostMapping("/confirmInstor")
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package org.nl.wms.pda.st.service;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 服务接口
|
* @description 服务接口
|
||||||
@@ -16,7 +17,7 @@ public interface CoolInService {
|
|||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject /
|
* @return JSONObject /
|
||||||
*/
|
*/
|
||||||
JSONObject coolIOQuery(JSONObject whereJson);
|
JSONObject coolIOQuery(JSONObject whereJson, HttpContext ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库确认
|
* 入库确认
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.nl.modules.common.utils.SecurityUtils;
|
|||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.wms.pda.st.service.CoolInService;
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -30,17 +31,19 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
public class CoolInServiceImpl implements CoolInService {
|
public class CoolInServiceImpl implements CoolInService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject coolIOQuery(JSONObject whereJson) {
|
public JSONObject coolIOQuery(JSONObject whereJson, HttpContext ctx) {
|
||||||
String container_name = whereJson.getString("container_name");
|
String container_name = whereJson.getString("container_name");
|
||||||
|
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
if (ObjectUtil.isNotEmpty(container_name)) map.put("container_name", "%"+container_name+"%");
|
if (ObjectUtil.isNotEmpty(container_name)) map.put("container_name", "%"+container_name+"%");
|
||||||
|
|
||||||
|
JSONObject jsonObject = WQL.getWO("PDA_COOLIN").addParamMap(map).pageQuery(ctx, "der.container_name ASC");
|
||||||
JSONArray resultJSONArray = WQL.getWO("PDA_COOLIN").addParamMap(map).process().getResultJSONArray(0);
|
JSONArray resultJSONArray = WQL.getWO("PDA_COOLIN").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", resultJSONArray);
|
jo.put("data", jsonObject.getJSONArray("content"));
|
||||||
|
jo.put("size", resultJSONArray.size());
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
IF 输入.flag = "1"
|
IF 输入.flag = "1"
|
||||||
QUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
(
|
(
|
||||||
CASE
|
CASE
|
||||||
@@ -78,5 +78,5 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
IF 输入.flag = "1"
|
IF 输入.flag = "1"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
|
distinct
|
||||||
mst.iostorinv_id,
|
mst.iostorinv_id,
|
||||||
mst.bill_code,
|
mst.bill_code,
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user