|
@@ -82,10 +82,15 @@ public class OrganizationRatingServiceImpl extends ServiceImpl<OrganizationRatin
|
|
|
List<String[]> strings = ExcelUtil.readData(fileType, startRows, true, is);
|
|
|
List<String> ids = strings.stream().map(row -> row[row.length - 1]).collect(Collectors.toList());
|
|
|
List<OrganizationRating> organizationRatings = baseMapper.selectBatchIds(ids);
|
|
|
+ if (!binSection.equals(organizationRatings.get(0).getBinSection())) {
|
|
|
+ throw new CustomException("请导入" + binSection + "的数据");
|
|
|
+ }
|
|
|
//遍历Excel表每一行的数据
|
|
|
for (String[] str : strings) {
|
|
|
for (OrganizationRating or : organizationRatings) {
|
|
|
- if (str[15].equals(or.getId())) {
|
|
|
+ if (str[0].equals(or.getOrganizationShortName())&&str[3].equals(or.getYear())) {
|
|
|
+// if (str[15].equals(or.getId())) {
|
|
|
+// or.setOrganizationShortName(str[0]);
|
|
|
or.setSafetyEnvProtection(str[3]);
|
|
|
or.setVeto(str[4]);
|
|
|
or.setNetProfit(str[5]);
|