梁超 3 settimane fa
parent
commit
e498022eac

+ 3
- 3
zhywpt-service-inss/src/main/java/cn/com/taiji/inss/manager/inst/InstOnlineActiveMananger.java Vedi File

import cn.com.taiji.inss.manager.tools.InstTools; import cn.com.taiji.inss.manager.tools.InstTools;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import java.time.LocalDateTime; import java.time.LocalDateTime;
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("车辆下已存在卡信息"); throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("车辆下已存在卡信息");
} }
} }

vehicleInfo = vehicleInfoRepo.findByVehicleId(vo.getVehicleId()); vehicleInfo = vehicleInfoRepo.findByVehicleId(vo.getVehicleId());
if (vehicleInfo == null) if (vehicleInfo == null)
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("没有开卡车辆信息,请先录入."); throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("没有开卡车辆信息,请先录入.");
&& (vehicleInfo.getPermittedWeight() == null || vehicleInfo.getPermittedWeight() == 0)) { && (vehicleInfo.getPermittedWeight() == null || vehicleInfo.getPermittedWeight() == 0)) {
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("货车核定载重错误,不能为空或0,请修改车辆信息!"); throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("货车核定载重错误,不能为空或0,请修改车辆信息!");
} }
//库存检测
// 库存检测
cardDetails = cardDetailsRepo.findBy(vo.getCardId()); cardDetails = cardDetailsRepo.findBy(vo.getCardId());
if (cardDetails == null) { if (cardDetails == null) {
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前卡不在库存中"); throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前卡不在库存中");




@Override @Override
@Transactional(rollbackFor = Exception.class)
void saveData(IssueOrderVO vo) throws ServiceHandleException { void saveData(IssueOrderVO vo) throws ServiceHandleException {
IssueOrderinfo orderInfo = orderInfoRepo.findByOrderNo(vo.getOrderId()); IssueOrderinfo orderInfo = orderInfoRepo.findByOrderNo(vo.getOrderId());
if (vo.isSaveOrder()) { if (vo.isSaveOrder()) {


} }
return obuInfo; return obuInfo;

} }





Loading…
Annulla
Salva