Commit 864af93b authored by chenzhao's avatar chenzhao

修改bug

parent 89f6c3b6
...@@ -166,4 +166,12 @@ public class AlertCalled extends BaseEntity { ...@@ -166,4 +166,12 @@ public class AlertCalled extends BaseEntity {
@TableField(exist=false) @TableField(exist=false)
@ApiModelProperty(value = "落地时间") @ApiModelProperty(value = "落地时间")
private String landingTime; private String landingTime;
@TableField(exist=false)
@ApiModelProperty(value = "任务时间")
private String taskTime;
@TableField(exist=false)
@ApiModelProperty(value = "任务时间")
private String seat;
} }
...@@ -115,5 +115,11 @@ public class ESAlertCalled { ...@@ -115,5 +115,11 @@ public class ESAlertCalled {
@Field(type = FieldType.Text) @Field(type = FieldType.Text)
private String flightNumber; private String flightNumber;
/**
* 落地时间
*/
@Field(type = FieldType.Long)
private Long taskTime;
} }
...@@ -327,14 +327,14 @@ ...@@ -327,14 +327,14 @@
</where>) b </where>) b
</select> </select>
<!--bug 8954 历史警情数据缺失 过滤了经纬度导致-->
<select id="alertCalledListByAlertStatusCount" resultType="Integer"> <select id="alertCalledListByAlertStatusCount" resultType="Integer">
SELECT SELECT
COUNT(*) COUNT(*)
FROM jc_alert_called a FROM jc_alert_called a
where a.is_delete=0 and a.alert_type_code <![CDATA[ <> ]]> 1214 where a.is_delete=0 and a.alert_type_code <![CDATA[ <> ]]> 1214
AND a.coordinate_x IS NOT NULL /* AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL AND a.coordinate_y IS NOT NULL*/
<if test='par.status==0'> <if test='par.status==0'>
and a.alert_status =0 and a.alert_status =0
</if> </if>
......
...@@ -580,9 +580,17 @@ public class DutyCommonServiceImpl implements IDutyCommonService { ...@@ -580,9 +580,17 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
Map<Date, Long> dutyPersonShiftMap = dutyPersonShiftsDb.stream() Map<Date, Long> dutyPersonShiftMap = dutyPersonShiftsDb.stream()
.collect(Collectors.toMap(DutyPersonShift::getDutyDate, DutyPersonShift::getSequenceNbr)); .collect(Collectors.toMap(DutyPersonShift::getDutyDate, DutyPersonShift::getSequenceNbr));
// todo: 只更新当天及值班之后数据 // todo: 只更新当天及值班之后数据
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String format = simpleDateFormat.format(new Date());
Date date = null;
try {
date = simpleDateFormat.parse(format);
} catch (ParseException e) {
e.printStackTrace();
}
Date finalDate = date;
Set<DutyPersonShift> needToDb = shiftDtos.stream() Set<DutyPersonShift> needToDb = shiftDtos.stream()
.filter(s -> DateUtils.dateCompare(s.getDutyDate(), new Date()) >= 0).map(shiftDto -> { .filter(s -> DateUtils.dateCompare(s.getDutyDate(), finalDate) >= 0).map(shiftDto -> { DutyPersonShift dutyPersonShift = new DutyPersonShift();
DutyPersonShift dutyPersonShift = new DutyPersonShift();
Bean.copyExistPropertis(shiftDto, dutyPersonShift); Bean.copyExistPropertis(shiftDto, dutyPersonShift);
dutyPersonShift.setInstanceId(finalInstanceId); dutyPersonShift.setInstanceId(finalInstanceId);
dutyPersonShift.setAppKey(RequestContext.getAppKey()); dutyPersonShift.setAppKey(RequestContext.getAppKey());
......
...@@ -128,12 +128,17 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU ...@@ -128,12 +128,17 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
*/ */
@Transactional @Transactional
public LinkageUnitDto saveModel(LinkageUnitDto linkageUnitDto) { public LinkageUnitDto saveModel(LinkageUnitDto linkageUnitDto) {
if (linkageUnitDto.getAddress() != null) { if (linkageUnitDto.getAddress() != null) {
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(linkageUnitDto.getAddress()); JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(linkageUnitDto.getAddress());
linkageUnitDto.setAddress(address.getString(BizConstant.ADDRESS)); linkageUnitDto.setAddress(address.getString(BizConstant.ADDRESS));
linkageUnitDto.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE))); String[] addressArr = linkageUnitDto.getAddress().split("@address@");
linkageUnitDto.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE))); JSONObject jsonObject = JSONObject.parseObject(addressArr[1]);
if (StringUtils.isNotEmpty(jsonObject.getString(BizConstant.LONGITUDE))) {
linkageUnitDto.setLongitude(Double.valueOf(jsonObject.getString(BizConstant.LONGITUDE)));
}
if (StringUtils.isNotEmpty(jsonObject.getString(BizConstant.LATITUDE))) {
linkageUnitDto.setLatitude(Double.valueOf(jsonObject.getString(BizConstant.LATITUDE)));
}
} }
// 1.保存行数据 // 1.保存行数据
String groupCode = this.getGroupCode(); String groupCode = this.getGroupCode();
......
...@@ -104,6 +104,9 @@ public class ShiftChangeController extends BaseController { ...@@ -104,6 +104,9 @@ public class ShiftChangeController extends BaseController {
public ResponseModel queryForPage( public ResponseModel queryForPage(
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) { @RequestParam(value = "size") int size) {
if (current >= 1){
current = (current-1)*size;
}
return ResponseHelper.buildResponse(iShiftChangeService.queryForShiftChangePage(current, size)); return ResponseHelper.buildResponse(iShiftChangeService.queryForShiftChangePage(current, size));
} }
......
...@@ -310,7 +310,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -310,7 +310,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}); });
Map<String, Integer> statusCountMap = alertCalledMapper.queryAlertStatusCount(beginDate, endDate); Map<String, Integer> statusCountMap = alertCalledMapper.queryAlertStatusCount(beginDate, endDate);
Integer unFinishedCount = this Integer unFinishedCount = this
.count(new LambdaQueryWrapper<AlertCalled>().eq(AlertCalled::getAlertStatus, false));// bug2532 .count(new LambdaQueryWrapper<AlertCalled>().eq(AlertCalled::getAlertStatus, false).eq(AlertCalled::getAlertTypeCode,"1214"));// bug2532
// 未结案警情统计错误 // 未结案警情统计错误
// bykongfm // bykongfm
...@@ -540,6 +540,17 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -540,6 +540,17 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}); });
} }
if (AlertStageEnums.LYXC.getCode().equals(alertCalled.getAlertTypeCode()) ||AlertStageEnums.ZJBZ.getCode().equals(alertCalled.getAlertTypeCode()) ) {
alertFormValuelist.stream().forEach(alertFormValue -> {
if (alertFormValue.getFieldCode().equals("taskTime")) {
alertCalled.setTaskTime(alertFormValue.getFieldValue());
}
if (alertFormValue.getFieldCode().equals("seat")) {
alertCalled.setSeat(alertFormValue.getFieldValue());
}
});
}
// 判断是否归并警情 // 判断是否归并警情
if (alertCalled.getFatherAlert() != null) { if (alertCalled.getFatherAlert() != null) {
// 警情归并,设置当前警情状态为结束。 // 警情归并,设置当前警情状态为结束。
...@@ -752,7 +763,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -752,7 +763,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}); });
Map<String, Integer> statusCountMap = alertCalledMapper.queryAlertStatusCount(beginDate, endDate); Map<String, Integer> statusCountMap = alertCalledMapper.queryAlertStatusCount(beginDate, endDate);
Integer unFinishedCount = this Integer unFinishedCount = this
.count(new LambdaQueryWrapper<AlertCalled>().eq(AlertCalled::getAlertStatus, false));// bug2532 .count(new LambdaQueryWrapper<AlertCalled>().eq(AlertCalled::getAlertStatus, false).notIn(AlertCalled::getAlertTypeCode,"1214"));// bug2532
// 未结案警情统计错误 // 未结案警情统计错误
// bykongfm // bykongfm
......
...@@ -302,7 +302,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -302,7 +302,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
definitions.put("$casualtiesNum",ValidationUtil.isEmpty(alertCalled.getCasualtiesNum()) ? "" : String.valueOf(alertCalled.getCasualtiesNum())); definitions.put("$casualtiesNum",ValidationUtil.isEmpty(alertCalled.getCasualtiesNum()) ? "" : String.valueOf(alertCalled.getCasualtiesNum()));
definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "" : alertCalled.getContactPhone()); definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "" : alertCalled.getContactPhone());
String companyName = JSONObject.parseObject(alertSubmittedExtDto.getSubmissionContent()).getString("$companyName") ; String companyName = JSONObject.parseObject(alertSubmittedExtDto.getSubmissionContent()).getString("companyName") ;
JSONObject jsonObject = null; JSONObject jsonObject = null;
if(!ValidationUtil.isEmpty(alertCalled.getUpdateTime())) { if(!ValidationUtil.isEmpty(alertCalled.getUpdateTime())) {
......
...@@ -21,6 +21,8 @@ public interface CheckMapper extends BaseMapper { ...@@ -21,6 +21,8 @@ public interface CheckMapper extends BaseMapper {
List<CheckInfoVo> getCheckInfo(CheckInfoPageParam param); List<CheckInfoVo> getCheckInfo(CheckInfoPageParam param);
List<Check> getCheckByTaskId(String taskId);
List<Map> queryUnqualifiedInputItem(@Param(value = "checkId") int checkId); List<Map> queryUnqualifiedInputItem(@Param(value = "checkId") int checkId);
List<Map> queryCheckPointInputItem(@Param(value = "planTaskId") int planTaskId, @Param(value = "pointId") int pointId); List<Map> queryCheckPointInputItem(@Param(value = "planTaskId") int planTaskId, @Param(value = "pointId") int pointId);
......
...@@ -25,6 +25,7 @@ import com.yeejoin.amos.supervision.business.feign.DangerFeignClient; ...@@ -25,6 +25,7 @@ import com.yeejoin.amos.supervision.business.feign.DangerFeignClient;
import com.yeejoin.amos.supervision.business.feign.JCSFeignClient; import com.yeejoin.amos.supervision.business.feign.JCSFeignClient;
import com.yeejoin.amos.supervision.business.service.intfc.ICheckReportService; import com.yeejoin.amos.supervision.business.service.intfc.ICheckReportService;
import com.yeejoin.amos.supervision.business.service.intfc.IPlanService; import com.yeejoin.amos.supervision.business.service.intfc.IPlanService;
import com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService;
import com.yeejoin.amos.supervision.common.enums.DangerCheckTypeLevelEnum; import com.yeejoin.amos.supervision.common.enums.DangerCheckTypeLevelEnum;
import com.yeejoin.amos.supervision.common.enums.PlanCheckLevelEnum; import com.yeejoin.amos.supervision.common.enums.PlanCheckLevelEnum;
import com.yeejoin.amos.supervision.common.enums.PlanFrequencyEnum; import com.yeejoin.amos.supervision.common.enums.PlanFrequencyEnum;
...@@ -84,6 +85,9 @@ public class CheckReportServiceImpl extends BaseService<CheckReportDto, CheckRep ...@@ -84,6 +85,9 @@ public class CheckReportServiceImpl extends BaseService<CheckReportDto, CheckRep
HiddenDangerMapper hiddenDangerMapper; HiddenDangerMapper hiddenDangerMapper;
@Autowired @Autowired
CheckMapper checkMapper;
@Autowired
IPlanDao planDao; IPlanDao planDao;
@Autowired @Autowired
...@@ -142,6 +146,14 @@ public class CheckReportServiceImpl extends BaseService<CheckReportDto, CheckRep ...@@ -142,6 +146,14 @@ public class CheckReportServiceImpl extends BaseService<CheckReportDto, CheckRep
// 获取复查信息 // 获取复查信息
getReviewInfo(checkReport); getReviewInfo(checkReport);
List<Check> list = checkMapper.getCheckByTaskId(String.valueOf(planTask.getId()));
//拿去第一条和最后一条检查记录给检查时间赋值
if (list != null){
Check check = list.get(0);
Check check1 = list.get(list.size() - 1);
checkReport.setEndCheckDate(check.getCheckTime());
checkReport.setStartCheckDate(check1.getCheckTime());
}
checkReportMapper.insert(checkReport); checkReportMapper.insert(checkReport);
} }
} }
......
...@@ -275,7 +275,7 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService { ...@@ -275,7 +275,7 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
} }
@Override @Override
public Map<String, Object> buildBizInfo(HiddenDangerDto hiddenDangerDto) throws Exception { public Map<String, Object> buildBizInfo(HiddenDangerDto hiddenDangerDto) throws Exception {
Map<String, Object> result = new HashMap<>(32); Map<String, Object> result = new HashMap<>(32);
Optional<Plan> op = iPlanDao.findById(hiddenDangerDto.getPlanId()); Optional<Plan> op = iPlanDao.findById(hiddenDangerDto.getPlanId());
Plan plan = op.orElseThrow((() -> new RuntimeException("计划不存在"))); Plan plan = op.orElseThrow((() -> new RuntimeException("计划不存在")));
......
...@@ -149,6 +149,11 @@ ...@@ -149,6 +149,11 @@
</choose> </choose>
</select> </select>
<select id="getCheckByTaskId" resultType="com.yeejoin.amos.supervision.dao.entity.Check">
select * from p_check where plan_task_id = #{taskId} order by check_time DESC
</select>
<select id="queryUnqualifiedInputItem" resultType="Map" parameterType="int"> <select id="queryUnqualifiedInputItem" resultType="Map" parameterType="int">
SELECT SELECT
ii.name, ii.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment