|
|
@ -34,10 +34,12 @@ import com.yxt.common.core.query.PagerQuery; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import com.yxt.common.core.vo.PagerVo; |
|
|
|
import com.yxt.oms.feign.sales.smssalesbill.SmsSalesBillFeign; |
|
|
|
import com.yxt.oms.feign.warehouse.warehouseInventory.WarehouseInventoryFeign; |
|
|
|
import io.swagger.annotations.ApiModelProperty; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.ArrayList; |
|
|
@ -61,7 +63,8 @@ public class SmsSalesBillService extends MybatisBaseService<SmsSalesBillMapper, |
|
|
|
|
|
|
|
@Resource |
|
|
|
private SmsSalesBillFeign smsSalesBillFeign; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private WarehouseInventoryFeign warehouseInventoryFeign; |
|
|
|
private QueryWrapper<SmsSalesBill> createQueryWrapper(SmsSalesBillQuery query) { |
|
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
|
@ -115,7 +118,21 @@ public class SmsSalesBillService extends MybatisBaseService<SmsSalesBillMapper, |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<ReviewDetailsVo> reviewDetails(String sid) { |
|
|
|
return smsSalesBillFeign.reviewDetails(sid); |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
ReviewDetailsVo data = smsSalesBillFeign.reviewDetails(sid).getData(); |
|
|
|
List<ReviewGoods> goods = data.getGoods(); |
|
|
|
if (!goods.isEmpty()) { |
|
|
|
for (ReviewGoods good : goods) { |
|
|
|
String goodsSkuSid = good.getGoodsSkuSid(); |
|
|
|
GoodsCountVo goodsCountVo = warehouseInventoryFeign.selCountsBySkuSid(goodsSkuSid); |
|
|
|
if (null != goodsCountVo) { |
|
|
|
good.setAllocateCount(goodsCountVo.getAllocateCount()); |
|
|
|
good.setUseCount(goodsCountVo.getUseCount()); |
|
|
|
good.setInventoryCount(goodsCountVo.getInventoryCount()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(data); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean saveShipper(ReviewDetailsVo dto) { |
|
|
|