Browse Source

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

dev-warehouse
zhenghaoyu 2 years ago
parent
commit
7fba9e1684
  1. 10
      blade-biz-common/src/main/java/org/springblade/common/serviceConstant/ServiceConstant.java
  2. 10
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  3. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java
  4. 10
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppParcelListVO.java
  5. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppSignforVO.java
  6. 15
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java
  7. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java
  8. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java
  9. 73
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  10. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  11. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java
  12. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  13. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  14. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  15. 28
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  16. 132
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  17. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  18. 27
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  19. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  20. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  21. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  22. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  23. 156
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  24. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java
  25. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

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

@ -76,26 +76,26 @@ public interface ServiceConstant {
/**
* 订单状态 -- 未预约
*/
Integer ORDER_STATE_NOT_RESERVATION =1;
String ORDER_STATE_NOT_RESERVATION ="1";
/**
* 订单状态 -- 已预约
*/
Integer ORDER_STATE_ALREADY_RESERVATION =2;
String ORDER_STATE_ALREADY_RESERVATION ="2";
/**
* 订单状态 -- 待配送
*/
Integer ORDER_STATE_WAIT_DELIVERY =3;
String ORDER_STATE_WAIT_DELIVERY ="3";
/**
* 订单状态 -- 配送中
*/
Integer ORDER_STATE_EXECUTION_DELIVERY =4;
String ORDER_STATE_EXECUTION_DELIVERY ="4";
/**
* 订单状态 -- 完成配送
*/
Integer ORDER_STATE_COMPLETE_DELIVERY =5;
String ORDER_STATE_COMPLETE_DELIVERY ="5";
/**
* 订单数据 -- 无数据源

10
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java

@ -236,6 +236,16 @@ public class DistributionDeliveryListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "数据来源")
private Integer source;
/**
* 定位打卡
*/
@ApiModelProperty(value = "定位打卡")
private String positioning;
/**
* 定位打卡地址
*/
@ApiModelProperty(value = "定位打卡地址")
private String positioningAdr;

11
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java

@ -52,6 +52,11 @@ public class DistributionAppDeliveryListVO extends DistributionDeliveryListEntit
*/
@ApiModelProperty(value = "签收件数")
private Integer signNub;
/**
* 签收完成件数
*/
@ApiModelProperty(value = "签收完成件数")
private Integer signNubSr;
/**
* 装车客户数
*/
@ -64,6 +69,12 @@ public class DistributionAppDeliveryListVO extends DistributionDeliveryListEntit
@ApiModelProperty(value = "配车状态")
private String vehicleStatus_name;
/**
* 配送状态
*/
@ApiModelProperty(value = "配送状态")
private String DeliStatus_name;
/**
* 配送种类;1-自主配送,2-三方配送
*/

10
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppParcelListVO.java

@ -45,12 +45,22 @@ public class DistributionAppParcelListVO extends DistributionParcelListEntity {
*/
@ApiModelProperty(value = "是否扫描")
private String isScan;
/**
* 物品名称
*/
@ApiModelProperty(value = "物品名称")
private String materialName;
/**
* 是否扫描
*/
@ApiModelProperty(value = "是否扫描")
private Integer scanStatus;
/**
* 签收状态
*/
@ApiModelProperty(value = "签收状态")
private Integer signforState;
}

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

@ -54,4 +54,10 @@ public class DistributionAppSignforVO extends DistributionSignforEntity {
@ApiModelProperty(value = "扫描件数")
private Integer signNub;
/**
* 配送状态
*/
@ApiModelProperty(value = "配送状态")
private String deliveryStatus;
}

15
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java

@ -37,12 +37,27 @@ public class DistributionAppStockArticleVO extends DistributionStockArticleEntit
*/
@ApiModelProperty(value = "扫描数")
private Integer loadingNub;
/**
* 签收数
*/
@ApiModelProperty(value = "签收(订单)")
private Integer signforNub;
/**
* 签收完成数
*/
@ApiModelProperty(value = "签收完成数(客户)")
private Integer signNub;
/**
* 是否齐全
*/
@ApiModelProperty(value = "是否齐全")
private String complete;
/**
* 是否齐全
*/
@ApiModelProperty(value = "是否齐全")
private Integer completecode;
/**
* 库存品包条
*/

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

@ -98,7 +98,7 @@ public class DistributionBillLadingAppController extends BladeController {
}
@ApiOperation(value = "自提订单列表库存品详细包件",notes = "自提订单列表库存品详细包件")
@GetMapping("/getInventory")
@GetMapping("/getInventoryNum")
@ApiOperationSupport(order = 1)
public R<IPage<DistrilbutionBillLadingAppVO>> getInventoryNum(@ApiIgnore @RequestParam Map<String, Object> distrilbutionBillLading, Query query){
IPage<DistrilbutionBillLadingAppVO> ladingAppVOIPage = distrilbutionBillLadingService.getInventoryNum(Condition.getPage(query),distrilbutionBillLading);

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java

@ -71,7 +71,6 @@ public class DistributionDeliveryAppController {
@ApiOperationSupport(order = 3)
@ApiOperation(value = "详情", notes = "传入DistributionDeliveryListDTO")
public R<IPage<DistributionAppReservationVO>> detail(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) {
//DistributionDeliveryListEntity detail = distributionDeliveryListService.getOne(Condition.getQueryWrapper(distributionDeliveryList));
IPage<DistributionAppReservationVO> pages = distributionDeliveryListService.getAppDeliveryreservationListPage(Condition.getPage(query),distributionDeliveryList);
return R.data(pages);
}

73
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java

@ -8,18 +8,14 @@ import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppSignforVO;
import com.logpm.distribution.vo.app.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@ -48,7 +44,7 @@ public class DistributionSignforAppController {
@ApiOperationSupport(order = 1)
@ApiOperation(value = "列表", notes = "DistributionAppDeliveryListDTO")
public R<IPage<DistributionAppDeliveryListVO>> list(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) {
IPage<DistributionAppDeliveryListVO> pages = distributionDeliveryListService.selectDistributionAppDeliveryListPage(Condition.getPage(query), distributionDeliveryList);
IPage<DistributionAppDeliveryListVO> pages = distributionSignforService.selectDistributionAppDeliveryListPage(Condition.getPage(query), distributionDeliveryList);
return R.data(pages);
}
@ -63,20 +59,75 @@ public class DistributionSignforAppController {
return R.data(pages);
}
/**
* 签收管理 订单列表
*/
@GetMapping("/order")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "列表", notes = "DistributionAppDeliveryListDTO")
public R<IPage<DistributionAppStockArticleVO>> order(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) {
IPage<DistributionAppStockArticleVO> pages = distributionSignforService.getAppDeliveryorderListPage(Condition.getPage(query), distributionDeliveryList);
return R.data(pages);
}
/**
* 签收 客户查看库存品
*/
@GetMapping("/inventory")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "客户查看库存品", notes = "DistributionAppDeliveryListDTO")
public R<IPage<DistributionAppStockArticleVO>> inventory(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO, Query query) {
IPage<DistributionAppStockArticleVO> pages = distributionSignforService.selectAppDeliveryInventory(Condition.getPage(query), distributionAppDeliveryListDTO);
return R.data(pages);
}
/**
* 签收管理 签收明细
*/
@GetMapping("/wrap")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "签收明细列表", notes = "DistributionAppDeliveryListDTO")
public R<IPage<DistributionAppParcelListVO>> wrap(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) {
IPage<DistributionAppParcelListVO> pages = distributionSignforService.getAppDeliverywrapListPage(Condition.getPage(query), distributionDeliveryList);
return R.data(pages);
}
/**
* 司机扫描签收管理 客户签收
* 查看签收库存品明细
*/
@GetMapping("/signfor")
@GetMapping("/wrapIn")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "查看签收库存品明细", notes = "DistributionAppDeliveryListDTO")
public R<IPage<DistributionAppStockListVO>> wrapIn(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO, Query query) {
IPage<DistributionAppStockListVO> page = distributionSignforService.selectDistributionAppDeliverywrapIn(Condition.getPage(query), distributionAppDeliveryListDTO);
return R.data(page);
}
/**
* 司机扫描签收管理 包条客户签收
*/
@PostMapping("/signfor")
@ApiOperationSupport(order = 2)
public R signfor(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.signfor(distrilbutionloadingscanDTO);
return msg;
}
/**
* 司机扫描签收管理 库存品客户签收
*/
@PostMapping("/signforIn")
@ApiOperationSupport(order = 2)
public R signforIn(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.signforIn(distrilbutionloadingscanDTO);
return msg;
}
/**
* 司机扫描签收管理 不在配送单签收
*/
@GetMapping("/signforcontinue")
@PostMapping("/signforcontinue")
@ApiOperationSupport(order = 2)
public R signforcontinue(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.signforcontinue(distrilbutionloadingscanDTO);
@ -85,7 +136,7 @@ public class DistributionSignforAppController {
/**
* 司机签收管理 确认签收
*/
@GetMapping("/signforack")
@PostMapping("/signforack")
@ApiOperationSupport(order = 2)
public R signforack(@Valid @RequestBody DistributionSignforEntity distributionSignfor) {
R msg = distributionSignforService.signforack(distributionSignfor);

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -244,7 +244,7 @@ public class DistributionStockupAppController extends BladeController {
entity.setCoding(packetBarCode);
entity.setStockupArea(stockupArea);
entity.setReservationId(reservationId);
entity.setConditions(0);
entity.setConditions("0");
entity.setType(2);
distributionStockService.save(entity);
@ -289,7 +289,7 @@ public class DistributionStockupAppController extends BladeController {
entity.setStockupArea(stockupArea);
entity.setReservationId(reservationId);
entity.setStockListId(stockListId);
entity.setConditions(0);
entity.setConditions("0");
entity.setType(2);
distributionStockService.save(entity);

17
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java

@ -44,5 +44,22 @@ public class DistributionAppDeliveryListDTO extends DistributionDeliveryListEnti
*/
@ApiModelProperty(value = "是否扫描")
private String isScan;
/**
* 配车开始时间
*/
@ApiModelProperty(value = "配车开始时间")
private String taskTime_start;
/**
* 配车结束时间
*/
@ApiModelProperty(value = "配车结束时间")
private String taskTime_end;
/**
* 是否齐全1-未扫,2-部分扫,3-齐套
*/
@ApiModelProperty(value = "是否齐全(1-未扫,2-部分扫,3-齐套)")
private Integer completecode;
}

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

@ -271,14 +271,14 @@
FROM
logpm_distribution_reservation ldr
join logpm_distribution_reservation_stockarticle ldrs on ldr.id = ldrs.reservation_id
join logpm_distribution_stock_article ldsa on ldsa.id =ldr.stock_article_id
join logpm_distribution_stock_article ldsa on ldsa.id =ldrs.stock_article_id
<where>
ldr.is_deleted = 0
<if test="param.state != null and param.state!=''">
and ldsa.state = #{param.state}
</if>
<if test="param.orderId != null and param.orderId!=''">
and ldsa.id = #{param.orderId}
<if test="param.orderSelfNumbering != null and param.orderSelfNumbering!=''">
and ldsa.order_self_numbering = #{param.orderSelfNumbering}
</if>
AND ldr.id = #{param.reservationId}
</where>
@ -290,7 +290,7 @@
ldr.reservation_num reservationNum,
lds.loaded_number loadingNub,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub,
COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub
COALESCE(lds.loaded_number + lds.loadedin_number, 0) signNub
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id

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

@ -236,4 +236,16 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @return
*/
List<DistributionAppStockListVO> selectListbyink(IPage page,Long id);
/**
* 签收完成数
*
* @return
*/
Integer selectCompletecusInCount(Long id);
/**
* 签收完成数
*
* @return
*/
List<DistributionAppStockArticleVO> selectDistributionAppDeliveryOrderOIn( @Param("param") DistributionAppDeliveryListVO distributionAppDeliveryListVO);
}

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

@ -548,7 +548,7 @@
<select id="selectDistributionAppDeliveryListPage" resultType="com.logpm.distribution.vo.app.DistributionAppDeliveryListVO">
SELECT
DISTINCT lddl.id id,
-- lddl.train_number trainNumber,
lddl.train_number trainNumber,
-- lddl.warehouse_name warehouseName,
-- lddl.warehouse_id warehouseId,
lddl.type type,
@ -557,6 +557,7 @@
lddl.driver_name driverName,
lddl.vehicle_id vehicleId,
lddl.driver_id driverId,
lddl.state state,
lddl.preparation_time preparationTime,
-- lddl.distribution_company distributionCompany,
-- lddl.state state,
@ -600,7 +601,7 @@
logpm_distribution_signfor lds
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id
WHERE lds.delivery_id = lddl.id) inventoryNub,
(SELECT COALESCE(sum(lds.loaded_number), 0) FROM logpm_distribution_signfor lds WHERE
(SELECT COALESCE(sum(lds.loaded_number+lds.loadedin_number), 0) FROM logpm_distribution_signfor lds WHERE
lddl.id = lds.delivery_id) scannedNumber
FROM
logpm_distribution_delivery_list lddl
@ -610,9 +611,10 @@
<if test="param.createTime_query!=null and param.createTime_query!=''">
and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if>
<if test="param.taskTime!=null and param.taskTime!=''">
and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%')
<if test="param.taskTime_start!=null and param.taskTime_start!=''">
and date_format(lddl.task_time,'%y%m%d%') >= date_format(#{param.taskTime_start},'%y%m%d%') and date_format(lddl.task_time,'%y%m%d%') &lt;= date_format(#{param.taskTime_end},'%y%m%d%')
</if>
</where>
</select>
<select id="getDeliveryStockArticleInfo" resultType="com.logpm.distribution.vo.DistributionStockArticleVO">
@ -741,7 +743,7 @@
join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id =ldpl.id
<where>
lds.delivery_id = #{id}
lds.delivery_id = #{param.id}
<if test="param.orderSelfNumbering != null and param.orderSelfNumbering!=''">
and ldsa.order_self_numbering = #{param.orderSelfNumbering}
</if>
@ -808,5 +810,27 @@
logpm_distribution_stock lds on lds.reservation_id = ldsf.reservation_id
where lddl.delivery_id = #{deliveryId} and lds.coding =#{barcode}
</select>
<select id="selectCompletecusInCount" resultType="java.lang.Integer">
SELECT COALESCE( COUNT(*), 0 )
FROM
logpm_distribution_signfor lds
join logpm_distribution_reservation ldr on ldr.id = lds.reservation_id
WHERE
lds.received_quantity >= ldr.reservation_num and lds.receivedin_quantity >= ldr.reservation_stock_list_num and lds.is_deleted = 0 and lds.delivery_id =#{id}
</select>
<select id="selectDistributionAppDeliveryOrderOIn"
resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_self_numbering orderSelfNumbering,
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
FROM
logpm_distribution_signfor lds join
logpm_distribution_reservation ldr on lds.reservation_id = ldr.id
join logpm_distribution_reservation_stockarticle ldrs on ldr.id = ldrs.reservation_id
join logpm_distribution_stock_article ldsa on ldsa.id =ldr.stock_article_id
where lds.delivery_id = #{param.id}
</select>
</mapper>

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

@ -17,13 +17,17 @@
package com.logpm.distribution.mapper;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.vo.DistributionSignforVO;
import com.logpm.distribution.excel.DistributionSignforExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppParcelListVO;
import com.logpm.distribution.vo.app.DistributionAppSignforVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -124,4 +128,28 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
List<DistributionAppSignforVO> selectAppcustomListPage(IPage<DistributionAppSignforVO> page, Long id);
/**
* 根据客户查询订单
*
* @return
*/
List<DistributionAppStockArticleVO> selectord(IPage<DistributionAppStockArticleVO> page,@Param("param") DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* 根据客户查询详情
*
* @return
*/
List<DistributionAppParcelListVO> selectListbyInpack(IPage<DistributionAppParcelListVO> page, DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* 查询签收列表
*
* @return
*/
List<DistributionAppDeliveryListVO> selectDistributionAppDeliveryInListPage(IPage<DistributionAppDeliveryListVO> page,@Param("param") DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
/**
* 客户查询库存品
*
* @return
*/
List<DistributionAppStockArticleVO> selectAppDeliveryInventoryPage(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
}

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

@ -490,6 +490,7 @@
ldr.id id,
ldr.consignee consignee,
ldr.reservation_num reservationNum,
lds.driver_signing driverSigning,
lds.loaded_number loadingNub,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub,
COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub
@ -500,5 +501,136 @@
lds.is_deleted = 0
AND lds.delivery_id = #{id}
</select>
<select id="selectord" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
distinct
ldsa.order_self_numbering orderSelfNumbering,
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) signforNub
FROM
logpm_distribution_reservation ldr
join logpm_distribution_reservation_stockarticle ldrs on ldr.id = ldrs.reservation_id
join logpm_distribution_stock_article ldsa on ldsa.id =ldrs.stock_article_id
<where>
ldr.is_deleted = 0
<if test="param.state != null and param.state!=''">
and ldsa.state = #{param.state}
</if>
<if test="param.orderSelfNumbering != null and param.orderSelfNumbering!=''">
and ldsa.order_self_numbering = #{param.orderSelfNumbering}
</if>
and ldr.id = #{param.reservationId}
</where>
</select>
<select id="selectListbyInpack" resultType="com.logpm.distribution.vo.app.DistributionAppParcelListVO">
select
DISTINCT ldrp.packet_bar_code packetBarCode,
ldrp.material_name materialName,
ldsa.order_self_numbering orderSelfNumbering,
ldl.signfor_state signforState
FROM
logpm_distribution_reservation_package ldrp
JOIN logpm_distribution_signfor lds on lds.reservation_id = ldrp.reservation_id
join logpm_distribution_reservation_stockarticle ldrs on lds.reservation_id = ldrs.reservation_id
join logpm_distribution_stock_article ldsa on ldsa.id = ldrs.stock_article_id
join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
JOIN logpm_distribution_loadscan ldl on ldl.package_id =ldpl.id
<where>
lds.delivery_id = #{param.id}
</where>
</select>
<select id="selectDistributionAppDeliveryInListPage" resultType="com.logpm.distribution.vo.app.DistributionAppDeliveryListVO">
SELECT
DISTINCT lddl.id id,
lddl.train_number trainNumber,
-- lddl.warehouse_name warehouseName,
-- lddl.warehouse_id warehouseId,
lddl.type type,
lddl.kind kind,
lddl.vehicle_name vehicleName,
lddl.driver_name driverName,
(SELECT COALESCE (sum(ldr.reservation_num) ,0)
FROM
logpm_distribution_signfor lds
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id
WHERE lds.delivery_id = lddl.id
) deliveryNumber,
-- lddl.vehicle_id vehicleId,
-- lddl.driver_id driverId,
lddl.state state,
lddl.preparation_time preparationTime,
-- lddl.distribution_company distributionCompany,
-- lddl.state state,
-- (SELECT GROUP_CONCAT(DISTINCT ldsu.forklift_name SEPARATOR ',') FROM
-- logpm_distribution_signfor lds
-- join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id
-- join logpm_distribution_stockup_info ldsi on ldr.id = ldsi.reservation_id
-- join logpm_distribution_stockup ldsu on ldsu.id = ldsi.stockup_id
-- WHERE lds.delivery_id = lddl.id
-- ) forkliftName,
lddl.create_time createTime,
(SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_signfor lds WHERE lds.delivery_id =lddl.id) customersNumber,
lddl.price price,
lddl.added_services_id addedServicesId,
(SELECT COALESCE (COUNT(*) ,0)
FROM
logpm_distribution_signfor lds
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id
join logpm_distribution_reservation_stockarticle ldrs on ldrs.reservation_id =ldr.id
WHERE lds.delivery_id = lddl.id
) orderNumber,
(SELECT COALESCE(sum(lds.loaded_number+lds.loadedin_number), 0) FROM logpm_distribution_signfor lds WHERE
lddl.id = lds.delivery_id) scannedNumber,
(SELECT GROUP_CONCAT(DISTINCT ldsu.loader_name SEPARATOR ',') from logpm_distribution_signfor lds INNER JOIN logpm_distribution_stockup_info AS ldsi ON lds.reservation_id = ldsi.reservation_id
INNER JOIN logpm_distribution_stockup AS ldsu ON ldsu.id = ldsi.stockup_id WHERE lds.delivery_id = lddl.id) loadingTeamName,
-- (SELECT GROUP_CONCAT( lds.reservation_id SEPARATOR ',') from logpm_distribution_signfor lds WHERE lds.delivery_id = lddl.id) reservationId,
lddl.lead_time leadTime,
-- lddl.order_id orderId,
-- lddl.fee fee,
lddl.loading_time loadingTime,
-- lddl.note_number noteNumber,
-- lddl.source source,
lddl.task_time taskTime,
-- (SELECT COALESCE (sum(ldr.reservation_stock_list_num) ,0)
-- FROM
-- logpm_distribution_signfor lds
-- join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id
-- WHERE lds.delivery_id = lddl.id) inventoryNub,
(SELECT COALESCE(sum(lds.receivedin_quantity+lds.received_quantity), 0) FROM logpm_distribution_signfor lds WHERE
lddl.id = lds.delivery_id) signNub,
( (SELECT COALESCE(count(*), 0) FROM logpm_distribution_loadscan ldl WHERE
lddl.id = ldl.delivery_id and ldl.signfor_state =2) +
(SELECT COALESCE(count(*), 0) FROM logpm_distribution_loadscaninvn ldl WHERE
lddl.id = ldl.delivery_id and ldl.signfor_state =2) ) signNubSr
FROM
logpm_distribution_delivery_list lddl
left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id
<where>
lddl.is_deleted =0
<if test="param.createTime_query!=null and param.createTime_query!=''">
and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if>
<if test="param.taskTime_start!=null and param.taskTime_start!=''">
and date_format(lddl.task_time,'%y%m%d%') >= date_format(#{param.taskTime_start},'%y%m%d%') and date_format(lddl.task_time,'%y%m%d%') &lt;= date_format(#{param.taskTime_end},'%y%m%d%')
</if>
</where>
</select>
<select id="selectAppDeliveryInventoryPage" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
lds.coding coding,
ldr.reservation_stock_list_num reservationStockListNum,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscaninvn ldl WHERE ldl.inventory_id =lds.stock_list_id and ldl.scan_status !=1 ) loadingNub
FROM
logpm_distribution_reservation ldr
join logpm_distribution_stock lds on ldr.id = lds.reservation_id
<where>
ldr.is_deleted = 0
<if test="param.coding != null and param.coding!=''">
and lds.coding = #{param.coding}
</if>
AND ldr.id = #{param.reservationId}
</where>
</select>
</mapper>

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

@ -139,8 +139,8 @@
select ldsa.id,ldsa.order_self_numbering orderSelfNumbering,ldsa.description_goods descriptionGoods,ldsa.total_number totalNumber,
ldbl.stockup_status stockupStatus,ldbl.stockip_allocation stockipAllocation,
( select count(*)
from logpm_distribution_stockup_scan ldss
where ldss.parcel_list_id in (
from logpm_distribution_stock lds
where lds.parcel_list_id in (
select ldpi.id
from logpm_distribution_parcel_list ldpi
where ldpi.stock_article_id in (

27
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java

@ -26,8 +26,7 @@ import com.logpm.distribution.excel.DistributionSignforExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.vo.DistributionSignforsnmbVO;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppSignforVO;
import com.logpm.distribution.vo.app.*;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
@ -90,4 +89,28 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* App-签收管理 客户
*/
IPage<DistributionAppSignforVO> getAppDeliveryreservationListPage(IPage<DistributionAppSignforVO> page, DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* App-司机扫描签收管理 库存品客户签收
*/
R signforIn(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO);
/**
* App-签收管理 查看订单
*/
IPage<DistributionAppStockArticleVO> getAppDeliveryorderListPage(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* App-签收管理 查看包条
*/
IPage<DistributionAppParcelListVO> getAppDeliverywrapListPage(IPage<DistributionAppParcelListVO> page, DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* App-签收管理 查看列表
*/
IPage<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage<DistributionAppDeliveryListVO> page, DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* App-签收管理 客户查看库存品
*/
IPage<DistributionAppStockArticleVO> selectAppDeliveryInventory(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
/**
* App-签收管理 查看详情库存品
*/
IPage<DistributionAppStockListVO> selectDistributionAppDeliverywrapIn(IPage<Object> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
}

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

@ -7,6 +7,7 @@ import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.mapper.DistributionLoadscanMapper;
import com.logpm.distribution.mapper.DistributionParcelListMapper;
import com.logpm.distribution.mapper.DistributionStockMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.DistributionStockupVO;
import com.logpm.distribution.vo.DistrilbutionBillStockVO;
@ -30,7 +31,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
private final DistributionLoadscanMapper distributionLoadscanMapper;
private final IDistributionStockArticleService distributionStockArticleService;
private final IDistributionStockService distributionStockService;
private final DistributionStockMapper distributionStockService;
private final IDistrilbutionBillStockService distrilbutionBillStockService;
private final IDistributionDeliveryDetailsService distributionDeliveryDetailsService;
@ -101,7 +102,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
DistributionStockEntity distributionStock = new DistributionStockEntity();
distributionStock.setId(id);
distributionStock.setConditions("3");
return distributionStockService.updateById(distributionStock);
int i = distributionStockService.updateById(distributionStock);
return i > 0 ? true : false;
}
@Override

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

@ -92,9 +92,9 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
List<DistributionAppStockArticleVO> distributionAppStockArticleVOS = baseMapper.selectDistributionAppDeliveryOrderPage(page, distributionAppDeliveryListDTO);
//转换字典
distributionAppStockArticleVOS.forEach(e->{
if (e.getLoadingNub() ==0){e.setComplete("未齐全");}
else if (e.getLoadingNub() <e.getReservationNum()){e.setComplete("部分齐全");}
else {e.setComplete("齐全");}
if (e.getLoadingNub() ==0){e.setComplete("未扫"); e.setCompletecode(1);}
else if (e.getLoadingNub() <e.getReservationNum()){e.setComplete("部分扫");e.setCompletecode(2);}
else {e.setComplete("齐套");e.setCompletecode(3);}
});
return page.setRecords(distributionAppStockArticleVOS);
}

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

@ -996,11 +996,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public IPage<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage<DistributionAppDeliveryListVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) {
//转换创建时间
if (null != distributionAppDeliveryListDTO.getCreateTime()) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
distributionAppDeliveryListDTO.setCreateTime_query(sdf.format(distributionAppDeliveryListDTO.getCreateTime()));
}
//获取当前登录人
BladeUser user = AuthUtil.getUser();
String roleId = user.getRoleId();
@ -1028,7 +1024,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (distributionAppStockArticleVO.getLoadingNub() >=distributionAppStockArticleVO.getReservationNum()) {ordCount +=1;}
}
distributionAppDeliveryListVO.setLoadCusNub(cusCount);
distributionAppDeliveryListVO.setOrderNumber(ordCount);
distributionAppDeliveryListVO.setLoadOrdNub(ordCount);
//查询下面的预约单
List<DistributionSignforEntity> distributionSignforEntityList = distributionSignforMapper.selectList(new QueryWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getDeliveryId,distributionAppDeliveryListVO.getId())
@ -1040,6 +1036,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer aLong = 0;
Integer aLong2 = 0;
distributionAppDeliveryListVO.setVehicleStatus_name("已配车");
distributionAppDeliveryListVO.setDeliStatus_name("配送中");
if (distributionAppDeliveryListVO.getState().equals("4")){distributionAppDeliveryListVO.setDeliStatus_name("完成");}
if (distributionAppDeliveryListVO.getKind().equals("1")){
aLong = distributionDeliverySelfMapper.selectCount(new QueryWrapper<DistributionDeliverySelfEntity>().lambda()
.eq(DistributionDeliverySelfEntity::getDeliveryId, distributionAppDeliveryListVO.getId())
@ -1136,6 +1134,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
public IPage<DistributionAppReservationVO> getAppDeliveryreservationListPage(IPage<DistributionAppReservationVO> page, DistributionAppDeliveryListDTO distributionDeliveryList) {
//查询客户
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(page,distributionDeliveryList.getId());
for (DistributionAppReservationVO distributionAppReservationVO : customList) {
//查询备货是否完成
Integer aLong = distributionStockMapper.selectCount(new QueryWrapper<DistributionStockEntity>().lambda()
@ -1369,15 +1368,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// }
//查询该配送所有包条
List<DistributionAppParcelListVO> parcelListVOS =baseMapper.selectListbypack(page,distributionAppDeliveryListDTO);
// for (DistributionAppParcelListVO parcelListVO : parcelListVOS) {
// if (null ==parcelListVO.getScanStatus() || parcelListVO.getScanStatus() ==1){parcelListVO.setIsScan("已扫描");}
// }
// //查询所有库存信息
// List<DistributionAppStockListVO> distributionAppStockListVOS = baseMapper.selectListbyink(page,distributionAppDeliveryListDTO.getId());
//// distributionAppDeliveryListVO.setLoadOrdNub(ordCount);
//// distributionAppDeliveryListVO.setLoadCusNub(cusCount);
// distributionAppDeliveryListVO.setParcelListVOS(parcelListVOS);
// distributionAppDeliveryListVO.setInventorylListVOS(distributionAppStockListVOS);
return page.setRecords(parcelListVOS);
}
}

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

@ -536,9 +536,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (stockArticleEntity.getHandQuantity() > r.getReservationNum()) {
//这里表示订单下的包件没有进行全部配送
//修改订单状态为部分配送
stockArticleEntity.setState(4);
stockArticleEntity.setState("4");
//修改订单的在库数量
stockArticleEntity.setState(stockArticleEntity.getHandQuantity() - r.getReservationNum());
stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() - r.getReservationNum());
//对订单进行修改
distributionStockArticleService.updateById(stockArticleEntity);
}

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

@ -31,12 +31,13 @@ import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.vo.DistributionSignforsnmbVO;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppReservationVO;
import com.logpm.distribution.vo.app.DistributionAppSignforVO;
import com.logpm.distribution.vo.app.*;
import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringUtils;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.system.feign.IDictBizClient;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
@ -47,6 +48,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 签收管理 服务实现类
@ -65,6 +67,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
private final DistributionDeliverySelfMapper distributionDeliverySelfMapper;
private final DistributionDeliveryTripartiteMapper distributionDeliveryTripartiteMapper;
private final DistributionSignforMapper distributionSignforMapper;
private final DistributionStockMapper distributionStockMapper;
private final IDictBizClient dictBizClient;
@Override
public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) {
@ -110,8 +114,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//查询该物品是否有所装车
List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
.ne(DistributionLoadscanEntity::getScanStatus, 1)
.eq(DistributionLoadscanEntity::getReservationId,distrilbutionloadingscanDTO.getReservationId())
.eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode())
);
// List<DistributionLoadscaninvnEntity> distributionLoadscaninvnEntities = distributionLoadscaninvnMapper.selectList(new QueryWrapper<DistributionLoadscaninvnEntity>().lambda()
// .ne(DistributionLoadscaninvnEntity::getScanStatus, 1)
// .eq(DistributionLoadscaninvnEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode())
// );
if (distributionLoadscanEntities.size() < 0) {
//TODO 查询库存品
//无拆包
@ -139,7 +148,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// );
// }
// }
return R.fail(3006, "该货物并未装车处理");
return R.fail(3006, "客户的该货物并未装车处理");
}
//修改装车表状态
boolean b = false;
@ -287,10 +296,147 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//查询客户
List<DistributionAppSignforVO> customList = baseMapper.selectAppcustomListPage(page,distributionDeliveryList.getId());
for (DistributionAppSignforVO distributionAppReservationVO : customList) {
//查询备货是否完成
//查询配送状态
distributionAppReservationVO.setDeliveryStatus("配送中");
if (distributionAppReservationVO.getDriverSigning().equals("2")){distributionAppReservationVO.setDeliveryStatus("完成配送");}
}
return page.setRecords(customList);
}
@Override
public R signforIn(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
// //查询该物品是否有所装车
// List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
// .ne(DistributionLoadscanEntity::getScanStatus, 1)
// .eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode())
// );
List<DistributionLoadscaninvnEntity> distributionLoadscaninvnEntities = distributionLoadscaninvnMapper.selectList(new QueryWrapper<DistributionLoadscaninvnEntity>().lambda()
.ne(DistributionLoadscaninvnEntity::getScanStatus, 1)
.eq(DistributionLoadscaninvnEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode())
);
if (distributionLoadscaninvnEntities.size()<0) {
return R.fail(3006, "该货物并未装车处理");
}
//修改装车表状态
boolean b = false;
for (DistributionLoadscaninvnEntity distributionLoadscaninvnEntity : distributionLoadscaninvnEntities) {
distributionLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscaninvnEntity.setSignforState(2);
distributionLoadscaninvnEntity.setReceivedQuantity(distributionLoadscaninvnEntity.getLoadedNub());
b = distributionLoadscaninvnService.updateById(distributionLoadscaninvnEntity);
//修改签收表司机签收数量
this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionLoadscaninvnEntity.getReservationId())
.setSql("receivedin_quantity = receivedin_quantity + " + distributionLoadscaninvnEntity.getLoadedNub())
);
}
return R.status(b);
}
@Override
public IPage<DistributionAppStockArticleVO> getAppDeliveryorderListPage(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionDeliveryList) {
List<DistributionAppStockArticleVO> selectord = baseMapper.selectord(page, distributionDeliveryList);
return page.setRecords(selectord);
}
@Override
public IPage<DistributionAppParcelListVO> getAppDeliverywrapListPage(IPage<DistributionAppParcelListVO> page, DistributionAppDeliveryListDTO distributionDeliveryList) {
//查询该配送所有签收包条
List<DistributionAppParcelListVO> parcelListVOS =baseMapper.selectListbyInpack(page,distributionDeliveryList);
return page.setRecords(parcelListVOS);
}
@Override
public IPage<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage<DistributionAppDeliveryListVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) {
//获取当前登录人
BladeUser user = AuthUtil.getUser();
String roleId = user.getRoleId();
List<DistributionAppDeliveryListVO> distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryInListPage(page, distributionAppDeliveryListDTO);
//转换字典字段
for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) {
//查询包件签收件数
Integer lad = distributionLoadscanMapper.selectCount(new QueryWrapper<DistributionLoadscanEntity>().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId,distributionAppDeliveryListVO.getId())
.eq(DistributionLoadscanEntity::getSignforState,2)
).intValue();
//查询库存品签收件数
Integer nad = distributionLoadscaninvnMapper.selectCount(new QueryWrapper<DistributionLoadscaninvnEntity>().lambda()
.eq(DistributionLoadscaninvnEntity::getDeliveryId,distributionAppDeliveryListVO.getId())
.eq(DistributionLoadscaninvnEntity::getSignforState,2)
).intValue();
distributionAppDeliveryListVO.setSignNub(lad+nad);
//查询完成客户数
Integer cusCount =distributionDeliveryListMapper.selectCompletecusInCount(distributionAppDeliveryListVO.getId());
//查询完成订单数
Integer ordCount = 0;
List<DistributionAppStockArticleVO> distributionAppStockArticleVOS = distributionDeliveryListMapper.selectDistributionAppDeliveryOrderOIn(distributionAppDeliveryListVO);
for (DistributionAppStockArticleVO distributionAppStockArticleVO : distributionAppStockArticleVOS) {
if (distributionAppStockArticleVO.getSignNub() >=distributionAppStockArticleVO.getReservationNum()) {ordCount +=1;}
}
distributionAppDeliveryListVO.setLoadCusNub(cusCount);
distributionAppDeliveryListVO.setLoadOrdNub(ordCount);
//查询下面的预约单
List<DistributionSignforEntity> distributionSignforEntityList = distributionSignforMapper.selectList(new QueryWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getDeliveryId,distributionAppDeliveryListVO.getId())
);
//提取id
List<Long> reList = distributionSignforEntityList.stream().map(DistributionSignforEntity::getId).collect(Collectors.toList());
distributionAppDeliveryListVO.setType_name(dictBizClient.getValue("distribution_type", distributionAppDeliveryListVO.getType() ).getData());
//查询是否配车
Integer aLong = 0;
Integer aLong2 = 0;
distributionAppDeliveryListVO.setVehicleStatus_name("已配车");
distributionAppDeliveryListVO.setDeliStatus_name("配送中");
if (distributionAppDeliveryListVO.getState().equals("4")){distributionAppDeliveryListVO.setDeliStatus_name("完成");}
if (distributionAppDeliveryListVO.getKind().equals("1")){
aLong = distributionDeliverySelfMapper.selectCount(new QueryWrapper<DistributionDeliverySelfEntity>().lambda()
.eq(DistributionDeliverySelfEntity::getDeliveryId, distributionAppDeliveryListVO.getId())
).intValue();
}else {
aLong2=distributionDeliveryTripartiteMapper.selectCount(new QueryWrapper<DistributionDeliveryTripartiteEntity>().lambda()
.eq(DistributionDeliveryTripartiteEntity::getDeliveryId, distributionAppDeliveryListVO.getId())).intValue();
}
if (aLong ==0 && aLong2 ==0){distributionAppDeliveryListVO.setVehicleStatus_name("未配车");}
//查询是否备货
distributionAppDeliveryListVO.setIsstock("备货完成");
Integer reNub = distributionStockMapper.selectCount(new QueryWrapper<DistributionStockEntity>().lambda()
.in(DistributionStockEntity::getReservationId,reList)
).intValue();
Integer deliveryNumber = distributionAppDeliveryListVO.getDeliveryNumber();
if(reNub<deliveryNumber){distributionAppDeliveryListVO.setIsstock("备货未完成");}
//查询司机
List<DistributionAppDeliverySelfVO> distributionAppDeliverySelfVOS = distributionDeliverySelfMapper.selectListcustom(distributionAppDeliveryListVO.getId());
if (distributionAppDeliverySelfVOS.size()>0){
StringBuilder stringBuilder = new StringBuilder();
distributionAppDeliverySelfVOS.forEach(e->{
if (e.getIsMaster() ==2){
stringBuilder.append(e.getDriverName()).append("(主)");
}else { stringBuilder.append(e.getDriverName()).append("(副)");}
});
distributionAppDeliveryListVO.setDriverName(stringBuilder.toString());
}
}
return page.setRecords(distributionAppDeliveryListVOS);
}
@Override
public IPage<DistributionAppStockArticleVO> selectAppDeliveryInventory(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) {
List<DistributionAppStockArticleVO> distributionAppStockArticleVOS = baseMapper.selectAppDeliveryInventoryPage(page, distributionAppDeliveryListDTO);
return page.setRecords(distributionAppStockArticleVOS);
}
@Override
public IPage<DistributionAppStockListVO> selectDistributionAppDeliverywrapIn(IPage<Object> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) {
return null;
}
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java

@ -98,7 +98,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
distributionStockEntity.setParcelListId(parcelListEntity.getId());
distributionStockEntity.setReservationCode(reservationEntity.getReservationCode());
}
distributionStockEntity.setConditions(1);
distributionStockEntity.setConditions("1");
baseMapper.updateById(distributionStockEntity);
log.info("#############repairPackageScanInfo: 补全包件扫码信息完成 coding={}",coding);
}
@ -120,7 +120,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
distributionStockEntity.setUnit(stockListEntity.getCargoUnit());
distributionStockEntity.setReservationCode(reservationEntity.getReservationCode());
}
distributionStockEntity.setConditions(1);
distributionStockEntity.setConditions("1");
baseMapper.updateById(distributionStockEntity);
//扣减

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

@ -80,7 +80,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
private final IDistributionStockListService distributionStockListService;
private final IDistributionAsyncService distributionAsyncService;
private final IDistrilbutionBillLadingService distrilbutionBillLadingService;
private final IDistributionStockService distributionStockService;
@ -102,7 +101,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean ownSaveOrUpdate(DistrilbutionBillLadingDTO distrilbutionBillLading) {
if (ObjectUtils.isNotNull(distrilbutionBillLading.getId())) {
//修改
this.updateById(distrilbutionBillLading);
@ -196,11 +194,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
DistrilbutionBillStockEntity distrilbutionBillStock = new DistrilbutionBillStockVO();
distrilbutionBillStock.setBillLadingId(distrilbutionBillLading.getId());
distrilbutionBillStock.setStockArticleId(Long.parseLong(s));
distrilbutionBillStock.setConditions("1");
distrilbutionBillStockService.save(distrilbutionBillStock);
}
//操作图片
if(distrilbutionBillLading.getPrintList().size() > 0){
addPrint(distrilbutionBillLading);
@ -217,6 +214,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
details.setBillLadingId(distrilbutionBillLading.getId());
details.setStockListId(i.getId());
details.setQuantity(i.getInventoryQuantity());
details.setConditions("1");
detailsEntities.add(details);
});
distributionDeliveryDetailsService.saveBatch(detailsEntities);
@ -787,7 +785,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity();
billLadingEntity.setId((Long) billLadingId);
billLadingEntity.setConsignee("2");
distrilbutionBillLadingService.updateById(billLadingEntity);
baseMapper.updateById(billLadingEntity);
}
return R.fail(200,"签收成功");
}

Loading…
Cancel
Save