opt:获取纸管长度
This commit is contained in:
@@ -249,32 +249,37 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
//获取纸管长度
|
||||
String containerLength = productionPlanList.get(0).getPaper_tube_or_FRP().equals("1") ? productionPlanList.get(0).getPaper_tube_description() : productionPlanList.get(0).getFRP_description();
|
||||
int maxNum = 0;
|
||||
for (String p : containerLength.split("\\|")) {
|
||||
int num = Integer.parseInt(p.replaceAll("[^0-9]", ""));
|
||||
if (num > maxNum) {
|
||||
maxNum = num;
|
||||
for (String part : containerLength.split("\\|")) {
|
||||
String numStr = part.replaceAll("\\D+", "");
|
||||
if (!numStr.isEmpty()) {
|
||||
int num = Integer.parseInt(numStr);
|
||||
if (num > maxNum) {
|
||||
maxNum = num;
|
||||
}
|
||||
}
|
||||
//todo 测试,扩展参数
|
||||
JSONObject param = new JSONObject();
|
||||
//木箱最大数量
|
||||
param.put("maxNo", "1");
|
||||
//木箱放入子卷数量
|
||||
param.put("boxNo", "1");
|
||||
//是否最后子卷
|
||||
param.put("lastOne", "1");
|
||||
//子卷号
|
||||
param.put("barcode", packagerelationList.get(0).getContainer_name());
|
||||
//子卷长度
|
||||
param.put("len", num);
|
||||
//托盘类型 1小托盘 2大托盘
|
||||
param.put("containerType", "2");
|
||||
jo.put("request_param", param.toString());
|
||||
zxqTask.createTask(jo);
|
||||
// } else {
|
||||
// throw new BadRequestException("装箱区暂无空余库位!");
|
||||
// }
|
||||
}
|
||||
}
|
||||
//todo 测试,扩展参数
|
||||
JSONObject param = new JSONObject();
|
||||
//木箱最大数量
|
||||
param.put("maxNo", "1");
|
||||
//木箱放入子卷数量
|
||||
param.put("boxNo", "1");
|
||||
//是否最后子卷
|
||||
param.put("lastOne", "1");
|
||||
//子卷号
|
||||
param.put("barcode", packagerelationList.get(0).getContainer_name());
|
||||
//子卷长度
|
||||
param.put("len", maxNum);
|
||||
//托盘类型 1小托盘 2大托盘
|
||||
param.put("containerType", "2");
|
||||
jo.put("request_param", param.toString());
|
||||
zxqTask.createTask(jo);
|
||||
// } else {
|
||||
// throw new BadRequestException("装箱区暂无空余库位!");
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
|
||||
@@ -7,12 +7,18 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.mapper.PdmBiSlittingproductionplanMapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.pdm_manage.enums.SUBEnum;
|
||||
import org.nl.b_lms.sch.tasks.TwoInTask;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||
@@ -49,6 +55,7 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -106,6 +113,9 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
*/
|
||||
@Autowired
|
||||
private PointService pointService;
|
||||
@Resource
|
||||
|
||||
private IpdmBiSubpackagerelationService ipdmBiSubpackagerelationService;
|
||||
|
||||
@Override
|
||||
public Object pageQuery(Map query, Pageable pageQuery) {
|
||||
@@ -374,10 +384,13 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
.eq(StIvtIostorinvdis::getIostorinv_id, mst.getIostorinv_id())
|
||||
).stream().map(row -> JSONObject.parseObject(JSON.toJSONString(row), LinkedHashMap.class))
|
||||
.collect(Collectors.toList());
|
||||
//查询木箱码
|
||||
PdmBiSubpackagerelation pdmBiSubpackagerelation = ipdmBiSubpackagerelationService.getOne(new LambdaQueryWrapper<PdmBiSubpackagerelation>()
|
||||
.eq(PdmBiSubpackagerelation::getContainer_name,whereJson.get("material_barcode")));
|
||||
// 查询木箱信息
|
||||
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
||||
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||
.eq(BstIvtBoxinfo::getBox_no, whereJson.get("box_no"))
|
||||
.eq(BstIvtBoxinfo::getBox_no, pdmBiSubpackagerelation.getPackage_box_sn())
|
||||
);
|
||||
jsonSend.put("dtl_row",JSONObject.parseObject(JSON.toJSONString(dtlDao)));
|
||||
jsonSend.put("tableMater", disList);
|
||||
|
||||
@@ -270,7 +270,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
||||
jsonDiv.put("point_code", jsonObject.getString("device_code"));
|
||||
jsonDiv.put("sect_id", IOSEnum.SECT_ID.code("二期主存区"));
|
||||
jsonDiv.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
||||
|
||||
jsonDiv.put("material_barcode",jsonObject.getString("material_barcode"));
|
||||
iStIvtIostorinvService.divStruct(jsonDiv);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public abstract class AbstractAcsTask {
|
||||
List<AcsTaskDto> taskList = this.schedule();
|
||||
if (ObjectUtil.isNotEmpty(taskList)) {
|
||||
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(taskList));
|
||||
return AcsUtil.notifyAcs("api/wms/task", arr);
|
||||
//return AcsUtil.notifyAcs("api/wms/task", arr);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user