|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.google.common.base.Strings;
|
|
import com.google.common.base.Strings;
|
|
@@ -998,7 +999,7 @@ public class APIController {
|
|
// baseCommonService.addLog( "用户校验失败,用户不存在!", CommonConstant.LOG_TYPE_1, null );
|
|
// baseCommonService.addLog( "用户校验失败,用户不存在!", CommonConstant.LOG_TYPE_1, null );
|
|
// return result;
|
|
// return result;
|
|
// }
|
|
// }
|
|
- if (adminPostRecord.getTestType().equals("异常")) {
|
|
|
|
|
|
+// if (adminPostRecord.getTestType().equals("异常")) {
|
|
//if (adminPostRecord.getTestPic() == null) {
|
|
//if (adminPostRecord.getTestPic() == null) {
|
|
// result.setMessage("图片必传!!");
|
|
// result.setMessage("图片必传!!");
|
|
// result.setCode(201);
|
|
// result.setCode(201);
|
|
@@ -1009,7 +1010,7 @@ public class APIController {
|
|
// result.setCode(201);
|
|
// result.setCode(201);
|
|
// return result;
|
|
// return result;
|
|
//}
|
|
//}
|
|
- }
|
|
|
|
|
|
+ //}
|
|
List<AdminPlatform> list = adminPlatformService.list();
|
|
List<AdminPlatform> list = adminPlatformService.list();
|
|
AdminPlatform adminPlatform = list.get(0);
|
|
AdminPlatform adminPlatform = list.get(0);
|
|
|
|
|
|
@@ -1034,9 +1035,11 @@ public class APIController {
|
|
}
|
|
}
|
|
|
|
|
|
adminAircraftPositionService.updateById(byId);
|
|
adminAircraftPositionService.updateById(byId);
|
|
-
|
|
|
|
- adminPostRecord.setId(one1.getId());
|
|
|
|
- adminPostRecord.setBeonDutyorNot(2);
|
|
|
|
|
|
+ LambdaUpdateWrapper<AdminPostRecord> adminPostRecordLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.eq(AdminPostRecord::getId,one1.getId());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getBeonDutyorNot,2);
|
|
|
|
+ //adminPostRecord.setId(one1.getId());
|
|
|
|
+ //adminPostRecord.setBeonDutyorNot(2);
|
|
//判断是否有异常数据,有就将状态设为异常,没有就正常
|
|
//判断是否有异常数据,有就将状态设为异常,没有就正常
|
|
/* QueryWrapper<AdminPostRecordItem> adminPostRecordItemQuseryWrapper = new QueryWrapper<AdminPostRecordItem>();
|
|
/* QueryWrapper<AdminPostRecordItem> adminPostRecordItemQuseryWrapper = new QueryWrapper<AdminPostRecordItem>();
|
|
adminPostRecordItemQuseryWrapper.eq("main_id", adminPostRecord.getId());
|
|
adminPostRecordItemQuseryWrapper.eq("main_id", adminPostRecord.getId());
|
|
@@ -1048,9 +1051,25 @@ public class APIController {
|
|
}*/
|
|
}*/
|
|
if (adminPostRecord.getBeonDutyorNot() != null && adminPostRecord.getBeonDutyorNot().equals(2)) {
|
|
if (adminPostRecord.getBeonDutyorNot() != null && adminPostRecord.getBeonDutyorNot().equals(2)) {
|
|
// 添加离岗时间
|
|
// 添加离岗时间
|
|
- adminPostRecord.setLeaveTime(new Date());
|
|
|
|
|
|
+ //adminPostRecord.setLeaveTime(new Date());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getLeaveTime,new Date());
|
|
|
|
+ }
|
|
|
|
+ // 离岗以机位上的数据为准
|
|
|
|
+ if (!Strings.isNullOrEmpty(one1.getAircraftPositionId())) {
|
|
|
|
+ AdminAircraftPosition byId1 = adminAircraftPositionService.getById(one1.getAircraftPositionId());
|
|
|
|
+ if (byId1 != null) {
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getAircraftNum,byId1.getAircraftNum());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getFlightNum,byId1.getFlightNum());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- adminPostRecordService.updateById(adminPostRecord);
|
|
|
|
|
|
+ //adminPostRecordService.updateById(adminPostRecord);
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getTestType,adminPostRecord.getTestType());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getTestContent,adminPostRecord.getTestContent());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getTestPic,adminPostRecord.getTestPic());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getLeaveTime,adminPostRecord.getLeaveTime());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getRemark,adminPostRecord.getRemark());
|
|
|
|
+ adminPostRecordLambdaUpdateWrapper.set(AdminPostRecord::getSignaturePic,adminPostRecord.getSignaturePic());
|
|
|
|
+ adminPostRecordService.update(adminPostRecordLambdaUpdateWrapper);
|
|
result.setMessage("提交岗位记录成功");
|
|
result.setMessage("提交岗位记录成功");
|
|
result.setResult("提交岗位记录成功");
|
|
result.setResult("提交岗位记录成功");
|
|
result.setCode(200);
|
|
result.setCode(200);
|
|
@@ -1439,17 +1458,7 @@ public class APIController {
|
|
}
|
|
}
|
|
if (initiateHandoverTO.getDropTime() == null) {
|
|
if (initiateHandoverTO.getDropTime() == null) {
|
|
// 获取过后还是空
|
|
// 获取过后还是空
|
|
- LambdaQueryWrapper<AdminAircraftPosition> positionLambdaQueryWrapper = new LambdaQueryWrapper<AdminAircraftPosition>();
|
|
|
|
- AdminAircraftPosition one1 = adminAircraftPositionService.getOne(positionLambdaQueryWrapper);
|
|
|
|
- if (one1 != null) {
|
|
|
|
- if (one1.getDropTime() != null) {
|
|
|
|
- initiateHandoverTO.setDropTime(one1.getDropTime());
|
|
|
|
- } else if(one1.getPredictDropTime() != null) {
|
|
|
|
- initiateHandoverTO.setDropTime(one1.getPredictDropTime());
|
|
|
|
- } else {
|
|
|
|
- initiateHandoverTO.setDropTime(new Date());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ initiateHandoverTO.setDropTime(new Date());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1494,8 +1503,9 @@ public class APIController {
|
|
|
|
|
|
//我记得好像安检和订单id是一样的
|
|
//我记得好像安检和订单id是一样的
|
|
AdminOrder byId1 = adminOrderService.getById(id);
|
|
AdminOrder byId1 = adminOrderService.getById(id);
|
|
|
|
+ Date qifeiTime = getQifeiTime(byId1);
|
|
byId1.setType("交接结束");
|
|
byId1.setType("交接结束");
|
|
- byId1.setQifeiTime(new Date());
|
|
|
|
|
|
+ byId1.setQifeiTime(qifeiTime);
|
|
byId1.setOverBy(one.getName());
|
|
byId1.setOverBy(one.getName());
|
|
byId1.setOverById(one.getId());
|
|
byId1.setOverById(one.getId());
|
|
adminOrderService.updateById(byId1);
|
|
adminOrderService.updateById(byId1);
|
|
@@ -1512,6 +1522,26 @@ public class APIController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取起飞时间
|
|
|
|
+ * @param byId1
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private Date getQifeiTime(AdminOrder byId1) {
|
|
|
|
+ if (!Strings.isNullOrEmpty(byId1.getFlightSole())) {
|
|
|
|
+ AdminDfdlList dfdl = adminDfdlListService.getById(byId1.getFlightSole());
|
|
|
|
+ if (dfdl != null && dfdl.getFrtt() != null) {
|
|
|
|
+ return dfdl.getFrtt();
|
|
|
|
+ } else if (!Strings.isNullOrEmpty(byId1.getFlightAfid())) {
|
|
|
|
+ dfdl = adminDfdlListService.getById(byId1.getFlightSole());
|
|
|
|
+ if (dfdl != null && dfdl.getFrtt() != null) {
|
|
|
|
+ return dfdl.getFrtt();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new Date();
|
|
|
|
+ }
|
|
|
|
+
|
|
@AutoLog(value = "小程序-手动恢复交接订单", operateType = CommonConstant.OPERATE_TYPE_3)
|
|
@AutoLog(value = "小程序-手动恢复交接订单", operateType = CommonConstant.OPERATE_TYPE_3)
|
|
@ApiOperation(value = "手动恢复订单(订单orderNum)", notes = "手动恢复订单(订单orderNum)")
|
|
@ApiOperation(value = "手动恢复订单(订单orderNum)", notes = "手动恢复订单(订单orderNum)")
|
|
@PostMapping(value = "/recoveryTerminationOrder/{orderNum}")
|
|
@PostMapping(value = "/recoveryTerminationOrder/{orderNum}")
|