人员管理以及班组管理 ---jsk
This commit is contained in:
parent
ace5b119cf
commit
2ab52441aa
|
|
@ -40,8 +40,8 @@ public class HumanManageController extends BaseController {
|
||||||
@ApiOperation(value = "新增人员")
|
@ApiOperation(value = "新增人员")
|
||||||
@PostMapping("addHuman")
|
@PostMapping("addHuman")
|
||||||
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.ADD_BUSINESS, details = "新增人员", type = "业务日志")
|
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.ADD_BUSINESS, details = "新增人员", type = "业务日志")
|
||||||
public AjaxResult addHuman(HumanManageVo vo) {
|
public AjaxResult addHuman(HumanManageVo vo, @RequestParam(value = "file[]", required = false) MultipartFile[] files) {
|
||||||
return service.addHuman(vo);
|
return service.addHuman(vo,files);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "修改人员")
|
@ApiOperation(value = "修改人员")
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||||
|
|
||||||
public interface HumanService {
|
public interface HumanService {
|
||||||
List<HumanManageVo> getHumanLists(HumanManageVo vo);
|
List<HumanManageVo> getHumanLists(HumanManageVo vo);
|
||||||
AjaxResult addHuman(HumanManageVo vo);
|
AjaxResult addHuman(HumanManageVo vo,MultipartFile[] files);
|
||||||
AjaxResult updateHuman(HumanManageVo vo);
|
AjaxResult updateHuman(HumanManageVo vo);
|
||||||
AjaxResult delHuman(HumanManageVo vo);
|
AjaxResult delHuman(HumanManageVo vo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.securitycontrol.background.humanvehiclemanage.service.HumanService;
|
||||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -23,9 +24,10 @@ public class HumanServiceImpl implements HumanService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult addHuman(HumanManageVo vo) {
|
public AjaxResult addHuman(HumanManageVo vo, MultipartFile[] files) {
|
||||||
try{
|
try{
|
||||||
mapper.addHuman(vo);
|
mapper.addHuman(vo);
|
||||||
|
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.securitycontrol.background.humanvehiclemanage.dao.HumanManageMapper">
|
<mapper namespace="com.securitycontrol.background.humanvehiclemanage.dao.HumanManageMapper">
|
||||||
<!--新增/修改 工程-->
|
<!--新增/修改 工程-->
|
||||||
<insert id="addHuman">
|
<insert id="addHuman" useGeneratedKeys="true" keyProperty="userId">
|
||||||
INSERT INTO t_team_people
|
INSERT INTO t_team_people
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="teamId != null and teamId != ''">team_id,</if>
|
<if test="teamId != null and teamId != ''">team_id,</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue