修改
This commit is contained in:
Binary file not shown.
@@ -531,7 +531,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//生成一个成品出库任务
|
//生成一个改切出库任务
|
||||||
|
|
||||||
//查询该箱子所在仓位
|
//查询该箱子所在仓位
|
||||||
String package_box_sn = plan_jo.getString("package_box_sn");
|
String package_box_sn = plan_jo.getString("package_box_sn");
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ public class LmsToSapController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/returnMoveDtl")
|
@PostMapping("/returnMoveDtl")
|
||||||
@Log("LMS创建移库单")
|
@Log("LMS移库接口回传")
|
||||||
@ApiOperation("LMS创建移库单")
|
@ApiOperation("LMS移库接口回传")
|
||||||
public ResponseEntity<Object> returnMoveDtl(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> returnMoveDtl(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(LmsToSapService.returnMoveDtl(jo), HttpStatus.OK);
|
return new ResponseEntity<>(LmsToSapService.returnMoveDtl(jo), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,4 +37,18 @@ public class OutController {
|
|||||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(outService.confirm(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(outService.confirm(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/conveyPointQuery")
|
||||||
|
@Log("缓存点位查询")
|
||||||
|
@ApiOperation("缓存点位查询")
|
||||||
|
public ResponseEntity<Object> conveyPointQuery(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(outService.conveyPointQuery(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/conveyConfirm")
|
||||||
|
@Log("出站配送")
|
||||||
|
@ApiOperation("出站配送")
|
||||||
|
public ResponseEntity<Object> conveyConfirm(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(outService.conveyConfirm(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,4 +44,18 @@ public class ShippingController {
|
|||||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(shippingService.confirm(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(shippingService.confirm(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/returnVehicle")
|
||||||
|
@Log("载具送回")
|
||||||
|
@ApiOperation("载具送回")
|
||||||
|
public ResponseEntity<Object> returnVehicle(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(shippingService.returnVehicle(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/check")
|
||||||
|
@Log("配送校验")
|
||||||
|
@ApiOperation("配送校验")
|
||||||
|
public ResponseEntity<Object> check(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(shippingService.check(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,18 @@ public interface OutService {
|
|||||||
*/
|
*/
|
||||||
JSONObject confirm(JSONObject whereJson);
|
JSONObject confirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存点位查询
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject conveyPointQuery(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出站配送
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject conveyConfirm(JSONObject whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,18 @@ public interface ShippingService {
|
|||||||
*/
|
*/
|
||||||
JSONObject confirm(JSONObject whereJson);
|
JSONObject confirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 载具送回
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject returnVehicle(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配送校验
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject check(JSONObject whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ 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.wms.pda.mps.service.OutService;
|
import org.nl.wms.pda.mps.service.OutService;
|
||||||
import org.nl.wms.pda.mps.service.ShippingService;
|
import org.nl.wms.pda.mps.service.ShippingService;
|
||||||
|
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||||
import org.nl.wms.sch.tasks.CutTrussTask;
|
import org.nl.wms.sch.tasks.CutTrussTask;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -157,5 +158,40 @@ public class OutServiceImpl implements OutService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject conveyPointQuery(JSONObject whereJson) {
|
||||||
|
String product_area = whereJson.getString("product_area");
|
||||||
|
HashMap<String,String> map = new HashMap<>();
|
||||||
|
map.put("flag","10");
|
||||||
|
if (StrUtil.isNotEmpty(product_area)){
|
||||||
|
map.put("product_area",product_area);
|
||||||
|
}
|
||||||
|
JSONArray deliver_rows = WQL.getWO("PDA_02").addParam("product_area",product_area).addParam("flag","").process().getResultJSONArray(0);
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("data",deliver_rows);
|
||||||
|
jo.put("message","查询成功!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject conveyConfirm(JSONObject whereJson) {
|
||||||
|
String point_code = whereJson.getString("point_code");
|
||||||
|
if (StrUtil.isEmpty(point_code)){
|
||||||
|
throw new BadRequestException("起点不能为空!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果查询到给ACS下发一个输送线任务
|
||||||
|
JSONObject form = new JSONObject();
|
||||||
|
form.put("point_code1",point_code);
|
||||||
|
form.put("point_code2","SS01");
|
||||||
|
form.put("task_type","010401");
|
||||||
|
CutConveyorTask cutConveyorTask = new CutConveyorTask();
|
||||||
|
cutConveyorTask.createTask(form);
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("message","查询成功!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,10 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject confirm(JSONObject whereJson) {
|
public JSONObject confirm(JSONObject whereJson) {
|
||||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||||
|
String vehicle_code = whereJson.getString("vehicle_code");
|
||||||
|
if (StrUtil.isEmpty(vehicle_code)){
|
||||||
|
throw new BadRequestException("载具号不能为空!");
|
||||||
|
}
|
||||||
|
|
||||||
if (rows.size()>2){
|
if (rows.size()>2){
|
||||||
throw new BadRequestException("最多选择两个子卷进行操作!");
|
throw new BadRequestException("最多选择两个子卷进行操作!");
|
||||||
@@ -126,6 +130,16 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
map.put("qzzno", qzzno);
|
map.put("qzzno", qzzno);
|
||||||
}
|
}
|
||||||
JSONObject plan_jo = WQL.getWO("PDA_02").addParamMap(map).process().uniqueResult(0);
|
JSONObject plan_jo = WQL.getWO("PDA_02").addParamMap(map).process().uniqueResult(0);
|
||||||
|
|
||||||
|
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '"+resource_name+"'").uniqueResult(0);
|
||||||
|
String product_area = cut_jo.getString("product_area");
|
||||||
|
String point_location = cut_jo.getString("point_location");
|
||||||
|
|
||||||
|
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '"+product_area+"' AND point_location = '"+point_location+"' AND vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(vehicle_area)){
|
||||||
|
throw new BadRequestException("该气涨轴无法放在该载具上!");
|
||||||
|
}
|
||||||
//查询离该分切计划包含机台最近的一个空点位
|
//查询离该分切计划包含机台最近的一个空点位
|
||||||
JSONObject empty_point = WQL.getWO("PDA_02")
|
JSONObject empty_point = WQL.getWO("PDA_02")
|
||||||
.addParam("sql_str", " ORDER BY abs("+plan_jo.getString("sort_seq")+"-sort_seq),point_code")
|
.addParam("sql_str", " ORDER BY abs("+plan_jo.getString("sort_seq")+"-sort_seq),point_code")
|
||||||
@@ -158,5 +172,48 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject returnVehicle(JSONObject whereJson) {
|
||||||
|
String point_code = whereJson.getString("point_code");
|
||||||
|
if (StrUtil.isEmpty(point_code)){
|
||||||
|
throw new BadRequestException("起点不能为空!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据起点判断区域查询对应的输送线空点位
|
||||||
|
JSONObject point_jo = WQL.getWO("PDA_02").addParam("flag","4").addParam("product_area","A").process().uniqueResult(0);
|
||||||
|
//下发输送线任务
|
||||||
|
JSONObject form = new JSONObject();
|
||||||
|
form.put("point_code1",point_code);
|
||||||
|
form.put("point_code2",point_jo.getString("point_code"));
|
||||||
|
form.put("task_type","010402");
|
||||||
|
form.put("vehicle_code","");
|
||||||
|
cutConveyorTask.createTask(form);
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("message","操作成功!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject check(JSONObject whereJson) {
|
||||||
|
String qzzno = whereJson.getString("qzzno");
|
||||||
|
String vehicle_code = whereJson.getString("vehicle_code");
|
||||||
|
|
||||||
|
JSONObject plan = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("qzz_no = '"+qzzno+"'").uniqueResult(0);
|
||||||
|
String resource_name = plan.getString("resource_name");
|
||||||
|
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '"+resource_name+"'").uniqueResult(0);
|
||||||
|
String product_area = cut_jo.getString("product_area");
|
||||||
|
String point_location = cut_jo.getString("point_location");
|
||||||
|
|
||||||
|
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '"+product_area+"' AND point_location = '"+point_location+"' AND vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(vehicle_area)){
|
||||||
|
throw new BadRequestException("该气涨轴无法放在该载具上!");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("message","校验无误,可以进行配送!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,10 +143,20 @@
|
|||||||
st_ivt_deliverypointivt ivt
|
st_ivt_deliverypointivt ivt
|
||||||
WHERE
|
WHERE
|
||||||
point_status = '01'
|
point_status = '01'
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
sch_base_task
|
||||||
|
WHERE
|
||||||
|
( point_code1 = ivt.point_code OR point_code2 = ivt.point_code )
|
||||||
|
AND task_status < '07'
|
||||||
|
AND is_delete = '0'
|
||||||
|
)
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.point_location <> ""
|
||||||
ivt.point_location = 输入.point_location
|
ivt.point_location = 输入.point_location
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
输入.sql_str
|
输入.sql_str
|
||||||
@@ -261,3 +271,43 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "9"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
up_point_code AS VALUE,
|
||||||
|
CONCAT( point_code, '上轴位' ) AS text
|
||||||
|
FROM
|
||||||
|
st_ivt_cutpointivt cut
|
||||||
|
WHERE
|
||||||
|
cut.point_code = 输入.device_code
|
||||||
|
UNION
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
down_point_code AS VALUE,
|
||||||
|
CONCAT( point_code, '下轴位' ) AS text
|
||||||
|
FROM
|
||||||
|
st_ivt_cutpointivt cut
|
||||||
|
WHERE
|
||||||
|
cut.point_code = 输入.device_code
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "10"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
st_ivt_deliverypointivt del
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
OPTINON 输入.product_area <> "
|
||||||
|
del.product_area = 输入.product_area
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user