|
|
@ -17,8 +17,11 @@ |
|
|
|
|
|
|
|
package com.epmet.service.evaluationindex.screen.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.constant.CompareConstant; |
|
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
@ -36,7 +39,9 @@ import org.springframework.util.CollectionUtils; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Calendar; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* 大屏数据采集 |
|
|
@ -299,6 +304,11 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { |
|
|
|
} while (deleteNum != NumConstant.ZERO); |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(formDTO.getDataList())) { |
|
|
|
List<CustomerAgencyFormDTO> pidIsZeroList = formDTO.getDataList().stream().filter(d -> d.getPid().equals(NumConstant.ZERO_STR) || "".equals(d.getPid())).collect(Collectors.toList()); |
|
|
|
if (pidIsZeroList.size()>=NumConstant.ONE){ |
|
|
|
Object o = JSONObject.toJSON(pidIsZeroList); |
|
|
|
throw new RenException("多个pid为【0】的数据:"+o.toString()); |
|
|
|
} |
|
|
|
screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO.getDataList(), customerId); |
|
|
|
} |
|
|
|
} |
|
|
|