Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 9 months ago
parent
commit
acc96f1aa0
  1. 14
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/dto/SignPushDataContactDTO.java
  2. 5
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/dto/SignPushDataDTO.java
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  4. 32
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionSignforClient.java
  5. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  7. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  8. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  9. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushBillDataQueueHandler.java
  10. 33
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushDataQueueHandler.java
  11. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  12. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.xml

14
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/dto/SignPushDataContactDTO.java

@ -28,6 +28,20 @@ public class SignPushDataContactDTO {
* 配送id * 配送id
*/ */
private Long distributionId; private Long distributionId;
/**
* 签收人ID
*/
private Long signUserId;
/**
* 签收人名称
*/
private String signUserName;
/**
* 签收人名称
*/
private String signUserPhone;
/** /**
* 计划装车数 * 计划装车数
*/ */

5
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/dto/SignPushDataDTO.java

@ -125,6 +125,11 @@ public class SignPushDataDTO {
*/ */
private String kind; private String kind;
/**
* 操作人
*/
private String deliveryType;
/** /**
* 复核时间 * 复核时间
*/ */

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -315,10 +315,6 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList") @ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList")
public R exportDistributionDeliveryList(@ApiIgnore @RequestParam Map<String, Object> distributionDeliveryList, BladeUser bladeUser, HttpServletResponse response) { public R exportDistributionDeliveryList(@ApiIgnore @RequestParam Map<String, Object> distributionDeliveryList, BladeUser bladeUser, HttpServletResponse response) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
return R.fail(403,"未授权仓库!!!");
}
List<DistributionDeliveryListExcel> list = distributionDeliveryListService.exportDistributionDeliveryList(distributionDeliveryList); List<DistributionDeliveryListExcel> list = distributionDeliveryListService.exportDistributionDeliveryList(distributionDeliveryList);
ExcelUtil.export(response, "配送管理数据" + DateUtil.time(), "配送管理数据表", list, DistributionDeliveryListExcel.class); ExcelUtil.export(response, "配送管理数据" + DateUtil.time(), "配送管理数据表", list, DistributionDeliveryListExcel.class);
return R.status(true); return R.status(true);

32
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionSignforClient.java

@ -232,7 +232,7 @@ public class DistributionSignforClient implements IDistributionSignforClient {
signPushDataContactDTO.setContact(distributionSignforEntity.getClerkSignRemarks()); signPushDataContactDTO.setContact(distributionSignforEntity.getClerkSignRemarks());
} }
} }
buildReservationNameAndPhone(customer);
//完成客户信息添加 //完成客户信息添加
delivery.setSignPushDataContactDTOs(customer); delivery.setSignPushDataContactDTOs(customer);
} }
@ -277,4 +277,34 @@ public class DistributionSignforClient implements IDistributionSignforClient {
} }
} }
private void buildReservationNameAndPhone(List<SignPushDataContactDTO> customers) {
for (SignPushDataContactDTO signPushDataUnitDTO : customers) {
User user = bladeRedis.get(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getSignUserId());
log.info("buildNameAndPhone >>> 获取缓存的中的用户信息{}",user);
if (user == null) {
R<User> userT = userClient.userInfoById(signPushDataUnitDTO.getSignUserId());
if (userT.isSuccess()) {
user = userT.getData();
bladeRedis.setEx(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getSignUserId(), user, 3600L);
}
}
if (ObjectUtils.isNotNull(user)) {
assert user != null;
signPushDataUnitDTO.setSignUserName(user.getName());
if (ObjectUtils.isNotEmpty(user.getPhone())){
signPushDataUnitDTO.setSignUserPhone(user.getPhone());
}else {
if (ObjectUtils.isNotEmpty(user.getAccount())){
signPushDataUnitDTO.setSignUserPhone(user.getAccount());
}else {
log.info("用户无电话号码且账号信息为空>>用户名称:{}",user.getName());
}
}
}
}
}
} }

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

@ -408,6 +408,15 @@
<if test=" params.deliveryStatus != '' and params.deliveryStatus != null"> <if test=" params.deliveryStatus != '' and params.deliveryStatus != null">
AND lddl.delivery_status =#{params.deliveryStatus} AND lddl.delivery_status =#{params.deliveryStatus}
</if> </if>
<if test=" params.warehouseId != '' and params.warehouseId != null">
AND lddl.warehouse_id =#{params.warehouseId}
</if>
<if test=" params.warehouseIds != null ">
AND lddl.warehouse_id IN
<foreach collection="params.warehouseIds" item="warehouseId" open="(" close=")" separator=",">
#{warehouseId}
</foreach>
</if>
</where> </where>
GROUP BY GROUP BY
lddl.id lddl.id
@ -1906,7 +1915,7 @@
lddl.warehouse_id AS warehouseId, lddl.warehouse_id AS warehouseId,
lddl.warehouse_name AS warehouseName, lddl.warehouse_name AS warehouseName,
lds.signing_time AS reviewTime, lds.signing_time AS reviewTime,
CASE lddl.type CASE lddl.type,
WHEN 1 THEN 2 WHEN 1 THEN 2
WHEN 2 THEN 1 WHEN 2 THEN 1
END type, END type,

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

@ -1368,7 +1368,9 @@
(lds.received_quantity + lds.receivedin_quantity) AS sign, (lds.received_quantity + lds.receivedin_quantity) AS sign,
lds.signing_status AS state, lds.signing_status AS state,
lds.create_time AS createTime, lds.create_time AS createTime,
lds.update_time AS updateTime lds.update_time AS updateTime,
lds.signee_id AS signUserId,
lds.signee_name AS signUserName
FROM FROM
logpm_distribution_signfor AS lds logpm_distribution_signfor AS lds
LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id AND ldr.is_deleted = 0 LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id AND ldr.is_deleted = 0

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

@ -1175,7 +1175,7 @@
lddl.train_number AS transNo, lddl.train_number AS transNo,
ldpl.waybill_number AS waybillNo, ldpl.waybill_number AS waybillNo,
ldpl.order_code AS orderSelfNum, ldpl.order_code AS orderSelfNum,
ldpl.order_package_code AS unitNo, IFNULL(ldpl.order_package_code ,'')AS unitNo,
ldpl.quantity AS num, ldpl.quantity AS num,
ldl.signfor_state AS type, ldl.signfor_state AS type,
ldl.scan_time AS operateTime, ldl.scan_time AS operateTime,
@ -1206,7 +1206,7 @@
lddl.train_number AS transNo, lddl.train_number AS transNo,
ldpl.waybill_number AS waybillNo, ldpl.waybill_number AS waybillNo,
ldpl.order_code AS orderSelfNum, ldpl.order_code AS orderSelfNum,
ldpl.order_package_code AS unitNo, IFNULL(ldpl.order_package_code ,'')AS unitNo,
ldpl.quantity AS num, ldpl.quantity AS num,
ldl.signfor_state AS type, ldl.signfor_state AS type,
ldl.signing_time AS operateTime, ldl.signing_time AS operateTime,
@ -1238,7 +1238,7 @@
lddl.train_number AS trans_no, lddl.train_number AS trans_no,
ldsl.incoming_batch AS waybill_no, ldsl.incoming_batch AS waybill_no,
ldsl.incoming_batch AS orderSelfNum, ldsl.incoming_batch AS orderSelfNum,
ldsld.stock_package_code AS unitNo, IFNULL(ldpl.order_package_code ,'')AS unitNo,
ldl.signfor_state AS type, ldl.signfor_state AS type,
ldl.create_time AS operateTime, ldl.create_time AS operateTime,
ldl.create_user AS administratorsId, ldl.create_user AS administratorsId,
@ -1273,7 +1273,7 @@
lddl.train_number AS trans_no, lddl.train_number AS trans_no,
ldsl.incoming_batch AS waybill_no, ldsl.incoming_batch AS waybill_no,
lddl.order_code AS orderSelfNum, lddl.order_code AS orderSelfNum,
ldsld.stock_package_code AS unitNo, IFNULL(ldpl.order_package_code ,'')AS unitNo,
ldl.signfor_state AS type, ldl.signfor_state AS type,
ldl.signing_time AS operateTime, ldl.signing_time AS operateTime,
ldl.signing_user_id AS administratorsId, ldl.signing_user_id AS administratorsId,

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

@ -621,6 +621,7 @@
lww.warehouse_address AS address, lww.warehouse_address AS address,
1 AS state, 1 AS state,
ldbl.create_time AS createTime, ldbl.create_time AS createTime,
ldbl.update_user AS signUserId,
ldbl.update_time AS updateTime, ldbl.update_time AS updateTime,
ldbl.remark AS content, ldbl.remark AS content,
ldbl.consignee AS contact, ldbl.consignee AS contact,
@ -649,7 +650,7 @@
IFNULL(SUM(ldbls.quantity),0) AS actual_plan, IFNULL(SUM(ldbls.quantity),0) AS actual_plan,
IFNULL(SUM(ldbls.quantity),0) AS delivery, IFNULL(SUM(ldbls.quantity),0) AS delivery,
IFNULL(SUM(ldbls.quantity),0) AS sign, IFNULL(SUM(ldbls.quantity),0) AS sign,
(SELECT GROUP_CONCAT(site) FROM logpm_distribution_print WHERE bill_lading_id = ldbl.id GROUP BY bill_lading_id) (SELECT GROUP_CONCAT(site) FROM logpm_distribution_print WHERE bill_lading_id = ldbl.id GROUP BY bill_lading_id),
FROM FROM
logpm_distrilbution_bill_lading AS ldbl logpm_distrilbution_bill_lading AS ldbl
LEFT JOIN logpm_distribution_bill_lading_scan AS ldbls ON ldbls.bill_lading_id = ldbl.id AND ldbls.is_deleted = 0 LEFT JOIN logpm_distribution_bill_lading_scan AS ldbls ON ldbls.bill_lading_id = ldbl.id AND ldbls.is_deleted = 0
@ -666,7 +667,7 @@
ldbl.pickup_batch AS transNo, ldbl.pickup_batch AS transNo,
ldsa.waybill_number AS waybillNo, ldsa.waybill_number AS waybillNo,
ldsa.order_code AS orderSelfNum, ldsa.order_code AS orderSelfNum,
ldbls.packet_bar_code AS unitNo, IFNULL(ldbls.packet_bar_code,'') AS unitNo,
2 AS type, 2 AS type,
1 AS isLoading, 1 AS isLoading,
1 AS is_out, 1 AS is_out,

35
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushBillDataQueueHandler.java

@ -149,7 +149,7 @@ public class ClerkCheckPushBillDataQueueHandler {
buildNameAndPhone(pushOldPackageSigning); buildNameAndPhone(pushOldPackageSigning);
signPushDataUnitDTOS.addAll(pushOldPackageSigning); signPushDataUnitDTOS.addAll(pushOldPackageSigning);
} }
buildClientNameAndPhone(customer);
//完成客户信息添加 //完成客户信息添加
delivery.setSignPushDataContactDTOs(customer); delivery.setSignPushDataContactDTOs(customer);
} }
@ -196,4 +196,37 @@ public class ClerkCheckPushBillDataQueueHandler {
} }
} }
/**
* 构建名称和电话号码
*
* @param customer
*/
private void buildClientNameAndPhone(List<SignPushDataContactDTO> customer) {
for (SignPushDataContactDTO signPushDataUnitDTO : customer) {
User user = bladeRedis.get(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getSignUserId());
log.info("buildNameAndPhone >>> 获取缓存的中的用户信息{}",user);
if (user == null) {
R<User> userT = userClient.userInfoById(signPushDataUnitDTO.getSignUserId());
if (userT.isSuccess()) {
user = userT.getData();
bladeRedis.setEx(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getSignUserId(), user, 3600L);
}
}
if (ObjectUtils.isNotNull(user)) {
assert user != null;
signPushDataUnitDTO.setSignUserName(user.getName());
if (ObjectUtils.isNotEmpty(user.getPhone())){
signPushDataUnitDTO.setSignUserPhone(user.getPhone());
}else {
if (ObjectUtils.isNotEmpty(user.getAccount())){
signPushDataUnitDTO.setSignUserPhone(user.getAccount());
}else {
log.info("用户无电话号码且账号信息为空>>用户名称:{}",user.getName());
}
}
}
}
}
} }

33
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushDataQueueHandler.java

@ -215,7 +215,9 @@ public class ClerkCheckPushDataQueueHandler {
} }
//完成客户信息添加 //完成客户信息添加
buildReservationNameAndPhone(customer);
delivery.setSignPushDataContactDTOs(customer); delivery.setSignPushDataContactDTOs(customer);
} }
} }
@ -259,6 +261,37 @@ public class ClerkCheckPushDataQueueHandler {
} }
} }
}
} /**
* 构建名称和电话号码
*
* @param customers
*/
private void buildReservationNameAndPhone(List<SignPushDataContactDTO> customers) {
for (SignPushDataContactDTO signPushDataUnitDTO : customers) {
User user = bladeRedis.get(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getSignUserId());
log.info("buildNameAndPhone >>> 获取缓存的中的用户信息{}",user);
if (user == null) {
R<User> userT = userClient.userInfoById(signPushDataUnitDTO.getSignUserId());
if (userT.isSuccess()) {
user = userT.getData();
bladeRedis.setEx(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getSignUserId(), user, 3600L);
}
}
if (ObjectUtils.isNotNull(user)) {
assert user != null;
signPushDataUnitDTO.setSignUserName(user.getName());
if (ObjectUtils.isNotEmpty(user.getPhone())){
signPushDataUnitDTO.setSignUserPhone(user.getPhone());
}else {
if (ObjectUtils.isNotEmpty(user.getAccount())){
signPushDataUnitDTO.setSignUserPhone(user.getAccount());
}else {
log.info("用户无电话号码且账号信息为空>>用户名称:{}",user.getName());
}
}
}
} }
} }
} }

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

@ -266,7 +266,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<Long> deliveryId = Func.toLongList((String) distributionDeliveryList.get("ids")); List<Long> deliveryId = Func.toLongList((String) distributionDeliveryList.get("ids"));
distributionDeliveryList.put("ids",deliveryId); distributionDeliveryList.put("ids",deliveryId);
} }
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
//未选择仓库查看当前登录人可以进行操作的仓库
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()){
List<Long> ids = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
distributionDeliveryList.put("warehouseIds",ids);
}
}else {
distributionDeliveryList.put("warehouseId",myCurrentWarehouse.getId());
}
List<DistributionDeliveryListExcel> list = new ArrayList<>(); List<DistributionDeliveryListExcel> list = new ArrayList<>();

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.xml

@ -36,6 +36,7 @@
left join logpm_warehouse_waybill lww on lww.id = ltwt.waybill_id left join logpm_warehouse_waybill lww on lww.id = ltwt.waybill_id
where 1=1 where 1=1
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0"> <if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
and ltwt.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>

Loading…
Cancel
Save