Browse Source

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

dist.1.3.0
zhaoqiaobo 9 months ago
parent
commit
989a3dabe2
  1. 13
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java
  2. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  3. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  4. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  5. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  6. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  7. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

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

@ -224,6 +224,12 @@ public class DistributionSignforStockArticleVO implements Serializable {
@ApiModelProperty(value = "创建人")
private String createUserName;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建人")
private String reservationIds;
/**
* 创建时间
@ -232,6 +238,13 @@ public class DistributionSignforStockArticleVO implements Serializable {
private Date signinTime;
/**
* 创建时间
*/
@ApiModelProperty(value = "签收时间")
private List<Map<String,Object>> info;

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

@ -33,6 +33,7 @@ import org.apache.ibatis.annotations.Param;
import org.springblade.core.secure.BladeUser;
import java.util.List;
import java.util.Map;
/**
* 签收管理 Mapper 接口
@ -331,4 +332,11 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
List<DistributionReservationEntity> selectReservationByDeliveryId(@Param("deliveryId") Long deliveryId);
DistributionSignforEntity selectByReservationId(@Param("reservationId") Long reservationId);
/**
* 已签收订单查询签收信息
* @param longList
* @return
*/
List<Map<String, Object>> getByReservationIds(@Param("reservationIds") List<Long> longList);
}

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

@ -1329,4 +1329,19 @@
<select id="selectByReservationId" resultType="com.logpm.distribution.entity.DistributionSignforEntity">
SELECT * FROM logpm_distribution_signfor WHERE reservation_id = #{reservationId}
</select>
<select id="getByReservationIds" resultType="java.util.Map">
SELECT
ldr.reservation_code AS reservationCode,
lds.reservation_id AS reservationId,
lds.id AS id
FROM
logpm_distribution_reservation AS ldr
LEFT JOIN logpm_distribution_signfor AS lds ON ldr.id = lds.reservation_id
WHERE
reservation_id IN
<foreach collection="reservationIds" item="reservationId" index="index" open="(" close=")" separator=",">
#{reservationId}
</foreach>
</select>
</mapper>

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

@ -1163,8 +1163,8 @@
IFNULL(( SELECT SUM( loaded_nub ) FROM logpm_distribution_loadscan WHERE order_id = ldsa.id AND scan_status != 1 ), 0 ) AS deliveryNumber,
IFNULL(( SELECT SUM( received_quantity ) FROM logpm_distribution_loadscan WHERE order_id = ldsa.id AND scan_status != 1 ), 0 ) AS signForNumber,
IFNULL(( SELECT SUM( stock_quantity ) FROM logpm_distribution_stock WHERE stock_article = ldsa.id ), 0 ) AS stockUpNumber,
IFNULL(( SELECT SUM( reservation_num ) FROM logpm_distribution_reservation_stockarticle WHERE stock_article_id = ldsa.id ), 0 ) AS reservationNumber,
CONCAT(GROUP_CONCAT(DISTINCT IFNULL(t.msg,'')),GROUP_CONCAT(DISTINCT IFNULL(y.msg,''))) AS reservationInfo,
IFNULL(( SELECT SUM( reservation_num ) FROM logpm_distribution_reservation_stockarticle WHERE stock_article_id = ldsa.id AND stock_article_status!= 2), 0 ) AS reservationNumber,
IF(GROUP_CONCAT(t.msg) is not null,GROUP_CONCAT(t.msg),IFNULL(GROUP_CONCAT(y.msg),null)) AS reservationInfo,
GROUP_CONCAT(DISTINCT IFNULL( m.mssg,'')) AS deliveryListInfo,
ldsa.create_time As createTime,
ldsa.create_user As createUser,
@ -1173,6 +1173,7 @@
GROUP_CONCAT(DISTINCT IFNULL( m.vehicleName,'')) AS vehicleName,
GROUP_CONCAT(DISTINCT IFNULL( m.examine_user_name,'')) AS examineUserNames,
k.earliestWarehouseEntryTime AS earliestWarehouseEntryTime,
GROUP_CONCAT(t.reservation_id) AS reservationIds,
j.scanSigningTime AS scanSigningTime
FROM
logpm_distribution_stock_article AS ldsa
@ -1183,7 +1184,10 @@
CONCAT( ldr.reservation_code, '(', ldrs.reservation_num, ')' ) AS msg
FROM
logpm_distribution_reservation_stockarticle AS ldrs
LEFT JOIN logpm_distribution_reservation ldr ON ldrs.reservation_id = ldr.id AND ldrs.stock_article_status != 2 AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0
LEFT JOIN logpm_distribution_reservation ldr ON ldrs.reservation_id = ldr.id
AND ldrs.stock_article_status != 2
AND ldr.reservation_status != 40
AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0
) AS t ON ldsa.id = t.stock_article_id
LEFT JOIN (
SELECT

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

@ -329,4 +329,10 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
*/
R cancelZeroPackage(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO);
/**
* 已签收订单查询预约信息
* @param longList
* @return
*/
List<Map<String, Object>> getByReservationIds(List<Long> longList);
}

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

@ -126,6 +126,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Autowired
private IDistributionParcelListService distributionParcelListService;
@Autowired
@Lazy
private IDistributionStockArticleService distributionStockArticleService;
@Autowired
private DistributionLoadscanMapper distributionLoadscanMapper;
@ -1482,6 +1483,15 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.success("操作成功");
}
/**
* @param longList
* @return
*/
@Override
public List<Map<String, Object>> getByReservationIds(List<Long> longList) {
return baseMapper.getByReservationIds(longList);
}
private List<DeliveryNodeVo> handleStockUp(DistributionStockupEntity distributionStockupEntity) {
List<DeliveryNodeVo> nodeVos = new ArrayList<>();
try {

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

@ -141,6 +141,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
private final IDistributionLoadscanService distributionLoadscanService;
private final IDistributionOrderCustomerLogService distributionOrderCustomerLogService;
private final IBasicdataClientClient basicdataClientClient;
private final DistributionSignforMapper distributionSignforMapper;
@Override
public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) {
@ -2025,6 +2026,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
R<User> userR = userClient.userInfoById(a.getCreateUser());
a.setCreateUserName(userR.getData().getName());
}
if (!Func.isEmpty(a.getReservationIds())){
//构建签收信息
List<Map<String,Object>> mapList = distributionSignforMapper.getByReservationIds(Func.toLongList(a.getReservationIds()));
if (!mapList.isEmpty()){
a.setInfo(mapList);
}
}
});
return distributionStockArticleEntityIPage;

Loading…
Cancel
Save