opt: 代码注释、生箔下料追加车号
This commit is contained in:
@@ -700,7 +700,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
res.put("RTOAL", 0);
|
||||
res.put("RTMSG", "称重失败!");
|
||||
res.put("RTYPE", "F");
|
||||
res.put("RTYPE", "E");
|
||||
log.error("废箔称重反馈MES, 反馈信息:{}", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -276,6 +276,7 @@ public class SlitterTaskUtil {
|
||||
|
||||
/**
|
||||
* 通过分切计划的上下轴返回对应的气胀轴编码
|
||||
* todo: 是否存在问题?
|
||||
* @param plan 分切机
|
||||
* @return 气胀轴编码或者"-"
|
||||
*/
|
||||
|
||||
@@ -103,7 +103,6 @@ public class AcsToWmsController {
|
||||
}
|
||||
|
||||
@PostMapping("/sendGetGoalStruct")
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> sendGetGoalStruct(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(acsToWmsService.sendGetGoalStruct(jo), HttpStatus.OK);
|
||||
|
||||
@@ -93,6 +93,11 @@ public interface AcsToWmsService {
|
||||
|
||||
JSONObject sendCBZInfo(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 2、反馈尺寸;3、申请放货;4、申请取货;6、套轴申请;7、套轴完成;8、拔轴完成;9、反馈重量
|
||||
* @param whereJson
|
||||
* @return
|
||||
*/
|
||||
JSONObject sendGetGoalStruct(JSONObject whereJson);
|
||||
|
||||
JSONObject actionFinishRequest(JSONObject whereJson);
|
||||
|
||||
@@ -1119,9 +1119,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if (product_area.equals("A3") || product_area.equals("A4")) {
|
||||
public_area = "A3";
|
||||
}
|
||||
// point_type = '0' :穿拔轴点
|
||||
JSONObject cbz_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '0'").uniqueResult(0);
|
||||
String cbz_size = cbz_jo.getString("qzz_size");
|
||||
String cbz_generation = cbz_jo.getString("qzz_generation");
|
||||
// 套轴申请
|
||||
if ("6".equals(type)) {
|
||||
//判断当前穿拔轴位置的气涨轴和纸管位的纸管是否匹配
|
||||
JSONObject zg_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '4'").uniqueResult(0);
|
||||
@@ -1144,6 +1146,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
paper_name = plan_jo.getString("frp_description");
|
||||
}
|
||||
// mark: 分切计划规格拆分数据
|
||||
String need_size = String.valueOf(paper_name.split("\\|")[2].charAt(0));
|
||||
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '" + plan_jo.getString("resource_name") + "'").uniqueResult(0);
|
||||
//获取分切机维护的气涨轴代数
|
||||
@@ -1197,6 +1200,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
}
|
||||
|
||||
// 套轴完成
|
||||
if ("7".equals(type)) {
|
||||
JSONObject task_resq = task_jo2.getJSONObject("request_param");
|
||||
JSONObject plan_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + task_resq.getString("container_name1") + "' AND is_delete = '0'").uniqueResult(0);
|
||||
@@ -1298,6 +1302,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String have_generation = request_param.getString("have_generation");
|
||||
|
||||
JSONObject struct_jo = new JSONObject();
|
||||
// 申请取货
|
||||
if ("4".equals(type)) {
|
||||
//查询可用的空气涨轴点位
|
||||
struct_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "6")
|
||||
@@ -1322,6 +1327,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
result.put("version", need_generation);
|
||||
result.put("size", need_size);
|
||||
}
|
||||
// 申请放货
|
||||
if ("3".equals(type)) {
|
||||
//查询可用的空点位
|
||||
struct_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "7")
|
||||
@@ -1344,6 +1350,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
result.put("version", have_generation);
|
||||
result.put("size", have_size);
|
||||
}
|
||||
// 反馈尺寸
|
||||
if ("2".equals(type)) {
|
||||
String size = whereJson.getString("size");
|
||||
JSONObject request_jo = task_jo.getJSONObject("request_param");
|
||||
@@ -1351,6 +1358,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
task_jo.put("request_param", request_jo);
|
||||
|
||||
}
|
||||
// 拔轴完成
|
||||
//拔轴任务完成更新穿拔轴机上的库存
|
||||
if ("8".equals(type)) {
|
||||
JSONObject cbz_device = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '0'").uniqueResult(0);
|
||||
@@ -1365,6 +1373,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
rgv_device.put("have_qzz", have_qzz - 1);
|
||||
WQLObject.getWQLObject("st_ivt_shaftivt").update(rgv_device);
|
||||
}
|
||||
// 反馈重量
|
||||
if ("9".equals(type)) {
|
||||
String is_hand = whereJson.getString("is_hand");
|
||||
if (StrUtil.isNotEmpty(is_hand) && is_hand.equals("1")) {
|
||||
@@ -1373,6 +1382,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
rgv_device.put("have_qzz", have_qzz > 0 ? (have_qzz - 1) : 0);
|
||||
WQLObject.getWQLObject("st_ivt_shaftivt").update(rgv_device);
|
||||
|
||||
// 套管工位有纸管,穿拔轴位置没有气胀轴
|
||||
//如果套管工位有货且套轴区域无轴,搬运一根轴到穿拔轴机上
|
||||
if (rgv_device.getIntValue("have_qzz") == 0) {
|
||||
//判断当前穿拔轴机构上是否存在可用的气涨轴
|
||||
|
||||
@@ -242,7 +242,7 @@ public class CasingServiceImpl implements CasingService {
|
||||
if (ObjectUtil.isEmpty(point_jo)) {
|
||||
throw new BadRequestException("未查询到对应的穿拔轴机构,请扫描正确点位!");
|
||||
}
|
||||
|
||||
// 载具信息表
|
||||
JSONObject qzz_jo = WQLObject.getWQLObject("md_pb_storagevehicleinfo").query("storagevehicle_code = '" + qzzno + "' AND is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(qzz_jo)) {
|
||||
throw new BadRequestException("该气涨轴不存在或被删除!");
|
||||
|
||||
@@ -78,7 +78,7 @@ public class InServiceImpl implements InService {
|
||||
jo.put("product_area", cut_ivt.getString("product_area"));
|
||||
jo.put("task_type", "010405");
|
||||
char dtl_type = cut_row.getString("delivery_code").charAt(cut_row.getString("delivery_code").length() - 1);
|
||||
//判断起点是否远离分切机
|
||||
//判断起点是否远离分切机 question: ???
|
||||
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 == 0) {
|
||||
jo.put("task_status", TaskStatusEnum.SURE_END.getCode());
|
||||
jo.put("point_code1", "");
|
||||
|
||||
@@ -63,7 +63,7 @@ public class OutServiceImpl implements OutService {
|
||||
if (StrUtil.isEmpty(is_last)) {
|
||||
throw new BadRequestException("是否末次下卷不能为空!");
|
||||
}
|
||||
|
||||
// 需要出战的分切计划
|
||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||
|
||||
if (rows.size() > 2) {
|
||||
@@ -77,7 +77,7 @@ public class OutServiceImpl implements OutService {
|
||||
String restruct_container_name = "";
|
||||
String package_box_sn = "";
|
||||
|
||||
//对子卷任务进行校验
|
||||
//对子卷任务进行校验 (最多两个)
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
if (StrUtil.isEmpty(split_group)) {
|
||||
@@ -176,6 +176,7 @@ public class OutServiceImpl implements OutService {
|
||||
|
||||
char dtl_type = delivery_point.getString("point_code").charAt(delivery_point.getString("point_code").length() - 1);
|
||||
|
||||
// 取空取满,放空放满
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("point_code1", delivery_point.getString("point_code"));
|
||||
jo.put("point_code2", point_code);
|
||||
|
||||
@@ -381,7 +381,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
start_pint_code = jsonIvt.getString("empty_point_code");
|
||||
point_code4 = jsonIvt.getString("full_point_code");
|
||||
}
|
||||
|
||||
String bigType = whereJson.getString("big_type");
|
||||
// 起点和终点确定 生成任务
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", start_pint_code);
|
||||
@@ -389,6 +389,9 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
param.put("point_code3", jsonSb.getString("point_code") + "_M");
|
||||
param.put("point_code4", point_code4);
|
||||
param.put("task_type", "010101");
|
||||
if (ObjectUtil.isNotEmpty(bigType) && "1".equals(bigType)) {
|
||||
param.put("car_no", "99");
|
||||
}
|
||||
param.put("material_code", whereJson.getString("container_name"));
|
||||
param.put("product_area", jsonSb.getString("product_area"));
|
||||
|
||||
|
||||
@@ -91,7 +91,9 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject confirm(JSONObject whereJson) {
|
||||
// 分切计划
|
||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||
// 载具号
|
||||
String vehicle_code = whereJson.getString("vehicle_code");
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
throw new BadRequestException("输入的载具号不能为空!");
|
||||
@@ -116,7 +118,7 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
String restruct_container_name = "";
|
||||
String package_box_sn = "";
|
||||
|
||||
//对子卷任务进行校验
|
||||
//对子卷任务进行校验,最多就两个
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
if (StrUtil.isEmpty(split_group)) {
|
||||
@@ -186,7 +188,12 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
}
|
||||
|
||||
//判断当前输送线上是否超过最大负荷任务数量组3组
|
||||
JSONArray cut_rows = WQL.getWO("PDA_02").addParam("flag", "13").addParam("qzzno", qzzno).addParam("product_area", product_area).addParam("point_location", point_location).process().getResultJSONArray(0);
|
||||
JSONArray cut_rows = WQL.getWO("PDA_02")
|
||||
.addParam("flag", "13")
|
||||
.addParam("qzzno", qzzno)
|
||||
.addParam("product_area", product_area)
|
||||
.addParam("point_location", point_location)
|
||||
.process().getResultJSONArray(0);
|
||||
|
||||
if (cut_rows.size() > 3) {
|
||||
if ("0".equals(point_location)) {
|
||||
@@ -196,7 +203,7 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
throw new BadRequestException("已超过下半段输送线最大负荷任务数,请等下一子卷送出再进行配送,并将该空载具送回!");
|
||||
}
|
||||
}
|
||||
|
||||
// todo: 载具的存放有个规则???
|
||||
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)) {
|
||||
@@ -262,6 +269,7 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
//如果是右边的任务,判断左边是否存在空载具且没任务,如果存在则把左边的空载具送出
|
||||
JSONObject left_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '" + empty_point.getString("point_location") + "' AND product_area = '" + empty_point.getString("product_area") + "' AND sort_seq = '" + empty_point.getString("sort_seq") + "' order by point_code").uniqueResult(0);
|
||||
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '" + left_point.getString("point_code") + "' OR point_code2 = '" + left_point.getString("point_code") + "') AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
// todo: 载具横移???
|
||||
if (ObjectUtil.isEmpty(task_jo) && "02".equals(left_point.getString("point_status"))) {
|
||||
//如果查询到给ACS下发一个输送线任务
|
||||
JSONObject form2 = new JSONObject();
|
||||
|
||||
@@ -143,5 +143,6 @@ public class AcsTaskDto {
|
||||
private String height;
|
||||
|
||||
private String barcode;
|
||||
private String car_no;
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ import org.springframework.stereotype.Component;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 自动呼叫纸管
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@@ -50,6 +53,7 @@ public class AutoCallEmptyVehicle {
|
||||
// log.info("AutoCallEmptyVehicle"+ DateUtil.now()+"执行!!!!");
|
||||
for (URLEnum url : URLEnum.values()) {
|
||||
String product_area = url.getProduct_area();
|
||||
// 点位类型 9:内包间
|
||||
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;
|
||||
@@ -144,14 +148,22 @@ public class AutoCallEmptyVehicle {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 呼叫纸管
|
||||
* @param rows 分切计划数组
|
||||
* @param product_area 生产区域
|
||||
*/
|
||||
void callPaperTube(JSONArray rows, String product_area) {
|
||||
JSONObject container_jo1;
|
||||
JSONObject container_jo2;
|
||||
JSONObject container_jo3;
|
||||
JSONObject container_jo4;
|
||||
// 纸管对象
|
||||
JSONObject paper_jo = new JSONObject();
|
||||
// 纸管编码
|
||||
String paper_code1;
|
||||
String paper_code2;
|
||||
// 纸管数组
|
||||
JSONArray paper_rows = new JSONArray();
|
||||
switch (rows.size()) {
|
||||
case 1:
|
||||
@@ -275,9 +287,15 @@ public class AutoCallEmptyVehicle {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 向ACS发起出管芯
|
||||
* @param rows 纸管数组信息
|
||||
* @param product_area 生产区域
|
||||
*/
|
||||
void getPaperStruct(JSONArray rows, String product_area) {
|
||||
//查询对应纸管库的库存
|
||||
JSONObject device_jo = new JSONObject();
|
||||
// 点位类型8:纸管库
|
||||
JSONObject zgk_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("point_type = '8' AND product_area = '" + product_area + "'").uniqueResult(0);
|
||||
//判断纸管库是否启用
|
||||
if ("1".equals(zgk_jo.getString("is_used"))) {
|
||||
@@ -285,6 +303,7 @@ public class AutoCallEmptyVehicle {
|
||||
device_jo.put("product_area", product_area);
|
||||
JSONArray device_ja = new JSONArray();
|
||||
device_ja.add(device_jo);
|
||||
// 获取管芯数据
|
||||
JSONObject device_data = wmsToAcsService.getPointStatus(device_ja);
|
||||
JSONObject data = device_data.getJSONArray("data").getJSONObject(0);
|
||||
JSONArray task_rows = new JSONArray();
|
||||
@@ -356,6 +375,11 @@ public class AutoCallEmptyVehicle {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建空轴搬运任务
|
||||
* @param rows 纸管数组信息
|
||||
* @param product_area 生产区域
|
||||
*/
|
||||
private void createTask(JSONArray rows, String product_area) {
|
||||
boolean same_flag = false;
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
@@ -395,12 +419,14 @@ public class AutoCallEmptyVehicle {
|
||||
jo.put("point_code1", qhd_jo.getString("point_code"));
|
||||
JSONObject in_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + product_area + "' AND point_type = '6'").uniqueResult(0);
|
||||
jo.put("point_code2", in_jo.getString("point_code"));
|
||||
// 构建请求参数
|
||||
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);
|
||||
@@ -409,6 +435,7 @@ public class AutoCallEmptyVehicle {
|
||||
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"));
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.nl.wms.sch.tasks;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -11,7 +10,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
@@ -62,6 +60,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
.priority(json.getString("priority"))
|
||||
.remark(json.getString("remark"))
|
||||
.product_area(product_area)
|
||||
.car_no(json.getString("car_no"))
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
}
|
||||
@@ -322,6 +321,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
json.put("product_area", form.getString("product_area"));
|
||||
json.put("handle_class", THIS_CLASS);
|
||||
json.put("sort_seq", "1");
|
||||
json.put("car_no", form.getString("car_no"));
|
||||
json.put("create_id", currentUserId);
|
||||
json.put("create_name", currentUsername);
|
||||
json.put("create_time", DateUtil.now());
|
||||
|
||||
@@ -237,6 +237,7 @@ public class CoolCutTask extends AbstractAcsTask {
|
||||
}
|
||||
|
||||
if ("010302".equals(jsonTask.getString("task_type"))) {
|
||||
// todo: B2,B3,B4未考虑完成处理方式(是否回传MES )
|
||||
if ("B1".equals(product_area)) {
|
||||
//更新起点烘箱对接位
|
||||
JSONObject dj_jo = WQLObject.getWQLObject("sch_base_point").query("point_code ='" + point_code1 + "'").uniqueResult(0);
|
||||
|
||||
@@ -151,7 +151,7 @@ public class CutConveyorTask extends AbstractAcsTask {
|
||||
String point_code1 = jsonTask.getString("point_code1");
|
||||
String point_code2 = jsonTask.getString("point_code2");
|
||||
|
||||
//分切输送出任务
|
||||
//分切输送出任务(到内包间)
|
||||
if ("010401".equals(jsonTask.getString("task_type"))) {
|
||||
// 校验终点是否存在
|
||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + point_code1 + "'").uniqueResult(0);
|
||||
@@ -327,6 +327,7 @@ public class CutConveyorTask extends AbstractAcsTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 横移
|
||||
if ("010406".equals(jsonTask.getString("task_type"))) {
|
||||
JSONObject jsonIvt2 = ivtTab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.util.List;
|
||||
* @Auther:Zhouz
|
||||
* @Date:2023/12/12
|
||||
* @Description:分切下料位和桁架之间的任务
|
||||
* 包含:四点任务、单独上轴、单独下卷
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@@ -211,7 +212,7 @@ public class CutTrussTask extends AbstractAcsTask {
|
||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
|
||||
}
|
||||
|
||||
//生成一个输送线出库任务
|
||||
//生成一个输送线出库任务(将满卷送到内包间)
|
||||
JSONObject form = new JSONObject();
|
||||
form.put("point_code1", jsonTask.getString("point_code1"));
|
||||
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + delivery_point.getString("product_area") + "' AND point_type = '7'").uniqueResult(0);
|
||||
@@ -226,7 +227,7 @@ public class CutTrussTask extends AbstractAcsTask {
|
||||
cutConveyorTask.createTask(form);
|
||||
}
|
||||
|
||||
//子卷出站任务
|
||||
//子卷出站任务(单独下卷)
|
||||
if ("010404".equals(jsonTask.getString("task_type"))) {
|
||||
//更新输送线的气涨轴编码
|
||||
JSONObject delivery_point = WQLObject.getWQLObject("ST_IVT_DeliveryPointIvt").query("point_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
||||
@@ -248,7 +249,7 @@ public class CutTrussTask extends AbstractAcsTask {
|
||||
}
|
||||
}
|
||||
|
||||
//生成一个输送线出库任务
|
||||
//生成一个输送线出库任务(将卷送到内包间)
|
||||
JSONObject form = new JSONObject();
|
||||
form.put("point_code1", jsonTask.getString("point_code2"));
|
||||
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + delivery_point.getString("product_area") + "' AND point_type = '7'").uniqueResult(0);
|
||||
@@ -263,6 +264,7 @@ public class CutTrussTask extends AbstractAcsTask {
|
||||
cutConveyorTask.createTask(form);
|
||||
}
|
||||
|
||||
// 子卷入站
|
||||
if ("010405".equals(jsonTask.getString("task_type"))) {
|
||||
//更新输送线的气涨轴编码
|
||||
JSONObject delivery_point = WQLObject.getWQLObject("ST_IVT_DeliveryPointIvt").query("point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||
@@ -285,9 +287,11 @@ public class CutTrussTask extends AbstractAcsTask {
|
||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
|
||||
}
|
||||
|
||||
// mark: 单纯上轴任务完成,需要将空载具移走
|
||||
//如果桁架任务执行完,右侧的输送线上存在气涨轴,则生成一个输送出的任务,防止左侧空载具挡住右侧气涨轴进行横移
|
||||
log.debug("如果桁架任务执行完,缓存位的输送线上存在气涨轴,则对上料位的空载具生成一个输送出的任务");
|
||||
char dtl_type = jsonTask.getString("point_code1").charAt(jsonTask.getString("point_code1").length() - 1);
|
||||
// hint: 只有靠近分切机的位置需要移走,靠近分切机的位置才能上轴
|
||||
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
|
||||
String point_location = delivery_point.getString("point_location");
|
||||
String product_area = delivery_point.getString("product_area");
|
||||
@@ -297,9 +301,11 @@ public class CutTrussTask extends AbstractAcsTask {
|
||||
.addParam("point_code", jsonTask.getString("point_code1"))
|
||||
.addParam("product_area", product_area)
|
||||
.addParam("sort_seq", sort_seq)
|
||||
// 有气涨轴
|
||||
.addParam("find_type", "3")
|
||||
.addParam("flag", "17").process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(right_point)) {
|
||||
// mark: 如果右边有气胀轴的载具,需要左横移到靠近分切机
|
||||
log.debug("生成一个输送线出库任务");
|
||||
//生成一个输送线出库任务
|
||||
JSONObject form = new JSONObject();
|
||||
@@ -315,12 +321,13 @@ public class CutTrussTask extends AbstractAcsTask {
|
||||
form.put("product_area", delivery_point.getString("product_area"));
|
||||
cutConveyorTask.createTask(form);
|
||||
} else {
|
||||
|
||||
// ????
|
||||
right_point = WQL.getWO("PDA_02")
|
||||
.addParam("point_location", point_location)
|
||||
.addParam("point_code", jsonTask.getString("point_code1"))
|
||||
.addParam("product_area", product_area)
|
||||
.addParam("sort_seq", sort_seq)
|
||||
// 有子卷
|
||||
.addParam("find_type", "4")
|
||||
.addParam("flag", "18").process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(right_point)) {
|
||||
|
||||
@@ -142,6 +142,7 @@ public class PaperTrussTask extends AbstractAcsTask {
|
||||
//桁架任务完成后创建输送线配送任务
|
||||
JSONObject request_param_jo = task_jo.getJSONObject("request_param");
|
||||
String container_name1 = request_param_jo.getString("container_name1");
|
||||
// 根据子卷号获取对应的分切计划,最多就两条记录
|
||||
JSONArray cut_rows = new JSONArray();
|
||||
JSONObject jo1 = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + container_name1 + "' AND is_delete = '0'").uniqueResult(0);
|
||||
cut_rows.add(jo1);
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 纸管出库任务
|
||||
* Created by ZZ on 2021/12/22.
|
||||
*/
|
||||
@Slf4j
|
||||
@@ -90,6 +91,7 @@ public class PaperTubeTask extends AbstractAcsTask {
|
||||
//查询对应的纸管出库口
|
||||
JSONObject out_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("point_type = '4' AND product_area = '" + product_area + "'").uniqueResult(0);
|
||||
|
||||
// 一根轴最多能够套两个管芯(两个子卷)
|
||||
JSONObject req_param = task_jo.getJSONObject("request_param");
|
||||
out_jo.put("container_name1", req_param.getString("container_name1"));
|
||||
out_jo.put("container_name2", req_param.getString("container_name2"));
|
||||
@@ -109,6 +111,7 @@ public class PaperTubeTask extends AbstractAcsTask {
|
||||
return;
|
||||
}
|
||||
|
||||
// mark: 此处为对分切计划的纸管规格进行拆解取值
|
||||
String need_size = String.valueOf(paper_name.split("\\|")[2].charAt(0));
|
||||
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '" + plan_jo.getString("resource_name") + "'").uniqueResult(0);
|
||||
|
||||
@@ -149,7 +152,7 @@ public class PaperTubeTask extends AbstractAcsTask {
|
||||
//如果穿拔轴上存在一根气胀轴且没有任务,则下发ACS允许套轴
|
||||
if ("1".equals(have_qzz)) {
|
||||
String device_code = cbz_jo.getString("point_code");
|
||||
//判断是否存在任务
|
||||
//判断是否存在任务(当前穿拔轴机构上的,防止气胀轴会被拉走)
|
||||
JSONObject paper_jo = WQLObject.getWQLObject("sch_base_task").query("point_code1 = '" + device_code + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(paper_jo)) {
|
||||
//给穿拔轴机下发套轴
|
||||
|
||||
Reference in New Issue
Block a user