Commit 937df678 authored by lanbaoming's avatar lanbaoming

Merge branch 'dev'

parents f5cd9f7d 6511ebe3
...@@ -18,6 +18,10 @@ import java.util.List; ...@@ -18,6 +18,10 @@ import java.util.List;
@ToString(callSuper = true) @ToString(callSuper = true)
public class CustomerAnalysisReq extends PageParam { public class CustomerAnalysisReq extends PageParam {
private String orderfield; //排序字段
private String ordertype; //排序方式
private int start; private int start;
private int size; private int size;
...@@ -50,7 +54,7 @@ public class CustomerAnalysisReq extends PageParam { ...@@ -50,7 +54,7 @@ public class CustomerAnalysisReq extends PageParam {
/* /*
销售经理 销售经理
*/ */
private List<String> salesmanid; private List<String> salesmanid;
private String salesmanidstr; private String salesmanidstr;
private String salesmanidstrs; private String salesmanidstrs;
......
...@@ -160,6 +160,24 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService { ...@@ -160,6 +160,24 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService {
对查询逻辑做处理 lanbm 2024-04-16 add 对查询逻辑做处理 lanbm 2024-04-16 add
*/ */
public CustomerAnalysisReq getReq(CustomerAnalysisReq Req) { public CustomerAnalysisReq getReq(CustomerAnalysisReq Req) {
//处理排序问题
if (Req.getOrderfield() == null || Req.getOrderfield().length() == 0) {
Req.setOrderfield("allsumvolume");
Req.setOrdertype("desc");
} else {
if (Req.getOrderfield().equals("sumvolumeV1")==true) {
Req.setOrderfield("sumvolume1");
}
}
if (Req.getOrdertype() != null &&
Req.getOrdertype().equals("descending")==true) {
Req.setOrdertype("desc");
} else {
Req.setOrdertype("asc");
}
//计算月份差 //计算月份差
long lc = monthDiff(Req.getSdate(), Req.getEdate()); long lc = monthDiff(Req.getSdate(), Req.getEdate());
if (lc == 0) { if (lc == 0) {
...@@ -231,8 +249,7 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService { ...@@ -231,8 +249,7 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService {
/* /*
设置部门多选 设置部门多选
*/ */
private void setDept(CustomerAnalysisReq Req) private void setDept(CustomerAnalysisReq Req) {
{
if (Req.getDeptid() != null && Req.getDeptid().size() > 0) { if (Req.getDeptid() != null && Req.getDeptid().size() > 0) {
if (Req.getDeptid().size() == 1) { if (Req.getDeptid().size() == 1) {
Req.setDeptidstr(Req.getDeptid().get(0).toString()); Req.setDeptidstr(Req.getDeptid().get(0).toString());
......
...@@ -58,7 +58,13 @@ ...@@ -58,7 +58,13 @@
) )
select * from dataTJ select * from dataTJ
<include refid="WherePage2"/> <include refid="WherePage2"/>
order by allsumvolume desc,number desc
<if test="orderfield!=null and orderfield!=''
and ordertype!=null and ordertype!=''">
order by ${orderfield} ${ordertype}
</if>
limit #{start},#{size} limit #{start},#{size}
</select> </select>
...@@ -198,8 +204,8 @@ ...@@ -198,8 +204,8 @@
and c.customer_service in ${salesmanidstrs} and c.customer_service in ${salesmanidstrs}
</if> </if>
<if test="deptid!=null and deptid!=''"> <if test="deptidstr!=null and deptidstr!=''">
and u_d.dept_id= #{deptid} and u_d.dept_id= #{deptidstr}
</if> </if>
<if test="deptidstrs!=null and deptidstrs!=''"> <if test="deptidstrs!=null and deptidstrs!=''">
and u_d.dept_id in ${deptidstrs} and u_d.dept_id in ${deptidstrs}
......
...@@ -532,7 +532,8 @@ public class WarehouseServiceImpl implements WarehouseService { ...@@ -532,7 +532,8 @@ public class WarehouseServiceImpl implements WarehouseService {
if (regionId.equals("")) { if (regionId.equals("")) {
return new ArrayList(); return new ArrayList();
} }
List<WarehouseTreeRegionVO> list = warehouseMapper.getRegionList(type, regionId, destCountryId, objectiveId, destWarehouseId); List<WarehouseTreeRegionVO> list =
warehouseMapper.getRegionList(type, regionId, destCountryId, objectiveId, destWarehouseId);
return list; return list;
} }
} }
...@@ -101,9 +101,17 @@ public class WarehouseController { ...@@ -101,9 +101,17 @@ public class WarehouseController {
} }
@GetMapping("/getRegionList") @GetMapping("/getRegionList")
public CommonResult<List<WarehouseTreeRegionVO>> getRegionList(@RequestParam(value = "type", required = false) Integer type, public CommonResult<List<WarehouseTreeRegionVO>> getRegionList(
String regionId,String destCountryId, String objectiveId ,String destWarehouseId){ @RequestParam(value = "type", required = false) Integer type,
List<WarehouseTreeRegionVO> list = warehouseService.getRegionList(type,regionId,destCountryId,objectiveId,destWarehouseId); String regionId,String destCountryId,
String objectiveId ,String destWarehouseId){
List<WarehouseTreeRegionVO> list =
warehouseService.getRegionList(
type,
regionId,
destCountryId,
objectiveId,
destWarehouseId);
return success(list); return success(list);
} }
......
...@@ -2494,9 +2494,24 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2494,9 +2494,24 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
this.createNoCanShipmentChannelException(orderDO, this.createNoCanShipmentChannelException(orderDO,
event, item, warehouseInInfoVO, event, item, warehouseInInfoVO,
type, orderNoCanShipmentChannelExceptionDOList); type, orderNoCanShipmentChannelExceptionDOList);
} else {
String s = orderDO.getOrderNo() +
"不可出渠道异常逻辑点 noQuoteOrAutomaticNoQuote:" +
noQuoteOrAutomaticNoQuote;
if (Objects.isNull(warehouseInInfoVO)) {
s += " warehouseInInfoVO 为空,";
}
s += "getCartonsNum:" +
warehouseInInfoVO.getCartonsNum();
zTest m = new zTest();
m.setTestname(s);
m.setCreatedate(new Date());
zTestMapper.insert(m);
} }
} else { } else {
//海运也需要判断单询价异常逻辑 lanbm 2024-06-17 add //海运也需要判断单询价异常逻辑
OrderItemDO item = OrderItemDO item =
orderItemMapper.selectById( orderItemMapper.selectById(
orderItemDO.getOrderItemId()); orderItemDO.getOrderItemId());
......
...@@ -110,7 +110,8 @@ public class ProductPriceExcelExportListener { ...@@ -110,7 +110,8 @@ public class ProductPriceExcelExportListener {
//先定义一个空集合每次循环使他变成null减少内存的占用 //先定义一个空集合每次循环使他变成null减少内存的占用
int start = (i - 1) * pageSize; int start = (i - 1) * pageSize;
int end = i * pageSize; int end = i * pageSize;
List<ProductPriceExcelData> list = productPriceService.getExcelList(pageSize, maxId, exportReqVO); List<ProductPriceExcelData> list =
productPriceService.getExcelList(pageSize, maxId, exportReqVO);
log.error("路线价格数据{}-{}处理成功", start, end); log.error("路线价格数据{}-{}处理成功", start, end);
if(CollectionUtil.isEmpty(list)) continue; if(CollectionUtil.isEmpty(list)) continue;
maxId = list.get(list.size() - 1).getId(); maxId = list.get(list.size() - 1).getId();
......
...@@ -1757,21 +1757,27 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -1757,21 +1757,27 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
@Override @Override
public void matchLineAndProduct(List<ProductPriceRespVO> list) { public void matchLineAndProduct(List<ProductPriceRespVO> list) {
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
//线路ID
List<Long> lineIdList = list.stream() List<Long> lineIdList = list.stream()
.map(ProductPriceBaseVO::getWarehouseLineId) .map(ProductPriceBaseVO::getWarehouseLineId)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<WarehouseLineDO> lineDOList = warehouseService.selectBylineIdList(lineIdList); List<WarehouseLineDO> lineDOList =
warehouseService.selectBylineIdList(lineIdList);
//产品ID
List<Long> productIdList = list.stream() List<Long> productIdList = list.stream()
.map(ProductPriceBaseVO::getProductId) .map(ProductPriceBaseVO::getProductId)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<ProductDO> productDOList = List<ProductDO> productDOList =
productService.getProductList(productIdList); productService.getProductList(productIdList);
Map<Long, ProductDO> productMap = productDOList.stream() Map<Long, ProductDO> productMap = productDOList.stream()
.collect(Collectors.toMap(ProductDO::getId, (v -> v), (v1, v2) -> v2)); .collect(Collectors.toMap(ProductDO::getId,
(v -> v), (v1, v2) -> v2));
Map<Long, WarehouseLineDO> lineMap = lineDOList.stream() Map<Long, WarehouseLineDO> lineMap = lineDOList.stream()
.collect(Collectors.toMap(WarehouseLineDO::getId, (v -> v), (v1, v2) -> v2)); .collect(Collectors.toMap(WarehouseLineDO::getId,
(v -> v), (v1, v2) -> v2));
list.forEach(t -> { list.forEach(t -> {
t.setWarehouseLineDO(lineMap.get(t.getWarehouseLineId())); t.setWarehouseLineDO(lineMap.get(t.getWarehouseLineId()));
t.setProductDO(productMap.get(t.getProductId())); t.setProductDO(productMap.get(t.getProductId()));
...@@ -1787,17 +1793,20 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -1787,17 +1793,20 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
@Override @Override
public List<ProductPriceExcelData> getExcelList(int pageSize, Long maxId, ProductPricePageReqVO params) { public List<ProductPriceExcelData> getExcelList(int pageSize, Long maxId, ProductPricePageReqVO params) {
List<ProductPriceExcelData> list = baseMapper.getExcelList(pageSize, maxId, params); List<ProductPriceExcelData> list =
baseMapper.getExcelList(pageSize, maxId, params);
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
List<Long> idList = list.stream() List<Long> idList = list.stream()
.map(ProductPriceExcelData::getId) .map(ProductPriceExcelData::getId)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<ProductPriceSpecialDO> specialList = productPriceSpecialService.getProductPriceSpecialList(idList); List<ProductPriceSpecialDO> specialList =
productPriceSpecialService.getProductPriceSpecialList(idList);
Map<Long, List<ProductPriceSpecialDO>> specialMap = specialList.stream() Map<Long, List<ProductPriceSpecialDO>> specialMap = specialList.stream()
.collect(Collectors.groupingBy(ProductPriceSpecialDO::getProductPriceId)); .collect(Collectors.groupingBy(ProductPriceSpecialDO::getProductPriceId));
List<ProductPriceStepDO> stepList = productPriceStepService.getProductPriceStepList(idList); List<ProductPriceStepDO> stepList =
productPriceStepService.getProductPriceStepList(idList);
List<Long> stepIdList = stepList.stream() List<Long> stepIdList = stepList.stream()
.map(ProductPriceStepDO::getId) .map(ProductPriceStepDO::getId)
.collect(toList()); .collect(toList());
......
...@@ -100,6 +100,12 @@ public class ProductPricePageReqVO extends PageParam { ...@@ -100,6 +100,12 @@ public class ProductPricePageReqVO extends PageParam {
@ApiModelProperty(value = "运输方式") @ApiModelProperty(value = "运输方式")
private String transportType; private String transportType;
@ApiModelProperty(value = "国家")
private Long destCountryId;
@ApiModelProperty(value = "目的仓")
private Long destWarehouseId;
@ApiModelProperty(value = "商品编码") @ApiModelProperty(value = "商品编码")
private String productCode; private String productCode;
@ApiModelProperty(value = "海关编码") @ApiModelProperty(value = "海关编码")
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
AND ep.deleted = 0 AND ep.deleted = 0
AND FIND_IN_SET(ewl.transport_type, ew_start.freight)>0 AND FIND_IN_SET(ewl.transport_type, ew_start.freight)>0
AND FIND_IN_SET(ewl.transport_type, ew_dest.freight)>0 AND FIND_IN_SET(ewl.transport_type, ew_dest.freight)>0
<if test="params.productCode != null and params.productCode !=''"> <if test="params.productCode != null and params.productCode !=''">
and ep.product_code like CONCAT('%',#{params.productCode},'%') and ep.product_code like CONCAT('%',#{params.productCode},'%')
</if> </if>
...@@ -112,6 +113,15 @@ ...@@ -112,6 +113,15 @@
and ew_dest.shi = #{params.destCityId} and ew_dest.shi = #{params.destCityId}
</if> </if>
<!--目的国-->
<if test="params.destCountryId != null">
and ew_dest.guojia=#{params.destCountryId}
</if>
<!--目的仓-->
<if test="params.destWarehouseId != null">
and ew_dest.id=#{params.destWarehouseId}
</if>
<if test="params.blacklist != null"> <if test="params.blacklist != null">
and epp.blacklist = #{params.blacklist} and epp.blacklist = #{params.blacklist}
</if> </if>
...@@ -268,6 +278,16 @@ ...@@ -268,6 +278,16 @@
<if test="params.destCityId != null"> <if test="params.destCityId != null">
and ew_dest.shi = #{params.destCityId} and ew_dest.shi = #{params.destCityId}
</if> </if>
<!--目的国-->
<if test="params.destCountryId != null">
and ew_dest.guojia=#{params.destCountryId}
</if>
<!--目的仓-->
<if test="params.destWarehouseId != null">
and ew_dest.id=#{params.destWarehouseId}
</if>
<if test="params.blacklist != null"> <if test="params.blacklist != null">
and epp.blacklist = #{params.blacklist} and epp.blacklist = #{params.blacklist}
</if> </if>
...@@ -387,6 +407,16 @@ ...@@ -387,6 +407,16 @@
<if test="params.destCityId != null"> <if test="params.destCityId != null">
and ew_dest.shi = #{params.destCityId} and ew_dest.shi = #{params.destCityId}
</if> </if>
<!--目的国-->
<if test="params.destCountryId != null">
and ew_dest.guojia=#{params.destCountryId}
</if>
<!--目的仓-->
<if test="params.destWarehouseId != null">
and ew_dest.id=#{params.destWarehouseId}
</if>
<if test="params.blacklist != null"> <if test="params.blacklist != null">
and epp.blacklist = #{params.blacklist} and epp.blacklist = #{params.blacklist}
</if> </if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment