|
@ -11,6 +11,7 @@ import com.epmet.commons.mybatis.enums.DelFlagEnum; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.enums.DictTypeEnum; |
|
|
import com.epmet.commons.tools.enums.DictTypeEnum; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
@ -205,6 +206,20 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public String save(IcTripReportFormDTO formDTO) { |
|
|
public String save(IcTripReportFormDTO formDTO) { |
|
|
|
|
|
//按客户校验参数
|
|
|
|
|
|
if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) { |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填"); |
|
|
|
|
|
} |
|
|
|
|
|
//磐石
|
|
|
|
|
|
if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){ |
|
|
|
|
|
if(StringUtils.isEmpty(formDTO.getNatOutcome())){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "48小时核算记录为必填", "48小时核算记录为必填"); |
|
|
|
|
|
} |
|
|
|
|
|
}else {//其他客户
|
|
|
|
|
|
if(StringUtils.isEmpty(formDTO.getVaccineNum())||StringUtils.isEmpty(formDTO.getIsNatRecord())){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种针次和48小时核算记录为必填", "疫苗接种针次和48小时核算记录为必填"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
//如果是单个录入的,默认数据属于当前用户所属组织id
|
|
|
//如果是单个录入的,默认数据属于当前用户所属组织id
|
|
|
if(IcResiUserConstant.USER_TYPE_INPUT.equals(formDTO.getUserType())){ |
|
|
if(IcResiUserConstant.USER_TYPE_INPUT.equals(formDTO.getUserType())){ |
|
|
//获取当前登录用户所属组织id
|
|
|
//获取当前登录用户所属组织id
|
|
@ -326,6 +341,20 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public String resiSave(IcTripReportFormDTO formDTO) { |
|
|
public String resiSave(IcTripReportFormDTO formDTO) { |
|
|
|
|
|
//按客户校验参数
|
|
|
|
|
|
if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) { |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填"); |
|
|
|
|
|
} |
|
|
|
|
|
//磐石
|
|
|
|
|
|
if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){ |
|
|
|
|
|
if(StringUtils.isEmpty(formDTO.getNatOutcome())){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "48小时核算记录为必填", "48小时核算记录为必填"); |
|
|
|
|
|
} |
|
|
|
|
|
}else {//其他客户
|
|
|
|
|
|
if(StringUtils.isEmpty(formDTO.getVaccineNum())||StringUtils.isEmpty(formDTO.getIsNatRecord())){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种针次和48小时核算记录为必填", "疫苗接种针次和48小时核算记录为必填"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); |
|
|
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); |
|
|
if (null == gridInfoCache) { |
|
|
if (null == gridInfoCache) { |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询网格信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询网格信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|