Browse Source

Merge branch 'pre-production'

master
zhenghaoyu 8 months ago
parent
commit
af41f55e8a
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBusinessPreOrderAppController.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  4. 76
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java

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

@ -40,7 +40,7 @@ public class DistributionBusinessPreOrderAppController {
@ResponseBody
@PostMapping("/scanOrderPackageCode")
@ApiOperationSupport(order = 1)
public Resp scanOrderPackageCode(@RequestBody BusinessSanDTO businessSanDTO){
public R scanOrderPackageCode(@RequestBody BusinessSanDTO businessSanDTO){
Resp resp = null;
try {

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

@ -194,7 +194,7 @@ public class DistributionSignforAppController {
*/
@PostMapping("/positioning")
@ApiOperationSupport(order = 2)
public Resp positioning(@Valid @RequestBody DistributionSignforEntity distributionSignfor) {
public R positioning(@Valid @RequestBody DistributionSignforEntity distributionSignfor) {
Resp msg = distributionSignforService.positioning(distributionSignfor);
return msg;
}
@ -205,7 +205,7 @@ public class DistributionSignforAppController {
*/
@PostMapping("/signingMessage")
@ApiOperationSupport(order = 2)
public Resp signingMessage(@Valid @RequestBody DistributionSignforEntity distributionSignfor) {
public R signingMessage(@Valid @RequestBody DistributionSignforEntity distributionSignfor) {
Resp msg = distributionSignforService.positioning(distributionSignfor);
return msg;
}

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

@ -877,7 +877,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (parcelListEntity.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())) {
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
distributionParcelListService.updateById(parcelListEntity);
// distributionParcelListService.updateById(parcelListEntity);
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity();
log.info("#########!!!!!!!!!!!!!!!!!--------- 77777777777 distributionDeliverySelfEntity={}", distributionDeliverySelfEntity);
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDeliveryId())) {

76
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java

@ -4,10 +4,13 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataTrayEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataTrayClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.warehouse.dto.TrayTypeDTO;
import com.logpm.warehouse.dto.ZeroOrderVO;
import com.logpm.warehouse.service.IWarehouseTaryAllocationService;
import com.logpm.warehouse.service.IWarehouseTrayTypeService;
import com.logpm.warehouse.vo.OrderDetailVO;
import com.logpm.warehouse.vo.TrayTypeDataListVO;
@ -36,6 +39,8 @@ public class WarehouseTrayTypeApiController {
private final IWarehouseTrayTypeService warehouseTrayTypeService;
private final IBasicdataWarehouseClient warehouseClient;
private final IWarehouseTaryAllocationService taryAllocationService;
private final IBasicdataTrayClient trayClient;
//----------------------订单分拣--------------------------------
@ResponseBody
@ -1367,37 +1372,60 @@ public class WarehouseTrayTypeApiController {
for (String trayCode : trayCodes) {
log.info(method+"当前同步的托盘 trayCode={}",trayCode);
BasicdataTrayEntity trayEntity = trayClient.getTrayByTrayCode(trayCode);
if(Objects.isNull(trayEntity)){
log.warn(method+"托盘信息不存在 trayCode={}",trayCode);
continue;
}
Long trayId = trayEntity.getId();
Long allcationId = taryAllocationService.getAllocationIdByTrayId(trayId);
if(!Objects.isNull(allcationId)){
log.warn(method+"托盘已上架 trayCode={}",trayCode);
continue;
}
R trayData = warehouseTrayTypeService.findTrayData(trayCode, myCurrentWarehouse.getId());
int total = 0;
Object data = trayData.getData();
String s = JSONObject.toJSONString(data);
JSONObject jsonObject = JSONObject.parseObject(s);
JSONArray packageList = jsonObject.getJSONArray("packageList");
JSONArray zeroOrderList = jsonObject.getJSONArray("zeroOrderList");
JSONArray stockOrderList = jsonObject.getJSONArray("stockOrderList");
int packageSize = packageList.size();
int zeroSize = zeroOrderList.size();
int stockSize = stockOrderList.size();
int total = packageSize+zeroSize+stockSize;
if(!Objects.isNull(data)){
String s = JSONObject.toJSONString(data);
JSONObject jsonObject = JSONObject.parseObject(s);
JSONArray packageList = jsonObject.getJSONArray("packageList");
JSONArray zeroOrderList = jsonObject.getJSONArray("zeroOrderList");
JSONArray stockOrderList = jsonObject.getJSONArray("stockOrderList");
int packageSize = packageList.size();
int zeroSize = zeroOrderList.size();
int stockSize = stockOrderList.size();
total = packageSize+zeroSize+stockSize;
}
R syncOldTrayData = warehouseTrayTypeService.findSyncOldTrayData(trayCode, myCurrentWarehouse.getId());
Object data1 = syncOldTrayData.getData();
String s1 = JSONObject.toJSONString(data1);
JSONObject jsonObject1 = JSONObject.parseObject(s1);
JSONArray packageList1 = jsonObject1.getJSONArray("packageList");
String trayType1 = jsonObject1.getString("trayType");
String trayCode1 = jsonObject1.getString("trayCode");
int size = packageList1.size();
if(total >= size){
log.warn(method+"新系统打托数量大于等于老系统 trayCode={} 不同步",trayCode);
continue;
}
List<String> orderPackageCodes = new ArrayList<>();
for (int i = 0; i < size; i++){
JSONObject jsonObject2 = packageList1.getJSONObject(i);
orderPackageCodes.add(jsonObject2.getString("orderPackageCode"));
if(!Objects.isNull(data1)){
String s1 = JSONObject.toJSONString(data1);
JSONObject jsonObject1 = JSONObject.parseObject(s1);
JSONArray packageList1 = jsonObject1.getJSONArray("packageList");
String trayType1 = jsonObject1.getString("trayType");
String trayCode1 = jsonObject1.getString("trayCode");
int size = packageList1.size();
if(total >= size){
log.warn(method+"新系统打托数量大于等于老系统 trayCode={} 不同步",trayCode);
continue;
}
List<String> orderPackageCodes = new ArrayList<>();
for (int i = 0; i < size; i++){
JSONObject jsonObject2 = packageList1.getJSONObject(i);
orderPackageCodes.add(jsonObject2.getString("orderPackageCode"));
}
if(!orderPackageCodes.isEmpty()){
warehouseTrayTypeService.syncOldTrayData(trayCode1,trayType1,orderPackageCodes,myCurrentWarehouse.getId(),"同步老系统打托");
}
}
warehouseTrayTypeService.syncOldTrayData(trayCode1,trayType1,orderPackageCodes,myCurrentWarehouse.getId(),"同步老系统打托");
}
return R.success("处理完成");

Loading…
Cancel
Save