rev:人工拔轴判断创建任务
This commit is contained in:
@@ -682,10 +682,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
//判断系统参数是否贴标
|
||||
String is_labeling = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("is_labeling").getValue();
|
||||
if (is_labeling.equals("0")){
|
||||
if (is_labeling.equals("0")) {
|
||||
//更新实际重量
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("real_weight",weight);
|
||||
map.put("real_weight", weight);
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(map, "package_box_sn = '" + vehicle_code + "'");
|
||||
data.put("is_auto_table", "0");
|
||||
result.put("data", data);
|
||||
@@ -971,7 +971,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Override
|
||||
public JSONObject sendGetGoalStruct(JSONObject whereJson) {
|
||||
log.info("sendGetGoalStruct请求参数为--------------------------:" + whereJson.toString());
|
||||
//type:2、反馈尺寸;3、申请放货;4、申请取货;6、套轴申请;7、套轴完成;8、拔轴完成
|
||||
//type:2、反馈尺寸;3、申请放货;4、申请取货;6、套轴申请;7、套轴完成;8、拔轴完成;9、反馈重量
|
||||
String type = whereJson.getString("type");
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
@@ -1238,6 +1238,42 @@ 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")) {
|
||||
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 > 0 ? (have_qzz - 1) : 0);
|
||||
WQLObject.getWQLObject("st_ivt_shaftivt").update(rgv_device);
|
||||
|
||||
//如果套管工位有货且套轴区域无轴,搬运一根轴到穿拔轴机上
|
||||
if (rgv_device.getIntValue("have_qzz") == 0){
|
||||
//判断当前穿拔轴机构上是否存在可用的气涨轴
|
||||
String cbj_qzz = cbz_jo.getString("have_qzz");
|
||||
//判断是否存在未完成的成品下卷任务
|
||||
JSONObject container_jo = WQLObject.getWQLObject("sch_base_task").query("task_type = '010605' AND product_area = '"+product_area+"' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
if ("0".equals(cbj_qzz) && ObjectUtil.isEmpty(container_jo)) {
|
||||
PaperTrussTask paperTrussTask = SpringContextHolder.getBean(PaperTrussTask.class);
|
||||
//查询套管工位的库存信息
|
||||
JSONObject tggw_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '4'").uniqueResult(0);
|
||||
//todo:创建桁架任务搬运一个符合的气涨轴
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_type", "010602");
|
||||
JSONObject qhd_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("point_type = '6' AND product_area = '" + public_area + "'").uniqueResult(0);
|
||||
jo.put("point_code1", qhd_jo.getString("point_code"));
|
||||
jo.put("point_code2", cbz_jo.getString("point_code"));
|
||||
jo.put("truss_type", "8");
|
||||
jo.put("vehicle_code", tggw_jo.getString("container_name1") + "-qzz");
|
||||
jo.put("product_area", product_area);
|
||||
JSONObject tas_param = new JSONObject();
|
||||
tas_param.put("need_size", tggw_jo.getString("qzz_size"));
|
||||
tas_param.put("need_generation", tggw_jo.getString("qzz_generation"));
|
||||
jo.put("request_param", tas_param.toString());
|
||||
paperTrussTask.createTask(jo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
WQLObject.getWQLObject("sch_base_task").update(task_jo);
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("device_code", struct_jo.getString("point_code"));
|
||||
@@ -1618,6 +1654,5 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
point.insert(jsonTwo);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user