Browse Source

Merge branch 'pre-production'

master
pref_mail@163.com 11 months ago
parent
commit
edd59e3c56
  1. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdatPriceApiVO.java
  2. 5
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceBasicUpdateVO.java
  3. 3
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageVO.java
  4. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationPackageEntity.java
  5. 22
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java
  6. 104
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceCategoryV2Excel.java
  7. 72
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceFullVehicleV2Excel.java
  8. 84
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceGeneralV2Excel.java
  9. 86
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceV2Excel.java
  10. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.java
  11. 51
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml
  12. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceService.java
  13. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryBasicServiceImpl.java
  14. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryDispatchServiceImpl.java
  15. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryWarehouseServiceImpl.java
  16. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceFullVehicleServiceImpl.java
  17. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceGeneralServiceImpl.java
  18. 1463
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
  19. 16
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceTemplateServiceImpl.java
  20. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  21. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  22. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  23. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  24. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java

2
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdatPriceApiVO.java

@ -38,6 +38,8 @@ public class BasicdatPriceApiVO implements Serializable {
@NotEmpty(message = "品牌id不能为空") @NotEmpty(message = "品牌id不能为空")
@ApiModelProperty(value = "品牌id") @ApiModelProperty(value = "品牌id")
private String brandId; private String brandId;
@ApiModelProperty(value = "日期")
private String time;
@ApiModelProperty(value = "发货单位id") @ApiModelProperty(value = "发货单位id")
private String sendOrgId; private String sendOrgId;
@ApiModelProperty(value = "始发地省份id") @ApiModelProperty(value = "始发地省份id")

5
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPriceBasicUpdateVO.java

@ -33,12 +33,15 @@ import java.util.Date;
public class BasicdataPriceBasicUpdateVO implements Serializable { public class BasicdataPriceBasicUpdateVO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@NotNull(message = "修改数据id不能为空")
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Long id; private Long id;
@NotNull(message = "模板不能为空") @NotNull(message = "模板不能为空")
@ApiModelProperty(value = "模板id") @ApiModelProperty(value = "模板id")
private Long templateId; private Long templateId;
@ApiModelProperty(value = "客户id")
private Long clientId;
@ApiModelProperty(value = "品牌id")
private Long brandId;
@NotNull(message = "生效时间不能为空") @NotNull(message = "生效时间不能为空")
@ApiModelProperty(value = "生效时间") @ApiModelProperty(value = "生效时间")
private Date effectiveTime; private Date effectiveTime;

3
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageVO.java

@ -45,6 +45,9 @@ public class BasicdataPricePageVO implements Serializable {
@ApiModelProperty(value = "品牌id") @ApiModelProperty(value = "品牌id")
private String brandId; private String brandId;
@ApiModelProperty(value = "客户id")
private String clientId;
@ApiModelProperty(value = "价格模板id") @ApiModelProperty(value = "价格模板id")
private String templateId; private String templateId;

7
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationPackageEntity.java

@ -96,5 +96,12 @@ public class DistributionReservationPackageEntity extends TenantEntity {
private Integer cancelStatus; private Integer cancelStatus;
/**
* 包件任务取消备注
*/
@ApiModelProperty(value = "包件任务取消备注")
private String cancelRemark;
} }

22
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java

@ -101,6 +101,16 @@ public class BasicdataPriceController extends BladeController {
IPage<BasicdataPricePageVO> pages = basicdataPriceService.selectBasicdataPricePage(Condition.getPage(query), basicdataPrice); IPage<BasicdataPricePageVO> pages = basicdataPriceService.selectBasicdataPricePage(Condition.getPage(query), basicdataPrice);
return R.data(pages); return R.data(pages);
} }
/**
* 基础价格表 历史版本查询
*/
@GetMapping("hisPage")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "历史版本查询", notes = "历史版本查询")
public R<IPage<BasicdataPricePageVO>> hisPage(BasicdataPricePageVO basicdataPrice, Query query) {
IPage<BasicdataPricePageVO> pages = basicdataPriceService.hisPage(Condition.getPage(query), basicdataPrice);
return R.data(pages);
}
/** /**
* 基础价格表 修改 * 基础价格表 修改
@ -135,6 +145,18 @@ public class BasicdataPriceController extends BladeController {
public R<String> upload(@RequestPart("file") MultipartFile file) { public R<String> upload(@RequestPart("file") MultipartFile file) {
return R.data(basicdataPriceService.upload(file)); return R.data(basicdataPriceService.upload(file));
} }
/**
* 基础价格表 导入
*/
@PostMapping("upload/v2")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "导入v2", notes = "导入v2")
@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "文件", dataType = "MultipartFile")
})
public R<String> uploadV2(@RequestPart("file") MultipartFile file) {
return R.data(basicdataPriceService.uploadV2(file));
}
/** /**
* 基础价格表 指定查询 * 基础价格表 指定查询

104
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceCategoryV2Excel.java

@ -0,0 +1,104 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.excel.pricev2;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* 价格 Excel实体类
*
* @author chao
* @since 2024-04-19
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataPriceCategoryV2Excel implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = {"商场名称", "商场名称"}, index = 0)
private String client;
@ExcelProperty(value = {"品牌", "品牌"}, index = 1)
private String brand;
@ExcelProperty(value = {"发站", "省"}, index = 2)
private String startProvince;
@ExcelProperty(value = {"发站", "市"}, index = 3)
private String startCity;
@ExcelProperty(value = {"发站", "区"}, index = 4)
private String startArea;
@ExcelProperty(value = {"到站", "省"}, index = 5)
private String endProvince;
@ExcelProperty(value = {"到站", "市"}, index = 6)
private String endCity;
@ExcelProperty(value = {"到站", "区"}, index = 7)
private String endArea;
@ExcelProperty(value = {"发货单位", "发货单位编码"}, index = 8)
private String sendOrgCode;
@ExcelProperty(value = {"发货单位", "发货单位"}, index = 9)
private String sendOrg;
@ExcelProperty(value = {"品类", "品类"}, index = 10)
private String category;
@ExcelProperty(value = {"提货", "单位"}, index = 11)
private String pickupUnit;
@ExcelProperty(value = {"提货", "单价"}, index = 12)
private String pickupPrice;
@ExcelProperty(value = {"干线", "单位"}, index = 13)
private String trunkLineUnit;
@ExcelProperty(value = {"干线", "单价"}, index = 14)
private String trunkLinePrice;
@ExcelProperty(value = {"仓储", "30天内"}, index = 15)
private String withinThirtyPrice;
@ExcelProperty(value = {"仓储", "30-60天"}, index = 16)
private String betweenThirtySixtyPrice;
@ExcelProperty(value = {"仓储", "60-90天"}, index = 17)
private String beyondSixtyPrice;
@ExcelProperty(value = {"仓储", "90天以上"}, index = 18)
private String beyondNinetyPrice;
@ExcelProperty(value = {"仓储附加费", "仓储操作/装卸费"}, index = 19)
private String warehouseOperatePrice;
@ExcelProperty(value = {"仓储附加费", "仓储管理费"}, index = 20)
private String warehouseManagementPrice;
@ExcelProperty(value = {"仓储附加费", "仓储分货费"}, index = 21)
private String warehouseSortPrice;
@ExcelProperty(value = {"配送", "单位"}, index = 22)
private String dispatchUnit;
@ExcelProperty(value = {"配送", "一般单价"}, index = 23)
private String dispatchPrice;
@ExcelProperty(value = {"配送", "遗留单价"}, index = 24)
private String dispatchLeaveBehindPrice;
@ExcelProperty(value = {"配送附加费", "分货费"}, index = 25)
private String dispatchSortPrice;
@ExcelProperty(value = {"配送附加费", "操作/装卸费价格"}, index = 26)
private String dispatchHandlingPrice;
@ExcelProperty(value = {"配送附加费", "平移费价格"}, index = 27)
private String dispatchRelocationPrice;
@ExcelProperty(value = {"配送附加费", "上楼费价格"}, index = 28)
private String dispatchDeliveryPrice;
@ExcelProperty(value = {"配送附加费", "上楼免楼层数"}, index = 29)
private String dispatchStairsCarryingCharge;
}

72
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceFullVehicleV2Excel.java

@ -0,0 +1,72 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.excel.pricev2;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* 价格 Excel实体类
*
* @author chao
* @since 2024-04-19
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataPriceFullVehicleV2Excel implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = {"商场名称", "商场名称"}, index = 0)
private String client;
@ExcelProperty(value = {"品牌", "品牌"}, index = 1)
private String brand;
@ExcelProperty(value = {"发站", "省"}, index = 2)
private String startProvince;
@ExcelProperty(value = {"发站", "市"}, index = 3)
private String startCity;
@ExcelProperty(value = {"发站", "区"}, index = 4)
private String startArea;
@ExcelProperty(value = {"到站", "省"}, index = 5)
private String endProvince;
@ExcelProperty(value = {"到站", "市"}, index = 6)
private String endCity;
@ExcelProperty(value = {"到站", "区"}, index = 7)
private String endArea;
@ExcelProperty(value = {"发货单位", "发货单位ID"}, index = 8)
private String sendOrgCode;
@ExcelProperty(value = {"发货单位", "发货单位"}, index = 9)
private String sendOrg;
@ExcelProperty(value = {"车型", "车型"}, index = 10)
private String vehicleType;
@ExcelProperty(value = {"提货", "单价"}, index = 11)
private String pickupPrice;
@ExcelProperty(value = {"干线", "单价"}, index = 12)
private String trunkLinePrice;
@ExcelProperty(value = {"配送", "单价"}, index = 13)
private String dispatchPrice;
}

84
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceGeneralV2Excel.java

@ -0,0 +1,84 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.excel.pricev2;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* 价格 Excel实体类
*
* @author chao
* @since 2024-04-19
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataPriceGeneralV2Excel implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = {"商场名称", "商场名称"}, index = 0)
private String client;
@ExcelProperty(value = {"品牌", "品牌"}, index = 1)
private String brand;
@ExcelProperty(value = {"发站", "省"}, index = 2)
private String startProvince;
@ExcelProperty(value = {"发站", "市"}, index = 3)
private String startCity;
@ExcelProperty(value = {"发站", "区"}, index = 4)
private String startArea;
@ExcelProperty(value = {"到站", "省"}, index = 5)
private String endProvince;
@ExcelProperty(value = {"到站", "市"}, index = 6)
private String endCity;
@ExcelProperty(value = {"到站", "区"}, index = 7)
private String endArea;
@ExcelProperty(value = {"发货单位", "发货单位ID"}, index = 8)
private String sendOrgCode;
@ExcelProperty(value = {"发货单位", "发货单位"}, index = 9)
private String sendOrg;
@ExcelProperty(value = {"提货", "最低计费"}, index = 10)
private String pickupMinCost;
@ExcelProperty(value = {"提货", "加算价格"}, index = 11)
private String pickupAddCost;
@ExcelProperty(value = {"干线", "最低计费"}, index = 12)
private String trunkLineMinCost;
@ExcelProperty(value = {"干线", "加算价格"}, index = 13)
private String trunkLineAddCost;
@ExcelProperty(value = {"配送", "最低计费"}, index = 14)
private String dispatchMinCost;
@ExcelProperty(value = {"配送", "加算价格"}, index = 15)
private String dispatchAddCost;
@ExcelProperty(value = {"配送", "向上判断件数"}, index = 16)
private String dispatchUpwardJudgment;
@ExcelProperty(value = {"配送", "向上判断加价"}, index = 17)
private String dispatchUpwardJudgmentCost;
@ExcelProperty(value = {"配送", "遗留最低计费"}, index = 18)
private String dispatchLeaveBehindMinCost;
@ExcelProperty(value = {"配送", "遗留加算价格"}, index = 19)
private String dispatchLeaveBehindAddCost;
}

86
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/pricev2/BasicdataPriceV2Excel.java

@ -0,0 +1,86 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.excel.pricev2;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* 价格 Excel实体类
*
* @author chao
* @since 2024-04-19
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataPriceV2Excel implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "商场编码(工厂)", index = 0)
private String clientCode;
/**
* 客户名称
*/
@ExcelProperty(value = "商场名称", index = 1)
private String client;
/**
* 品牌
*/
@ExcelProperty(value = "品牌", index = 2)
private String brand;
/**
* 生效时间
*/
@ExcelProperty(value = "生效日期", index = 3)
private String effectiveTime;
/**
* 到期时间
*/
@ExcelProperty(value = "截止日期", index = 4)
private String expiryTime;
/**
* 配送服务类型
*/
@ExcelProperty(value = "配送服务类型", index = 5)
private String serviceType;
/**
* 结算方式
*/
@ExcelProperty(value = "结算方式", index = 6)
private String settlementMethod;
/**
* 付款方
*/
@ExcelProperty(value = "付款方", index = 7)
private String payingParty;
/**
* 模版名称
*/
@ExcelProperty(value = "模版名称", index = 8)
private String templateName;
}

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.java

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataPriceEntity; import com.logpm.basicdata.entity.BasicdataPriceEntity;
import com.logpm.basicdata.excel.price.BasicdataPriceExcel; import com.logpm.basicdata.excel.price.BasicdataPriceExcel;
import com.logpm.basicdata.excel.pricev2.BasicdataPriceV2Excel;
import com.logpm.basicdata.vo.BasicdataPriceImportVO; import com.logpm.basicdata.vo.BasicdataPriceImportVO;
import com.logpm.basicdata.vo.BasicdataPricePageVO; import com.logpm.basicdata.vo.BasicdataPricePageVO;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
@ -51,4 +52,8 @@ public interface BasicdataPriceMapper extends BaseMapper<BasicdataPriceEntity> {
void removeRouteByPriceId(Long id); void removeRouteByPriceId(Long id);
List<BasicdataPriceImportVO> findEntityByClientAndBrand(@Param("prices") List<BasicdataPriceExcel> prices); List<BasicdataPriceImportVO> findEntityByClientAndBrand(@Param("prices") List<BasicdataPriceExcel> prices);
List<BasicdataPriceImportVO> findEntityByClientAndBrandV2(@Param("prices") List<BasicdataPriceV2Excel> priceExcels);
List<BasicdataPricePageVO> hisPage(IPage<BasicdataPricePageVO> page, BasicdataPricePageVO basicdataPrice);
} }

51
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml

@ -11,6 +11,7 @@
select t.id, select t.id,
cli.client_name, cli.client_name,
t.brand_id, t.brand_id,
t.client_id,
t.template_id, t.template_id,
ldb.brand_name, ldb.brand_name,
lbpt.service_type, lbpt.service_type,
@ -22,11 +23,13 @@
t.update_time, t.update_time,
t.effective_time, t.effective_time,
t.expiry_time t.expiry_time
from logpm_basicdata_price t from logpm_basicdata_store_brand lbsb
left join logpm_basicdata_price_template lbpt on t.template_id = lbpt.id left join logpm_basicdata_client cli on cli.id = lbsb.client_id
left join logpm_basicdata_client cli on cli.id = t.client_id left join logpm_basicdata_price t on lbsb.client_id = t.client_id
and lbsb.brand_id = t.brand_id and t.effective_time <![CDATA[ <= ]]> now() and t.expiry_time >= now()
left join logpm_basicdata_brand ldb on ldb.id = t.brand_id left join logpm_basicdata_brand ldb on ldb.id = t.brand_id
where t.is_deleted = 0 left join logpm_basicdata_price_template lbpt on t.template_id = lbpt.id
where lbsb.is_deleted = 0
<if test="basicdataPrice.clientName != null and basicdataPrice.clientName != ''"> <if test="basicdataPrice.clientName != null and basicdataPrice.clientName != ''">
and cli.client_name like concat('%',#{basicdataPrice.clientName},'%') and cli.client_name like concat('%',#{basicdataPrice.clientName},'%')
</if> </if>
@ -42,6 +45,30 @@
</if> </if>
</if> </if>
</select> </select>
<select id="hisPage" resultType="com.logpm.basicdata.vo.BasicdataPricePageVO">
select t.id,
cli.client_name,
t.brand_id,
t.client_id,
t.template_id,
ldb.brand_name,
lbpt.service_type,
case
when t.maintenance_status = 1 then '未维护'
when t.maintenance_status = 2 then '已维护'
else ''
end maintenance_status,
t.update_time,
t.effective_time,
t.expiry_time
from logpm_basicdata_price t
left join logpm_basicdata_price_template lbpt on t.template_id = lbpt.id
left join logpm_basicdata_client cli on cli.id = t.client_id
left join logpm_basicdata_brand ldb on ldb.id = t.brand_id
where t.is_deleted = 0
and t.client_id = #{basicdataPrice.clientId}
and t.brand_id = #{basicdataPrice.brandId}
</select>
<select id="findEntityByClientAndBrand" resultType="com.logpm.basicdata.vo.BasicdataPriceImportVO"> <select id="findEntityByClientAndBrand" resultType="com.logpm.basicdata.vo.BasicdataPriceImportVO">
select t.*,lbc.client_name,lbb.brand_name,lbc.client_code select t.*,lbc.client_name,lbb.brand_name,lbc.client_code
@ -58,5 +85,19 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="findEntityByClientAndBrandV2" resultType="com.logpm.basicdata.vo.BasicdataPriceImportVO">
select t.*,lbc.client_name,lbb.brand_name,lbc.client_code
from logpm_basicdata_price t
left join logpm_basicdata_client lbc on t.client_id = lbc.id
left join logpm_basicdata_brand lbb on t.brand_id = lbb.id
where t.is_deleted = 0
<if test="prices != null and prices.size() > 0">
and
<foreach collection="prices" item="item" separator=" or " open="(" close=")">
<if test="item.client != null and item.client != '' and item.brand != null and item.brand != '' ">
(lbc.client_name = #{item.client} and lbb.brand_name = #{item.brand})
</if>
</foreach>
</if>
</select>
</mapper> </mapper>

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceService.java

@ -69,4 +69,9 @@ public interface IBasicdataPriceService extends BaseService<BasicdataPriceEntity
* @return 返回上传结果一般为上传成功或失败的信息 * @return 返回上传结果一般为上传成功或失败的信息
*/ */
String upload(MultipartFile file); String upload(MultipartFile file);
String uploadV2(MultipartFile file);
IPage<BasicdataPricePageVO> hisPage(IPage<BasicdataPricePageVO> page, BasicdataPricePageVO basicdataPrice);
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryBasicServiceImpl.java

@ -41,7 +41,7 @@ public class BasicdataPriceCategoryBasicServiceImpl extends BaseServiceImpl<Basi
@Override @Override
public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) { public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) {
if(!ObjectUtil.hasEmpty(priceId, serviceType)){ if(!ObjectUtil.isAllEmpty(priceId, serviceType)){
this.baseMapper.removeByPriceIdAndServiceType(priceId, serviceType); this.baseMapper.removeByPriceIdAndServiceType(priceId, serviceType);
} }
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryDispatchServiceImpl.java

@ -41,7 +41,7 @@ public class BasicdataPriceCategoryDispatchServiceImpl extends BaseServiceImpl<B
@Override @Override
public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) { public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) {
if(!ObjectUtil.hasEmpty(priceId,serviceType)){ if(!ObjectUtil.isAllEmpty(priceId,serviceType)){
this.baseMapper.removeByPriceIdAndServiceType(priceId,serviceType); this.baseMapper.removeByPriceIdAndServiceType(priceId,serviceType);
} }
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceCategoryWarehouseServiceImpl.java

@ -41,7 +41,7 @@ public class BasicdataPriceCategoryWarehouseServiceImpl extends BaseServiceImpl<
@Override @Override
public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) { public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) {
if (!ObjectUtil.hasEmpty(priceId, serviceType)) { if (!ObjectUtil.isAllEmpty(priceId, serviceType)) {
baseMapper.removeByPriceIdAndServiceType(priceId, serviceType); baseMapper.removeByPriceIdAndServiceType(priceId, serviceType);
} }
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceFullVehicleServiceImpl.java

@ -41,7 +41,7 @@ public class BasicdataPriceFullVehicleServiceImpl extends BaseServiceImpl<Basicd
@Override @Override
public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) { public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) {
if (!ObjectUtil.hasEmpty(priceId, serviceType)) { if (!ObjectUtil.isAllEmpty(priceId, serviceType)) {
this.baseMapper.removeByPriceIdAndServiceType(priceId, serviceType); this.baseMapper.removeByPriceIdAndServiceType(priceId, serviceType);
} }
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceGeneralServiceImpl.java

@ -43,7 +43,7 @@ public class BasicdataPriceGeneralServiceImpl extends BaseServiceImpl<BasicdataP
@Override @Override
public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) { public void removeByPriceIdAndServiceType(Long priceId, Integer serviceType) {
if (!ObjectUtil.hasEmpty(priceId, serviceType)) { if (!ObjectUtil.isAllEmpty(priceId, serviceType)) {
if (ObjectUtil.equal(serviceType, ServiceTypeEnums.DISPATCH.getCode())) { if (ObjectUtil.equal(serviceType, ServiceTypeEnums.DISPATCH.getCode())) {
// 配送遗留 // 配送遗留
baseMapper.removeByPriceIdAndServiceType(priceId, 5); baseMapper.removeByPriceIdAndServiceType(priceId, 5);

1463
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

File diff suppressed because it is too large Load Diff

16
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceTemplateServiceImpl.java

@ -22,6 +22,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity; import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import com.logpm.basicdata.enums.DispatchTypeEnums; import com.logpm.basicdata.enums.DispatchTypeEnums;
import com.logpm.basicdata.enums.MinCostTypeEnums; import com.logpm.basicdata.enums.MinCostTypeEnums;
@ -203,11 +204,21 @@ public class BasicdataPriceTemplateServiceImpl extends BaseServiceImpl<Basicdata
default: default:
throw new ServiceException("当前选择的类型不存在"); throw new ServiceException("当前选择的类型不存在");
} }
checkName(priceTemplateEntity.getName());
this.baseMapper.updateById(priceTemplateEntity); this.baseMapper.updateById(priceTemplateEntity);
return Boolean.TRUE; return Boolean.TRUE;
} }
private void checkName(String name) {
BasicdataPriceTemplateEntity one = this.getOne(Wrappers.<BasicdataPriceTemplateEntity>lambdaQuery()
.eq(BasicdataPriceTemplateEntity::getName, name)
.last("limit 1")
);
if (ObjectUtil.isNotEmpty(one)) {
throw new ServiceException("模版名称重复,请检查");
}
}
@Override @Override
public BasicdataPriceTemplateVO detail(Long id) { public BasicdataPriceTemplateVO detail(Long id) {
BasicdataPriceTemplateEntity detail = this.getById(id); BasicdataPriceTemplateEntity detail = this.getById(id);
@ -226,9 +237,10 @@ public class BasicdataPriceTemplateServiceImpl extends BaseServiceImpl<Basicdata
String userAccount = AuthUtil.getUserAccount(); String userAccount = AuthUtil.getUserAccount();
if (ObjectUtil.equal(userAccount, "admin")) { if (ObjectUtil.equal(userAccount, "admin")) {
basicdataPriceTemplate.setTemplateType("系统"); basicdataPriceTemplate.setTemplateType("系统");
}else{ } else {
basicdataPriceTemplate.setTemplateType("用户"); basicdataPriceTemplate.setTemplateType("用户");
} }
checkName(basicdataPriceTemplate.getName());
this.save(basicdataPriceTemplate); this.save(basicdataPriceTemplate);
return basicdataPriceTemplate.getId(); return basicdataPriceTemplate.getId();
} }

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -367,4 +367,12 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return * @return
*/ */
List<DistributionSignforInventoryExcel> getDistributionSignforInventoryList(@Param("id")Long id); List<DistributionSignforInventoryExcel> getDistributionSignforInventoryList(@Param("id")Long id);
/**
*
* @param reservationId
* @param stockArticleId
* @param parceListId
*/
Integer cancelOld(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId,@Param("packageId") Long parceListId);
} }

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -83,6 +83,17 @@
</if> </if>
</where> </where>
</delete> </delete>
<delete id="cancelOld">
UPDATE logpm_distribution_reservation_package SET packet_bar_status = 2 ,cancel_remark = '异常审核取消原计划' WHERE parce_list_id = #{packageId} ;
UPDATE logpm_distribution_reservation_stockarticle SET reservation_num = (SELECT count(id) FROM logpm_distribution_reservation_package WHERE packet_bar_status != 2 AND reservation_id = #{reservationId} AND stock_article_id = #{stockArticleId} AND is_deleted = 0) WHERE reservation_id = #{reservationId} AND stock_article_id = #{stockArticleId};
UPDATE logpm_distribution_reservation_stockarticle SET stock_article_status = 2 WHERE reservation_num = 0 AND reservation_id = #{reservationId} AND stock_article_id = #{stockArticleId};
UPDATE logpm_distribution_reservation SET reservation_num = (SELECT count(id) FROM logpm_distribution_reservation_package WHERE packet_bar_status != 2 AND reservation_id = #{reservationId} AND is_deleted =0 ) WHERE id = #{reservationId};
UPDATE logpm_distribution_reservation SET reservation_status = '40',cancel_reason = '异常审核判定判定取消预约计划' WHERE id = #{reservationId} AND (reservation_num + reservation_stock_list_num) = 0;
</delete>
<!-- <select id="selectDistributionSignforPage" resultType="com.logpm.distribution.vo.DistributionSignforVO">--> <!-- <select id="selectDistributionSignforPage" resultType="com.logpm.distribution.vo.DistributionSignforVO">-->

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -4274,11 +4274,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//这里就是取消的预约单,进行状态回退 //这里就是取消的预约单,进行状态回退
DistributionReservationEntity reservationEntity = n.get(0); DistributionReservationEntity reservationEntity = n.get(0);
reservationEntity.setReservationStatus(ReservationStatusConstant.yiqueren.getValue()); reservationEntity.setReservationStatus(ReservationStatusConstant.yiqueren.getValue());
reservationEntity.setStockupStatus(ReservationStockupStatusConstant.weibeihuo.getValue());
distributionReservationMapper.updateById(reservationEntity); distributionReservationMapper.updateById(reservationEntity);
//删除配送预约中间表信息 //删除配送预约中间表信息
distributionSignforMapper.deleteByReservationAndDeliveryId(reservationEntity.getId(), deliveryListEntity.getId()); distributionSignforMapper.deleteByReservationAndDeliveryId(reservationEntity.getId(), deliveryListEntity.getId());
//删除Redis中的reservationCode //删除Redis中的reservationCode
bladeRedis.del(user.getTenantId()+":"+ ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME+":reservationLock"+reservationEntity.getReservationCode()); bladeRedis.del(user.getTenantId()+":"+ ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME+":reservationLock"+reservationEntity.getReservationCode());
//取消备货中间表
distributionStockupInfoService.update(Wrappers.<DistributionStockupInfoEntity>update().lambda()
.eq(DistributionStockupInfoEntity::getReservationId,reservationEntity.getId())
.set(DistributionStockupInfoEntity::getStockStatus,"4")
);
}); });
//修改备货信息 //修改备货信息
String kind = deliveryListEntity.getKind(); String kind = deliveryListEntity.getKind();

17
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -5454,6 +5454,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("#############异常包件信息异常:{}", distributionLoadscanAbnormalEntities); log.error("#############异常包件信息异常:{}", distributionLoadscanAbnormalEntities);
return R.fail(3000, "审核失败"); return R.fail(3000, "审核失败");
} }
List<Long> packageIds = distributionLoadscanAbnormalEntities.stream().filter(f->LoadingAbnormalAuditingStatusConstant.daishenhe.getValue().equals(f.getAuditingStatus())).map(DistributionLoadscanAbnormalEntity::getPackageId).distinct().collect(Collectors.toList());
//查询审核的是否存在计划
List<DistributionReservationPackageEntity> packageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.in(DistributionReservationPackageEntity::getParceListId, packageIds)
.ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (!packageEntityList.isEmpty()) {
//找出审核的包件中存在计划的包件
for (DistributionReservationPackageEntity distributionReservationPackageEntity : packageEntityList) {
log.info("异常审核取消原计划包件");
log.info("异常审核取消原计划包件参数>>>>>>>>>reservationId:{},orderId:{},packageId:{}",distributionReservationPackageEntity.getReservationId(),distributionReservationPackageEntity.getStockArticleId(),distributionReservationPackageEntity.getParceListId());
Integer a = baseMapper.cancelOld(distributionReservationPackageEntity.getReservationId(),distributionReservationPackageEntity.getStockArticleId(),distributionReservationPackageEntity.getParceListId());
log.info("异常审核取消原计划包件执行条数row:{}",a);
}
}
List<Long> reservationId = distributionLoadscanAbnormalEntities.stream().distinct().map(DistributionLoadscanAbnormalEntity::getReservationId).collect(Collectors.toList()); List<Long> reservationId = distributionLoadscanAbnormalEntities.stream().distinct().map(DistributionLoadscanAbnormalEntity::getReservationId).collect(Collectors.toList());
if (distributionLoadscanAbnormalEntities.size() == 1) { if (distributionLoadscanAbnormalEntities.size() == 1) {
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = distributionLoadscanAbnormalEntities.get(0); DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = distributionLoadscanAbnormalEntities.get(0);

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java

@ -89,7 +89,7 @@ public class AdvanceOrderListener {
JSONObject jsonObject = JSONUtil.parseObj(detail); JSONObject jsonObject = JSONUtil.parseObj(detail);
TrunklineAdvanceDetailEntity entity = JSONUtil.toBean(jsonObject, TrunklineAdvanceDetailEntity.class); TrunklineAdvanceDetailEntity entity = JSONUtil.toBean(jsonObject, TrunklineAdvanceDetailEntity.class);
// 检查转换后的实体不为null,且其orderPackageCode非null // 检查转换后的实体不为null,且其orderPackageCode非null
if (!ObjectUtil.hasEmpty(entity, entity.getOrderPackageCode())) { if (!ObjectUtil.isAllEmpty(entity, entity.getOrderPackageCode())) {
orderPackageCodes.add(entity.getOrderPackageCode()); orderPackageCodes.add(entity.getOrderPackageCode());
} }
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save