|
|
@@ -4273,6 +4273,9 @@ public class KwtWaybillOrderV1Service {
|
|
|
waybillOrderResp.setActualGoodsPrice(actualGoodsPrice.setScale(2, RoundingMode.HALF_UP).toPlainString());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 原矿运输山上、上下门卫企业id
|
|
|
+ List<String> mockEntIds = Arrays.asList("538039617157337089", "538040297439891457");
|
|
|
// 如果原矿订单,会有两条门卫订单。门卫放行,只能山上放行山上的,山下只能放行山下的
|
|
|
if (Objects.equals(logOrder.getOrderType(), 1)) {
|
|
|
// 装货重量
|
|
|
@@ -4286,28 +4289,28 @@ public class KwtWaybillOrderV1Service {
|
|
|
BigDecimal lossRate = calculateLossRate2(loadAmount, unloadAmount);
|
|
|
waybillOrderResp.setLossRate(lossRate);
|
|
|
waybillOrderResp.setIsPassReason(isLossRateExceeded(logOrder, lossRate));
|
|
|
- }
|
|
|
|
|
|
+ // 原矿运输山上山下的自己放行自己门卫数据
|
|
|
+ if (Objects.equals(waybillOrderResp.getConsignUnitId(), mockEntIds.get(0))) {
|
|
|
+ // 如果状态为待放行,只能山上的运单展示放行按钮
|
|
|
+ if (!Objects.equals(waybillOrderResp.getStatus(), CarWaybillV1Enum.WAIT_RELEASE.getCode())) {
|
|
|
+ waybillOrderResp.setIsDisplayPassButton(Boolean.FALSE);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 如果状态为卸货待放行,只能山下的运单展示放行按钮
|
|
|
+ if (!Objects.equals(waybillOrderResp.getStatus(), CarWaybillV1Enum.UNLOADING_WAIT_RELEASE.getCode())) {
|
|
|
+ waybillOrderResp.setIsDisplayPassButton(Boolean.FALSE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // 原矿运输山上、上下门卫企业id
|
|
|
- List<String> mockEntIds = Arrays.asList("538039617157337089", "538040297439891457");
|
|
|
List<KwtGatekeeperWaybillOrder> gatekeeperList = gatekeeperMap.getOrDefault(billOrder.getId(), new ArrayList<>());
|
|
|
if (Objects.equals(waybillOrderResp.getConsignUnitId(), mockEntIds.get(0))) {
|
|
|
- // 如果状态为待放行,只能山上的运单展示放行按钮
|
|
|
- if(Objects.equals(waybillOrderResp.getStatus(), CarWaybillV1Enum.WAIT_RELEASE.getCode())) {
|
|
|
- waybillOrderResp.setIsDisplayPassButton(Boolean.TRUE);
|
|
|
- }
|
|
|
-
|
|
|
KwtGatekeeperWaybillOrder gatekeeper = gatekeeperList.stream()
|
|
|
.filter(gate -> gate.getEntId() != null && Objects.equals(String.valueOf(gate.getEntId()), mockEntIds.get(0)))
|
|
|
.findFirst().orElse(new KwtGatekeeperWaybillOrder());
|
|
|
waybillOrderResp.setGatekeeperId(gatekeeper.getId());
|
|
|
-
|
|
|
} else {
|
|
|
- // 如果状态为卸货待放行,只能山下的运单展示放行按钮
|
|
|
- if(Objects.equals(waybillOrderResp.getStatus(), CarWaybillV1Enum.UNLOADING_WAIT_RELEASE.getCode())) {
|
|
|
- waybillOrderResp.setIsDisplayPassButton(Boolean.TRUE);
|
|
|
- }
|
|
|
KwtGatekeeperWaybillOrder gatekeeper = gatekeeperList.stream()
|
|
|
.filter(gate -> gate.getEntId() != null && Objects.equals(String.valueOf(gate.getEntId()), mockEntIds.get(1)))
|
|
|
.findFirst().orElse(new KwtGatekeeperWaybillOrder());
|