提交 73a236e0 authored 作者: 姜文业's avatar 姜文业

Merge branch 'v24.2_company_owner_20240902' of https://t.clxkj.cn/clx-java/clx-performance into dev

...@@ -6,6 +6,7 @@ import com.clx.performance.param.feign.DistributionTruckParam; ...@@ -6,6 +6,7 @@ import com.clx.performance.param.feign.DistributionTruckParam;
import com.clx.performance.param.feign.OrderAdjustTonnageDownParam; import com.clx.performance.param.feign.OrderAdjustTonnageDownParam;
import com.clx.performance.param.pc.OrderCancelFeignParam; import com.clx.performance.param.pc.OrderCancelFeignParam;
import com.clx.performance.param.pc.OrderChildReportParam; import com.clx.performance.param.pc.OrderChildReportParam;
import com.clx.performance.param.pc.owner.CreteAccountParam;
import com.clx.performance.param.pc.owner.FrozenAccountParam; import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam; import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.param.pc.owner.UpdateStatusParam; import com.clx.performance.param.pc.owner.UpdateStatusParam;
...@@ -19,6 +20,7 @@ import com.clx.performance.vo.pc.OwnerAccountArrearsVO; ...@@ -19,6 +20,7 @@ import com.clx.performance.vo.pc.OwnerAccountArrearsVO;
import com.clx.performance.vo.pc.OwnerLoanAccountVO; import com.clx.performance.vo.pc.OwnerLoanAccountVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO; import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO;
import com.msl.common.result.Result; import com.msl.common.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -167,4 +169,7 @@ public interface PerformanceFeign { ...@@ -167,4 +169,7 @@ public interface PerformanceFeign {
Result<OrderExtractWeightVO> getOrderCanExtractWeight(@RequestParam("orderNo") String orderNo); Result<OrderExtractWeightVO> getOrderCanExtractWeight(@RequestParam("orderNo") String orderNo);
@PostMapping(value = {"clx-performance/feign/owner/createAccount"})
public Result<Object> createAccount(@RequestBody CreteAccountParam param);
} }
package com.clx.performance.controller.feign; package com.clx.performance.controller.feign;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.clx.performance.param.pc.owner.CreteAccountParam;
import com.clx.performance.param.pc.owner.FrozenAccountParam; import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam; import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.service.OwnerAccountService; import com.clx.performance.service.OwnerAccountService;
...@@ -63,4 +64,11 @@ public class OwnerAccountFeignController { ...@@ -63,4 +64,11 @@ public class OwnerAccountFeignController {
) { ) {
return Result.ok(ownerAccountService.accountArrearsInfo(userNo, prepaidArrearsOrder, marginArrearsOrder)); return Result.ok(ownerAccountService.accountArrearsInfo(userNo, prepaidArrearsOrder, marginArrearsOrder));
} }
@ApiOperation(value = "创建账户", notes = "<br>By:姜文业")
@PostMapping("/createAccount")
public Result<Object> createAccount(@RequestBody CreteAccountParam param) {
ownerAccountService.createAccount(param);
return Result.ok();
}
} }
...@@ -104,7 +104,11 @@ public class PushOrderChildExpectTimeJob { ...@@ -104,7 +104,11 @@ public class PushOrderChildExpectTimeJob {
} }
if(Objects.equals(orderSourceMap.get(item.getOrderNo()),SyncPlatformEnum.Source.TRADE_PLATFORM.getCode())){ if(Objects.equals(orderSourceMap.get(item.getOrderNo()),SyncPlatformEnum.Source.TRADE_PLATFORM.getCode())){
syncSmbExpectList.add(dto); syncSmbExpectList.add(dto);
}else{ //集煤宝的运单预计时间也要同步给马上来供应链,马上来供应链同步给场站
syncNewOwnerClientExpectList.add(dto);
}
if(Objects.equals(orderSourceMap.get(item.getOrderNo()),SyncPlatformEnum.Source.NEW_OWNER_CLIENT.getCode())){
syncNewOwnerClientExpectList.add(dto); syncNewOwnerClientExpectList.add(dto);
} }
} }
......
...@@ -212,8 +212,10 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea ...@@ -212,8 +212,10 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
@Override @Override
public IPage<OrderGoodsVO> pageOrderGoodsList(PageOrderGoodsListParam param) { public IPage<OrderGoodsVO> pageOrderGoodsList(PageOrderGoodsListParam param) {
long start2 = System.currentTimeMillis();
IPage<OrderGoodsVO> page = orderGoodsDao.pageOrderGoodsList(param); IPage<OrderGoodsVO> page = orderGoodsDao.pageOrderGoodsList(param);
long start3 = System.currentTimeMillis();
log.info("执行耗时2,{}",start3-start2);
if(CollectionUtils.isNotEmpty(page.getRecords())){ if(CollectionUtils.isNotEmpty(page.getRecords())){
List<String> fleetNoList = new ArrayList<>(); List<String> fleetNoList = new ArrayList<>();
List<String> orderNoList = new ArrayList<>(); List<String> orderNoList = new ArrayList<>();
...@@ -224,22 +226,27 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea ...@@ -224,22 +226,27 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
} }
orderNoList.add(record.getOrderNo()); orderNoList.add(record.getOrderNo());
} }
long start5 = System.currentTimeMillis();
log.info("执行耗时3,{}",start5-start3);
if(CollectionUtils.isNotEmpty(fleetNoList)){ if(CollectionUtils.isNotEmpty(fleetNoList)){
List<OrderGoodsBindTruckNumDTO> bindTruckNumList = orderGoodsTruckBindDao.queryOrderGoodsTruckNum(fleetNoList); List<OrderGoodsBindTruckNumDTO> bindTruckNumList = orderGoodsTruckBindDao.queryOrderGoodsTruckNum(fleetNoList);
Map<String, Integer> map = bindTruckNumList.stream().collect( Map<String, Integer> map = bindTruckNumList.stream().collect(
Collectors.toMap(OrderGoodsBindTruckNumDTO::getOrderGoodsNo,OrderGoodsBindTruckNumDTO :: getTruckNum)); Collectors.toMap(OrderGoodsBindTruckNumDTO::getOrderGoodsNo,OrderGoodsBindTruckNumDTO :: getTruckNum));
page.getRecords().forEach(item->item.setDispatchedOrders(map.get(item.getOrderGoodsNo()))); page.getRecords().forEach(item->item.setDispatchedOrders(map.get(item.getOrderGoodsNo())));
} }
long start6 = System.currentTimeMillis();
log.info("执行耗时4,{}",start6-start5);
Optional<Map<String, FeignOrderInfoVO>> orderListOption = orderService.queryListOrderByOrderNoList(orderNoList); Optional<Map<String, FeignOrderInfoVO>> orderListOption = orderService.queryListOrderByOrderNoList(orderNoList);
if(!orderListOption.isPresent()){ if(!orderListOption.isPresent()){
log.warn("通过订单号批量查询订单信息失败,失败原因"); log.warn("通过订单号批量查询订单信息失败,失败原因");
throw new ServiceSystemException(ResultEnum.DATA_ERROR,"查询货单对应的订单信息失败"); throw new ServiceSystemException(ResultEnum.DATA_ERROR,"查询货单对应的订单信息失败");
} }
long start7 = System.currentTimeMillis();
log.info("执行耗时5,{}",start7-start6);
List<OrderGoods> orderGoods = orderGoodsDao.listInField(OrderGoods::getOrderNo, orderNoList); List<OrderGoods> orderGoods = orderGoodsDao.listInField(OrderGoods::getOrderNo, orderNoList);
long start8 = System.currentTimeMillis();
log.info("执行耗时6,{}",start8-start7);
Map<String, BigDecimal> orderExtractWeightMap = new HashMap<>(); Map<String, BigDecimal> orderExtractWeightMap = new HashMap<>();
for (OrderGoods orderGood : orderGoods) { for (OrderGoods orderGood : orderGoods) {
...@@ -249,6 +256,8 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea ...@@ -249,6 +256,8 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
orderExtractWeightMap.put(orderNo,Objects.nonNull(orderExtractWeightMap.get(orderNo))? orderExtractWeightMap.put(orderNo,Objects.nonNull(orderExtractWeightMap.get(orderNo))?
orderExtractWeightMap.get(orderNo).add(weight): weight); orderExtractWeightMap.get(orderNo).add(weight): weight);
} }
long start9 = System.currentTimeMillis();
log.info("执行耗时7,{}",start9-start8);
Map<String, FeignOrderInfoVO> orderInfoMap = orderListOption.get(); Map<String, FeignOrderInfoVO> orderInfoMap = orderListOption.get();
page.getRecords().forEach(item->{ page.getRecords().forEach(item->{
FeignOrderInfoVO orderInfo = orderInfoMap.get(item.getOrderNo()); FeignOrderInfoVO orderInfo = orderInfoMap.get(item.getOrderNo());
...@@ -260,6 +269,8 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea ...@@ -260,6 +269,8 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
} }
item.setResidueTransportWeight(calcOrderGoodsResidueWeight(item.getExtractWeight(),item.getAlreadyTransportWeight())); item.setResidueTransportWeight(calcOrderGoodsResidueWeight(item.getExtractWeight(),item.getAlreadyTransportWeight()));
}); });
long start11 = System.currentTimeMillis();
log.info("执行耗时8,{}",start11-start9);
} }
return page; return page;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论