|
@@ -20,6 +20,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.base.BaseMap;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.system.util.JwtUtil;
|
|
|
import org.jeecg.common.util.CommonUtils;
|
|
|
import org.jeecg.common.util.RedisUtil;
|
|
@@ -794,6 +795,48 @@ public class APIController {
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
|
|
|
+ @AutoLog(value = "岗位异常信息-分页列表查询")
|
|
|
+ @ApiOperation(value="岗位异常信息-分页列表查询", notes="岗位异常信息-分页列表查询")
|
|
|
+ @GetMapping(value = "/listAdminPostRecordItem")
|
|
|
+ public Result<?> queryPageList(@RequestHeader("Authorization") String Authorization, AdminPostRecordItem adminPostRecordItem,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ Result<AdminPostRecord> result = new Result<AdminPostRecord>();
|
|
|
+ if (Authorization.equals("")) {
|
|
|
+ result.setMessage("token不能为空");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ String name = JwtUtil.getUsername(Authorization);
|
|
|
+
|
|
|
+ //校验token==================
|
|
|
+ if (!redisUtil.hasKey(CommonConstant.PREFIX_NFT_USER_TOKEN + name)) {
|
|
|
+ result.setMessage("TOKEN失效");
|
|
|
+ result.setCode(201);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ //1. 校验用户是否有效
|
|
|
+ //update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
|
|
|
+ QueryWrapper<AdminUserStaff> adminUserStaffQueryWrapper = new QueryWrapper<>();
|
|
|
+ adminUserStaffQueryWrapper.eq("name", name);
|
|
|
+ AdminUserStaff one = adminUserStaffService.getOne(adminUserStaffQueryWrapper);
|
|
|
+ if (one == null) {
|
|
|
+ result.setMessage("token校验该用户不存在");
|
|
|
+ baseCommonService.addLog("用户校验失败,用户不存在!", CommonConstant.LOG_TYPE_1, null);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(adminPostRecordItem == null || Strings.isNullOrEmpty(adminPostRecordItem.getMainId())) {
|
|
|
+ result.setMessage("mainId不能为空");
|
|
|
+ baseCommonService.addLog("mainId不能为空", CommonConstant.OPERATE_TYPE_1, null);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ QueryWrapper<AdminPostRecordItem> queryWrapper = QueryGenerator.initQueryWrapper(adminPostRecordItem, req.getParameterMap());
|
|
|
+ List<AdminPostRecordItem> list = adminPostRecordItemService.list(queryWrapper);
|
|
|
+ return Result.OK(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@ApiOperation(value = "查询这个人在这个机位上是否提交到岗", notes = "查询这个人在这个机位上是否提交到岗")
|
|
|
@PostMapping(value = "/beOnDutyRrNot/{aircraftNum}")
|
|
|
public Result<AdminPostRecord> beOnDutyRrNot(@RequestHeader("Authorization") String Authorization, @PathVariable String aircraftNum) {
|
|
@@ -964,17 +1007,17 @@ public class APIController {
|
|
|
|
|
|
adminAircraftPositionService.updateById(byId);
|
|
|
|
|
|
-// AdminPostRecord adminPostRecord2 = new AdminPostRecord();
|
|
|
-//// adminPostRecord2.setId( adminPostRecord.getId() );
|
|
|
-// adminPostRecord2.setId(one1.getId());
|
|
|
-// adminPostRecord2.setTestType(adminPostRecord.getTestType());
|
|
|
-// adminPostRecord2.setTestContent(adminPostRecord.getTestContent());
|
|
|
-// adminPostRecord2.setTestPic(adminPostRecord.getTestPic());
|
|
|
-// adminPostRecord2.setSignaturePic(adminPostRecord.getSignaturePic());
|
|
|
-// adminPostRecord2.setRemark(adminPostRecord.getRemark());
|
|
|
-// adminPostRecord2.setBeonDutyorNot(2);
|
|
|
adminPostRecord.setId(one1.getId());
|
|
|
adminPostRecord.setBeonDutyorNot(2);
|
|
|
+ //判断是否有异常数据,有就将状态设为异常,没有就正常
|
|
|
+/* QueryWrapper<AdminPostRecordItem> adminPostRecordItemQuseryWrapper = new QueryWrapper<AdminPostRecordItem>();
|
|
|
+ adminPostRecordItemQuseryWrapper.eq("main_id", adminPostRecord.getId());
|
|
|
+ int count = adminPostRecordItemService.count(adminPostRecordItemQuseryWrapper);
|
|
|
+ if (count > 0) {
|
|
|
+ adminPostRecord.setTestType("异常");
|
|
|
+ } else {
|
|
|
+ adminPostRecord.setTestType("正常");
|
|
|
+ }*/
|
|
|
adminPostRecordService.updateById(adminPostRecord);
|
|
|
result.setMessage("提交岗位记录成功");
|
|
|
result.setResult("提交岗位记录成功");
|
|
@@ -1627,7 +1670,7 @@ public class APIController {
|
|
|
return result;
|
|
|
}
|
|
|
AdminOrder byId = adminOrderService.getById(adminOrderExamine.getOrderId());
|
|
|
- if (byId.getType().equals("交接结束")) {
|
|
|
+ if (byId != null && byId.getType().equals("交接结束")) {
|
|
|
result.setMessage("交接结束不可提交");
|
|
|
return result;
|
|
|
}
|