Compare commits
No commits in common. "b1025b2fb4c83ef67d8d5be7fd24eb2305e3b757" and "fba2d7d992ecd642e8ff99b2fff64254b5a80c3e" have entirely different histories.
b1025b2fb4
...
fba2d7d992
|
|
@ -1,6 +1,5 @@
|
||||||
package com.njzscloud.dispose.cst.order.pojo.param;
|
package com.njzscloud.dispose.cst.order.pojo.param;
|
||||||
|
|
||||||
import com.njzscloud.dispose.cst.order.constant.CheckStatus;
|
|
||||||
import com.njzscloud.dispose.cst.order.constant.OrderStatus;
|
import com.njzscloud.dispose.cst.order.constant.OrderStatus;
|
||||||
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -65,10 +64,5 @@ public class OrderTransQueryParam {
|
||||||
*/
|
*/
|
||||||
private TransStatus transStatus;
|
private TransStatus transStatus;
|
||||||
|
|
||||||
/**
|
|
||||||
* 勘料状态;字典代码:check_status,Wu-->无需勘料、YiKanLiao-->已勘料、WeiKanLiao-->未勘料
|
|
||||||
*/
|
|
||||||
private CheckStatus checkStatus;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -325,13 +325,12 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
// 根据订单类型区分毛重皮重
|
// 根据订单类型区分毛重皮重
|
||||||
if (OrderCategory.HuiShouYuYue.equals(result.getOrderCategory())) {
|
if (OrderCategory.HuiShouYuYue.equals(result.getOrderCategory())) {
|
||||||
transEntity.setTareWeight(weight);
|
transEntity.setTareWeight(weight);
|
||||||
transEntity.setSettleWeight(result.getRoughWeight() - transEntity.getTareWeight());
|
|
||||||
// 更新车辆皮重
|
// 更新车辆皮重
|
||||||
this.updateTruckHisTareWeight(result.getTruckId(), weight);
|
this.updateTruckHisTareWeight(result.getTruckId(), weight);
|
||||||
} else if (OrderCategory.XiaoShouYuYue.equals(result.getOrderCategory())) {
|
} else if (OrderCategory.XiaoShouYuYue.equals(result.getOrderCategory())) {
|
||||||
transEntity.setRoughWeight(weight);
|
transEntity.setRoughWeight(weight);
|
||||||
transEntity.setSettleWeight(transEntity.getRoughWeight() - result.getTareWeight());
|
|
||||||
}
|
}
|
||||||
|
transEntity.setSettleWeight(transEntity.getRoughWeight() - transEntity.getTareWeight());
|
||||||
transEntity.setOutFrontPhoto(leavingParam.getFrontPhoto());
|
transEntity.setOutFrontPhoto(leavingParam.getFrontPhoto());
|
||||||
transEntity.setOutBodyPhoto(leavingParam.getBodyPhoto());
|
transEntity.setOutBodyPhoto(leavingParam.getBodyPhoto());
|
||||||
transEntity.setOutTime(LocalDateTime.now());
|
transEntity.setOutTime(LocalDateTime.now());
|
||||||
|
|
|
||||||
|
|
@ -69,37 +69,27 @@ public class OrderTransService extends ServiceImpl<OrderTransMapper, OrderTransE
|
||||||
.eq(param.getTrainNum() != null, "cot.train_num", param.getTrainNum())
|
.eq(param.getTrainNum() != null, "cot.train_num", param.getTrainNum())
|
||||||
.like(StrUtil.isNotBlank(param.getStationName()), "co.station_name", param.getStationName())
|
.like(StrUtil.isNotBlank(param.getStationName()), "co.station_name", param.getStationName())
|
||||||
.eq(param.getOrderStatus() != null, "co.order_status", param.getOrderStatus())
|
.eq(param.getOrderStatus() != null, "co.order_status", param.getOrderStatus())
|
||||||
.eq(param.getTransStatus() != null, "cot.trans_status", param.getTransStatus())
|
.eq(param.getTransStatus() != null, "cot.trans_status", param.getTransStatus());
|
||||||
.eq(param.getCheckStatus() != null, "cot.check_status", param.getCheckStatus());
|
|
||||||
}
|
}
|
||||||
// 管理员查看全部,非管理员按身份过滤
|
// 管理员查看全部,非管理员按身份过滤
|
||||||
if (!SecurityUtil.isAdmin()) {
|
if (!SecurityUtil.isAdmin()) {
|
||||||
MyResult userDetail = SecurityUtil.loginUser();
|
MyResult userDetail = SecurityUtil.loginUser();
|
||||||
if (userDetail.isKanLiao()) {
|
Long currentCustomerId = userDetail.getCurrentCustomerId();
|
||||||
Long userId = userDetail.getUserId();
|
if (currentCustomerId != null) {
|
||||||
if (userId != null) {
|
CustomerEntity customer = customerService.getById(currentCustomerId);
|
||||||
ew.eq("cot.checker_id", userId);
|
if (customer != null && customer.getIdentityCategory() != null) {
|
||||||
|
ew.eq(IdentityCategory.ChanFei.equals(customer.getIdentityCategory())
|
||||||
|
|| IdentityCategory.CaiGou.equals(customer.getIdentityCategory()),
|
||||||
|
"co.customer_id", currentCustomerId);
|
||||||
|
ew.eq(IdentityCategory.YunShu.equals(customer.getIdentityCategory()),
|
||||||
|
"co.trans_customer_id", currentCustomerId);
|
||||||
|
ew.eq(IdentityCategory.SiJi.equals(customer.getIdentityCategory()),
|
||||||
|
"cot.driver_customer_id", currentCustomerId);
|
||||||
} else {
|
} else {
|
||||||
throw Exceptions.clierr("当前登录人无用户ID");
|
throw Exceptions.clierr("客户信息或客户身份类型不存在");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Long currentCustomerId = userDetail.getCurrentCustomerId();
|
throw Exceptions.clierr("当前登录人无客户信息");
|
||||||
if (currentCustomerId != null) {
|
|
||||||
CustomerEntity customer = customerService.getById(currentCustomerId);
|
|
||||||
if (customer != null && customer.getIdentityCategory() != null) {
|
|
||||||
ew.eq(IdentityCategory.ChanFei.equals(customer.getIdentityCategory())
|
|
||||||
|| IdentityCategory.CaiGou.equals(customer.getIdentityCategory()),
|
|
||||||
"co.customer_id", currentCustomerId);
|
|
||||||
ew.eq(IdentityCategory.YunShu.equals(customer.getIdentityCategory()),
|
|
||||||
"co.trans_customer_id", currentCustomerId);
|
|
||||||
ew.eq(IdentityCategory.SiJi.equals(customer.getIdentityCategory()),
|
|
||||||
"cot.driver_customer_id", currentCustomerId);
|
|
||||||
} else {
|
|
||||||
throw Exceptions.clierr("客户信息或客户身份类型不存在");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw Exceptions.clierr("当前登录人无客户信息");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,6 @@ import java.util.Optional;
|
||||||
@Setter
|
@Setter
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class MyResult extends UserDetail {
|
public class MyResult extends UserDetail {
|
||||||
|
|
||||||
public static final String ROLE_KANLIAO = "ROLE_KANLIAO";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单信息
|
* 菜单信息
|
||||||
*/
|
*/
|
||||||
|
|
@ -69,14 +66,4 @@ public class MyResult extends UserDetail {
|
||||||
// noinspection OptionalGetWithoutIsPresent
|
// noinspection OptionalGetWithoutIsPresent
|
||||||
return identityInfo.get();
|
return identityInfo.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否是看料员
|
|
||||||
*
|
|
||||||
* @return true/false
|
|
||||||
*/
|
|
||||||
public boolean isKanLiao() {
|
|
||||||
return this.getRoles().contains(ROLE_KANLIAO);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue