Browse Source

Merge branch 'fix_bug_2024-01-22' into dev

# Conflicts:
#	blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataCarrierEntity.java
#	blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
dev-pushdata-important
pref_mail@163.com 1 year ago
parent
commit
de28699e78
  1. 1
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataCarrierEntity.java
  2. 1
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java
  3. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java
  4. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java
  5. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataCodeClient.java
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
  7. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  9. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  11. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  12. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  13. 74
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

1
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataCarrierEntity.java

@ -208,4 +208,5 @@ public class BasicdataCarrierEntity extends TenantEntity {
@ApiModelProperty(value = "预留5") @ApiModelProperty(value = "预留5")
private String reserve5; private String reserve5;
} }

1
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java

@ -319,4 +319,5 @@ public class BasicdataVehicleEntity extends TenantEntity {
@ApiModelProperty(value = "预留5") @ApiModelProperty(value = "预留5")
private String reserve5; private String reserve5;
} }

7
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java

@ -80,4 +80,11 @@ public interface IBasicdataClientClient {
@GetMapping(API_PREFIX+"/findListByClientName") @GetMapping(API_PREFIX+"/findListByClientName")
List<JSONObject> findListByClientName(@RequestParam String clientName); List<JSONObject> findListByClientName(@RequestParam String clientName);
/**
* 根据Id查询客户
* @param mallId
* @return
*/
BasicdataClientEntity getMallById(Long mallId);
} }

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java

@ -114,4 +114,9 @@ public class BasicdataClientClient implements IBasicdataClientClient {
return basicdataClientService.findListByClientName(clientName); return basicdataClientService.findListByClientName(clientName);
} }
@Override
public BasicdataClientEntity getMallById(Long mallId) {
return basicdataClientService.getById(mallId);
}
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataCodeClient.java

@ -1,5 +1,6 @@
package com.logpm.basicdata.feign; package com.logpm.basicdata.feign;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.service.IBasicdataCodeService; import com.logpm.basicdata.service.IBasicdataCodeService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -16,4 +17,5 @@ public class BasicdataCodeClient implements IBasicdataCodeClient {
public String getCodeByType(Integer type,String warehouseCode,String orderCode) { public String getCodeByType(Integer type,String warehouseCode,String orderCode) {
return basicdataCodeService.getCodeByType(type,warehouseCode,orderCode); return basicdataCodeService.getCodeByType(type,warehouseCode,orderCode);
} }
} }

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

@ -256,9 +256,6 @@
</select> </select>
<select id="getLoadCountNum" resultType="int"> <select id="getLoadCountNum" resultType="int">
SELECT SELECT
count( ldl.id ) count( ldl.id )
FROM FROM
@ -269,7 +266,6 @@
AND ldl.delivery_id = #{deliveryId} AND ldl.delivery_id = #{deliveryId}
AND ldl.scan_status != '1' AND ldl.scan_status != '1'
AND ldl.is_abnormal_loading = 1 AND ldl.is_abnormal_loading = 1
</select> </select>
<select id="selectLoadingNumByReservationId" resultType="java.lang.Integer"> <select id="selectLoadingNumByReservationId" resultType="java.lang.Integer">
SELECT (IF((SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2) is null,0,(SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2))) SELECT (IF((SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2) is null,0,(SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2)))

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

@ -335,10 +335,12 @@
LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id
WHERE WHERE
ldrs.reservation_id = #{reservationId} ldrs.reservation_id = #{reservationId}
AND ldsl.mall_name = #{mallName}
group by ldsl.cargo_number group by ldsl.cargo_number
) t ) t
LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number
LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = t.id where ldslNew.is_deleted = 0 LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = t.id
where ldslNew.is_deleted = 0
<!-- SELECT--> <!-- SELECT-->
<!-- ldsl.sku AS sku,--> <!-- ldsl.sku AS sku,-->

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

@ -349,7 +349,7 @@
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
<where> <where>
lds.is_deleted = 0 and ldr.is_deleted = 0 and lddl.is_deleted = 0 lds.is_deleted = 0 and ldr.is_deleted = 0 and lddl.is_deleted = 0 AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0
<if test="param.mallName != null and param.mallName!=''"> <if test="param.mallName != null and param.mallName!=''">
and ldr.mall_name like concat('%',#{param.mallName},'%') and ldr.mall_name like concat('%',#{param.mallName},'%')
</if> </if>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml

@ -123,6 +123,7 @@
CASE CASE
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) = 0 THEN 20 WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) = 0 THEN 20
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) > 0 THEN 10 WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) > 0 THEN 10
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) &lt; 0 THEN 30
END AS conditions, END AS conditions,
(select GROUP_CONCAT(DISTINCT ldpl.material_name ) (select GROUP_CONCAT(DISTINCT ldpl.material_name )
from logpm_distribution_parcel_list ldpl from logpm_distribution_parcel_list ldpl

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

@ -173,7 +173,7 @@ public interface IDistributionReservationService extends BaseService<Distributio
List<DistributionStockupOrderListVO> selectStockupOrderList(Long reservationId,String isZero); List<DistributionStockupOrderListVO> selectStockupOrderList(Long reservationId,String isZero);
List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId); List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId,String mallName);
Integer selectOrderNumByReservationId(Long reservationId); Integer selectOrderNumByReservationId(Long reservationId);

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

@ -2863,8 +2863,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} }
@Override @Override
public List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId) { public List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId,String mallName) {
return baseMapper.selectStockupStockListNew(reservationId,warehouseId); return baseMapper.selectStockupStockListNew(reservationId,warehouseId,mallName);
} }
@Override @Override

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

@ -218,10 +218,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer abnormalLoading = distributionLoadscanMapper.selectAbnormalLoadingByReservationId(d.getReservationId()); Integer abnormalLoading = distributionLoadscanMapper.selectAbnormalLoadingByReservationId(d.getReservationId());
//该客户的异常签收件数 //该客户的异常签收件数
Integer abnormalSigning = distributionLoadscanMapper.selectAbnormalSigningByReservationId(d.getReservationId()); Integer abnormalSigning = distributionLoadscanMapper.selectAbnormalSigningByReservationId(d.getReservationId());
// DistributionLoadingNumDTO reservationSigningNum = distributionReservationMapper.selectReservationSigningNum(d.getReservationId()); // DistributionLoadingNumDTO reservationSigningNum = distributionReservationMapper.selectReservationSigningNum(d.getReservationId());
if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())){ if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())){
List<DisStockListDetailEntity> disStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservation(d.getReservationId()); List<DisStockListDetailEntity> disStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservation(d.getReservationId());
if (Func.isNotEmpty(disStockListDetailEntities)){ if (Func.isNotEmpty(disStockListDetailEntities)){

74
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -26,7 +26,9 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataCodeClient; import com.logpm.basicdata.feign.IBasicdataCodeClient;
import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient; import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
@ -201,6 +203,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Autowired @Autowired
private DistributionStockListInfoMapper distributionStockListInfoMapper; private DistributionStockListInfoMapper distributionStockListInfoMapper;
@Autowired
private IBasicdataClientClient basicdataClientClient;
@Override @Override
public IPage<DistributionStockupVO> selectDistributionStockupPage(IPage<DistributionStockupVO> page, DistributionStockupVO distributionStockup) { public IPage<DistributionStockupVO> selectDistributionStockupPage(IPage<DistributionStockupVO> page, DistributionStockupVO distributionStockup) {
@ -1135,10 +1140,28 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override @Override
public List<DistributionStockupStockListVO> selectStockupStockList(StockupDTO stockupDTO) { public List<DistributionStockupStockListVO> selectStockupStockList(StockupDTO stockupDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
log.error("###########myCurrentWarehouse:{}",myCurrentWarehouse);
return null;
}
Long reservationId = stockupDTO.getReservationId();//预约单id Long reservationId = stockupDTO.getReservationId();//预约单id
DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId); DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId);
if (Func.isEmpty(reservationEntity)){
log.error("###########查询预约失败reservationId:{}",reservationId);
return null;
}
String mallName = reservationEntity.getMallName();
if (Func.isBlank(mallName)){
//预约商场名称为空 查看是否存在商场ID
if (Func.isNotEmpty(reservationEntity.getMallId())){
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.getMallById(reservationEntity.getMallId());
mallName = basicdataClientEntity.getClientName();
}else {
log.error("###########预约单无商场信息:{}",reservationId);
}
}
if (stockupDTO.getTypeService().equals("3")) { if (stockupDTO.getTypeService().equals("3")) {
//自 //自
@ -1167,30 +1190,29 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
} else { } else {
//商,市 //商,市
List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId,reservationEntity.getWarehouseId()); List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId,myCurrentWarehouse.getId(),mallName);
for (int i = 0; i < list.size(); i++) { for (DistributionStockupStockListVO distributionStockupStockListVO : list) {
DistributionStockupStockListVO distributionStockupStockListVO = list.get(i); if (distributionStockupStockListVO.getPlanNum().equals(distributionStockupStockListVO.getRealNum())) {
if (distributionStockupStockListVO.getPlanNum().equals(distributionStockupStockListVO.getRealNum())) { distributionStockupStockListVO.setCompleteStact(true);
distributionStockupStockListVO.setCompleteStact(true); }
} if (Func.isNotEmpty(distributionStockupStockListVO.getAllocations())) {
if (Func.isNotEmpty(distributionStockupStockListVO.getAllocations())){
String[] ids = distributionStockupStockListVO.getAllocations().split(",");
String[] ids = distributionStockupStockListVO.getAllocations().split(","); List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids);
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids);
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) {
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { if (distributionStockupStockListVO.getAllocationList() == null) {
if (distributionStockupStockListVO.getAllocationList() == null) { distributionStockupStockListVO.setAllocationList(new ArrayList<>());
distributionStockupStockListVO.setAllocationList(new ArrayList<>()); }
} Map<String, Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>(); map.put("id", allocationInforById.getId());
map.put("id", allocationInforById.getId()); map.put("name", allocationInforById.getQrCode());
map.put("name", allocationInforById.getQrCode()); distributionStockupStockListVO.getAllocationList().add(map);
distributionStockupStockListVO.getAllocationList().add(map); }
} }
}
}
}
return list; return list;
} }

Loading…
Cancel
Save