|
@@ -9,59 +9,59 @@ import org.springframework.stereotype.Service;
|
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
-import com.ruoyi.zhdd.domain.bo.JgyDutyEmpBo;
|
|
|
|
-import com.ruoyi.zhdd.domain.vo.JgyDutyEmpVo;
|
|
|
|
-import com.ruoyi.zhdd.domain.JgyDutyEmp;
|
|
|
|
-import com.ruoyi.zhdd.mapper.JgyDutyEmpMapper;
|
|
|
|
-import com.ruoyi.zhdd.service.IJgyDutyEmpService;
|
|
|
|
|
|
+import com.ruoyi.zhdd.domain.bo.DutyEmpBo;
|
|
|
|
+import com.ruoyi.zhdd.domain.vo.DutyEmpVo;
|
|
|
|
+import com.ruoyi.zhdd.domain.DutyEmp;
|
|
|
|
+import com.ruoyi.zhdd.mapper.DutyEmpMapper;
|
|
|
|
+import com.ruoyi.zhdd.service.IDutyEmpService;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 值班人员Service业务层处理
|
|
|
|
|
|
+ * 值班排班信息Service业务层处理
|
|
*
|
|
*
|
|
- * @author ruoyi
|
|
|
|
- * @date 2021-09-22
|
|
|
|
|
|
+ * @author xintong
|
|
|
|
+ * @date 2021-10-11
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
-public class JgyDutyEmpServiceImpl extends ServicePlusImpl<JgyDutyEmpMapper, JgyDutyEmp, JgyDutyEmpVo> implements IJgyDutyEmpService {
|
|
|
|
|
|
+public class DutyEmpServiceImpl extends ServicePlusImpl<DutyEmpMapper, DutyEmp, DutyEmpVo> implements IDutyEmpService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public JgyDutyEmpVo queryById(Long deId){
|
|
|
|
- return getVoById(deId);
|
|
|
|
|
|
+ public DutyEmpVo queryById(Long id){
|
|
|
|
+ return getVoById(id);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public TableDataInfo<JgyDutyEmpVo> queryPageList(JgyDutyEmpBo bo) {
|
|
|
|
- PagePlus<JgyDutyEmp, JgyDutyEmpVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo));
|
|
|
|
|
|
+ public TableDataInfo<DutyEmpVo> queryPageList(DutyEmpBo bo) {
|
|
|
|
+ PagePlus<DutyEmp, DutyEmpVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo));
|
|
return PageUtils.buildDataInfo(result);
|
|
return PageUtils.buildDataInfo(result);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<JgyDutyEmpVo> queryList(JgyDutyEmpBo bo) {
|
|
|
|
|
|
+ public List<DutyEmpVo> queryList(DutyEmpBo bo) {
|
|
return listVo(buildQueryWrapper(bo));
|
|
return listVo(buildQueryWrapper(bo));
|
|
}
|
|
}
|
|
|
|
|
|
- private LambdaQueryWrapper<JgyDutyEmp> buildQueryWrapper(JgyDutyEmpBo bo) {
|
|
|
|
|
|
+ private LambdaQueryWrapper<DutyEmp> buildQueryWrapper(DutyEmpBo bo) {
|
|
Map<String, Object> params = bo.getParams();
|
|
Map<String, Object> params = bo.getParams();
|
|
- LambdaQueryWrapper<JgyDutyEmp> lqw = Wrappers.lambdaQuery();
|
|
|
|
- lqw.eq(bo.getDuId() != null, JgyDutyEmp::getDuId, bo.getDuId());
|
|
|
|
- lqw.eq(bo.getEmpId() != null, JgyDutyEmp::getEmpId, bo.getEmpId());
|
|
|
|
|
|
+ LambdaQueryWrapper<DutyEmp> lqw = Wrappers.lambdaQuery();
|
|
|
|
+ lqw.eq(bo.getPeriod() != null, DutyEmp::getPeriod, bo.getPeriod());
|
|
|
|
+ lqw.like(StringUtils.isNotBlank(bo.getEmpName()), DutyEmp::getEmpName, bo.getEmpName());
|
|
return lqw;
|
|
return lqw;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean insertByBo(JgyDutyEmpBo bo) {
|
|
|
|
- JgyDutyEmp add = BeanUtil.toBean(bo, JgyDutyEmp.class);
|
|
|
|
|
|
+ public Boolean insertByBo(DutyEmpBo bo) {
|
|
|
|
+ DutyEmp add = BeanUtil.toBean(bo, DutyEmp.class);
|
|
validEntityBeforeSave(add);
|
|
validEntityBeforeSave(add);
|
|
return save(add);
|
|
return save(add);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean updateByBo(JgyDutyEmpBo bo) {
|
|
|
|
- JgyDutyEmp update = BeanUtil.toBean(bo, JgyDutyEmp.class);
|
|
|
|
|
|
+ public Boolean updateByBo(DutyEmpBo bo) {
|
|
|
|
+ DutyEmp update = BeanUtil.toBean(bo, DutyEmp.class);
|
|
validEntityBeforeSave(update);
|
|
validEntityBeforeSave(update);
|
|
return updateById(update);
|
|
return updateById(update);
|
|
}
|
|
}
|
|
@@ -71,7 +71,7 @@ public class JgyDutyEmpServiceImpl extends ServicePlusImpl<JgyDutyEmpMapper, Jgy
|
|
*
|
|
*
|
|
* @param entity 实体类数据
|
|
* @param entity 实体类数据
|
|
*/
|
|
*/
|
|
- private void validEntityBeforeSave(JgyDutyEmp entity){
|
|
|
|
|
|
+ private void validEntityBeforeSave(DutyEmp entity){
|
|
//TODO 做一些数据校验,如唯一约束
|
|
//TODO 做一些数据校验,如唯一约束
|
|
}
|
|
}
|
|
|
|
|