提交 c94a520b authored 作者: 李瑞鑫's avatar 李瑞鑫

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

package com.clx.performance.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.Optional;
public enum OrderGoodsEnum {
;
@Getter
@AllArgsConstructor
public enum SendWaitModeEnum {
// 发货-排队系统形式 1:小程序 2:app
WECHAT_PROGRAM(1, "微信小程序"),
APP(2, "app");
private final Integer code;
private final String msg;
public static Optional<SendWaitModeEnum> getByCode(Integer code) {
if (code == null) {
return Optional.empty();
}
return Arrays.stream(values()).filter(e -> e.code.equals(code)).findFirst();
}
public static String getMsgByCode(Integer code) {
return getByCode(code).map(SendWaitModeEnum::getMsg).orElse(null);
}
}
@Getter
@AllArgsConstructor
public enum SendWaitSystemMsgEnum {
YES(1, "需要"),
NO(0, "不需要");
private final Integer code;
private final String msg;
public static Optional<SendWaitSystemMsgEnum> getByCode(Integer code) {
if (code == null) {
return Optional.empty();
}
return Arrays.stream(values()).filter(e -> e.code.equals(code)).findFirst();
}
public static String getMsgByCode(Integer code) {
return getByCode(code).map(SendWaitSystemMsgEnum::getMsg).orElse(null);
}
}
public static void main(String[] args) {
System.out.println(SendWaitModeEnum.getMsgByCode(null));
}
}
......@@ -2,9 +2,12 @@ package com.clx.performance.feign;
import com.clx.open.sdk.request.action.GetOrderBreakContractOwnerRuleFileAction;
import com.clx.open.sdk.request.action.GetOwnerAccountInfoAction;
import com.clx.open.sdk.request.action.QueryPerformanceProgressAction;
import com.clx.open.sdk.request.dto.OwnerCancelResidueWeightDTO;
import com.clx.performance.param.pc.OrderCancelParam;
import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.PerformanceProgressDetailVO;
import com.clx.performance.vo.pc.PerformanceProgressVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleFileVO;
import com.msl.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -13,6 +16,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = "clx-performance", configuration = PerformanceClientConfiguration.class)
public interface PerformanceSDKFeign {
......@@ -34,4 +39,6 @@ public interface PerformanceSDKFeign {
@PostMapping("clx-performance/feign/sdk/getOwnerRuleFile")
Result<BreakContractOwnerRuleFileVO> getOwnerRuleFile(@RequestBody GetOrderBreakContractOwnerRuleFileAction action);
@GetMapping("clx-performance/feign/sdk/queryPerformanceProgress")
Result<List<PerformanceProgressVO>> queryPerformanceProgress(@RequestBody QueryPerformanceProgressAction action);
}
package com.clx.performance.vo.pc;
import com.clx.performance.enums.OrderGoodsEnum;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......@@ -181,9 +182,19 @@ public class OrderGoodsVO {
@ApiModelProperty(value = "发货-是否需要系统排队 0 否 1 是")
private Integer sendWaitSystem;
@ApiModelProperty(value = "发货-是否需要系统排队 描述: 需要 不需要")
public String getSendWaitSystemMsg() {
return OrderGoodsEnum.SendWaitSystemMsgEnum.getMsgByCode(sendWaitMode);
}
@ApiModelProperty(value = "发货-排队系统名称")
private String sendWaitSystemName;
@ApiModelProperty(value = "发货-排队系统形式 1:小程序 2:app")
private Integer sendWaitMode;
@ApiModelProperty(value = "发货-排队系统形式 描述: 微信小程序 app")
public String getSendWaitModeMsg() {
return OrderGoodsEnum.SendWaitModeEnum.getMsgByCode(sendWaitMode);
}
}
\ No newline at end of file
......@@ -2,13 +2,16 @@ package com.clx.performance.controller.feign;
import com.clx.open.sdk.request.action.GetOrderBreakContractOwnerRuleFileAction;
import com.clx.open.sdk.request.action.GetOwnerAccountInfoAction;
import com.clx.open.sdk.request.action.QueryPerformanceProgressAction;
import com.clx.open.sdk.request.dto.OwnerCancelResidueWeightDTO;
import com.clx.performance.param.pc.OrderCancelParam;
import com.clx.performance.service.OrderCancelService;
import com.clx.performance.service.OrderGoodsService;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.PerformanceProgressService;
import com.clx.performance.service.breakcontract.BreakContractOwnerRuleService;
import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.PerformanceProgressVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleFileVO;
import com.msl.common.result.Result;
import com.msl.user.utils.TokenUtil;
......@@ -20,6 +23,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
@Slf4j
@RestController
......@@ -38,6 +42,8 @@ public class PerformanceSdkFeignController {
private final BreakContractOwnerRuleService breakContractOwnerRuleService;
private final PerformanceProgressService performanceProgressService;
@ApiOperation(value = "货主端取消订单", notes = "<br>By:胡宇帆")
@PostMapping("/ownCancelOrderPre")
......@@ -67,4 +73,9 @@ public class PerformanceSdkFeignController {
return Result.ok(breakContractOwnerRuleService.getRuleFile(action.getId()));
}
@ApiOperation(value = "查询履约进度", notes = "<br>By:杨启发")
@GetMapping("/queryPerformanceProgress")
Result<List<PerformanceProgressVO>> queryPerformanceProgress(@RequestBody QueryPerformanceProgressAction action){
return Result.ok(performanceProgressService.queryPerformanceProgress(action.getOrderNoList()));
}
}
......@@ -34,7 +34,7 @@ public interface PerformanceProgressService {
void dealPerformanceProgress4OrderInfo(OrderInfoMessage data);
List<PerformanceProgressVO> queryPerformanceProgress(List<String> orderNoList);
void dealPerformanceProgress4OrderGoods(OrderGoods data);
......
......@@ -492,6 +492,10 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
performanceProgressDao.updateEntityByKey(update);
}
@Override
public List<PerformanceProgressVO> queryPerformanceProgress(List<String> orderNoList) {
return performanceProgressStruct.convertList(performanceProgressDao.listInField(PerformanceProgress::getOrderNo, orderNoList));
}
// 计算接单率
public BigDecimal calcOrderedRate(BigDecimal orderedWeight,BigDecimal pendingWeight){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论