Browse Source

1.修改一键装车

dev-warehouse
0.0 2 years ago
parent
commit
75ec5c4e07
  1. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  3. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSigndetailController.java
  4. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java
  5. 28
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  7. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  8. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.java
  9. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml
  10. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  11. 117
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  12. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSigndetailService.java
  13. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  14. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSigndetailServiceImpl.java
  15. 75
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

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

@ -123,6 +123,11 @@ public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity {
*/
@ApiModelProperty(value = "数量")
private Integer quantity;
/**
* 签收数量
*/
@ApiModelProperty(value = "签收数量")
private Integer receivedQuantity;
/**
* 车次号
*/
@ -213,11 +218,7 @@ public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity {
*/
@ApiModelProperty(value = "备注")
private String remarks;
/**
* 签收件数
*/
@ApiModelProperty(value = "签收件数")
private Integer receivedQuantity;
/**
* 文员签收状态
*/

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

@ -160,7 +160,7 @@ public class DistributionSignforAppController {
*/
@PostMapping("/oneclick")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionSignfor")
@ApiOperation(value = "司机一键签收", notes = "传入distributionSignfor")
public R oneclick(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
distributionSignfor.setIsClerk(false);
R msg = distributionSignforService.oneclick(distributionSignfor);

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSigndetailController.java

@ -17,12 +17,14 @@
package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionSigndetailDTO;
import com.logpm.distribution.entity.DistributionPackagereceiptEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.feign.IDistributionSignforClient;
import com.logpm.distribution.service.IDistributionPackagereceiptService;
import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionPackagereceiptVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -109,6 +111,17 @@ public class DistributionSigndetailController extends BladeController {
return R.data(distributionSigndetailVO);
}
/**
* 签收详情 查看包件详情
*/
@GetMapping("/packdetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查看包件详情", notes = "传入distributionDeliveryList")
public R<IPage<DistributionDeliveryInfoVO>> packdetail(DistributionDeliveryInfoDTO distributionDeliveryInfoDTO, Query query) {
IPage<DistributionDeliveryInfoVO> pages = distributionSigndetailService.selectDistributionDeliveryInfopackdetail(Condition.getPage(query), distributionDeliveryInfoDTO);
return R.data(pages);
}
/**
* 签收明细 分页
*/

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

@ -44,6 +44,16 @@ public class DistributionAppDeliveryListDTO extends DistributionDeliveryListEnti
*/
@ApiModelProperty(value = "是否扫描")
private String isScan;
/**
* 扫描类型
*/
@ApiModelProperty(value = "扫描类型")
private String scanStatus;
/**
* 签收类型
*/
@ApiModelProperty(value = "签收类型")
private String signforState;
/**
* 配车开始时间
*/

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

@ -267,7 +267,7 @@
</select>
<select id="selectDistributionAppDeliveryOrderPage" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_code orderCdoe,
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
@ -281,7 +281,8 @@
<!-- and ldsa.type_service = #{param.typeService}-->
<!-- </if>-->
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
AND ldr.id = #{param.reservationId}
</where>
@ -319,7 +320,7 @@
</select>
<select id="selectDistributionAppDeliveryOrderCompletewPage" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_code AS orderCdoe,
ldsa.order_code AS orderCode,
ldsa.complete_set AS completeSet,
ldrs.reservation_num AS reservationNum,
loadingNub
@ -339,7 +340,7 @@
JOIN logpm_distribution_reservation_stockarticle ldrs ON loading.stock_article_id = ldrs.stock_article_id
JOIN logpm_distribution_reservation ldr ON ldr.id = ldrs.reservation_id
JOIN logpm_distribution_stock_article ldsa ON ldsa.id = ldrs.stock_article_id
WHERE
<where>
ldr.is_deleted = 0
@ -347,15 +348,16 @@
<!-- and ldsa.type_service = #{param.typeService}-->
<!-- </if>-->
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
AND loading.loadingNub &lt; ldrs.reservation_num
AND loading.loadingNub &lt; ldrs.reservation_num AND ldr.id = #{param.reservationId}
</where>
</select>
<select id="selectDistributionAppDeliveryOrderCompmletePage" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_code AS orderCdoe,
ldsa.order_code AS orderCode,
ldsa.complete_set AS completeSet,
ldrs.reservation_num AS reservationNum,
loadingNub
@ -381,14 +383,15 @@
<!-- and ldsa.type_service = #{param.typeService}-->
<!-- </if>-->
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
AND loading.loadingNub =0
AND loading.loadingNub =0 AND ldr.id = #{param.reservationId}
</where>
</select>
<select id="selectDistributionAppDeliveryOrderCompcletePage" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_code AS orderCdoe,
ldsa.order_code AS orderCode,
ldsa.complete_set AS completeSet,
ldrs.reservation_num AS reservationNum,
loadingNub
@ -414,9 +417,10 @@
<!-- and ldsa.type_service = #{param.typeService}-->
<!-- </if>-->
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
AND loading.loadingNub >=ldrs.reservation_num
AND loading.loadingNub >=ldrs.reservation_num AND ldr.id = #{param.reservationId}
</where>
</select>
</mapper>

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

@ -130,7 +130,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
*
* @return
*/
List<DistributionLoadscanEntity> selectdeliverOne (@Param("reservationId") Long reservationId);
List<DistributionLoadscanEntity> selectdeliverOne (@Param("reservationId") Long reservationId,@Param("deliveryId") Long deliveryId);
/**
* 查询该客户无数据数据该配送任务
*
@ -193,7 +193,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
*
* @return
*/
List<DistributionLoadscaninvnEntity> selectdeliverOnevnopen(@Param("reservationId")Long reservationId);
List<DistributionLoadscaninvnEntity> selectdeliverOnevnopen(@Param("reservationId")Long reservationId,@Param("deliveryId") Long deliveryId);
/**
* 查询商配库存数

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

@ -186,7 +186,7 @@
logpm_distribution_signfor ldsf on lddl.id = ldsf.delivery_id
join
logpm_distribution_stock lds on lds.reservation_id = ldsf.reservation_id
where ldsf.reservation_id =#{reservationId}
where ldsf.reservation_id =#{reservationId} and ldsf.delivery_id =#{deliveryId}
</select>
@ -459,7 +459,7 @@
JOIN logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id
join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
where
lds.is_deleted =0 and lds.reservation_id =#{reservationId}
lds.is_deleted =0 and lds.reservation_id =#{reservationId} and lds.delivery_id =#{deliveryId}
</select>
<select id="selectdeliverOneNo" resultType="com.logpm.distribution.entity.DistributionLoadscanEntity">
SELECT
@ -769,7 +769,17 @@
<where>
lds.delivery_id = #{param.id}
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
and ldsa.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.scanStatus != null and param.scanStatus!=''">
<choose>
<when test="param.scanStatus== 1">
and (ldl.scan_status = null or ldl.scan_status = 4)
</when>
<when test="param.scanStatus== 2">
and (ldl.scan_status = 2 or ldl.scan_status = 3)
</when>
</choose>
</if>
</where>

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

@ -16,8 +16,10 @@
*/
package com.logpm.distribution.mapper;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionSigndetailDTO;
import com.logpm.distribution.entity.DistributionSigndetailEntity;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionSigndetailVO;
import com.logpm.distribution.excel.DistributionSigndetailExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -53,4 +55,10 @@ public interface DistributionSigndetailMapper extends BaseMapper<DistributionSig
List<DistributionSigndetailExcel> exportDistributionSigndetail(@Param("ew") Wrapper<DistributionSigndetailEntity> queryWrapper);
DistributionSigndetailVO selectVOById(Long id);
/**
* 通过配送包条
*
* @return
*/
List<DistributionDeliveryInfoVO> selectDistributionDeliverypackdetailPage(IPage<DistributionDeliveryInfoVO> page,@Param("param") DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
}

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml

@ -225,5 +225,25 @@
JOIN logpm_distribution_signfor lds ON lds.reservation_id = ldl.reservation_id
join logpm_distribution_stock_article ldsa on ldl.order_id = ldsa.id
</select>
<select id="selectDistributionDeliverypackdetailPage" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
SELECT
ldsa.warehouse warehouse,
ldpl.order_package_code orderPackageCode,
ldpl.goods_allocation goodsAllocation,
ldpl.pallet pallet,
ldpl.material_name materialName,
ldpl.material_code materialCode,
ldpl.firsts firsts,
ldpl.SECOND SECOND,
ldpl.third_product thirdProduct,
COALESCE (ldl.received_quantity ,0) receivedQuantity
FROM
logpm_distribution_stock_article ldsa
JOIN logpm_distribution_parcel_list ldpl ON ldpl.stock_article_id = ldsa.id
LEFT JOIN logpm_distribution_loadscan ldl ON ldl.package_id = ldpl.id
<where>
ldsa.id = #{param.id}
</where>
</select>
</mapper>

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

@ -102,9 +102,9 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
*/
Long selectIdByOrderId(Long id);
Integer updateloadByReservationId(@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
Integer updateloadByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
Integer updateloadreduceByReservationId(@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
Integer updateloadreduceByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
/**
* 签收详情
*
@ -118,7 +118,7 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
*/
Integer selectloadNub(@Param("id")Long id);
Integer updateloadByinvn(@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
Integer updateloadByinvn(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
/**
* 根据配送查询客户
*
@ -132,7 +132,7 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
*/
List<DistributionAppStockArticleVO> selectord(IPage<DistributionAppStockArticleVO> page,@Param("param") DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* 根据客户查询详情
* 根据车次查询详情
*
* @return
*/
@ -155,4 +155,30 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
List<DistributionAppStockListVO> selectListbyink(IPage<DistributionAppStockListVO> page, Long id);
/**
* 部分扫
*
* @return
*/
List<DistributionAppStockArticleVO> selectorda(IPage<DistributionAppStockArticleVO> page,@Param("param") DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* 未扫
*
* @return
*/
List<DistributionAppStockArticleVO> selectordb(IPage<DistributionAppStockArticleVO> page,@Param("param") DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* 已扫
*
* @return
*/
List<DistributionAppStockArticleVO> selectordc(IPage<DistributionAppStockArticleVO> page,@Param("param") DistributionAppDeliveryListDTO distributionDeliveryList);
/**
* 更新签收数量
*
* @return
*/
Integer updateSignforByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("packageNub") Integer packageNub);
Integer updatesignforByinvn(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("packageNub") Integer packageNub);
}

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

@ -43,13 +43,19 @@
<result column="delivery_phone" property="deliveryPhone"/>
</resultMap>
<update id="updateloadByReservationId">
UPDATE logpm_distribution_signfor lds set loaded_number = ( loaded_number + #{nub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId}
UPDATE logpm_distribution_signfor lds set lds.loaded_number = ( lds.loaded_number + #{nub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}
</update>
<update id="updateloadByinvn">
UPDATE logpm_distribution_signfor lds set loadedin_number = ( loadedin_number + #{nub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId}
UPDATE logpm_distribution_signfor lds set lds.loadedin_number = ( lds.loadedin_number + #{nub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}
</update>
<update id="updateloadreduceByReservationId">
UPDATE logpm_distribution_signfor lds set loaded_number = ( loaded_number - #{nub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{id} and loaded_number !=0
UPDATE logpm_distribution_signfor lds set lds.loaded_number = ( lds.loaded_number - #{nub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and loaded_number !=0 and lds.delivery_id = #{deliveryId}
</update>
<update id="updateSignforByReservationId">
UPDATE logpm_distribution_signfor lds set lds.received_quantity = ( lds.received_quantity + #{packageNub} ),lds.loaded_number = ( lds.loaded_number + #{packageNub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id =#{deliveryId}
</update>
<update id="updatesignforByinvn">
UPDATE logpm_distribution_signfor lds set lds.loadedin_number = ( lds.loadedin_number + #{packageNub} ),lds.receivedin_quantity = ( lds.receivedin_quantity + #{packageNub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id =#{deliveryId}
</update>
@ -517,7 +523,8 @@
<!-- and ldsa.state = #{param.state}-->
<!-- </if>-->
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
and ldr.id = #{param.reservationId}
</where>
@ -537,6 +544,12 @@
JOIN logpm_distribution_loadscan ldl on ldl.package_id =ldpl.id
<where>
lds.delivery_id = #{param.id}
<if test="param.signforState != null and param.signforState!=''">
and ldl.signfor_state = #{param.signforState}
</if>
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
</if>
</where>
</select>
<select id="selectDistributionAppDeliveryInListPage" resultType="com.logpm.distribution.vo.app.DistributionAppDeliveryListVO">
@ -653,5 +666,101 @@
left join logpm_basicdata_material lbm on lbm.id = ldpl.material_id
where lds.delivery_id = #{id}
</select>
<select id="selectorda" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT distinct
ldsa.order_code AS orderCode,
ldrs.reservation_num AS 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) AS 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.orderCode != null and param.orderCode!=''">
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
and ldr.id = #{param.reservationId}
and
(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) &lt; ldrs.reservation_num and (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) !=0
</where>
</select>
<select id="selectordb" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT distinct
ldsa.order_code AS orderCode,
ldrs.reservation_num AS 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) AS 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.orderCode != null and param.orderCode!=''">
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
and ldr.id = #{param.reservationId}
and (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) =0
</where>
</select>
<select id="selectordc" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT distinct
ldsa.order_code AS orderCode,
ldrs.reservation_num AS 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) AS 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.orderCode != null and param.orderCode!=''">
and ldsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
and ldr.id = #{param.reservationId}
and (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) >= ldrs.reservation_num
</where>
</select>
</mapper>

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

@ -17,8 +17,10 @@
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionSigndetailDTO;
import com.logpm.distribution.entity.DistributionSigndetailEntity;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionSigndetailVO;
import com.logpm.distribution.excel.DistributionSigndetailExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -56,4 +58,10 @@ public interface IDistributionSigndetailService extends BaseService<Distribution
* @return
*/
DistributionSigndetailVO getOneById(Long id);
/**
* 签收自定义查询详情
*
* @return
*/
IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfopackdetail(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
}

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

@ -322,7 +322,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//判断是商配还是市配
// DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
// if (distributionDeliveryListEntity.getType().equals("1")) {
@ -468,7 +468,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
distributionLoadscanService.saveBatch(distributionLoadscanEntities);
@ -501,7 +501,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), 1);
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), 1);
}
distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);
} else if (distrilbutionloadingscanDTO.getType() == 3) {
@ -542,7 +542,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
distributionLoadscanService.saveBatch(distributionLoadscanEntities);
} else {
@ -578,7 +578,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
distributionLoadscanService.saveBatch(distributionLoadscanEntities);
}
@ -659,13 +659,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
//先查询有数据的
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverOne(distrilbutionloadingscanDTO.getReservationId());
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverOne(distrilbutionloadingscanDTO.getReservationId(),distrilbutionloadingscanDTO.getDeliveryId());
//无数据的
// List<DistributionLoadscanEntity> distributionLoadscanEntitiesno = baseMapper.selectdeliverOneNo(distrilbutionloadingscanDTO.getReservationId(), distrilbutionloadingscanDTO.getDeliveryId());
//查询所有的库存品(无拆包)
//List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntities = baseMapper.selectdeliverOnevn(distrilbutionloadingscanDTO.getReservationId(), distrilbutionloadingscanDTO.getDeliveryId());
//查询所有的库存品(拆包)
List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntitiesopen = baseMapper.selectdeliverOnevnopen(distrilbutionloadingscanDTO.getReservationId());
List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntitiesopen = baseMapper.selectdeliverOnevnopen(distrilbutionloadingscanDTO.getReservationId(),distrilbutionloadingscanDTO.getDeliveryId());
//将该客户所有的物品上该车辆
if (distributionLoadscanEntities.size() > 0) {
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
@ -697,7 +697,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
distributionLoadscanService.save(distributionLoadscanEntity);
}
// distributionLoadscanService.saveBatch(distributionLoadscanEntities);
@ -755,7 +755,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByinvn(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByinvn(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntitiesopen);
}
@ -845,7 +845,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//取消装车,更新该装车记录
distributionLoadscanMapper.updatecutSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO);
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
// }
} else if (distrilbutionloadingscanDTO.getType() == 2) {
@ -859,7 +859,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//取消装车,更新该装车记录
distributionLoadscanMapper.updatecutSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO);
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
} else if (distrilbutionloadingscanDTO.getType() == 3) {
//订单扫描,查询该订单是否有数据
@ -885,7 +885,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//取消装车,更新该装车记录
distributionLoadscanMapper.updatecutSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO);
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
} else {
//查询订单是否属于该配送任务
@ -902,7 +902,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//取消装车,更新该装车记录
distributionLoadscanMapper.updatecutSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO);
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
}
@ -966,7 +966,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByinvn(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByinvn(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
b = distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);
// } else if (distrilbutionloadingscanDTO.getInventorytype() == 1) {
@ -1518,7 +1518,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByinvn(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByinvn(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
b = distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);

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

@ -17,8 +17,10 @@
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.config.GlobalConfig;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionSigndetailDTO;
import com.logpm.distribution.entity.DistributionSigndetailEntity;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionSigndetailVO;
import com.logpm.distribution.excel.DistributionSigndetailExcel;
import com.logpm.distribution.mapper.DistributionSigndetailMapper;
@ -68,4 +70,10 @@ public class DistributionSigndetailServiceImpl extends BaseServiceImpl<Distribut
return baseMapper.selectVOById(id);
}
@Override
public IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfopackdetail(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) {
List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliverypackdetailPage(page, distributionDeliveryInfoDTO);
return page.setRecords(distributionDeliveryInfoVOS);
}
}

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

@ -240,7 +240,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//查询本车次是否第一次扫码,没有则更新上车时间
//Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//修改签收表司机签收数量
this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionLoadscanEntity.getReservationId())
@ -281,7 +281,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setReceivedQuantity(1);
distributionLoadscanEntity.setIsInsert(2);
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
boolean b = distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);
@ -339,6 +339,15 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public IPage<DistributionAppStockArticleVO> getAppDeliveryorderListPage(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionDeliveryList) {
List<DistributionAppStockArticleVO> selectord = baseMapper.selectord(page, distributionDeliveryList);
if (null !=distributionDeliveryList.getCompletecode()){
if (distributionDeliveryList.getCompletecode() ==2){
selectord = baseMapper.selectorda(page, distributionDeliveryList);
}else if (distributionDeliveryList.getCompletecode() ==1){
selectord = baseMapper.selectordb(page, distributionDeliveryList);
}else if (distributionDeliveryList.getCompletecode() ==3){
selectord = baseMapper.selectordc(page, distributionDeliveryList);
}
}
return page.setRecords(selectord);
}
@ -441,8 +450,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public R positioning(DistributionSignforEntity distributionSignfor) {
DistributionSignforEntity distributionSignforEntity = baseMapper.selectOne(new QueryWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionSignforEntity::getDeliveryId,distributionSignfor.getDeliveryId())
);
if (null !=distributionSignforEntity.getPositioning()||null !=distributionSignforEntity.getPositioningAdr()){
return R.fail(3008,"已打卡");
}
boolean update = this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionSignforEntity::getDeliveryId,distributionSignfor.getDeliveryId())
.set(StringUtils.isNotBlank(distributionSignfor.getPositioning()), DistributionSignforEntity::getPositioning, distributionSignfor.getPositioning())
.set(StringUtils.isNotBlank(distributionSignfor.getPositioningAdr()), DistributionSignforEntity::getPositioningAdr, distributionSignfor.getPositioningAdr())
);
@ -451,6 +468,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public R oneclick(DistributionSignforDTO distributionSignfor) {
DistributionSignforEntity distributionSignforEntity = baseMapper.selectOne(new QueryWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId())
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
);
if (distributionSignfor.getIsClerk()){
if (null != distributionSignforEntity.getSigningType()){return R.fail(3010,"已经签收");}
}else {
if (null != distributionSignforEntity.getSjsigningTime()){return R.fail(3010,"已经签收");}
}
//获取当前用户司机
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distributionSignfor.getDeliveryId());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = null;
@ -465,11 +492,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
);
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
//先查询有数据的
List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionDeliveryListMapper.selectdeliverOne(distributionSignfor.getReservationId());
List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionDeliveryListMapper.selectdeliverOne(distributionSignfor.getReservationId(),distributionSignfor.getDeliveryId());
//查询所有的库存品(拆包)
List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntitiesopen = distributionDeliveryListMapper.selectdeliverOnevnopen(distributionSignfor.getReservationId());
List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntitiesopen = distributionDeliveryListMapper.selectdeliverOnevnopen(distributionSignfor.getReservationId(),distributionSignfor.getDeliveryId());
//将该客户所有的物品上该车辆
if (distributionLoadscanEntities.size() > 0) {
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
@ -480,6 +507,20 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.ne(DistributionLoadscanEntity::getScanStatus, 1)
);
if (distributionLoadscanEntitiesflag.size() > 0) {
// 修改该记录
for (DistributionLoadscanEntity loadscanEntity : distributionLoadscanEntitiesflag) {
if (loadscanEntity.getSignforState() ==2)break;
distributionLoadscanService.update(new UpdateWrapper<DistributionLoadscanEntity>().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getDeliveryId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, distributionLoadscanEntity.getOrderPackageCode())
.set(DistributionLoadscanEntity::getSigningTime,simpleDateFormat.format(new Date()))
.set(DistributionLoadscanEntity::getSignforState,2)
.set(DistributionLoadscanEntity::getReceivedQuantity,1)
);
//更新签收表的签收数量和装车数量
Integer j = distributionSignforMapper.updateSignforByReservationId(loadscanEntity.getDeliveryId(),loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
}
// distributionLoadscanService.update()
continue;
}
//依次插入该装车记录,设置车辆,
@ -506,15 +547,22 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
distributionLoadscanEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString());
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
// Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的签收数量和装车数量
Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
distributionLoadscanService.save(distributionLoadscanEntity);
}
}
if (distributionLoadscanvnEntitiesopen.size() > 0) {
for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntitiesopen) {
//查询是否重复扫码
List<DistributionLoadscaninvnEntity> distributionLoadscanEntitiesflag = distributionLoadscaninvnMapper.selectList(new QueryWrapper<DistributionLoadscaninvnEntity>().lambda()
.eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionLoadscanEntity.getDeliveryId())
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distributionLoadscanEntity.getOrderPackageCode())
.ne(DistributionLoadscaninvnEntity::getScanStatus, 1)
.eq(DistributionLoadscaninvnEntity::getSignforState,2)
);
//依次插入该装车记录,设置车辆
if (null != distributionDeliverySelfEntity.getDriverId()) {
distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
@ -543,16 +591,15 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
}
//查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByinvn(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
// Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的装车数量和签收数量
Integer j = distributionSignforMapper.updatesignforByinvn(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntitiesopen);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
boolean update = this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getDeliveryType, distributionSignfor.getReservationId())
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionSignforEntity::getId, distributionSignforEntity.getId())
.set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures())
.set(StringUtils.isNotBlank(distributionSignfor.getSigningType()), DistributionSignforEntity::getSigningType, distributionSignfor.getSigningType())
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 2)

Loading…
Cancel
Save