|
|
|
|
@@ -61,7 +61,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> receiveTaskFromAcs(Map jsonObject) {
|
|
|
|
|
log.debug("WCS的请求参数为:" + jsonObject);
|
|
|
|
|
log.debug("ACS的receiveTaskFromAcs请求参数为:" + jsonObject);
|
|
|
|
|
String device_code = (String) jsonObject.get("device_code");
|
|
|
|
|
String type = (String) jsonObject.get("type");
|
|
|
|
|
String group_id = (String) jsonObject.get("group_id");
|
|
|
|
|
@@ -327,6 +327,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> manipulatorApply(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的manipulatorApply请求参数为:" + jsonObject);
|
|
|
|
|
String device_code = (String) jsonObject.get("device_code");
|
|
|
|
|
if (StrUtil.isEmpty(device_code)) {
|
|
|
|
|
throw new BadRequestException("设备点位不能为空!");
|
|
|
|
|
@@ -450,6 +451,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> group(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的group请求参数为:" + jsonObject);
|
|
|
|
|
String task_code = jsonObject.get("task_code").toString();
|
|
|
|
|
String vehicle_code = jsonObject.get("vehicle_code").toString();
|
|
|
|
|
//永远判断生成不生成输送任务
|
|
|
|
|
@@ -532,10 +534,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> inKiln(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的inKiln请求参数为:" + jsonObject);
|
|
|
|
|
String vehicle_code = String.valueOf(jsonObject.get("vehicle_code"));
|
|
|
|
|
KilnUtil.inKiln(vehicle_code);
|
|
|
|
|
JSONObject jo = new JSONObject();
|
|
|
|
|
jo.put("vehicle_code",vehicle_code);
|
|
|
|
|
jo.put("vehicle_code", vehicle_code);
|
|
|
|
|
//调用wms的接口
|
|
|
|
|
WmsToJnServiceImpl wmsToJnService = new WmsToJnServiceImpl();
|
|
|
|
|
wmsToJnService.feedBackInKiln(jo);
|
|
|
|
|
@@ -549,6 +552,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> ispackage(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的ispackage请求参数为:" + jsonObject);
|
|
|
|
|
String vehicle_code = jsonObject.get("vehicle_code").toString();
|
|
|
|
|
if (StrUtil.isEmpty(vehicle_code)) {
|
|
|
|
|
throw new BadRequestException("托盘条码不能为空!");
|
|
|
|
|
@@ -573,7 +577,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
KilnUtil.outKiln(vehicle_code);
|
|
|
|
|
|
|
|
|
|
JSONObject jo = new JSONObject();
|
|
|
|
|
jo.put("vehicle_code",vehicle_code);
|
|
|
|
|
jo.put("vehicle_code", vehicle_code);
|
|
|
|
|
//调用wms的接口
|
|
|
|
|
WmsToJnServiceImpl wmsToJnService = new WmsToJnServiceImpl();
|
|
|
|
|
wmsToJnService.feedBackOutKiln(jo);
|
|
|
|
|
@@ -588,6 +592,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> getEmptyVehicle_code(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的getEmptyVehicle_code请求参数为:" + jsonObject);
|
|
|
|
|
//获取一个空的托盘号
|
|
|
|
|
String code = "VEHICCLE_CODE_MTP";
|
|
|
|
|
String vehicle_type = "03";
|
|
|
|
|
@@ -617,6 +622,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> getDevicecodeByVehicle_ype(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的getDevicecodeByVehicle_ype请求参数为:" + jsonObject);
|
|
|
|
|
String vehicle_type = (String) jsonObject.get("vehicle_type");
|
|
|
|
|
if (StrUtil.isEmpty(vehicle_type)) {
|
|
|
|
|
throw new BadRequestException("托盘类型不能为空!");
|
|
|
|
|
@@ -634,6 +640,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> getVehicleInfoBycode(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的getVehicleInfoBycode请求参数为:" + jsonObject);
|
|
|
|
|
String device_code = (String) jsonObject.get("device_code");
|
|
|
|
|
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
|
|
|
|
|
String vehicle_code = point_table.query("point_code='" + device_code + "'").uniqueResult(0).getString("vehicle_code");
|
|
|
|
|
@@ -654,6 +661,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> sureProduceTask(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的sureProduceTask请求参数为:" + jsonObject);
|
|
|
|
|
String producetask_code = (String) jsonObject.get("producetask_code");
|
|
|
|
|
String device_code = (String) jsonObject.get("device_code");
|
|
|
|
|
String material_code = (String) jsonObject.get("material_code");
|
|
|
|
|
@@ -700,7 +708,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
if (StrUtil.equals("FJJXS1", device_code) || StrUtil.equals("FJJXS2", device_code) || StrUtil.equals("FJJXS3", device_code)) {
|
|
|
|
|
//调用mes接口
|
|
|
|
|
HashMap map = new HashMap();
|
|
|
|
|
map.put("producetask_code",producetask_code);
|
|
|
|
|
map.put("producetask_code", producetask_code);
|
|
|
|
|
WmsToJnServiceImpl wmsToJnServiceImpl = new WmsToJnServiceImpl();
|
|
|
|
|
wmsToJnServiceImpl.feedBackPackWordShop(map);
|
|
|
|
|
}
|
|
|
|
|
@@ -721,6 +729,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public void updateVehicleType(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的updateVehicleType请求参数为:" + jsonObject);
|
|
|
|
|
String vehicle_type = (String) jsonObject.get("vehicle_type");
|
|
|
|
|
if (vehicle_type.equals("1")) {
|
|
|
|
|
vehicle_type = "03";
|
|
|
|
|
@@ -758,6 +767,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
public Map<String, Object> receiveTaskStatusAcs(String string) {
|
|
|
|
|
{
|
|
|
|
|
JSONArray array = JSONArray.parseArray(string);
|
|
|
|
|
log.debug("ACS的receiveTaskStatusAcs请求参数为:" + array);
|
|
|
|
|
//返回处理失败的任务
|
|
|
|
|
JSONArray errArr = new JSONArray();
|
|
|
|
|
for (int i = 0; i < array.size(); i++) {
|
|
|
|
|
@@ -822,6 +832,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> CribbingInfoByCode(String material_code) {
|
|
|
|
|
log.debug("ACS的CribbingInfoByCode请求参数为:" + material_code);
|
|
|
|
|
if (StrUtil.isEmpty(material_code)) {
|
|
|
|
|
throw new BadRequestException("物料条码不能为空!");
|
|
|
|
|
}
|
|
|
|
|
@@ -839,6 +850,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> receiveAgvStatus(JSONArray arr) {
|
|
|
|
|
log.debug("ACS的receiveAgvStatus请求参数为:" + arr);
|
|
|
|
|
WQLObject deviceStatus_table = WQLObject.getWQLObject("st_buss_deviceStatus");
|
|
|
|
|
for (int i = 0; i < arr.size(); i++) {
|
|
|
|
|
JSONObject jo = arr.getJSONObject(i);
|
|
|
|
|
@@ -877,6 +889,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> queryCribbingInfo(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的queryCribbingInfo请求参数为:" + jsonObject);
|
|
|
|
|
String device_code = (String) jsonObject.get("device_code");
|
|
|
|
|
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
|
|
|
|
|
JSONObject produceInfoByCode = this.getProduceInfoByCode(device_code);
|
|
|
|
|
@@ -901,6 +914,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> queryPrintInfoByCode(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的queryPrintInfoByCode请求参数为:" + jsonObject);
|
|
|
|
|
//找出最近的一个到包装位的任务
|
|
|
|
|
JSONObject taskObj = WQLObject.getWQLObject("sch_base_task").query("next_point_code='BZSLW' and is_delete='0' and task_type='07'", "update_time desc").uniqueResult(0);
|
|
|
|
|
JSONObject result = WQL.getWO("ACSTOMES_001").addParam("flag", "9").addParam("task_id", taskObj.getString("task_id")).process().uniqueResult(0);
|
|
|
|
|
@@ -910,6 +924,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Map<String, Object> deleteTask(Map jsonObject) {
|
|
|
|
|
log.debug("ACS的deleteTask请求参数为:" + jsonObject);
|
|
|
|
|
String task_code = jsonObject.get("task_code").toString();
|
|
|
|
|
WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
|
|
|
|
|
WQLObject group_table = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
|
|
|
|
|