Merge branch 'b_lms' of http://121.40.234.130:8899/root/lanzhouhailiang_one into b_lms
This commit is contained in:
@@ -28,4 +28,6 @@ public interface PdmBiSubpackagerelationMapper extends BaseMapper<PdmBiSubpackag
|
||||
@Param("status") String status);
|
||||
|
||||
|
||||
List<PdmBiSubpackagerelation> queryContainerNameBySaleOrder( @Param("sale_order_name") String sale_order_name);
|
||||
|
||||
}
|
||||
|
||||
@@ -72,5 +72,17 @@
|
||||
ORDER BY
|
||||
MAX(create_time) DESC
|
||||
</select>
|
||||
<select id="queryContainerNameBySaleOrder" resultType="org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation">
|
||||
SELECT
|
||||
a.*,b.*
|
||||
FROM
|
||||
`pdm_bi_subpackagerelation` a
|
||||
LEFT JOIN bst_ivt_packageinfoivt b ON a.container_name = b.container_name
|
||||
WHERE
|
||||
b.point_status = '6'
|
||||
AND a.sale_order_name = #{sale_order_name}
|
||||
ORDER BY box_group DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -153,25 +153,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
*/
|
||||
@Override
|
||||
public List<PdmBiSubpackagerelation> queryContainerNameBySaleOrder(Map whereJson) {
|
||||
LambdaQueryWrapper<PdmBiSubpackagerelation> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (whereJson.containsKey("customer_description")) {
|
||||
queryWrapper.like(PdmBiSubpackagerelation::getCustomer_description, whereJson.get("customer_description"));
|
||||
}
|
||||
if (whereJson.containsKey("sale_order_name")) {
|
||||
queryWrapper.eq(PdmBiSubpackagerelation::getSale_order_name, whereJson.get("sale_order_name"));
|
||||
}
|
||||
if (whereJson.containsKey("customer_name")) {
|
||||
queryWrapper.like(PdmBiSubpackagerelation::getCustomer_name, whereJson.get("customer_name"));
|
||||
}
|
||||
if (whereJson.containsKey("status")) {
|
||||
if ("99".equals(whereJson.get("status"))) {
|
||||
queryWrapper.eq(PdmBiSubpackagerelation::getStatus, whereJson.get("status"));
|
||||
} else {
|
||||
queryWrapper.ge(PdmBiSubpackagerelation::getStatus, whereJson.get("status"));
|
||||
}
|
||||
}
|
||||
queryWrapper.orderByDesc(PdmBiSubpackagerelation::getBox_group);
|
||||
List<PdmBiSubpackagerelation> pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper.selectList(queryWrapper);
|
||||
List<PdmBiSubpackagerelation> pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper.queryContainerNameBySaleOrder(whereJson.get("sale_order_name").toString());
|
||||
Map<String, Long> countByGroup = pdmBiSubpackagerelationList.stream()
|
||||
.filter(item -> item.getBox_group() != null)
|
||||
.collect(Collectors.groupingBy(PdmBiSubpackagerelation::getBox_group, Collectors.counting()));
|
||||
|
||||
@@ -239,11 +239,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
||||
}
|
||||
List<String> pcsnList = Arrays.asList(material_barcode.split(","));
|
||||
// 查询子卷包装关系
|
||||
// List<JSONObject> subList = subTab.query("container_name ='B2512402242302B1A1' and status in ('0','1')")
|
||||
// .getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
// List<JSONObject> subList = subTab.query("container_name ='B2512402242302B1A1' and status in ('0','1')")
|
||||
// .getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
List<JSONObject> subList = subTab.query("container_name in ('" + String.join("','", pcsnList) + "') and status in ('0','1')")
|
||||
List<JSONObject> subList = subTab.query("container_name in ('" + String.join("','", pcsnList) + "') and status in ('0','1','99')")
|
||||
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
if (ObjectUtil.isEmpty(subList)) {
|
||||
throw new BadRequestException("未查询到子卷包装信息!");
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.sch.point.dao.SchBasePoint;
|
||||
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
@@ -20,6 +22,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -69,13 +72,16 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
||||
.eq(SchBasePoint::getIs_used, IOSEnum.IS_NOTANDYES.code("是"))
|
||||
.eq(SchBasePoint::getIs_delete, IOSEnum.IS_NOTANDYES.code("否"))
|
||||
);
|
||||
|
||||
// 1.查询此木箱号的子卷包装关系
|
||||
JSONObject jsonSub = subTab.query("package_box_sn = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
|
||||
if(StringUtils.isEmpty(whereJson.getString("vehicle_code"))){
|
||||
throw new BadRequestException("木箱号不能为空!");
|
||||
}
|
||||
//木箱号可能用逗号隔开
|
||||
String vehicleCode = Arrays.asList(whereJson.getString("vehicle_code").split(",")).get(0);
|
||||
JSONObject jsonSub = subTab.query("package_box_sn = '" + vehicleCode + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonSub)) {
|
||||
throw new BadRequestException("未查询到该木箱对应的包装关系!");
|
||||
}
|
||||
|
||||
// 2.找相同订单号的所有排
|
||||
jsonSub.put("region_id", RegionTypeEnum.TWO_FH01.getId());
|
||||
List<JSONObject> pointLikeOrder = schBasePointMapper.queryLikeOrderRow(jsonSub);
|
||||
|
||||
Reference in New Issue
Block a user