|
|
|
@ -9,6 +9,8 @@ import com.biutag.entity.setting.DictData; |
|
|
|
import com.biutag.entity.system.Dept; |
|
|
|
import com.biutag.entity.system.Dept; |
|
|
|
import com.biutag.entity.system.Duty; |
|
|
|
import com.biutag.entity.system.Duty; |
|
|
|
import com.biutag.entity.system.PoliceUser; |
|
|
|
import com.biutag.entity.system.PoliceUser; |
|
|
|
|
|
|
|
import com.biutag.enums.RoleEnum; |
|
|
|
|
|
|
|
import com.biutag.lan.config.AdminThreadLocal; |
|
|
|
import com.biutag.lan.domain.validate.commons.PageValidate; |
|
|
|
import com.biutag.lan.domain.validate.commons.PageValidate; |
|
|
|
import com.biutag.lan.domain.validate.system.DutyCreateValidate; |
|
|
|
import com.biutag.lan.domain.validate.system.DutyCreateValidate; |
|
|
|
import com.biutag.lan.domain.validate.system.DutySearchValidate; |
|
|
|
import com.biutag.lan.domain.validate.system.DutySearchValidate; |
|
|
|
@ -17,6 +19,7 @@ import com.biutag.lan.domain.vo.system.DutyDetailVo; |
|
|
|
import com.biutag.lan.domain.vo.system.DutyListedVo; |
|
|
|
import com.biutag.lan.domain.vo.system.DutyListedVo; |
|
|
|
import com.biutag.lan.mapper.DataScreenMapper; |
|
|
|
import com.biutag.lan.mapper.DataScreenMapper; |
|
|
|
import com.biutag.lan.mapper.PoliceUserMapper; |
|
|
|
import com.biutag.lan.mapper.PoliceUserMapper; |
|
|
|
|
|
|
|
import com.biutag.lan.service.IDeptService; |
|
|
|
import com.biutag.lan.service.IDutyService; |
|
|
|
import com.biutag.lan.service.IDutyService; |
|
|
|
import com.biutag.mapper.setting.DictDataMapper; |
|
|
|
import com.biutag.mapper.setting.DictDataMapper; |
|
|
|
import com.biutag.mapper.system.DeptMapper; |
|
|
|
import com.biutag.mapper.system.DeptMapper; |
|
|
|
@ -48,9 +51,13 @@ public class DutyServiceImpl implements IDutyService { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
DeptMapper deptMapper; |
|
|
|
DeptMapper deptMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
IDeptService deptService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
DictDataMapper dictDataMapper; |
|
|
|
DictDataMapper dictDataMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 值班列表 |
|
|
|
* 值班列表 |
|
|
|
* |
|
|
|
* |
|
|
|
@ -68,6 +75,10 @@ public class DutyServiceImpl implements IDutyService { |
|
|
|
.like(StrUtil.isNotBlank(searchValidate.getEmpNo()), Duty::getEmpNo, searchValidate.getEmpNo()) |
|
|
|
.like(StrUtil.isNotBlank(searchValidate.getEmpNo()), Duty::getEmpNo, searchValidate.getEmpNo()) |
|
|
|
.like(StrUtil.isNotBlank(searchValidate.getMobile()), Duty::getMobile, searchValidate.getMobile()) |
|
|
|
.like(StrUtil.isNotBlank(searchValidate.getMobile()), Duty::getMobile, searchValidate.getMobile()) |
|
|
|
.eq(StrUtil.isNotBlank(searchValidate.getDeptType()), Duty::getDeptType, searchValidate.getDeptType()); |
|
|
|
.eq(StrUtil.isNotBlank(searchValidate.getDeptType()), Duty::getDeptType, searchValidate.getDeptType()); |
|
|
|
|
|
|
|
if (!RoleEnum.PROVINCIAL_CLASSES.getRoleId().equals(AdminThreadLocal.getRoleId())) { |
|
|
|
|
|
|
|
List<String> deptIds = deptService.getAllIds(AdminThreadLocal.getDeptId()); |
|
|
|
|
|
|
|
queryWrapper.in(Duty::getDepartId, deptIds); |
|
|
|
|
|
|
|
} |
|
|
|
Page<Duty> dutyPage = dutyMapper.selectPage(Page.of(page, limit), queryWrapper); |
|
|
|
Page<Duty> dutyPage = dutyMapper.selectPage(Page.of(page, limit), queryWrapper); |
|
|
|
List<DutyListedVo> records = dutyPage.getRecords().stream().map(item -> { |
|
|
|
List<DutyListedVo> records = dutyPage.getRecords().stream().map(item -> { |
|
|
|
DutyListedVo vo = new DutyListedVo(); |
|
|
|
DutyListedVo vo = new DutyListedVo(); |
|
|
|
|