master
guochaojie 3 months ago
parent d453cefa39
commit a8483ee3aa

@ -571,15 +571,16 @@ public class RecycleDeliveryOrderServiceImpl extends ServiceImpl<RecycleDelivery
.set(RecycleDeliveryOrderEntity::getLastModifyTime, form.getLastModifyTime())
.eq(RecycleDeliveryOrderEntity::getId, form.getId());
//如果重量不一致则改为调整通过
if (!entity.getReportWeight().equals(form.getAdjustWeight()) && "1".equals(form.getAdjustStatus())) {
if (entity.getReportWeight().compareTo(form.getAdjustWeight()) != 0 && "1".equals(form.getAdjustStatus())) {
wrapper.lambda().set(RecycleDeliveryOrderEntity::getAdjustStatus, "2");
}
//如果是拒绝的话 将审核重量以及单价全部改为0
if ("4".equals(form.getAdjustStatus())) {
if ("3".equals(form.getAdjustStatus())) {
wrapper.lambda().set(RecycleDeliveryOrderEntity::getAdjustWeight, 0)
.set(RecycleDeliveryOrderEntity::getAdjustPrice, 0);
}
boolean update = this.update(wrapper);
entity = this.getById(form.getId());
if (update) {
BigDecimal price = entity.getAdjustPrice();
String orderNo = entity.getOrderNo();
@ -653,6 +654,7 @@ public class RecycleDeliveryOrderServiceImpl extends ServiceImpl<RecycleDelivery
enterpriseAccountBillService.save(billEntity);
// 添加散户流水
ClientAccountDetailEntity clientAccountDetail = new ClientAccountDetailEntity();
clientAccountDetail.setOrderNumber(orderNo);
clientAccountDetail.setClientId(client.getId());
clientAccountDetail.setAmount(amount);
clientAccountDetail.setChangeType("1");

@ -649,15 +649,15 @@ public class RecycleOrderServiceImpl extends ServiceImpl<RecycleOrderMapper, Rec
}
//散户下单
response.setDoorRecycleOrders((int) list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.SH_ORDER.getCode())).count());
response.setDoorRecyclePrice(list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.SH_ORDER.getCode()))
response.setDoorRecyclePrice(list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.SH_ORDER.getCode()) && Objects.nonNull(obj.getOrderAmount()))
.map(RecycleOrderEntity::getOrderAmount).reduce(BigDecimal.ZERO, BigDecimal::add));
//定时回收
response.setRegularRecycleOrders((int) list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.TM_RECOVERY.getCode())).count());
response.setRegularRecyclePrice(list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.TM_RECOVERY.getCode()))
response.setRegularRecyclePrice(list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.TM_RECOVERY.getCode())&& Objects.nonNull(obj.getOrderAmount()))
.map(RecycleOrderEntity::getOrderAmount).reduce(BigDecimal.ZERO, BigDecimal::add));
//到站回收
response.setInboundRecycleOrders((int) list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.DZ_RECOVERY.getCode())).count());
response.setInboundRecyclePrice(list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.DZ_RECOVERY.getCode()))
response.setInboundRecyclePrice(list.stream().filter(obj -> obj.getOrderTypeId().equals(OrderTypeEnum.DZ_RECOVERY.getCode())&& Objects.nonNull(obj.getOrderAmount()))
.map(RecycleOrderEntity::getOrderAmount).reduce(BigDecimal.ZERO, BigDecimal::add));
return response;
}

@ -411,20 +411,21 @@ public class RecycleStationStaffServiceImpl extends ServiceImpl<RecycleStationSt
}else{
}
this.saveOrUpdate(entity);
RecycleStationStaffEntity saved = this.getById(entity.getId());
//RecycleStaffDevice子表数据新增修改
if(!isSave){
QueryWrapper<RecycleStaffDeviceEntity> RecycleStaffDevicequeryWrapper = new QueryWrapper<>();
RecycleStaffDevicequeryWrapper.lambda().eq(RecycleStaffDeviceEntity::getOpenId, entity.getOpenid());
RecycleStaffDevicequeryWrapper.lambda().eq(RecycleStaffDeviceEntity::getOpenId, saved.getOpenid());
recycleStaffDeviceService.remove(RecycleStaffDevicequeryWrapper);
}
if (recycleStationStaffForm.getRecycleStaffDeviceList()!=null){
List<RecycleStaffDeviceEntity> tableField114 = JsonUtil.getJsonToList(recycleStationStaffForm.getRecycleStaffDeviceList(),RecycleStaffDeviceEntity.class);
for(RecycleStaffDeviceEntity entitys : tableField114){
entitys.setId(RandomUtil.uuId());
entitys.setStationId(entity.getStationId());
entitys.setOpenId(entity.getOpenid());
entitys.setUserName(entity.getStaffsName());
entitys.setPhone(entity.getMobilePhone());
entitys.setStationId(saved.getStationId());
entitys.setOpenId(saved.getOpenid());
entitys.setUserName(saved.getStaffsName());
entitys.setPhone(saved.getMobilePhone());
if(isSave){
}else{
}

Loading…
Cancel
Save