|
@@ -13,6 +13,7 @@ import com.zd.laboratory.domain.XxpCardInfo;
|
|
|
import com.zd.laboratory.domain.XxpDuty;
|
|
import com.zd.laboratory.domain.XxpDuty;
|
|
|
import com.zd.laboratory.domain.XxpInspection;
|
|
import com.zd.laboratory.domain.XxpInspection;
|
|
|
import com.zd.laboratory.domain.vo.XxpInspectionVO;
|
|
import com.zd.laboratory.domain.vo.XxpInspectionVO;
|
|
|
|
|
+import com.zd.laboratory.service.ILabSubjectAccessRecordService;
|
|
|
import com.zd.laboratory.service.IXxpCardInfoService;
|
|
import com.zd.laboratory.service.IXxpCardInfoService;
|
|
|
import com.zd.laboratory.service.IXxpInspectionService;
|
|
import com.zd.laboratory.service.IXxpInspectionService;
|
|
|
import com.zd.model.constant.HttpStatus;
|
|
import com.zd.model.constant.HttpStatus;
|
|
@@ -57,6 +58,9 @@ public class LabXxpInspectionController extends BaseController
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private RemoteUserService remoteUserService;
|
|
private RemoteUserService remoteUserService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ILabSubjectAccessRecordService iLabSubjectAccessRecordService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询巡查列表
|
|
* 查询巡查列表
|
|
@@ -257,7 +261,11 @@ public class LabXxpInspectionController extends BaseController
|
|
|
}
|
|
}
|
|
|
int num=xxpInspectionService.selectNoSignOut(xxpCardInfo.getSubjectId(),xxpInspectionVo.getUserId());
|
|
int num=xxpInspectionService.selectNoSignOut(xxpCardInfo.getSubjectId(),xxpInspectionVo.getUserId());
|
|
|
if(num>0){
|
|
if(num>0){
|
|
|
- return ResultData.fail("已签到,请勿重复签到,请签出后再签到!");
|
|
|
|
|
|
|
+ return ResultData.fail("请你先签退后再进行签到!");
|
|
|
|
|
+ }
|
|
|
|
|
+ int numAccess=iLabSubjectAccessRecordService.getSignOutRecordNoOut(xxpCardInfo.getSubjectId(),xxpInspectionVo.getUserId());
|
|
|
|
|
+ if(numAccess>0){
|
|
|
|
|
+ return ResultData.fail("请你先签退后再进行签到!");
|
|
|
}
|
|
}
|
|
|
ResultData resultData=remoteUserService.getUserMapInfoByUserId(xxpInspectionVo.getUserId());
|
|
ResultData resultData=remoteUserService.getUserMapInfoByUserId(xxpInspectionVo.getUserId());
|
|
|
if(null==resultData ||resultData.getCode()!= HttpStatus.SUCCESS){
|
|
if(null==resultData ||resultData.getCode()!= HttpStatus.SUCCESS){
|
|
@@ -293,4 +301,26 @@ public class LabXxpInspectionController extends BaseController
|
|
|
return ResultData.result(xxpInspectionService.updateXxpInspectionSignOut(labId,userId));
|
|
return ResultData.result(xxpInspectionService.updateXxpInspectionSignOut(labId,userId));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 判断是巡查签到还是准入签到
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "判断是巡查签到还是准入签到 1巡查 2准入")
|
|
|
|
|
+ @PostMapping("/isSignInType")
|
|
|
|
|
+ public ResultData isSignInType(@RequestParam("labId") Long labId,@RequestParam("userId") Long userId) {
|
|
|
|
|
+ int type=0;
|
|
|
|
|
+ int num=xxpInspectionService.selectNoSignOut(labId,userId);
|
|
|
|
|
+ if(num>0){
|
|
|
|
|
+ type=1;
|
|
|
|
|
+ }
|
|
|
|
|
+ int numAccess=iLabSubjectAccessRecordService.getSignOutRecordNoOut(labId,userId);
|
|
|
|
|
+ if(numAccess>0){
|
|
|
|
|
+ type=2;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(type==0){
|
|
|
|
|
+ return ResultData.fail("未查到签到签到记录");
|
|
|
|
|
+ }
|
|
|
|
|
+ return ResultData.success(type);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|