|
@ -16,6 +16,7 @@ import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ExcelPoiUtils; |
|
|
import com.epmet.commons.tools.utils.ExcelPoiUtils; |
|
@ -134,13 +135,13 @@ public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl<IcVaccinePrar |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void save(IcVaccinePrarmeterDTO dto) { |
|
|
public void save(IcVaccinePrarmeterDTO dto) { |
|
|
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); |
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); |
|
|
if (null == agencyInfo) { |
|
|
if (null == gridInfo) { |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取组织信息失败", "获取组织信息失败"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取网格信息失败", "获取网格信息失败"); |
|
|
} |
|
|
} |
|
|
IcVaccinePrarmeterEntity entity = ConvertUtils.sourceToTarget(dto, IcVaccinePrarmeterEntity.class); |
|
|
IcVaccinePrarmeterEntity entity = ConvertUtils.sourceToTarget(dto, IcVaccinePrarmeterEntity.class); |
|
|
entity.setCustomerId(agencyInfo.getCustomerId()); |
|
|
entity.setCustomerId(gridInfo.getCustomerId()); |
|
|
entity.setPids(agencyInfo.getPids()); |
|
|
entity.setPids(gridInfo.getPids()); |
|
|
entity.setCheckState(NumConstant.ZERO_STR); |
|
|
entity.setCheckState(NumConstant.ZERO_STR); |
|
|
insert(entity); |
|
|
insert(entity); |
|
|
} |
|
|
} |
|
|