代码更新

This commit is contained in:
2022-11-16 14:59:47 +08:00
parent 0b374a437b
commit b921c23aa8
5 changed files with 15 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -33,7 +34,10 @@ public class CoolInController {
@Log("半成品入库初始化查询")
@ApiOperation("半成品入库初始化查询")
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")

View File

@@ -3,6 +3,7 @@ package org.nl.wms.pda.st.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.modules.wql.core.content.HttpContext;
/**
* @description 服务接口
@@ -16,7 +17,7 @@ public interface CoolInService {
* @param whereJson /
* @return JSONObject /
*/
JSONObject coolIOQuery(JSONObject whereJson);
JSONObject coolIOQuery(JSONObject whereJson, HttpContext ctx);
/**
* 入库确认

View File

@@ -15,6 +15,7 @@ import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.system.util.CodeUtil;
import org.nl.modules.wql.WQL;
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.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -30,17 +31,19 @@ import org.springframework.transaction.annotation.Transactional;
public class CoolInServiceImpl implements CoolInService {
@Override
public JSONObject coolIOQuery(JSONObject whereJson) {
public JSONObject coolIOQuery(JSONObject whereJson, HttpContext ctx) {
String container_name = whereJson.getString("container_name");
JSONObject map = new JSONObject();
map.put("flag", "1");
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);
JSONObject jo = new JSONObject();
jo.put("data", resultJSONArray);
jo.put("data", jsonObject.getJSONArray("content"));
jo.put("size", resultJSONArray.size());
jo.put("message", "查询成功!");
return jo;
}

View File

@@ -41,7 +41,7 @@
##########################################
IF 输入.flag = "1"
QUERY
PAGEQUERY
SELECT
(
CASE
@@ -78,5 +78,5 @@
ENDOPTION
ENDSELECT
ENDQUERY
ENDPAGEQUERY
ENDIF

View File

@@ -45,6 +45,7 @@
IF 输入.flag = "1"
QUERY
SELECT
distinct
mst.iostorinv_id,
mst.bill_code,
(