联调问题
This commit is contained in:
parent
c02c8aaaf9
commit
0782501f3f
|
|
@ -141,8 +141,10 @@ public class PersonnelController extends BaseController {
|
||||||
public AjaxResult updatePersonnel(@RequestBody PersonnelVo personnelVo) {
|
public AjaxResult updatePersonnel(@RequestBody PersonnelVo personnelVo) {
|
||||||
try {
|
try {
|
||||||
int res = personnelService.updatePersonnel(personnelVo);
|
int res = personnelService.updatePersonnel(personnelVo);
|
||||||
if (res > 0) {
|
if (res ==1) {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
} else if (res ==2) {
|
||||||
|
return AjaxResult.error("手机号已存在");
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("修改失败");
|
return AjaxResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,13 @@ public class PersonnelServiceImpl implements PersonnelService {
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
personnelVo.setUpdateUser(userId.toString());
|
personnelVo.setUpdateUser(userId.toString());
|
||||||
personnelVo.setUpdateTime(new Date());
|
personnelVo.setUpdateTime(new Date());
|
||||||
|
if (StringUtils.isNotEmpty(personnelVo.getPhone())){
|
||||||
|
//判断该手机号是否存在
|
||||||
|
PersonnelVo personnelV = personnelMapper.getPersonnelListByPhone(personnelVo);
|
||||||
|
if (personnelV != null){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
return personnelMapper.updatePersonnel(personnelVo);
|
return personnelMapper.updatePersonnel(personnelVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select personnel_classification_id as id,
|
select personnel_classification_id as id,
|
||||||
name as name
|
name as name
|
||||||
from tb_personnel where is_active = '1' and phone =#{phone}
|
from tb_personnel where is_active = '1' and phone =#{phone}
|
||||||
|
and inspection_station_id= #{inspectionStationId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getPersonnelByInspection" resultType="com.bonus.digital.dao.PersonnelVo">
|
<select id="getPersonnelByInspection" resultType="com.bonus.digital.dao.PersonnelVo">
|
||||||
select tis.id,
|
select tis.id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue