|
|
|
|
@ -9,6 +9,7 @@ import com.alibaba.excel.read.metadata.ReadSheet;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.biutag.aop.NotPower; |
|
|
|
|
import com.biutag.constants.AppConstants; |
|
|
|
|
import com.biutag.core.AjaxResult; |
|
|
|
|
import com.biutag.core.PageResult; |
|
|
|
|
import com.biutag.entity.system.Dept; |
|
|
|
|
@ -121,10 +122,13 @@ public class DutyController {
|
|
|
|
|
duty.setPoliceName(item.getPoliceName()); |
|
|
|
|
duty.setEmpNo(item.getEmpNo()); |
|
|
|
|
duty.setMobile(item.getMobile()); |
|
|
|
|
PoliceUser policeUser = policeUserMapper.selectOne(new LambdaQueryWrapper<PoliceUser>().eq(PoliceUser::getEmpNo, item.getEmpNo())); |
|
|
|
|
if (Objects.isNull(policeUser)) { |
|
|
|
|
List<PoliceUser> policeUsers = policeUserMapper.selectList(new LambdaQueryWrapper<PoliceUser>() |
|
|
|
|
.eq(PoliceUser::getIsDelete, AppConstants.FALSE) |
|
|
|
|
.eq(PoliceUser::getEmpNo, item.getEmpNo())); |
|
|
|
|
if (policeUsers.isEmpty()) { |
|
|
|
|
throw new RuntimeException(String.format("警号[%s]无该警员信息", item.getEmpNo())); |
|
|
|
|
} |
|
|
|
|
PoliceUser policeUser = policeUsers.get(0); |
|
|
|
|
Dept dept = deptMapper.selectById(policeUser.getDataDeptId()); |
|
|
|
|
if (Objects.isNull(dept)) { |
|
|
|
|
throw new RuntimeException("未找到单位信息"); |
|
|
|
|
|