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