|
@@ -5,11 +5,13 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fjhx.sale.entity.documents.po.Documents;
|
|
|
import com.fjhx.sale.entity.pack.dto.PackShipmentDto;
|
|
|
import com.fjhx.sale.entity.pack.dto.PackShipmentSelectDto;
|
|
|
import com.fjhx.sale.entity.pack.po.PackShipment;
|
|
|
import com.fjhx.sale.entity.pack.vo.PackShipmentVo;
|
|
|
import com.fjhx.sale.mapper.pack.PackShipmentMapper;
|
|
|
+import com.fjhx.sale.service.documents.DocumentsService;
|
|
|
import com.fjhx.sale.service.pack.PackDetailGoodsService;
|
|
|
import com.fjhx.sale.service.pack.PackDetailProductService;
|
|
|
import com.fjhx.sale.service.pack.PackShipmentService;
|
|
@@ -39,6 +41,9 @@ public class PackShipmentServiceImpl extends ServiceImpl<PackShipmentMapper, Pac
|
|
|
@Autowired
|
|
|
private PackDetailProductService packDetailProductService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private DocumentsService documentsService;
|
|
|
+
|
|
|
@Override
|
|
|
public Page<PackShipmentVo> getPage(PackShipmentSelectDto dto) {
|
|
|
IWrapper<PackShipment> wrapper = getWrapper();
|
|
@@ -77,9 +82,12 @@ public class PackShipmentServiceImpl extends ServiceImpl<PackShipmentMapper, Pac
|
|
|
*/
|
|
|
@Override
|
|
|
public List<PackShipmentVo> getList(PackShipmentSelectDto dto) {
|
|
|
+ List<Long> packShipmentIds = documentsService.listObject(Documents::getPackShipmentId, q -> q.orderByAsc(Documents::getContractId));
|
|
|
//查询出货绑定主合同列表详情
|
|
|
List<PackShipmentVo> packShipments = baseMapper.getList(Wrappers.query()
|
|
|
- .like(ObjectUtil.isNotEmpty(dto.getKeyword())," c.code",dto.getKeyword()));
|
|
|
+ .like(ObjectUtil.isNotEmpty(dto.getKeyword()), "c.code", dto.getKeyword())
|
|
|
+ .notIn(ObjectUtil.isNotEmpty(packShipmentIds), "ps.id", packShipmentIds)
|
|
|
+ );
|
|
|
return packShipments;
|
|
|
}
|
|
|
|