|
@@ -55,11 +55,11 @@ public class PatrolInspectionPersonnelServiceImpl extends AbstractCrudService<Pa
|
|
|
public void addPatrolInspectionPersonnel(PatrolInspectionPersonnel patrolInspectionPersonnel) {
|
|
|
LambdaQueryWrapper<PatrolInspectionPersonnel> queryWrapper = Wrappers.lambdaQuery();
|
|
|
queryWrapper.eq(PatrolInspectionPersonnel::getTenantId, SecurityUtils.getTenantId())
|
|
|
- .eq(PatrolInspectionPersonnel::getAreaId, patrolInspectionPersonnel.getAreaId())
|
|
|
+// .eq(PatrolInspectionPersonnel::getAreaId, patrolInspectionPersonnel.getAreaId())
|
|
|
.eq(PatrolInspectionPersonnel::getUserId, patrolInspectionPersonnel.getUserId());
|
|
|
int count = this.count(queryWrapper);
|
|
|
if (count>0){
|
|
|
- throw new BusinessException("同区域人员不可重复添加");
|
|
|
+ throw new BusinessException("一个用户只能添加一个巡检人员");
|
|
|
}
|
|
|
patrolInspectionPersonnel.setCompanyId(0);
|
|
|
patrolInspectionPersonnel.setTenantId(SecurityUtils.getTenantId());
|
|
@@ -143,6 +143,13 @@ public class PatrolInspectionPersonnelServiceImpl extends AbstractCrudService<Pa
|
|
|
patrolInspectionPersonnelVo.setTenantId(list.get(i).getTenantId());
|
|
|
patrolInspectionPersonnelVo.setAreaId(list.get(i).getAreaId());
|
|
|
patrolInspectionPersonnelVo.setUserId(list.get(i).getUserId());
|
|
|
+ patrolInspectionPersonnelVo.setDocumentInfo(list.get(i).getDocumentInfo());
|
|
|
+ patrolInspectionPersonnelVo.setNation(list.get(i).getNation());
|
|
|
+ patrolInspectionPersonnelVo.setEduLevel(list.get(i).getEduLevel());
|
|
|
+ patrolInspectionPersonnelVo.setRegisterResidence(list.get(i).getRegisterResidence());
|
|
|
+ patrolInspectionPersonnelVo.setResidence(list.get(i).getResidence());
|
|
|
+ patrolInspectionPersonnelVo.setPhysicsCard(list.get(i).getPhysicsCard());
|
|
|
+ patrolInspectionPersonnelVo.setIdCard(list.get(i).getIdCard());
|
|
|
for (int j = 0; j < userList.size(); j++) {
|
|
|
if (list.get(i).getUserId().longValue() == userList.get(j).getUserId()) {
|
|
|
patrolInspectionPersonnelVo.setName(userList.get(j).getNickName());
|