联调问题
This commit is contained in:
parent
c0aeb2020c
commit
4204bcaa91
|
|
@ -71,9 +71,11 @@ public class PersonnelClassificationController extends BaseController {
|
|||
{
|
||||
try {
|
||||
int res = personnelClassificationService.delClassification(personnelClassificationVo);
|
||||
if (res > 0) {
|
||||
if (res == 1) {
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
} else if (res == 2) {
|
||||
return AjaxResult.error("已绑定人员请勿删除");
|
||||
} else {
|
||||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.digital.mapper;
|
||||
|
||||
import com.bonus.digital.dao.PersonnelClassificationVo;
|
||||
import com.bonus.digital.dao.PersonnelVo;
|
||||
import com.bonus.digital.dao.SelectDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -31,4 +32,6 @@ public interface PersonnelMapper {
|
|||
List<SelectDto> getInspectionStationSelect(@Param("category") String category);
|
||||
|
||||
List<SelectDto> getPersonnelClassificationSelect(@Param("category") String category);
|
||||
|
||||
List<PersonnelVo> getPersonnelListByClassificationId(PersonnelClassificationVo personnelClassificationVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.bonus.digital.service.impl;
|
|||
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.digital.dao.PersonnelClassificationVo;
|
||||
import com.bonus.digital.dao.PersonnelVo;
|
||||
import com.bonus.digital.mapper.PersonnelClassificationMapper;
|
||||
import com.bonus.digital.mapper.PersonnelMapper;
|
||||
import com.bonus.digital.service.PersonnelClassificationService;
|
||||
import lombok.extern.log4j.Log4j;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -24,6 +26,9 @@ public class PersonnelClassificationServiceImpl implements PersonnelClassificati
|
|||
@Resource
|
||||
private PersonnelClassificationMapper personnelClassificationMapper;
|
||||
|
||||
@Resource
|
||||
private PersonnelMapper personnelMapper;
|
||||
|
||||
/**
|
||||
* 获取0:人员分类1:人员性质2:岗位列表
|
||||
*/
|
||||
|
|
@ -49,6 +54,10 @@ public class PersonnelClassificationServiceImpl implements PersonnelClassificati
|
|||
*/
|
||||
@Override
|
||||
public int delClassification(PersonnelClassificationVo personnelClassificationVo) {
|
||||
List<PersonnelVo> personnelVoList = personnelMapper.getPersonnelListByClassificationId(personnelClassificationVo);
|
||||
if (!personnelVoList.isEmpty()){
|
||||
return 2;
|
||||
}
|
||||
return personnelClassificationMapper.delClassification(personnelClassificationVo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,4 +109,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
personnel_classification_name as value
|
||||
from tb_personnel_classification where is_active = '1' and category = #{category}
|
||||
</select>
|
||||
<select id="getPersonnelListByClassificationId" resultType="com.bonus.digital.dao.PersonnelVo">
|
||||
select personnel_classification_id as id,
|
||||
name as name
|
||||
from tb_personnel where is_active = '1'
|
||||
and (position_id = #{personnelClassificationId} or
|
||||
personnel_nature_id = #{personnelClassificationId} or
|
||||
personnel_classification_id = #{personnelClassificationId})
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue