Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev-warehouse
0.0 2 years ago
parent
commit
25e14d4e7a
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 10
      blade-biz-common/src/main/java/org/springblade/common/serviceConstant/ServiceConstant.java
  3. 2
      blade-biz-common/src/main/java/org/springblade/common/utils/CommonUtil.java
  4. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelDetailsEntity.java
  5. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  6. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java
  7. 13
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  8. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java
  9. 32
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingAppVO.java
  10. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingOwnVO.java
  11. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingDetailVO.java
  12. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java
  13. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java
  14. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  15. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  16. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  17. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml
  18. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  19. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  20. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  21. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  22. 72
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  23. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  24. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  25. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionParcelListWrapper.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -20,6 +20,8 @@ public class DictBizConstant {
public static final String ORDER_PACKAGE_STATUS = "order_package_status";//配送包件状态
public static final String ORDER_PACKAGE_FREEZE_STATUS = "order_package_freeze_status";//包间冻结状态
public static final String ORDER_PACKAGE_STOCKUP_STATUS = "order_package_stockup_status";//包间备货状态
public static final String ORDER_PACKAGE_GROUNDING_STATUS = "order_package_grounding_status";//包间上架状态

10
blade-biz-common/src/main/java/org/springblade/common/serviceConstant/ServiceConstant.java

@ -243,6 +243,16 @@ public interface ServiceConstant {
//已签收
String ORDER_STATE_SEVEN = "70";
/**
* 订单预约状态
*/
//未预约
String ORDER_RESERVATION_STATE_NOT="10";
//部分预约
String ORDER_RESERVATION_STATE_PART="20";
//已预约
String ORDER_RESERVATION_STATE_RESERVED="30";

2
blade-biz-common/src/main/java/org/springblade/common/utils/CommonUtil.java

@ -55,7 +55,7 @@ public class CommonUtil {
public static String datoLongToString(Long dateTime,String format,String timeZone){
if (StringUtils.isEmpty(timeZone)) {
if (!StringUtils.hasLength(timeZone)) {
timeZone = "Asia/Shanghai";
}
if (dateTime != null) {

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelDetailsEntity.java

@ -108,4 +108,6 @@ public class DistributionParcelDetailsEntity extends TenantEntity {
@ApiModelProperty(value = "货位")
private String goodsAllocation;
}

11
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -188,6 +188,17 @@ public class DistributionParcelListEntity extends TenantEntity {
@ApiModelProperty(value = "包件冻结状态")
private String orderPackageFreezeStatus;
@ApiModelProperty(value = "包件冻结状态")
private String orderPackageReservationStatus;
@ApiModelProperty(value = "备货状态")
private String orderPackageStockupStatus;
@ApiModelProperty(value = "上架状态")
private String orderPackageGroundingStatus;

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java

@ -125,6 +125,11 @@ public class DistributionStockListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "入库时间")
private Date warehousingTime;
/**
* 上架时间
*/
@ApiModelProperty(value = "上架时间")
private Date groundingTime;
/**
* 拆包数
*/

13
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -48,6 +48,19 @@ public class DistributionParcelListVO extends DistributionParcelListEntity {
* 包件冻结状态
*/
private String orderPackageFreezeStatusName;
/**
* 包件上架状态
*/
private String orderPackageGroundingStatusName;
/**
* 包件备货状态
*/
private String orderPackageStockupStatusName;
/**
* 包件预约状态
*/
private String orderPackageReservationStatusName;
}

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java

@ -77,11 +77,7 @@ public class DistributionStockArticleVO extends DistributionStockArticleEntity {
@ApiModelProperty(value = "冻结状态名称")
private String freezeStatusName;
/**
* 上架状态
*/
@ApiModelProperty(value = "上架状态名称")
private String groundingStatus;
@ApiModelProperty(value = "订单状态名称")
private String orderStatusName;

32
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingAppVO.java

@ -18,6 +18,8 @@ package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -33,6 +35,7 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="自提实体", description="自提实体")
public class DistrilbutionBillLadingAppVO extends DistrilbutionBillLadingEntity {
private static final long serialVersionUID = 1L;
@ -42,33 +45,50 @@ public class DistrilbutionBillLadingAppVO extends DistrilbutionBillLadingEntity
private Integer carType;
private String carTypeStr;
@ApiModelProperty(value = "提货状态")
private String condition;//提货状态
@ApiModelProperty(value = "提货状态")
private String conditionStr;//提货状态
@ApiModelProperty(value = "车牌号")
private String pickUpPlate;//车牌号
private String conditions;//提货状态
private String conditionsStr;//提货状态
private String pickUpPlate;//车牌号
@ApiModelProperty(value = "提货人")
private String consignee;//提货人
@ApiModelProperty(value = "备货状态")
private String stockupStatus;//备货状态
// @ApiModelProperty(value = "分类")
private String stockupStatusStr;
@ApiModelProperty(value = "制单时间")
private Date createTime;//制单时间
@ApiModelProperty(value = "提货时间")
private Date pickUpTime;//提货时间
@ApiModelProperty(value = "订单总数")
private Integer orderNum;//订单总数
@ApiModelProperty(value = "自提件数")
private Integer planNum;//自提件数
@ApiModelProperty(value = "签收总数")
private Integer signedNum;//签收总数
@ApiModelProperty(value = "签收总数")
private Integer inventoryNum;//签收总数
@ApiModelProperty(value = "齐套总数")
private Integer completeNum;//齐套总数
@ApiModelProperty(value = "库存品id")
private String stockListId;//库存品id
@ApiModelProperty(value = "库存数量")
private Integer quantity;//库存数量
@ApiModelProperty(value = "物品名称")
private String descriptionGoods;//物品名称
@ApiModelProperty(value = "单位")
private String cargoUnit;//单位
@ApiModelProperty(value = "sku")
private String sku;//sku
@ApiModelProperty(value = "备货数量")
private Integer deliveryNum;//备货数量
@ApiModelProperty(value = "以扫备货数量")
private Integer esauInventoryNum;//以扫备货数量

7
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingOwnVO.java

@ -16,13 +16,10 @@
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionDeliveryChargeEntity;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 提货单 视图实体类
*
@ -34,7 +31,7 @@ import java.util.List;
public class DistrilbutionBillLadingOwnVO extends DistrilbutionBillLadingEntity {
private static final long serialVersionUID = 1L;
private String orderSelfNumbering;
private String orderCode;
private String descriptionGoods;
private Integer totalNumber;
private String stockupStatus;
@ -42,7 +39,7 @@ public class DistrilbutionBillLadingOwnVO extends DistrilbutionBillLadingEntity
private String stockipAllocation;
private Integer esau;
private String packetBarCode;
private String orderPackageCode;
private String firsts;
private String second;
private String thirdProduct;

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingDetailVO.java

@ -31,9 +31,9 @@ public class DistrilbutionAppBillLadingDetailVO implements Serializable {
private static final long serialVersionUID = 1L;
private Long stockArticleId;
private String orderSelfNumbering;
private String orderCode;
private String packetBarCode;
private String orderPackageCode;
private Integer scanStatus;//扫码状态
private String scanStatusStr;//扫码状态

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java

@ -23,6 +23,8 @@ import com.logpm.distribution.service.IDistrilbutionBillLadingService;
import com.logpm.distribution.vo.DistrilbutionBillLadingAppVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingOrderMainVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
@ -92,6 +94,7 @@ public class DistributionBillLadingAppController extends BladeController {
@ApiOperation(value = "自提订单列表库存品",notes = "自提订单列表库存品")
@GetMapping("/getInventory")
@ApiOperationSupport(order = 1)
@ApiImplicitParam(name = "id",value ="自提单ID")
public R<IPage<DistrilbutionBillLadingAppVO>> getInventory(@ApiIgnore @RequestParam Map<String, Object> distrilbutionBillLading, Query query){
IPage<DistrilbutionBillLadingAppVO> ladingAppVOIPage = distrilbutionBillLadingService.getInventory(Condition.getPage(query),distrilbutionBillLading);
return R.data(ladingAppVOIPage);
@ -100,13 +103,19 @@ public class DistributionBillLadingAppController extends BladeController {
@ApiOperation(value = "自提订单列表库存品详细包件",notes = "自提订单列表库存品详细包件")
@GetMapping("/getInventoryNum")
@ApiOperationSupport(order = 1)
@ApiImplicitParam(name = "id",value ="自提单ID")
public R<IPage<DistrilbutionBillLadingAppVO>> getInventoryNum(@ApiIgnore @RequestParam Map<String, Object> distrilbutionBillLading, Query query){
IPage<DistrilbutionBillLadingAppVO> ladingAppVOIPage = distrilbutionBillLadingService.getInventoryNum(Condition.getPage(query),distrilbutionBillLading);
return R.data(ladingAppVOIPage);
}
@ApiOperation(value = "扫描id")
@ApiOperation(value = "自提扫描id")
@PutMapping("/scan")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "自提单ID", required = true),
@ApiImplicitParam(name = "coding", value = "包条码", required = true),
@ApiImplicitParam(name = "type", value = "类型 4 订单 3 库存品", required = true)
})
public R getScan(@ApiIgnore @RequestParam Map<String, Object> distrilbutionBillLading){
R scan = distrilbutionBillLadingService.getScan(distrilbutionBillLading);
return scan;

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java

@ -29,6 +29,7 @@ import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -86,8 +87,11 @@ public class DistributionStockupController extends BladeController {
@ApiOperation(value = "详情", notes = "传入distributionStockup")
public R<IPage<DistributionStockupVO>> detailReservationOwn(@ApiIgnore @RequestParam Map<String, Object> distributionStockup, Query query) {
Object o = distributionStockup.get("id");
IPage<DistributionStockupVO> detail = distributionStockupService.detailReservationOwn(Condition.getPage(query),Long.parseLong((String) o));
return R.data(detail);
if(ObjectUtil.isNotEmpty(o)){
IPage<DistributionStockupVO> detail = distributionStockupService.detailReservationOwn(Condition.getPage(query),Long.parseLong((String) o));
return R.data(detail);
}
return R.data(null);
}
/**

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -722,7 +722,7 @@
</select>
<select id="selectDistributionAppDeliveryOrder" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_self_numbering orderSelfNumbering,
ldsa.order_code orderCode,
ldsa.complete_set completeSet,
ldrs.reservation_num reservationNum,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscan ldl WHERE ldl.order_id =ldsa.id and ldl.scan_status !=1 ) loadingNub
@ -735,7 +735,7 @@
<select id="selectListbypack" resultType="com.logpm.distribution.vo.app.DistributionAppParcelListVO">
select
DISTINCT ldrp.packet_bar_code packetBarCode,
ldsa.order_self_numbering orderSelfNumbering,
ldsa.order_code orderCode,
ldl.scan_status scanStatus
FROM
logpm_distribution_reservation_package ldrp
@ -746,15 +746,15 @@
LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id =ldpl.id
<where>
lds.delivery_id = #{param.id}
<if test="param.orderSelfNumbering != null and param.orderSelfNumbering!=''">
and ldsa.order_self_numbering = #{param.orderSelfNumbering}
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
</if>
</where>
</select>
<select id="selectDistributionAppDeliveryOrderO" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_self_numbering orderSelfNumbering,
ldsa.order_code orderCode,
ldsa.complete_set completeSet,
ldrs.reservation_num reservationNum,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscan ldl WHERE ldl.order_id =ldsa.id and ldl.scan_status !=1 ) loadingNub
@ -823,7 +823,7 @@
<select id="selectDistributionAppDeliveryOrderOIn"
resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_self_numbering orderSelfNumbering,
ldsa.order_code orderCode,
ldsa.complete_set completeSet,
ldrs.reservation_num reservationNum,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscan ldl WHERE ldl.order_id =ldsa.id and ldl.scan_status !=1 and ldl.signfor_state =2 ) signNub

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

@ -53,15 +53,15 @@
</update>
<select id="selectOrderInfoList" resultType="com.logpm.distribution.vo.PackageStockupVO">
select ldpl.order_self_numbering orderCode,
select ldpl.order_code orderCode,
ldpl.order_package_code packageBarCode,
1 goodsType,
IF(t.id is null,0,1) isScan,
s.id scanId
IF(lds.id is null,0,1) isScan,
lds.id scanId
from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_package ldrp on ldr.id = ldrp.reservation_id and ldrp.is_deleted = 0
left join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id and ldpl.is_deleted = 0
left join logpm_distribution_stock s on s.parcel_list_id = ldpl.id and s.is_deleted = 0
left join logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id and lds.is_deleted = 0
where ldpl.stock_article_id = #{stockArticleId}
and ldr.id = #{reservationId}
and CONCAT(ldpl.cargo_title,'-',ldpl.shelf_title,'-',ldpl.goods_allocation) = #{allocation}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -167,7 +167,7 @@
<select id="selectStockupOrderList" resultType="com.logpm.distribution.vo.DistributionStockupOrderListVO">
select CONCAT(ldpl.cargo_title,'-',ldpl.shelf_title,'-',ldpl.goods_allocation) allocation,
ldsa.order_self_numbering orderCode,
ldsa.order_code orderCode,
ldrs.stock_article_id stockArticleId,
ldpl.pallet pallet,
count(ldpl.id) planNum,
@ -184,7 +184,7 @@
group by ldpl.cargo_title,
ldpl.shelf_title,
ldpl.goods_allocation,
ldrs.stock_article_code,
ldsa.order_code,
ldrs.stock_article_id,
ldpl.pallet
</select>
@ -439,7 +439,7 @@
ldsl.reserve3,
ldsl.reserve4,
ldsl.reserve5,
ldsl.order_self_numbering,
ldsl.order_code,
ldsl.incoming_batch,
ldsl.service_number,
ldsl.material_id,

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml

@ -93,7 +93,6 @@
ldpl.warehouse_id,
ldpl.warehouse,
ldpl.conditions,
ldpl.packet_bar_code,
ldpl.cargo_title,
ldpl.shelf_title,
ldpl.goods_allocation,
@ -105,7 +104,7 @@
ldpl.quantity,
ldpl.train_number,
ldpl.stock_article_id,
ldpl.order_self_numbering,
ldpl.order_code,
ldpl.service_number,
ldpl.material_name,
ldpl.material_code,

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -81,8 +81,8 @@
)
and
ldsa.is_deleted = 0 and ldsa.type_service ='2'
<if test="distributionStockArticleVO.orderSelfNumbering!=null and distributionStockArticleVO.orderSelfNumbering !=''">
and ldsa.order_self_numbering == #{distributionStockArticleVO.orderSelfNumbering}
<if test="distributionStockArticleVO.orderCode!=null and distributionStockArticleVO.orderCode !=''">
and ldsa.order_code == #{distributionStockArticleVO.orderCode}
</if>
<!-- 条件没有写完 -->
</select>

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -124,7 +124,7 @@
</select>
<select id="selectStockListInfoList" resultType="com.logpm.distribution.vo.DistributionStockupStockListInfoVO">
<select id="selectStockListInfoList" resultType="com.logpm.distribution.vo.StockListInfoListVO">
select
s.coding packageCode,
s.goods_name name
@ -136,13 +136,7 @@
where ldr.is_deleted = 0
and s.id is not null
and ldr.id = #{reservationId}
and ldsl.description_goods = #{descriptionGoods}
and ldsl.storage_location = #{allocation}
and ldsl.tray_name = #{pallet}
and ldsl.sku = #{sku}
and ldsl.cargo_norms = #{cargoNorms}
and ldsl.cargo_unit = #{cargoUnit}
and ldrs.stocklist_id = #{stockListId}
</select>
<select id="selectWarehouseAreaByReservationId" resultType="String">

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -48,6 +48,7 @@
LEFT JOIN logpm_warehouse_goods_area lwga ON lds.stockup_area = lwga.id
LEFT JOIN logpm_basicdata_team_group btg ON lds.loader_id = btg.id
<where>
lds.is_deleted = 0
<!-- lds.tenant_id = #{param.tenantId} -->
<if test="param.typeService != null and param.typeService != '' "> and lds.type_service = #{param.typeService}</if>
<if test="param.stockupDate != null "> and TO_DAYS(lds.stockup_date)=TO_DAYS( #{param.stockupDate})</if>
@ -181,6 +182,7 @@
ldr.id in (select reservation_id
from logpm_distribution_stockup_info )
and ldsi.stockup_id = #{id}
and ldr.is_deleted = 0
</where>
</select>
@ -204,12 +206,13 @@
LEFT JOIN logpm_distribution_stockup lds on lds.id = ldsi.stockup_id
<where>
ldsi.stockup_id = #{ id }
and ldsi.is_deleted = 0
</where>
</select>
<select id="getInventoryOwn" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select DISTINCT ldsii.sku ,ldsii.order_self_numbering orderSelfNumbering,ldsii.description_goods descriptionGoods,ldsii.cargo_unit cargoUnit,
select DISTINCT ldsii.sku ,ldsii.order_code orderCode,ldsii.description_goods descriptionGoods,ldsii.cargo_unit cargoUnit,
ldrsi.reservation_num reservationNum,ldpl.pallet ,lds.stockup_area stockupArea,
lds.stockup_status stockupStatus,lds.stockup_date stockupDate,ldpl.goods_allocation goodsAllocation,
(

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java

@ -29,7 +29,6 @@ import com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO;
import com.logpm.distribution.vo.DistrilbutionBillLadingVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.mp.support.Query;
import java.util.List;
@ -65,7 +64,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
DistrilbutionBillLadingAppVO selectDataByBillLadingId(@Param("billLadingId") Long billLadingId);
List<DistrilbutionAppBillLadingDetailVO> selectDetailList(@Param("stockArticleId") Long stockArticleId, @Param("scanStatus") Integer scanStatus,@Param("orderSelfNumbering") String orderSelfNumbering);
List<DistrilbutionAppBillLadingDetailVO> selectDetailList(@Param("stockArticleId") Long stockArticleId, @Param("scanStatus") Integer scanStatus,@Param("orderCode") String orderSelfNumbering);
DistrilbutionBillLadingVO getOneOwn(@Param("id") Long id);

72
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -64,38 +64,38 @@
</select>
<select id="pageListApp" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingAppVO">
select ldbl.id billLadingId,
select lad.id billLadingId,
3 carType,
ldbl.`condition` `condition`,
ldbl.Pick_up_plate pickUpPlate,
ldbl.consignee consignee,
ldbl.create_time,
ldbl.pick_up_time,
ldbl.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading ldbl
where ldbl.is_deleted = 0
<if test="param.pickUpTimeStart != null and param.pickUpTimeStart!='' ">ldbl.pick_up_time &lt;= #{param.pickUpTimeStart} </if>
<if test="param.pickUpTimeEnd != null and param.pickUpTimeEnd!='' ">ldbl.pick_up_time &gt;= #{param.pickUpTimeEnd} </if>
lad.`conditions` `conditions`,
lad.Pick_up_plate pickUpPlate,
lad.consignee consignee,
lad.create_time,
lad.pick_up_time,
lad.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading lad
where lad.is_deleted = 0
<if test="param.pickUpTimeStart != null and param.pickUpTimeStart!='' ">and lad.pick_up_time &lt;= #{param.pickUpTimeStart} </if>
<if test="param.pickUpTimeEnd != null and param.pickUpTimeEnd!='' "> and lad.pick_up_time &gt;= #{param.pickUpTimeEnd} </if>
</select>
<select id="selectDataByBillLadingId" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingAppVO">
select ldbl.id billLadingId,
select lad.id billLadingId,
3 carType,
ldbl.`condition` `condition`,
ldbl.Pick_up_plate pickUpPlate,
ldbl.consignee consignee,
ldbl.create_time,
ldbl.pick_up_time,
ldbl.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading ldbl
where ldbl.is_deleted = 0
and ldbl.id = #{billLadingId}
lad.`condition` `condition`,
lad.Pick_up_plate pickUpPlate,
lad.consignee consignee,
lad.create_time,
lad.pick_up_time,
lad.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading lad
where lad.is_deleted = 0
and lad.id = #{billLadingId}
</select>
<select id="selectDetailList" resultType="com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO">
select ldpl.stock_article_id stockArticleId,
ldpl.order_self_numbering orderSelfNumbering,
ldpl.packet_bar_code packetBarCode,
ldpl.order_code orderCode,
ldpl.order_package_code orderPackageCode,
case
when ldbls.id is null then 1
else 2
@ -106,8 +106,8 @@
<where>
and ldpl.is_deleted = 0
and ldpl.stock_article_id = #{stockArticleId}
<if test="orderSelfNumbering != null and orderSelfNumbering !=''">
and ldpl.order_self_numbering = ${orderSelfNumbering}
<if test="orderCode != null and orderCode !=''">
and ldpl.order_code = ${orderCode}
</if>
<if test="scanStatus != null and scanStatus==1">
and ldbls.id is null
@ -118,15 +118,15 @@
</where>
</select>
<select id="getOneOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select ldbl.id,ldbl.stockup_code stockupCode,ldbl.pick_up_time pickUpTime,ldbl.stockup_area stockupArea,ldbl.consignee,
ldbl.pick_up_plate pickUpPlate,ldbl.total_cost totalCost
from logpm_distrilbution_bill_lading ldbl
select lad.id,lad.stockup_code stockupCode,lad.pick_up_time pickUpTime,lad.stockup_area stockupArea,lad.consignee,
lad.pick_up_plate pickUpPlate,lad.total_cost totalCost
from logpm_distrilbution_bill_lading lad
<where>
ldbl.id = #{id}
lad.id = #{id}
</where>
</select>
<select id="detailReservationOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO">
select ldpi.id,ldpi.packet_bar_code packetBarCode,ldpi.firsts ,ldpi.second ,ldpi.third_product thirdProduct,ldpi.material_name materialName,
select ldpi.id,ldpi.order_package_code orderPackageCode,ldpi.firsts ,ldpi.second ,ldpi.third_product thirdProduct,ldpi.material_name materialName,
ldpi.goods_allocation goodsAllocation,ldpi.pallet
from logpm_distribution_parcel_list ldpi
where ldpi.stock_article_id in (
@ -136,7 +136,7 @@
)
</select>
<select id="detailOrderOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO">
select ldsa.id,ldsa.order_self_numbering orderSelfNumbering,ldsa.description_goods descriptionGoods,ldsa.total_number totalNumber,
select ldsa.id,ldsa.order_code orderCode,ldsa.description_goods descriptionGoods,ldsa.total_number totalNumber,
ldbl.stockup_status stockupStatus,ldbl.stockip_allocation stockipAllocation,
( select count(*)
from logpm_distribution_stock lds
@ -158,7 +158,7 @@
</where>
</select>
<select id="getInventoryOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO">
select ldsi.id,ldsi.sku,ldsi.order_self_numbering,ldsi.description_goods ,ldsi.cargo_unit ,lddd.quantity ,ldsi.tray_name ,ldsi.storage_location
select ldsi.id,ldsi.sku,ldsi.order_code,ldsi.description_goods ,ldsi.cargo_unit ,lddd.quantity ,ldsi.tray_name ,ldsi.storage_location
from logpm_distribution_delivery_details lddd LEFT JOIN logpm_distribution_stock_list ldsi on lddd.stock_list_id = ldsi.id
<where>
lddd.bill_lading_id = #{id}
@ -166,8 +166,8 @@
</select>
<select id="getDetailOne" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingDetailsVO">
select ldbl.id,ldbl.pick_up_time ,ldbl.consignee ,ldbl.pick_up_plate ,ldbl.delivery_document ,ldbl.certificate_type ,ldbl.total_cost
from logpm_distrilbution_bill_lading ldbl
select lad.id,lad.pick_up_time ,lad.consignee ,lad.pick_up_plate ,lad.delivery_document ,lad.certificate_type ,lad.total_cost
from logpm_distrilbution_bill_lading lad
<where>
ldbl.id = #{id}
</where>
@ -182,7 +182,9 @@
from logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distribution_delivery_details lddd on ldbl.id = lddd.bill_lading_id
LEFT JOIN logpm_distribution_stock_list ldsl on ldsl.id = lddd.stock_list_id
where ldbl.id = #{param.id} and lddd.is_deleted = '0'
<where>
ldbl.id = #{param.id} and lddd.is_deleted = '0'
</where>
</select>

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -17,6 +17,7 @@
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
@ -241,6 +242,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
p.setOrderPackageStatus(ServiceConstant.PACKAGE_STATUS_RESERVATION);
distributionParcelListService.updateById(p);
});
s.setReservationStatus(ServiceConstant.ORDER_RESERVATION_STATE_RESERVED);
s.setAvailableQuantity(0);
} else {
//维护选中的包件信息
@ -255,31 +257,25 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// p.setBrandId(p.getBrandId());
distributionParcelListService.updateById(p);
});
s.setReservationStatus(ServiceConstant.ORDER_RESERVATION_STATE_PART);
//设置订单可用数量为
s.setAvailableQuantity(s.getHandQuantity() - s.getReservationNum());
//这里查询到当前订单下的包件信息和选中包件进行比对,如果数量一致那么说明该订单是已预约状态、否则为部分预约状态
LambdaQueryWrapper<DistributionParcelListEntity> qw = new QueryWrapper<DistributionParcelListEntity>().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId());
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.getBaseMapper().selectList(qw);
if (packageList.size() == parcelListEntities.size()){
//这里就是表示进行了包件选取的操作,但是选取的包件数量为全部
s.setReservationStatus(ServiceConstant.ORDER_RESERVATION_STATE_RESERVED);
}
}
distributionReservationStockarticleEntity.setReservationNum(packageNum.get());
//订单无数据源,不需要进行包件信息维护
//修改订单状态为已预约
// s.setOrderStatus(ServiceConstant.ORDER_STATE_ALREADY_RESERVATION);
s.setReservationStatus(30+"");// TODO 需要根据订单预约的包件数量是否等于订单总包件数量,存入 部分预约和已预约的状态值
stockArticleCount.getAndAdd(s.getReservationNum());
DistributionStockArticleEntity stockArticleEntity = Func.copy(s, DistributionStockArticleEntity.class);
// if (stockArticleEntity.getStoreId()==-1){
//
// }
// if (stockArticleEntity.getMallId()==-1){
//
// }
// if (stockArticleEntity.getFee().equals(-1)){
//
// }
// if (stockArticleEntity.getStoreId()==-1){
//
// }
// if (stockArticleEntity.getStoreId()==-1){
//
// }
distributionStockArticleService.updateById(s);
//拼接订单自编号
arrayList.add(s.getOrderCode());

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -833,7 +833,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
);
list1.forEach( di ->{
DistrilbutionAppBillLadingDetailVO billLadingDetailVO = new DistrilbutionAppBillLadingDetailVO();
billLadingDetailVO.setPacketBarCode(di.getCoding());
billLadingDetailVO.setOrderPackageCode(di.getCoding());
billLadingDetailVO.setScanStatus(Integer.parseInt(di.getConditions()));
switch (di.getConditions()){
case "2":

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionParcelListWrapper.java

@ -28,6 +28,10 @@ public class DistributionParcelListWrapper extends BaseEntityWrapper<Distributio
parcelListVO.setOrderPackageStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STATUS, entity.getOrderPackageStatus()));
parcelListVO.setOrderPackageFreezeStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_FREEZE_STATUS, entity.getOrderPackageFreezeStatus()));
parcelListVO.setOrderPackageGroundingStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_GROUNDING_STATUS, entity.getOrderPackageGroundingStatus()));
parcelListVO.setOrderPackageStockupStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STOCKUP_STATUS, entity.getOrderPackageStockupStatus()));
parcelListVO.setOrderPackageReservationStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_FREEZE_STATUS, entity.getOrderPackageReservationStatus()));
return parcelListVO;
}
}

Loading…
Cancel
Save