fix:生箔、送气胀轴
This commit is contained in:
@@ -175,6 +175,8 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
|
||||
// 收卷辊编码
|
||||
String rollCode = param.getString("roll_code");
|
||||
String isCallEmpty = param.getString("is_call_empty");
|
||||
String theory_height = param.getString("theory_height");
|
||||
String productin_qty = param.getString("productin_qty");
|
||||
// 判断是否存在任务
|
||||
List<SchBaseTask> unFinishTasks = taskService.checkHaveTask(pointCode);
|
||||
// 判断是否存在对应的桁架任务
|
||||
@@ -194,7 +196,8 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
|
||||
rawOrder.setMfg_order_name("$$$$");
|
||||
rawOrder.setProduct_name("锂电");
|
||||
rawOrder.setDescription("锂电");
|
||||
rawOrder.setTheory_height(BigDecimal.valueOf(2000));
|
||||
rawOrder.setTheory_height(new BigDecimal(theory_height));
|
||||
rawOrder.setProductin_qty(new BigDecimal(productin_qty));
|
||||
rawOrder.setUp_coiler_date(DateUtil.now());
|
||||
rawOrder.setStatus("01");
|
||||
rawOrder.setWind_roll(rollCode);
|
||||
|
||||
@@ -399,6 +399,11 @@ public class SlitterPdaServiceImpl implements SlitterPdaService {
|
||||
StIvtCutpointivt cutDevice = cutpointivtService.getPintByUpOrDownCode(pointCode, false);
|
||||
List<PdmBiSlittingproductionplan> plans = new ArrayList<>();
|
||||
int count = 1;
|
||||
if (row.size() > 4) {
|
||||
throw new BadRequestException("一趟最多只能申请4个纸管!");
|
||||
}
|
||||
// hint: 获取临时搭建母卷号
|
||||
String virtualContainer = TaskUtils.createVirtualGroupNum("yyMMddHHmmss");
|
||||
for (CallShaftVo callShaftVo : row) {
|
||||
// 保存工单
|
||||
PdmBiSlittingproductionplan plan = new PdmBiSlittingproductionplan();
|
||||
@@ -406,10 +411,11 @@ public class SlitterPdaServiceImpl implements SlitterPdaService {
|
||||
plan.setOrder_type("1");
|
||||
plan.setContainer_name(TaskUtils.createVirtualSubContainer("yyMMddHHmmss", cutDevice.getExt_code(), count++));
|
||||
plan.setProduct_name("-");
|
||||
// plan.setParent_container_name(virtualContainer);
|
||||
plan.setSplit_group(virtualContainer);
|
||||
plan.setDescription("-");
|
||||
plan.setWare_house("-");
|
||||
plan.setResource_name(cutDevice.getExt_code());
|
||||
plan.setSplit_group("-");
|
||||
plan.setManufacture_sort("1");
|
||||
plan.setMfg_order_name("-");
|
||||
plan.setManufacture_date(DateUtil.format(new Date(), "yyyy-MM-dd"));
|
||||
|
||||
@@ -10,6 +10,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CallShaftVo {
|
||||
private String point_code;
|
||||
private String location;
|
||||
private String left_or_right;
|
||||
private String material_code;
|
||||
private String material_spec;
|
||||
|
||||
@@ -207,7 +207,7 @@ public class NbjPdaServiceImpl implements NbjPdaService {
|
||||
// 分切计划校验
|
||||
JSONArray rows = param.getJSONArray("row");
|
||||
if (rows.size() > 2) {
|
||||
throw new BadRequestException("一次只能绑定2个分切计划");
|
||||
throw new BadRequestException("一次最多只能绑定2个分切计划");
|
||||
}
|
||||
List<PdmBiSlittingproductionplan> planList = rows.toJavaList(PdmBiSlittingproductionplan.class);
|
||||
List<String> orderIds = planList.stream()
|
||||
@@ -241,6 +241,14 @@ public class NbjPdaServiceImpl implements NbjPdaService {
|
||||
tzzcPoint.setPoint_status("2");
|
||||
setBCutUpdateByPC(tzzcPoint);
|
||||
bstIvtCutpointivtService.updateById(tzzcPoint);
|
||||
// 查找同组的另一个气胀轴是否有没套好,套好就创建AGV
|
||||
List<PdmBiSlittingproductionplan> list = slittingproductionplanService.getSameGroupOthers(demoPlan.getSplit_group(), demoPlan.getUp_or_down());
|
||||
if (CollectionUtil.isEmpty(list)) {
|
||||
// 创建任务
|
||||
JSONObject sendParam = new JSONObject();
|
||||
sendParam.put("point_code", pointCode);
|
||||
toDoSendShaft(sendParam);
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "管芯绑定成功!");
|
||||
@@ -381,6 +389,14 @@ public class NbjPdaServiceImpl implements NbjPdaService {
|
||||
public JSONObject doSendShaft(JSONObject param) {
|
||||
log.info("手持送气胀轴 - {}", param);
|
||||
// param: point_code, device
|
||||
toDoSendShaft(param);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "送轴任务创建成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
private void toDoSendShaft(JSONObject param) {
|
||||
String pointCode = param.getString("point_code");
|
||||
String device = param.getString("device");
|
||||
BstIvtCutpointivt startPoint = bstIvtCutpointivtService.getPintByTrussCode(pointCode, false);
|
||||
@@ -430,9 +446,5 @@ public class NbjPdaServiceImpl implements NbjPdaService {
|
||||
taskParam.put("is_flag", "0");
|
||||
}
|
||||
pdaSendShaftAGVTask.createTask(taskParam);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "送轴任务创建成功!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,14 @@ public interface IpdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
||||
* @return
|
||||
*/
|
||||
List<PdmBiSlittingproductionplan> getByContainerNames(List<String> collect);
|
||||
|
||||
/**
|
||||
* 获取同组, 不同上下
|
||||
* @param splitGroup 组别
|
||||
* @param upDown 上下卷
|
||||
* @return
|
||||
*/
|
||||
List<PdmBiSlittingproductionplan> getSameGroupOthers(String splitGroup, String upDown);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -295,5 +295,14 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
lam.in(PdmBiSlittingproductionplan::getContainer_name, collect);
|
||||
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PdmBiSlittingproductionplan> getSameGroupOthers(String splitGroup, String upDown) {
|
||||
LambdaQueryWrapper<PdmBiSlittingproductionplan> lam = new QueryWrapper<PdmBiSlittingproductionplan>().lambda();
|
||||
lam.eq(PdmBiSlittingproductionplan::getSplit_group, splitGroup)
|
||||
.ne(PdmBiSlittingproductionplan::getUp_or_down, upDown)
|
||||
.eq(PdmBiSlittingproductionplan::getIs_child_tz_ok, "0");
|
||||
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -331,8 +331,8 @@ public class TaskUtils {
|
||||
*/
|
||||
public static String createVirtualQzzNo(String resourceName, String format, PdmBiSlittingproductionplan demoPlan) {
|
||||
return resourceName.substring(0, 2)
|
||||
+ resourceName.substring(resourceName.length() - 2)
|
||||
+ demoPlan.getSplit_group()
|
||||
+ resourceName.substring(resourceName.length() - 2) + "-"
|
||||
// + demoPlan.getSplit_group()
|
||||
+ TaskUtils.getDateTime(format) + "-"
|
||||
+ demoPlan.getUp_or_down();
|
||||
}
|
||||
@@ -398,6 +398,9 @@ public class TaskUtils {
|
||||
public static String createVirtualContainer(String rollCode, String format, String pointCode) {
|
||||
return "R-" + pointCode + "-" + TaskUtils.getDateTime(format) + "-" + rollCode;
|
||||
}
|
||||
public static String createVirtualGroupNum(String format) {
|
||||
return "G" + "-" + TaskUtils.getDateTime(format);
|
||||
}
|
||||
/**
|
||||
* 创建虚拟的子卷号
|
||||
* @param format 时间格式
|
||||
|
||||
Reference in New Issue
Block a user