|
|
|
@ -171,6 +171,37 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
return page.setRecords(basicdataPriceVOS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<BasicdataPricePageVO> hisPage(IPage<BasicdataPricePageVO> page, BasicdataPricePageVO basicdataPrice) { |
|
|
|
|
if (ObjectUtil.hasEmpty(basicdataPrice.getClientId(), basicdataPrice.getBrandId())) { |
|
|
|
|
throw new ServiceException("客户id和品牌id不能为空"); |
|
|
|
|
} |
|
|
|
|
List<BasicdataPricePageVO> basicdataPriceVOS = baseMapper.hisPage(page, basicdataPrice); |
|
|
|
|
if (CollUtil.isNotEmpty(basicdataPriceVOS)) { |
|
|
|
|
for (BasicdataPricePageVO basicdataPriceVO : basicdataPriceVOS) { |
|
|
|
|
// 维护状态
|
|
|
|
|
if (ObjectUtil.isNotEmpty(basicdataPriceVO.getExpiryTime())) { |
|
|
|
|
DateTime now = DateUtil.date(); |
|
|
|
|
if (now.isAfter(basicdataPriceVO.getExpiryTime())) { |
|
|
|
|
// 已到期
|
|
|
|
|
basicdataPriceVO.setMaintenanceStatus("已过期"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 服务类型
|
|
|
|
|
String serviceType = basicdataPriceVO.getServiceType(); |
|
|
|
|
if (StrUtil.isNotEmpty(serviceType)) { |
|
|
|
|
List<String> res = new ArrayList<>(); |
|
|
|
|
List<String> split = StrUtil.split(serviceType, ","); |
|
|
|
|
for (String s : split) { |
|
|
|
|
res.add(IDict.getTextByCode(ServiceTypeEnums.class, Convert.toInt(s))); |
|
|
|
|
} |
|
|
|
|
basicdataPriceVO.setServiceType(StrUtil.join("/", res)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return page.setRecords(basicdataPriceVOS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public Boolean basicUpdate(BasicdataPriceBasicUpdateVO vo) { |
|
|
|
|