修改
This commit is contained in:
@@ -34,6 +34,7 @@ public class OutController {
|
||||
@Log("套轴确认")
|
||||
@ApiOperation("套轴确认")
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(casingService.confirm(whereJson), HttpStatus.OK);
|
||||
casingService.confirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,13 +35,15 @@ public class ShippingController {
|
||||
@Log("呼叫载具")
|
||||
@ApiOperation("呼叫载具")
|
||||
public ResponseEntity<Object> needVehicle(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(shippingService.needVehicle(whereJson), HttpStatus.OK);
|
||||
shippingService.needVehicle(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirm")
|
||||
@Log("套轴确认")
|
||||
@ApiOperation("套轴确认")
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(shippingService.confirm(whereJson), HttpStatus.OK);
|
||||
shippingService.confirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.pda.mps.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
public interface ShippingService {
|
||||
@@ -9,20 +10,20 @@ public interface ShippingService {
|
||||
* @param whereJson /
|
||||
* @return JSONObject
|
||||
*/
|
||||
JSONObject queryMaterialInfo(JSONObject whereJson);
|
||||
JSONArray queryMaterialInfo(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 呼叫载具
|
||||
* @param whereJson /
|
||||
* @return JSONObject
|
||||
*/
|
||||
JSONObject needVehicle(JSONObject whereJson);
|
||||
void needVehicle(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 配送确认
|
||||
* @param whereJson /
|
||||
* @return JSONObject
|
||||
*/
|
||||
JSONObject confirm(JSONObject whereJson);
|
||||
void confirm(JSONObject whereJson);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
package org.nl.wms.pda.mps.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.wms.pda.mps.service.CasingService;
|
||||
import org.nl.wms.pda.mps.service.ShippingService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@@ -14,27 +21,42 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject queryMaterialInfo(JSONObject whereJson) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
public JSONArray queryMaterialInfo(JSONObject whereJson) {
|
||||
String product_area = whereJson.getString("product_area");
|
||||
String qzzno = whereJson.getString("qzzno");
|
||||
|
||||
HashMap map = new HashMap();
|
||||
map.put("flag", "3");
|
||||
if (StrUtil.isNotEmpty(product_area)) {
|
||||
map.put("product_area", product_area);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(qzzno)) {
|
||||
map.put("qzzno", qzzno);
|
||||
}
|
||||
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
|
||||
return rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject needVehicle(JSONObject whereJson) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
public void needVehicle(JSONObject whereJson) {
|
||||
JSONObject cut_jo = whereJson.getJSONObject("cut_jo");
|
||||
//查询离该分切计划包含机台最近的一个空载具
|
||||
JSONObject empty_vehicle = WQL.getWO("PDA_02")
|
||||
.addParam("sort_seq",cut_jo.getString("sort_seq"))
|
||||
.addParam("product_area",cut_jo.getString("product_area"))
|
||||
.addParam("point_location",cut_jo.getString("point_location"))
|
||||
.addParam("flag","3").process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(empty_vehicle)){
|
||||
throw new BadRequestException("未查询到可用的空载具!");
|
||||
}
|
||||
|
||||
//如果查询到给ACS下发一个桁架任务
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject confirm(JSONObject whereJson) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
public void confirm(JSONObject whereJson) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
输入.product_area TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
输入.qzzno TYPEAS s_string
|
||||
输入.sort_seq TYPEAS s_string
|
||||
输入.point_location TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -83,17 +86,48 @@
|
||||
plan.FRP_material,
|
||||
plan.FRP_description,
|
||||
plan.FRP_model,
|
||||
plan.workorder_id
|
||||
plan.workorder_id,
|
||||
ivt.sort_seq,
|
||||
ivt.product_area,
|
||||
ivt.point_location
|
||||
FROM
|
||||
PDM_BI_SlittingProductionPlan plan
|
||||
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
|
||||
WHERE
|
||||
plan.STATUS < 2
|
||||
AND
|
||||
is_child_tz_ok = 0
|
||||
is_child_tz_ok = 1
|
||||
AND
|
||||
is_child_ps_ok = 0
|
||||
OPTION 输入.product_area <> ""
|
||||
ivt.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
OPTION 输入.qzzno <> ""
|
||||
plan.qzzno = 输入.qzzno
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
QUERY
|
||||
SELECT
|
||||
ivt.*
|
||||
FROM
|
||||
st_ivt_deliverypointivt ivt
|
||||
WHERE
|
||||
1=1
|
||||
OPTION 输入.product_area <> ""
|
||||
ivt.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
OPTION 输入.product_area <> ""
|
||||
ivt.point_location = 输入.point_location
|
||||
ENDOPTION
|
||||
ORDER BY
|
||||
abs(3-输入.sort_seq),point_code
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user