|
@@ -1,9 +1,16 @@
|
|
package com.fjhx.sale.service.pack.impl;
|
|
package com.fjhx.sale.service.pack.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.fjhx.sale.entity.pack.po.PackShipment;
|
|
import com.fjhx.sale.entity.pack.po.PackShipment;
|
|
import com.fjhx.sale.mapper.pack.PackShipmentMapper;
|
|
import com.fjhx.sale.mapper.pack.PackShipmentMapper;
|
|
|
|
+import com.fjhx.sale.service.pack.PackDetailGoodsService;
|
|
|
|
+import com.fjhx.sale.service.pack.PackDetailProductService;
|
|
import com.fjhx.sale.service.pack.PackShipmentService;
|
|
import com.fjhx.sale.service.pack.PackShipmentService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.obs.services.internal.ServiceException;
|
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.fjhx.sale.entity.pack.vo.PackShipmentVo;
|
|
import com.fjhx.sale.entity.pack.vo.PackShipmentVo;
|
|
@@ -12,17 +19,26 @@ import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
import com.fjhx.sale.entity.pack.dto.PackShipmentDto;
|
|
import com.fjhx.sale.entity.pack.dto.PackShipmentDto;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
* 出货绑定主合同表 服务实现类
|
|
* 出货绑定主合同表 服务实现类
|
|
* </p>
|
|
* </p>
|
|
*
|
|
*
|
|
- * @author
|
|
|
|
|
|
+ * @author
|
|
* @since 2023-04-19
|
|
* @since 2023-04-19
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
public class PackShipmentServiceImpl extends ServiceImpl<PackShipmentMapper, PackShipment> implements PackShipmentService {
|
|
public class PackShipmentServiceImpl extends ServiceImpl<PackShipmentMapper, PackShipment> implements PackShipmentService {
|
|
|
|
+ @Autowired
|
|
|
|
+ private PackDetailGoodsService packDetailGoodsService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private PackDetailProductService packDetailProductService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Page<PackShipmentVo> getPage(PackShipmentSelectDto dto) {
|
|
public Page<PackShipmentVo> getPage(PackShipmentSelectDto dto) {
|
|
@@ -54,4 +70,34 @@ public class PackShipmentServiceImpl extends ServiceImpl<PackShipmentMapper, Pac
|
|
this.removeById(id);
|
|
this.removeById(id);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询出货绑定主合同列表详情
|
|
|
|
+ * @param dto
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public List<PackShipmentVo> getList(PackShipmentSelectDto dto) {
|
|
|
|
+ //查询出货绑定主合同列表详情
|
|
|
|
+ List<PackShipmentVo> packShipments = baseMapper.getList(Wrappers.query()
|
|
|
|
+ .like(ObjectUtil.isNotEmpty(dto.getKeyword())," c.code",dto.getKeyword()));
|
|
|
|
+ return packShipments;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询出货-主合同表的产品信息详情列表
|
|
|
|
+ * @param dto
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public List<Map<String, Object>> productDetailList(PackShipmentSelectDto dto) {
|
|
|
|
+ if (ObjectUtil.isEmpty(dto.getPackDetailIds())){
|
|
|
|
+ throw new ServiceException("参数缺失:包装明细单ID不能为null");
|
|
|
|
+ }
|
|
|
|
+ String packDetailIds = dto.getPackDetailIds();
|
|
|
|
+ //获取到包装明细单ID列表
|
|
|
|
+ List<String> ids = Arrays.asList(packDetailIds.split(","));
|
|
|
|
+ return baseMapper.productDetailList(ids);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|