opt:只显示存在点位的子卷信息
This commit is contained in:
@@ -28,4 +28,6 @@ public interface PdmBiSubpackagerelationMapper extends BaseMapper<PdmBiSubpackag
|
|||||||
@Param("status") String status);
|
@Param("status") String status);
|
||||||
|
|
||||||
|
|
||||||
|
List<PdmBiSubpackagerelation> queryContainerNameBySaleOrder( @Param("sale_order_name") String sale_order_name);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,5 +72,17 @@
|
|||||||
ORDER BY
|
ORDER BY
|
||||||
MAX(create_time) DESC
|
MAX(create_time) DESC
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|||||||
@@ -153,25 +153,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PdmBiSubpackagerelation> queryContainerNameBySaleOrder(Map whereJson) {
|
public List<PdmBiSubpackagerelation> queryContainerNameBySaleOrder(Map whereJson) {
|
||||||
LambdaQueryWrapper<PdmBiSubpackagerelation> queryWrapper = new LambdaQueryWrapper<>();
|
List<PdmBiSubpackagerelation> pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper.queryContainerNameBySaleOrder(whereJson.get("sale_order_name").toString());
|
||||||
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);
|
|
||||||
Map<String, Long> countByGroup = pdmBiSubpackagerelationList.stream()
|
Map<String, Long> countByGroup = pdmBiSubpackagerelationList.stream()
|
||||||
.filter(item -> item.getBox_group() != null)
|
.filter(item -> item.getBox_group() != null)
|
||||||
.collect(Collectors.groupingBy(PdmBiSubpackagerelation::getBox_group, Collectors.counting()));
|
.collect(Collectors.groupingBy(PdmBiSubpackagerelation::getBox_group, Collectors.counting()));
|
||||||
|
|||||||
Reference in New Issue
Block a user