Browse Source

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

single_db
caoyizhong 1 year ago
parent
commit
343e84c81e
  1. 6
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayGoodsClient.java
  2. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java
  3. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java
  4. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  5. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  7. 70
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java
  8. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayGoodsClient.java
  9. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java
  10. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java
  11. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

6
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayGoodsClient.java

@ -95,4 +95,10 @@ public interface IWarehouseTrayGoodsClient {
*/
@GetMapping(GETTRAYLIST+"/getTrayInfoByInventory")
String getTrayInfoByInventory(@RequestParam Long marketId,@RequestParam String cargoNumber);
@GetMapping(API_PREFIX+"/findTrayCodeByOrderPackageCode")
WarehouseTrayGoodsEntity findTrayCodeByOrderPackageCode(@RequestParam String unitNo);
@GetMapping(API_PREFIX+"/delTrayGoodsById")
void delTrayGoodsById(@RequestParam Long trayGoodsId, @RequestParam Long warehouseId);
}

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java

@ -20,6 +20,7 @@ package com.logpm.warehouse.feign;
import com.alibaba.fastjson.JSONObject;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -57,6 +58,9 @@ public interface IWarehouseTrayTypeClient {
@PostMapping(API_PREFIX+"/orderScanOrderPackageCode")
boolean orderScanOrderPackageCode(@RequestBody Map<String, Object> map);
@PostMapping(API_PREFIX+"/orderScanOrderPackageCode")
R orderScanOrderPackageCodeReturnR(@RequestBody Map<String, Object> map);
@PostMapping(API_PREFIX+"/enterZeroOrderByTrayCode")
boolean enterZeroOrderByTrayCode(@RequestBody Map<String, Object> map);

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java

@ -101,6 +101,8 @@ public interface IWarehouseUpdownGoodsClient {
* @return
*/
@GetMapping(LOCATIONSTOCKLISTINFORMATION+"/getAllocationNameByInventory")
String getAllocationNameByInventory(@RequestParam Long marketId,@RequestParam String cargoNumber);
@GetMapping(API_PREFIX+"/findEntityByOrderPackageCode")
WarehouseUpdownGoodsEntity findEntityByOrderPackageCode(@RequestParam String unitNo);
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java

@ -14,6 +14,11 @@ public class StockupDTO implements Serializable {
private Integer status;//0未完成 1已完成
/**
* 客户名城
*/
private String customName;
@ApiModelProperty("当前页")
private Integer current;
@ApiModelProperty("每页的数量")

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

@ -398,16 +398,9 @@
</select>
<select id="selectHomeStockupPage" resultType="com.logpm.distribution.vo.DistributionStockupListVO">
select t.* from (
select DISTINCT lds.id , lds.type_service typeService,lds.stockup_status stockupStatus,lds.stockup_area
stockupArea,
<!--(
select GROUP_CONCAT(DISTINCT IFNULL(ldsa.consignee_person,'') SEPARATOR ',')
from logpm_distribution_stockup ds
LEFT JOIN logpm_distribution_stockup_info ldsi on ds.id = ldsi.stockup_id
LEFT JOIN logpm_distribution_reservation_stockarticle ldrs on ldrs.reservation_id = ldsi.reservation_id and ldrs.stock_article_status in (1,3)
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldrs.stock_article_id
where ds.id = lds.id
) customer,-->
(
select GROUP_CONCAT(DISTINCT IFNULL(ldr.consignee,'') SEPARATOR ',')
from logpm_distribution_stockup ds
@ -474,6 +467,7 @@
and lds.forklift_id = #{param.userId}
</where>
UNION
select DISTINCT lds.id ,lds.type_service typeService,lds.stockup_status stockupStatus,lds.stockup_area
stockupArea,
(
@ -525,6 +519,12 @@
and lds.assign_status = 20
and lds.forklift_id = #{param.userId}
</where>
) t
<where>
<if test="param.customName !=null and param.customName !=''">
t.customer like concat('%', #{param.customName},'%')
</if>
</where>
</select>
<select id="selectStockupClientInfo" resultType="com.logpm.distribution.vo.DistributionStockupListVO">
select DISTINCT ldr.consignee customer,

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

@ -1204,11 +1204,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
map.put("name", allocationInforById.getQrCode());
distributionStockupStockListVO.getAllocationList().add(map);
}
}else {
log.info("##################库存品信息:{}",list);
return null;
}
// 查询货位信息
}

70
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java

@ -18,9 +18,9 @@ import com.logpm.oldproject.feign.IAdvanceClient;
import com.logpm.oldproject.feign.ITrayClient;
import com.logpm.oldproject.feign.ITrayScanClient;
import com.logpm.oldproject.feign.ITrayScanDesClient;
import com.logpm.warehouse.feign.IWarehouseTaryAllocationClient;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.feign.*;
import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RabbitConstant;
@ -77,6 +77,10 @@ public class OrderStatusHandler {
private ITrayScanDesClient trayScanDesClient;
@Autowired
private ITrayScanClient trayScanClient;
@Autowired
private IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
@Autowired
private IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
@RabbitHandler
@ -218,16 +222,70 @@ public class OrderStatusHandler {
m.put("warehouseId",warehouseId);
m.put("orderPackageCode",unitNo);
boolean b = warehouseTrayTypeClient.orderScanOrderPackageCode(m);
if(!b){
log.warn("####################orderStatusHandler: 打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
R response = warehouseTrayTypeClient.orderScanOrderPackageCodeReturnR(m);
int code = response.getCode();
if(code == 4001){
log.info("####################orderStatusHandler: 包件已在当前托盘打托 unitNo={} trayCode={}",unitNo,"T"+trayId);
}else if(code == 4002){
log.info("####################orderStatusHandler: 包件已在其他托盘打托 unitNo={} ",unitNo);
WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsClient.findTrayCodeByOrderPackageCode(unitNo);
if(Objects.isNull(trayGoodsEntity)){
log.warn("####################orderStatusHandler: 包件未打托 unitNo={}",unitNo);
}else{
String oldTrayCode = trayGoodsEntity.getTrayCode();
Long trayGoodsId = trayGoodsEntity.getId();
Long wid = trayGoodsEntity.getWarehouseId();
BasicdataTrayEntity oldTrayEntity = basicdataTrayClient.getTrayByTrayCode(oldTrayCode);
Long oldTrayId = oldTrayEntity.getId();
//判断托盘是否有上架
Long oldAllocationId = taryAllocationClient.findAllocationByTrayId(oldTrayId);
if (Objects.isNull(oldAllocationId)){
//没有上架
//直接解绑托盘
warehouseTrayGoodsClient.delTrayGoodsById(trayGoodsId,wid);
}else{
//有上架
//下架
updownTypeClient.downPackage(unitNo,wid);
}
}
boolean b1 = warehouseTrayTypeClient.orderScanOrderPackageCode(m);
if(!b1){
log.warn("####################orderStatusHandler: 二次打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
}else{
log.info("####################orderStatusHandler: 二次打托成功 unitNo={} trayCode={}",unitNo,"T"+trayId);
}
}else if(code == 4003){
log.info("####################orderStatusHandler: 包件未打托已上架 unitNo={} ",unitNo);
WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsClient.findEntityByOrderPackageCode(unitNo);
if(Objects.isNull(updownGoodsEntity)){
log.warn("####################orderStatusHandler: 包件未上架 unitNo={}",unitNo);
}else{
Long wid = updownGoodsEntity.getWarehouseId();
updownTypeClient.downPackage(unitNo,wid);
}
boolean b1 = warehouseTrayTypeClient.orderScanOrderPackageCode(m);
if(!b1){
log.warn("####################orderStatusHandler: 二次打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
}else{
log.info("####################orderStatusHandler: 二次打托成功 unitNo={} trayCode={}",unitNo,"T"+trayId);
}
}else if(code == 4004){
log.info("####################orderStatusHandler: 包件打托方式不正确 unitNo={} ",unitNo);
//先去空置托盘再打托
warehouseTrayTypeClient.trayToNull("T"+trayId);
boolean b1 = warehouseTrayTypeClient.orderScanOrderPackageCode(m);
if(!b1){
log.warn("####################orderStatusHandler: 二次打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
}
}else{
String msg1 = r.getMsg();
int code1 = r.getCode();
log.warn("######################orderStatusHandler: 打托失败 msg={} code={}",msg1,code1);
log.warn("######################orderStatusHandler: 打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
}
}else{
//有上架就上架
updownTypeClient.upShelfPackage(unitNo,allocationId,warehouseId);

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayGoodsClient.java

@ -89,4 +89,18 @@ public class WarehouseTrayGoodsClient implements IWarehouseTrayGoodsClient {
public String getTrayInfoByInventory(Long marketId, String cargoNumber) {
return warehouseTrayGoodsService.getTrayInfoByInventory(marketId,cargoNumber);
}
@Override
public WarehouseTrayGoodsEntity findTrayCodeByOrderPackageCode(String unitNo) {
QueryWrapper<WarehouseTrayGoodsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("association_value",unitNo);
WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsService.getOne(queryWrapper);
return trayGoodsEntity;
}
@Override
public void delTrayGoodsById(Long trayGoodsId,Long warehouseId) {
warehouseTrayGoodsService.deleteByTrayGoodsId(trayGoodsId,warehouseId);
}
}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java

@ -51,6 +51,17 @@ public class WarehouseTrayTypeClient implements IWarehouseTrayTypeClient {
}
}
@Override
public R orderScanOrderPackageCodeReturnR(Map<String, Object> map) {
String trayType = (String) map.get("trayType");
String trayCode = (String) map.get("trayCode");
Long warehouseId = (Long) map.get("warehouseId");
String orderPackageCode = (String) map.get("orderPackageCode");
return warehouseTrayTypeService.orderScanOrderPackageCodeSync(trayType, trayCode, orderPackageCode, warehouseId);
}
@Override
public boolean enterZeroOrderByTrayCode(Map<String, Object> map) {
String trayType = (String) map.get("trayType");

9
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java

@ -1,6 +1,7 @@
package com.logpm.warehouse.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
@ -101,4 +102,12 @@ public class WarehouseUpdownGoodsClient implements IWarehouseUpdownGoodsClient {
public String getAllocationNameByInventory(Long marketId, String cargoNumber) {
return warehouseUpdownGoodsService.getAllocationNameByInventory(marketId, cargoNumber);
}
@Override
public WarehouseUpdownGoodsEntity findEntityByOrderPackageCode(String unitNo) {
QueryWrapper<WarehouseUpdownGoodsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("association_value",unitNo);
return warehouseUpdownGoodsService.getOne(queryWrapper);
}
}

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -575,11 +575,11 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
String oldTrayCode = trayGoodsEntity.getTrayCode();
if(oldTrayCode.equals(trayCode)){
log.warn("##############orderScanOrderPackageCode: 该包条已打托 trayCode={}",trayCode);
return Resp.scanFail(2001,"该包条已打托","已扫描");
return Resp.scanFail(4001,"该包条已打托","已扫描");
}
log.warn("#########orderScanOrderPackageCode: 包件已打托 orderPackageCode={}",orderPackageCode);
return Resp.scanFail(2001,"包件已打托","已在"+oldTrayCode+"托盘绑定");
return Resp.scanFail(4002,"包件已打托","已在"+oldTrayCode+"托盘绑定");
}
QueryWrapper<WarehouseUpdownGoodsEntity> updownGoodsEntityQueryWrapper = new QueryWrapper<>();
@ -589,7 +589,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
if(!Objects.isNull(updownGoodsEntity)){
String positionCode = updownGoodsEntity.getPositionCode();
log.warn("#########orderScanOrderPackageCode: 包件已上架 orderPackageCode={}",orderPackageCode);
return Resp.scanFail(2001,"包件已上架","包件已上架"+positionCode+",请先下架或进行移库绑定");
return Resp.scanFail(4003,"包件已上架","包件已上架"+positionCode+",请先下架或进行移库绑定");
}
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);
@ -659,7 +659,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
if(!tt.equals(trayType)){
log.warn("##############orderScanOrderPackageCode: 打托方式不正确 {}={}",trayType,tt);
return Resp.scanFail(2001,"打托方式不正确","打托方式不正确");
return Resp.scanFail(4004,"打托方式不正确","打托方式不正确");
}
if(StringUtil.isBlank(filterValue)){

Loading…
Cancel
Save