glj-代码提交

This commit is contained in:
管李杰 2024-07-16 14:13:26 +08:00
parent 2cf5df3051
commit e48045eb2b
4 changed files with 32 additions and 23 deletions

View File

@ -228,7 +228,6 @@ public class DisasterInfo implements Serializable {
private String email; private String email;
//分数 //分数
@TableField(exist = false)
private Integer fraction; private Integer fraction;
} }

View File

@ -782,7 +782,6 @@ public class DisasterInfoController {
} }
byId.setFraction(fractionUserNew); byId.setFraction(fractionUserNew);
administratorService.updateById(byId); administratorService.updateById(byId);
}else { }else {
userEmail = disasterInfo.getEmail(); userEmail = disasterInfo.getEmail();
} }

View File

@ -25,6 +25,7 @@
<result property="sponsorOrganization" column="sponsor_organization" jdbcType="TIMESTAMP"/> <result property="sponsorOrganization" column="sponsor_organization" jdbcType="TIMESTAMP"/>
<result property="respondedTime" column="responded_time" jdbcType="TIMESTAMP"/> <result property="respondedTime" column="responded_time" jdbcType="TIMESTAMP"/>
<result property="isEndApply" column="is_end_apply" jdbcType="INTEGER"/> <result property="isEndApply" column="is_end_apply" jdbcType="INTEGER"/>
<result property="fraction" column="fraction" jdbcType="INTEGER"/>
</resultMap> </resultMap>
@ -36,7 +37,7 @@
di.temp_start_time,di.create_time,di.vordm_id, di.temp_start_time,di.create_time,di.vordm_id,
di.respond_time,di.download_count,di.sponsor_organization, di.respond_time,di.download_count,di.sponsor_organization,
di.responded_time,di.is_end_apply,di.admin_id,di.admin_name, di.responded_time,di.is_end_apply,di.admin_id,di.admin_name,
di.chief_id,di.chief_name,di.approval_role di.chief_id,di.chief_name,di.approval_role,di.fraction
</sql> </sql>
<sql id="Home_Disaster_Info"> <sql id="Home_Disaster_Info">
@ -191,6 +192,7 @@
d.respond_status, d.respond_status,
d.responded_time, d.responded_time,
d.is_end_apply, d.is_end_apply,
d.fraction,
ud.review_time AS reviewTime, ud.review_time AS reviewTime,
ud.sponsor_id AS sponsorId, ud.sponsor_id AS sponsorId,
bdb.dict_value as dictValue, bdb.dict_value as dictValue,

View File

@ -118,6 +118,8 @@ public class EntityDataAllServiceImpl extends ServiceImpl<EntityDataAllMapper, E
currentRow.forEach(cell -> { currentRow.forEach(cell -> {
if (!Objects.isNull(cell)){ if (!Objects.isNull(cell)){
int columnIndex = cell.getColumnIndex(); int columnIndex = cell.getColumnIndex();
//设置单元格类型
cell.setCellType(CellType.STRING);
switch (columnIndex) { switch (columnIndex) {
case 0: case 0:
entityDataAll.setTitle(cell.getStringCellValue()); entityDataAll.setTitle(cell.getStringCellValue());
@ -132,56 +134,62 @@ public class EntityDataAllServiceImpl extends ServiceImpl<EntityDataAllMapper, E
entityDataAll.setProductTime(cell.getStringCellValue()); entityDataAll.setProductTime(cell.getStringCellValue());
break; break;
case 4: case 4:
entityDataAll.setProductResolution(Double.toString(cell.getNumericCellValue())); entityDataAll.setProductResolution(cell.getStringCellValue());
break; break;
case 5: case 5:
String s = Double.toString(cell.getNumericCellValue()); String s = cell.getStringCellValue();
entityDataAll.setCloudCover(Integer.parseInt(s.substring(0,s.lastIndexOf(".")))); entityDataAll.setCloudCover(Integer.parseInt(s));
break; break;
case 6: case 6:
entityDataAll.setSatelliteCode(cell.getStringCellValue()); entityDataAll.setSatelliteCode(cell.getStringCellValue());
break; break;
case 7: case 7:
entityDataAll.setUpperLeftLat(Double.toString(cell.getNumericCellValue())); entityDataAll.setUpperLeftLat(cell.getStringCellValue());
break; break;
case 8: case 8:
entityDataAll.setUpperLeftLon(Double.toString(cell.getNumericCellValue())); entityDataAll.setUpperLeftLon(cell.getStringCellValue());
break; break;
case 9: case 9:
entityDataAll.setUpperRightLat(Double.toString(cell.getNumericCellValue())); entityDataAll.setUpperRightLat(cell.getStringCellValue());
break; break;
case 10: case 10:
entityDataAll.setUpperRightLon(Double.toString(cell.getNumericCellValue())); entityDataAll.setUpperRightLon(cell.getStringCellValue());
break; break;
case 11: case 11:
entityDataAll.setViewCenterLat(Double.toString(cell.getNumericCellValue())); entityDataAll.setViewCenterLat(cell.getStringCellValue());
break; break;
case 12: case 12:
entityDataAll.setViewCenterLon(Double.toString(cell.getNumericCellValue())); entityDataAll.setViewCenterLon(cell.getStringCellValue());
break; break;
case 13: case 13:
entityDataAll.setLowerRightLat(Double.toString(cell.getNumericCellValue())); entityDataAll.setLowerRightLat(cell.getStringCellValue());
break; break;
case 14: case 14:
entityDataAll.setLowerRightLon(Double.toString(cell.getNumericCellValue())); entityDataAll.setLowerRightLon(cell.getStringCellValue());
break; break;
case 15: case 15:
entityDataAll.setLowerLeftLat(Double.toString(cell.getNumericCellValue())); entityDataAll.setLowerLeftLat(cell.getStringCellValue());
break; break;
case 16: case 16:
entityDataAll.setLowerLeftLon(Double.toString(cell.getNumericCellValue())); entityDataAll.setLowerLeftLon(cell.getStringCellValue());
break; break;
case 17: case 17:
entityDataAll.setCoverageArea(Double.toString(cell.getNumericCellValue())); entityDataAll.setCoverageArea(cell.getStringCellValue());
break; break;
case 18: case 18:
String s1 = Double.toString(cell.getNumericCellValue()); String s1 = cell.getStringCellValue();
// 1-Optical satellite, 2-Night light satellite, 3-Video satellite,
// 4-Hyperspectral satellite, 5-Radar satellite
if (s1.equals("Optical")){ if (s1.equals("Optical")){
entityDataAll.setSensorType("1"); entityDataAll.setSatelliteTypeSelect(1);
}else if (s1.equals("Radar")){ }else if (s1.equals("Night light satellite")){
entityDataAll.setSensorType("2"); entityDataAll.setSatelliteTypeSelect(2);
}else if (s1.equals("Luminous")){ }else if (s1.equals("Video satellite")){
entityDataAll.setSensorType("3"); entityDataAll.setSatelliteTypeSelect(3);
}else if (s1.equals("Hyperspectral satellite")){
entityDataAll.setSatelliteTypeSelect(4);
}else if (s1.equals("Radar satellite")){
entityDataAll.setSatelliteTypeSelect(5);
} }
break; break;
case 19: case 19:
@ -217,6 +225,7 @@ public class EntityDataAllServiceImpl extends ServiceImpl<EntityDataAllMapper, E
entityDataAll.setUploaderId(userId); entityDataAll.setUploaderId(userId);
entityDataAll.setUploadTime(new Date()); entityDataAll.setUploadTime(new Date());
entityDataAll.setIsAdministration(1); entityDataAll.setIsAdministration(1);
entityDataAll.setStatus(2);
baseMapper.insert(entityDataAll); baseMapper.insert(entityDataAll);
} }
}); });