|
|
@@ -28,6 +28,7 @@ import cn.start.tz.module.member.api.user.dto.SendAppMpMessageReqDTO;
|
|
|
import cn.start.tz.module.member.api.user.dto.WxMpTemplateDataReqDto;
|
|
|
import cn.start.tz.module.pressure2.controller.admin.boilerorderexception.vo.BoilerOrderExceptionSaveReqVO;
|
|
|
import cn.start.tz.module.pressure2.dal.dataobject.acceptorder.AcceptOrderDO;
|
|
|
+import cn.start.tz.module.pressure2.dal.dataobject.equipboilerscheduling.EquipBoilerSchedulingDO;
|
|
|
import cn.start.tz.module.pressure2.enums.RedisKeyEnums;
|
|
|
import cn.start.tz.module.pressure2.controller.admin.appointmentconfirmorder.vo.*;
|
|
|
import cn.start.tz.module.pressure2.controller.app.appointmentconfirmorder.vo.AppAppointmentRefuseVO;
|
|
|
@@ -490,6 +491,14 @@ public class AppointmentConfirmOrderServiceImpl implements AppointmentConfirmOrd
|
|
|
}).toList();
|
|
|
|
|
|
appointmentConfirmOrderItemMapper.insertBatch(list);
|
|
|
+
|
|
|
+ Long count = appointmentConfirmOrderItemMapper.selectCount(BoilerAppointmentConfirmOrderItemDO::getOrderId, equipUpdateVO.getOrderId());
|
|
|
+ if (count != null){
|
|
|
+ AppointmentConfirmOrderDO updateObj = new AppointmentConfirmOrderDO();
|
|
|
+ updateObj.setId(equipUpdateVO.getOrderId());
|
|
|
+ updateObj.setEquipNumBoiler(Math.toIntExact(count));
|
|
|
+ appointmentConfirmOrderMapper.updateById(updateObj);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
AppointmentConfirmOrderDO appointmentConfirmOrderDO = appointmentConfirmOrderMapper.selectById(equipUpdateVO.getOrderId());
|
|
|
@@ -526,12 +535,16 @@ public class AppointmentConfirmOrderServiceImpl implements AppointmentConfirmOrd
|
|
|
|
|
|
if(StringUtils.isNotBlank(appointmentRefuseVO.getOrderId())){
|
|
|
Long count = appointmentConfirmOrderItemMapper.selectCount(BoilerAppointmentConfirmOrderItemDO::getOrderId, appointmentRefuseVO.getOrderId());
|
|
|
+ AppointmentConfirmOrderDO updateOrder = new AppointmentConfirmOrderDO();
|
|
|
+ updateOrder.setId(appointmentRefuseVO.getOrderId());
|
|
|
if(count == null || count == 0){
|
|
|
- AppointmentConfirmOrderDO updateOrder = new AppointmentConfirmOrderDO();
|
|
|
- updateOrder.setId(appointmentRefuseVO.getOrderId());
|
|
|
updateOrder.setStatus(500);
|
|
|
- appointmentConfirmOrderMapper.updateById(updateOrder);
|
|
|
+ updateOrder.setEquipNumBoiler(0);
|
|
|
}
|
|
|
+ if (count != null){
|
|
|
+ updateOrder.setEquipNumBoiler(Math.toIntExact(count));
|
|
|
+ }
|
|
|
+ appointmentConfirmOrderMapper.updateById(updateOrder);
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
@@ -577,14 +590,18 @@ public class AppointmentConfirmOrderServiceImpl implements AppointmentConfirmOrd
|
|
|
in(BoilerAppointmentConfirmOrderItemDO::getEquipId, appointmentRefuseVO.getEquipIds())
|
|
|
);
|
|
|
|
|
|
- if(StringUtils.isNotBlank(appointmentRefuseVO.getOrderId())){
|
|
|
+ if (StringUtils.isNotBlank(appointmentRefuseVO.getOrderId())) {
|
|
|
Long count = appointmentConfirmOrderItemMapper.selectCount(BoilerAppointmentConfirmOrderItemDO::getOrderId, appointmentRefuseVO.getOrderId());
|
|
|
- if(count == null || count == 0){
|
|
|
- AppointmentConfirmOrderDO updateOrder = new AppointmentConfirmOrderDO();
|
|
|
- updateOrder.setId(appointmentRefuseVO.getOrderId());
|
|
|
+ AppointmentConfirmOrderDO updateOrder = new AppointmentConfirmOrderDO();
|
|
|
+ updateOrder.setId(appointmentRefuseVO.getOrderId());
|
|
|
+ if (count == null || count == 0) {
|
|
|
updateOrder.setStatus(500);
|
|
|
- appointmentConfirmOrderMapper.updateById(updateOrder);
|
|
|
+ updateOrder.setEquipNumBoiler(0);
|
|
|
+ }
|
|
|
+ if (count != null){
|
|
|
+ updateOrder.setEquipNumBoiler(Math.toIntExact(count));
|
|
|
}
|
|
|
+ appointmentConfirmOrderMapper.updateById(updateOrder);
|
|
|
}
|
|
|
|
|
|
return ;
|
|
|
@@ -688,6 +705,10 @@ public class AppointmentConfirmOrderServiceImpl implements AppointmentConfirmOrd
|
|
|
eq(BoilerAppointmentConfirmOrderItemDO::getOrderId, appointmentRefuseVO.getOrderId()).
|
|
|
in(BoilerAppointmentConfirmOrderItemDO::getEquipId, appointmentRefuseVO.getEquipIds())
|
|
|
);
|
|
|
+ Long count = appointmentConfirmOrderItemMapper.selectCount(BoilerAppointmentConfirmOrderItemDO::getOrderId, appointmentRefuseVO.getOrderId());
|
|
|
+ if (count != null) {
|
|
|
+ appointmentConfirmOrderMapper.updateById(new AppointmentConfirmOrderDO().setId(appointmentRefuseVO.getOrderId()).setEquipNumBoiler(count.intValue()));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|