fix:获取堆叠模版优化

This commit is contained in:
zhouz
2024-07-09 19:08:53 +08:00
parent c660472ae9
commit c29798e1b3

View File

@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; 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.query.QueryWrapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.hibernate.annotations.Source; import org.hibernate.annotations.Source;
@@ -68,6 +69,8 @@ public class LashManageServiceImpl implements LashManageService {
*/ */
private final TwoLashTask twoLashTask; private final TwoLashTask twoLashTask;
private final TwoOutHeapTask twoOutHeapTask;
/** /**
* 木箱类型信息服务 * 木箱类型信息服务
*/ */
@@ -91,6 +94,9 @@ public class LashManageServiceImpl implements LashManageService {
throw new BadRequestException("没有此木箱信息:"+whereJson.getString("vehicle_code")); throw new BadRequestException("没有此木箱信息:"+whereJson.getString("vehicle_code"));
} }
//查询该木箱的堆叠模版信息
MdpbBoxtype boxtype = iMdpbBoxtypeService.getOne(new LambdaQueryWrapper<MdpbBoxtype>().eq(MdpbBoxtype::getBox_type, boxDao.getMaterial_code()));
JSONObject jsonSub = WQLObject.getWQLObject("pdm_bi_subpackagerelation") JSONObject jsonSub = WQLObject.getWQLObject("pdm_bi_subpackagerelation")
.query("package_box_sn = '" + boxDao.getBox_no() + "'") .query("package_box_sn = '" + boxDao.getBox_no() + "'")
.uniqueResult(0); .uniqueResult(0);
@@ -133,7 +139,7 @@ public class LashManageServiceImpl implements LashManageService {
jsonPoint.put("vehicle_qty", NumberUtil.add(jsonPoint.getBigDecimal("vehicle_qty"),1)); jsonPoint.put("vehicle_qty", NumberUtil.add(jsonPoint.getBigDecimal("vehicle_qty"),1));
if (jsonPoint.getIntValue("vehicle_qty") == Integer.parseInt(boxDao.getLash_num())) { if (jsonPoint.getIntValue("vehicle_qty") == Integer.parseInt(boxtype.getLash_num())) {
// 相同清空载具以及数量 // 相同清空载具以及数量
jsonPoint.put("vehicle_qty",0); jsonPoint.put("vehicle_qty",0);
jsonPoint.put("vehicle_code",""); jsonPoint.put("vehicle_code","");