Compare commits
2 Commits
fba2d7d992
...
b1025b2fb4
| Author | SHA1 | Date |
|---|---|---|
|
|
b1025b2fb4 | |
|
|
511530f95f |
|
|
@ -1,5 +1,6 @@
|
||||||
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;
|
||||||
|
|
@ -64,5 +65,10 @@ public class OrderTransQueryParam {
|
||||||
*/
|
*/
|
||||||
private TransStatus transStatus;
|
private TransStatus transStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料状态;字典代码:check_status,Wu-->无需勘料、YiKanLiao-->已勘料、WeiKanLiao-->未勘料
|
||||||
|
*/
|
||||||
|
private CheckStatus checkStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -325,12 +325,13 @@ 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,11 +69,20 @@ 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 userId = userDetail.getUserId();
|
||||||
|
if (userId != null) {
|
||||||
|
ew.eq("cot.checker_id", userId);
|
||||||
|
} else {
|
||||||
|
throw Exceptions.clierr("当前登录人无用户ID");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
Long currentCustomerId = userDetail.getCurrentCustomerId();
|
Long currentCustomerId = userDetail.getCurrentCustomerId();
|
||||||
if (currentCustomerId != null) {
|
if (currentCustomerId != null) {
|
||||||
CustomerEntity customer = customerService.getById(currentCustomerId);
|
CustomerEntity customer = customerService.getById(currentCustomerId);
|
||||||
|
|
@ -92,6 +101,7 @@ public class OrderTransService extends ServiceImpl<OrderTransMapper, OrderTransE
|
||||||
throw Exceptions.clierr("当前登录人无客户信息");
|
throw Exceptions.clierr("当前登录人无客户信息");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return PageResult.of(baseMapper.paging(pageParam.toPage(), ew));
|
return PageResult.of(baseMapper.paging(pageParam.toPage(), ew));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ 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";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单信息
|
* 菜单信息
|
||||||
*/
|
*/
|
||||||
|
|
@ -66,4 +69,14 @@ 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