Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -878,7 +878,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
@Override
|
||||
public JSONObject sendDeviceStatus(JSONObject whereJson) {
|
||||
log.info("sendDeviceStatus--------------输入为:" + whereJson.toString());
|
||||
log.info("sendDeviceStatus--------------输入为:" + whereJson.toString());
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
String device_code = whereJson.getString("device_code");
|
||||
String device_name = whereJson.getString("device_name");
|
||||
@@ -968,7 +968,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String zg_size = zg_jo.getString("qzz_size");
|
||||
String zg_generation = zg_jo.getString("qzz_generation");
|
||||
|
||||
if (StrUtil.isEmpty(zg_generation) || StrUtil.isEmpty(zg_size)){
|
||||
if (StrUtil.isEmpty(zg_generation) || StrUtil.isEmpty(zg_size)) {
|
||||
//如果纸管工位的代数和尺寸为空,则把气胀轴搬运到气胀轴缓存位
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_type", "010603");
|
||||
@@ -977,7 +977,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
jo.put("point_code2", fhd_jo.getString("point_code"));
|
||||
jo.put("product_area", product_area);
|
||||
jo.put("vehicle_code", "qzz");
|
||||
jo.put("truss_type", "1");
|
||||
jo.put("truss_type", "8");
|
||||
JSONObject request_param = new JSONObject();
|
||||
request_param.put("have_size", cbz_size);
|
||||
request_param.put("have_generation", cbz_generation);
|
||||
@@ -987,7 +987,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
result.put("is_bushing", "0");
|
||||
result.put("message", "反馈成功!");
|
||||
return result;
|
||||
}else {
|
||||
} else {
|
||||
if (cbz_size.equals(zg_size) && zg_generation.equals(cbz_generation)) {
|
||||
//todo:反馈ACS可以进行穿轴
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
@@ -1147,7 +1147,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//更新RGV上气胀轴数量
|
||||
JSONObject rgv_device = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '5'").uniqueResult(0);
|
||||
int have_qzz = rgv_device.getIntValue("have_qzz");
|
||||
rgv_device.put("have_qzz", have_qzz-1);
|
||||
rgv_device.put("have_qzz", have_qzz - 1);
|
||||
WQLObject.getWQLObject("st_ivt_shaftivt").update(rgv_device);
|
||||
}
|
||||
WQLObject.getWQLObject("sch_base_task").update(task_jo);
|
||||
@@ -1190,7 +1190,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if ("3".equals(type)) {
|
||||
String product_area = task_jo.getString("product_area");
|
||||
//判断对应的内包间区域是否启用
|
||||
JSONObject pack_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("point_type = '9' AND product_area = '"+product_area+"'").uniqueResult(0);
|
||||
JSONObject pack_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("point_type = '9' AND product_area = '" + product_area + "'").uniqueResult(0);
|
||||
if (task_jo.getString("task_type").equals("010401") && pack_jo.getString("is_used").equals("1")) {
|
||||
String vehicle_code = task_jo.getString("vehicle_code2");
|
||||
JSONObject vehicle_jo = WQLObject.getWQLObject("md_pb_vehiclearea").query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||
@@ -1220,6 +1220,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONObject request_param = new JSONObject();
|
||||
request_param.put("container_name1", hchj_jo.getString("container_name1"));
|
||||
request_param.put("container_name2", hchj_jo.getString("container_name2"));
|
||||
jo.put("request_param", request_param);
|
||||
jo.put("vehicle_code", hchj_jo.getString("container_name1"));
|
||||
jo.put("product_area", product_area);
|
||||
paperTrussTask.createTask(jo);
|
||||
|
||||
@@ -620,6 +620,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
if (StrUtil.equals("1", Attribute2)) {
|
||||
//更新该子卷号对应的分切计划为已呼叫
|
||||
plan_jo.put("is_call", "1");
|
||||
plan_jo.put("call_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_jo);
|
||||
}
|
||||
if (StrUtil.equals(is_mesTolms, "1")) {
|
||||
|
||||
@@ -10,12 +10,16 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.pda.mps.service.CasingService;
|
||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||
import org.nl.wms.sch.tasks.PaperTubeTask;
|
||||
import org.nl.wms.sch.tasks.URLEnum;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@@ -30,8 +34,11 @@ public class AutoCallEmptyVehicle {
|
||||
public void run() {
|
||||
for (URLEnum url : URLEnum.values()) {
|
||||
String product_area = url.getProduct_area();
|
||||
JSONObject nbj_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '"+product_area+"' AND point_type = '9'").uniqueResult(0);
|
||||
if (nbj_jo.getString("is_used").equals("1")){
|
||||
JSONObject nbj_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '9'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(nbj_jo)){
|
||||
continue;
|
||||
}
|
||||
if (nbj_jo.getString("is_used").equals("1")) {
|
||||
//上半部分
|
||||
this.callEmptyVehicle(product_area, "0");
|
||||
//下半部分
|
||||
@@ -228,8 +235,9 @@ public class AutoCallEmptyVehicle {
|
||||
}
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
row.put("is_paper_ok", "1");
|
||||
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(row);
|
||||
HashMap map = new HashMap();
|
||||
map.put("is_paper_ok", "1");
|
||||
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(map,"workorder_id = '"+row.getString("workorder_id")+"'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,12 +371,22 @@ public class AutoCallEmptyVehicle {
|
||||
JSONObject request_param = new JSONObject();
|
||||
request_param.put("need_size", need_size);
|
||||
request_param.put("need_generation", need_generation);
|
||||
JSONArray cut_rows = new JSONArray();
|
||||
String qzzno = "";
|
||||
if (same_flag) {
|
||||
request_param.put("container_name1", rows.getJSONObject(0).getString("pcsn"));
|
||||
qzzno = "qzz-" + rows.getJSONObject(0).getString("pcsn");
|
||||
JSONObject container_jo1 = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + rows.getJSONObject(0).getString("pcsn") + "'").uniqueResult(0);
|
||||
cut_rows.add(container_jo1);
|
||||
request_param.put("container_name2", rows.getJSONObject(0).getString("pcsn2"));
|
||||
JSONObject container_jo2 = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + rows.getJSONObject(0).getString("pcsn2") + "'").uniqueResult(0);
|
||||
cut_rows.add(container_jo2);
|
||||
} else {
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
qzzno = "qzz-" + rows.getJSONObject(i).getString("pcsn");
|
||||
request_param.put("container_name" + (i + 1), rows.getJSONObject(i).getString("pcsn"));
|
||||
JSONObject container_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + rows.getJSONObject(i).getString("pcsn") + "'").uniqueResult(0);
|
||||
cut_rows.add(container_jo);
|
||||
}
|
||||
}
|
||||
request_param.put("need_location", cut_jo.getString("point_location"));
|
||||
@@ -376,5 +394,12 @@ public class AutoCallEmptyVehicle {
|
||||
jo.put("material_code", rows.getJSONObject(0).getString("pcsn"));
|
||||
jo.put("product_area", product_area);
|
||||
paperTubeTask.createTask(jo);
|
||||
|
||||
//更新对应气胀轴为套轴完成
|
||||
CasingService casingService = SpringContextHolder.getBean(CasingService.class);
|
||||
JSONObject conrimd_jo = new JSONObject();
|
||||
conrimd_jo.put("qzzno", qzzno);
|
||||
conrimd_jo.put("cut_rows", cut_rows);
|
||||
casingService.confirm(conrimd_jo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user