人员履历管理,需求计划管理
This commit is contained in:
parent
c50fcb88ae
commit
8e70fd60e0
|
|
@ -0,0 +1,143 @@
|
|||
package com.bonus.gzcar.business.backstage.controller;
|
||||
|
||||
|
||||
import com.bonus.gzcar.business.backstage.entity.CarPersonVo;
|
||||
import com.bonus.gzcar.business.backstage.service.CarPersonService;
|
||||
import com.bonus.gzcar.business.utils.ExportExcelUtil;
|
||||
import com.bonus.gzcar.manager.annotation.DecryptAndVerify;
|
||||
import com.bonus.gzcar.manager.core.entity.EncryptedReq;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsun
|
||||
*/
|
||||
@Api(tags = "人员履历管理")
|
||||
@RestController
|
||||
@RequestMapping("/backstage/carPerson/")
|
||||
@Slf4j
|
||||
public class CarPersonController {
|
||||
|
||||
@Autowired
|
||||
private CarPersonService service;
|
||||
|
||||
/**
|
||||
* 分页查询类型数据接口
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getCarPageList")
|
||||
@DecryptAndVerify(decryptedClass = CarPersonVo.class)
|
||||
public PageInfo<CarPersonVo> getCarPageList(EncryptedReq<CarPersonVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<CarPersonVo> list = service.getCarPageList(dto.getData());;
|
||||
PageInfo<CarPersonVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出需求计划
|
||||
* @param
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
@PostMapping("export")
|
||||
public void export(HttpServletResponse response, @RequestBody CarPersonVo dto) {
|
||||
try {
|
||||
List<CarPersonVo> list = service.getCarPageList(dto);
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
});
|
||||
ExportExcelUtil.export(response,"车辆", CarPersonVo.class,list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 新增车辆信息
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("addCarData")
|
||||
public ServerResponse addCarData(HttpServletRequest request, @RequestParam(value = "file[]",required = false) MultipartFile[] files) {
|
||||
return service.addCarData(request,files);
|
||||
}
|
||||
/**
|
||||
* 查询分包商详情
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getCarCarDetails")
|
||||
@DecryptAndVerify(decryptedClass = CarPersonVo.class)
|
||||
public ServerResponse getCarCarDetails(EncryptedReq<CarPersonVo> dto) {
|
||||
return service.getCarCarDetails(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆信息
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("updateCarData")
|
||||
public ServerResponse updateCarData(HttpServletRequest request, @RequestParam(value = "file[]",required = false) MultipartFile[] files) {
|
||||
return service.updateCarData(request,files);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆数据
|
||||
* 列表查询 传入 345
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("deleteCarData")
|
||||
@DecryptAndVerify(decryptedClass = CarPersonVo.class)
|
||||
public ServerResponse deleteCarData(EncryptedReq<CarPersonVo> dto) {
|
||||
return service.deleteCarData(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 车辆下拉选查询-
|
||||
* 传入 supId
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getCarListBySup")
|
||||
@DecryptAndVerify(decryptedClass = CarPersonVo.class)
|
||||
public PageInfo<CarPersonVo> getCarListBySup(EncryptedReq<CarPersonVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<CarPersonVo> list = service.getCarListBySup(dto.getData());;
|
||||
PageInfo<CarPersonVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询对应车辆附件
|
||||
* 传入 id
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getCarImageList")
|
||||
@DecryptAndVerify(decryptedClass = CarPersonVo.class)
|
||||
public ServerResponse getCarImageList(EncryptedReq<CarPersonVo> dto) {
|
||||
return service.getCarImageList(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -162,9 +162,20 @@ public class CarNeedPlanVo extends ParentVo {
|
|||
*/
|
||||
private String outTime;
|
||||
|
||||
private String carLength;
|
||||
private String carWidth;
|
||||
private String carHeight;
|
||||
private String carWeight;
|
||||
private String carStart;
|
||||
private String carEnd;
|
||||
|
||||
|
||||
private int fileNum;
|
||||
|
||||
/**
|
||||
* 删除的文件
|
||||
*/
|
||||
private String delFile;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
package com.bonus.gzcar.business.backstage.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.bonus.gzcar.business.system.entity.FileUploadVo;
|
||||
import com.bonus.gzcar.business.system.entity.ParentVo;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class CarPersonVo extends ParentVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@NotBlank(message = "身份证号码不能为空")
|
||||
@Excel(name = "身份证号码", width = 10.0, orderNum = "1")
|
||||
private String idNumber;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@NotBlank(message = "请填写人员姓名")
|
||||
@Excel(name = "人员姓名", width = 10.0, orderNum = "2")
|
||||
private String name;
|
||||
|
||||
|
||||
@NotBlank(message = "请填写联系方式")
|
||||
@Excel(name = "联系方式", width = 10.0, orderNum = "3")
|
||||
private String phone;
|
||||
|
||||
|
||||
/**
|
||||
* 吨位
|
||||
*/
|
||||
@NotBlank(message = "评价,备注")
|
||||
@Excel(name = "评价,备注", width = 10.0, orderNum = "4")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 图片类型
|
||||
*/
|
||||
private String types;
|
||||
|
||||
/**
|
||||
* 删除文件的类型
|
||||
*/
|
||||
private String delTypes;
|
||||
/**
|
||||
* 删除文件id
|
||||
*/
|
||||
private String delFileId;
|
||||
|
||||
/**
|
||||
* 证书,多个证书逗号分割
|
||||
*/
|
||||
private List<FileUploadVo> certificateFileList;
|
||||
|
||||
/**
|
||||
* 其他附件,多个附件逗号分割
|
||||
*/
|
||||
private List<FileUploadVo> otherFileList;
|
||||
|
||||
private String certificateFile;
|
||||
private String otherFile;
|
||||
|
||||
/**
|
||||
* 删除的文件
|
||||
*/
|
||||
private String delFile;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.bonus.gzcar.business.backstage.mapper;
|
||||
|
||||
import com.bonus.gzcar.business.backstage.entity.CarPersonVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsun
|
||||
* 人员履历管理 数据层
|
||||
*/
|
||||
@Repository
|
||||
public interface CarPersonMapper {
|
||||
List<CarPersonVo> getCarPageList(CarPersonVo data) ;
|
||||
|
||||
/**
|
||||
* 新增车辆数据信息
|
||||
* @param carCarVo
|
||||
* @return
|
||||
*/
|
||||
int addCarData(CarPersonVo carCarVo);
|
||||
|
||||
/**
|
||||
* 修改车辆数据
|
||||
* @param carCarVo
|
||||
* @return
|
||||
*/
|
||||
int updateCarData(CarPersonVo carCarVo);
|
||||
|
||||
/**
|
||||
* 查询车辆数据详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<CarPersonVo> getCarSupDetails(CarPersonVo data);
|
||||
|
||||
/**
|
||||
* 删除车辆数据
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
int deleteCarData(CarPersonVo data);
|
||||
|
||||
/**
|
||||
* 查询对应供应商的车辆
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<CarPersonVo> getCarListBySup(CarPersonVo data);
|
||||
|
||||
/**
|
||||
* 查询供应商车辆
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
int getUserBySup(CarPersonVo data);
|
||||
|
||||
int getCarNumBySup(CarPersonVo carCarVo);
|
||||
}
|
||||
|
|
@ -131,6 +131,10 @@ public class CarNeedPlanServiceImpl implements CarNeedPlanService{
|
|||
}
|
||||
recordService.addRecord(vo.getId(),"0","1","2","紧急内部用车","0");
|
||||
}else{
|
||||
List<FileUploadVo> fileList=uploadService.uploadImage(files,vo.getId(),"car_plan_apply","运输起始点高德地图截图");
|
||||
if(fileList.size()!=files.length){
|
||||
return ServerResponse.createErroe("附件上传失败");
|
||||
}
|
||||
recordService.addRecord(vo.getId(),"0","1","2","","0");
|
||||
}
|
||||
|
||||
|
|
@ -161,6 +165,9 @@ public class CarNeedPlanServiceImpl implements CarNeedPlanService{
|
|||
if("1".equals(vo.getApplyType())){
|
||||
List<FileUploadVo> fileList=uploadService.getFileList(vo.getId(),"car_plan_apply","");
|
||||
vo.setFileList(fileList);
|
||||
}else{
|
||||
List<FileUploadVo> fileList=uploadService.getFileList(vo.getId(),"car_plan_apply","运输起始点高德地图截图");
|
||||
vo.setFileList(fileList);
|
||||
}
|
||||
List<AuditRecordVo> recordList=recordService.getRecordList(data.getId());
|
||||
vo.setRecordList(recordList);
|
||||
|
|
@ -183,6 +190,9 @@ public class CarNeedPlanServiceImpl implements CarNeedPlanService{
|
|||
if(vo!=null){
|
||||
List<CarNeedPlanDetailVo> list=mapper.getNeedDetailInfo(data);
|
||||
vo.setDetailList(list);
|
||||
|
||||
List<FileUploadVo> fileList=uploadService.getFileList(vo.getId(),"car_plan_apply","运输起始点高德地图截图");
|
||||
vo.setFileList(fileList);
|
||||
}
|
||||
return ServerResponse.createSuccess("查询成功",vo);
|
||||
}catch (Exception e){
|
||||
|
|
@ -224,6 +234,17 @@ public class CarNeedPlanServiceImpl implements CarNeedPlanService{
|
|||
vo.setNeedNum(carNeedNun);
|
||||
int num =mapper.updateNeedPlanData(vo);
|
||||
if(num>0){
|
||||
|
||||
if(files!=null && files.length>0){
|
||||
List<FileUploadVo> fileList=uploadService.uploadImage(files,vo.getId(),"car_plan_apply","运输起始点高德地图截图");
|
||||
if(fileList.size()!=files.length){
|
||||
return ServerResponse.createErroe("文件上传失败!");
|
||||
}
|
||||
}
|
||||
if(StringHelper.isNotEmpty(vo.getDelFile())){
|
||||
uploadService.deleteFile(vo.getDelFile());
|
||||
}
|
||||
|
||||
for (CarNeedPlanDetailVo detailVo:detailList){
|
||||
detailVo.setPlanId(vo.getId());
|
||||
detailVo.setPlanType(vo.getType());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package com.bonus.gzcar.business.backstage.service;
|
||||
|
||||
import com.bonus.gzcar.business.backstage.entity.CarPersonVo;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsun
|
||||
*/
|
||||
public interface CarPersonService {
|
||||
List<CarPersonVo> getCarPageList(CarPersonVo data);
|
||||
|
||||
/**
|
||||
* 新增车辆数据
|
||||
* @param request
|
||||
* @param files
|
||||
* @return
|
||||
*/
|
||||
ServerResponse addCarData(HttpServletRequest request, MultipartFile[] files);
|
||||
|
||||
/**
|
||||
* 修改车辆信息
|
||||
* @param request
|
||||
* @param files
|
||||
* @return
|
||||
*/
|
||||
ServerResponse updateCarData(HttpServletRequest request, MultipartFile[] files);
|
||||
|
||||
/**
|
||||
* 查询车辆信息详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getCarCarDetails(CarPersonVo data);
|
||||
|
||||
/**
|
||||
* 删除车辆数据
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse deleteCarData(CarPersonVo data);
|
||||
|
||||
/**
|
||||
* 查询车辆数据下拉选
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<CarPersonVo> getCarListBySup(CarPersonVo data);
|
||||
|
||||
/**
|
||||
* 查询车辆附件
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getCarImageList(CarPersonVo data);
|
||||
}
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
package com.bonus.gzcar.business.backstage.service;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.bonus.gzcar.business.backstage.entity.CarPersonVo;
|
||||
import com.bonus.gzcar.business.backstage.entity.CarSupVo;
|
||||
import com.bonus.gzcar.business.backstage.mapper.CarPersonMapper;
|
||||
import com.bonus.gzcar.business.system.entity.FileUploadVo;
|
||||
import com.bonus.gzcar.business.system.service.FileUploadService;
|
||||
import com.bonus.gzcar.manager.advice.ValidatorsUtils;
|
||||
import com.bonus.gzcar.manager.common.util.StringHelper;
|
||||
import com.bonus.gzcar.manager.common.util.UserUtil;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsun
|
||||
*/
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CarPersonServiceImpl implements CarPersonService {
|
||||
|
||||
@Autowired
|
||||
private CarPersonMapper mapper;
|
||||
|
||||
@Autowired
|
||||
private ValidatorsUtils validatorsUtils;
|
||||
|
||||
@Autowired
|
||||
private FileUploadService uploadService;
|
||||
@Override
|
||||
public List<CarPersonVo> getCarPageList(CarPersonVo data) {
|
||||
try {
|
||||
return mapper.getCarPageList(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString());
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆数据
|
||||
* @param request
|
||||
* @param files
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse addCarData(HttpServletRequest request, MultipartFile[] files) {
|
||||
try {
|
||||
String params=request.getParameter("params");
|
||||
if(StringHelper.isEmpty(params)){
|
||||
return ServerResponse.createErroe("请求参数缺失");
|
||||
}
|
||||
String userId= UserUtil.getLoginUser().getUserId()+"";
|
||||
CarPersonVo carCarVo = JSON.parseObject(params, CarPersonVo.class);
|
||||
carCarVo.setCreator(userId);
|
||||
String result = validatorsUtils.valid(carCarVo);
|
||||
int num=mapper.addCarData(carCarVo);
|
||||
if(num>0){
|
||||
if(files==null || files.length<1){
|
||||
return ServerResponse.createErroe("请上传附件");
|
||||
}
|
||||
List<FileUploadVo> fileList=uploadService.uploadImage(files,carCarVo.getId(),"car_person_resume","其他附件");
|
||||
if(fileList.size()!=files.length){
|
||||
return ServerResponse.createErroe("附件上传失败");
|
||||
}
|
||||
}
|
||||
return ServerResponse.createSuccess("新增成功","新增成功");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createErroe("新增失败!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ServerResponse updateCarData(HttpServletRequest request, MultipartFile[] files) {
|
||||
try {
|
||||
String params=request.getParameter("params");
|
||||
if(StringHelper.isEmpty(params)){
|
||||
return ServerResponse.createErroe("请求参数缺失");
|
||||
}
|
||||
String userId= UserUtil.getLoginUser().getUserId()+"";
|
||||
CarPersonVo carCarVo = JSON.parseObject(params, CarPersonVo.class);
|
||||
carCarVo.setCreator(userId);
|
||||
String result = validatorsUtils.valid(carCarVo);
|
||||
if (StringUtils.isNotBlank(result)) {
|
||||
return ServerResponse.createErroe(result);
|
||||
}
|
||||
int num=mapper.updateCarData(carCarVo);
|
||||
if(num>0){
|
||||
if(files!=null && files.length>0){
|
||||
List<FileUploadVo> fileList=uploadService.uploadImage(files,carCarVo.getId(),"car_person_resume","其他附件");
|
||||
if(fileList.size()!=files.length){
|
||||
return ServerResponse.createErroe("文件上传失败!");
|
||||
}
|
||||
}
|
||||
if(StringHelper.isNotEmpty(carCarVo.getDelFile())){
|
||||
uploadService.deleteFile(carCarVo.getDelFile());
|
||||
}
|
||||
return ServerResponse.createSuccess("修改成功","修改成功");
|
||||
}
|
||||
return ServerResponse.createErroe("修改失败!");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString());
|
||||
}
|
||||
return ServerResponse.createErroe("修改失败!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getCarCarDetails(CarPersonVo data) {
|
||||
try{
|
||||
List<CarPersonVo> list=mapper.getCarSupDetails(data);
|
||||
if(com.bonus.gzcar.manager.common.util.StringUtils.isNotEmpty(list)){
|
||||
CarPersonVo vo=list.get(0);
|
||||
List<FileUploadVo> flieList=uploadService.getFileList(vo.getId(),"car_person_resume",null);
|
||||
vo.setFileList(flieList);
|
||||
return ServerResponse.createSuccess("查询成功",vo);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createSuccess("查询失败",new CarSupVo());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse deleteCarData(CarPersonVo data) {
|
||||
try{
|
||||
int num=mapper.deleteCarData(data);
|
||||
uploadService.deleteFileByTableId(data.getId(),"car_person_resume");
|
||||
if(num>0){
|
||||
return ServerResponse.createBySuccessMsg("删除成功");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createErroe("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
*车辆下拉选查询
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CarPersonVo> getCarListBySup(CarPersonVo data) {
|
||||
List<CarPersonVo> list=new ArrayList<>();
|
||||
try {
|
||||
list=mapper.getCarListBySup(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getCarImageList(CarPersonVo data) {
|
||||
List<FileUploadVo> list=new ArrayList<>();
|
||||
try {
|
||||
list=uploadService.getFileList(data.getId(),"car_person_resume",null);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString());
|
||||
}
|
||||
return ServerResponse.createSuccess(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,9 +7,11 @@
|
|||
insert into car_plan_apply(
|
||||
code, type, pro_id, project_part,
|
||||
project_content, need_time, creator, create_time,
|
||||
remark, status, updater, update_time, apply_type, status_type, user_name,need_num
|
||||
remark, status, updater, update_time, apply_type, status_type, user_name,need_num,
|
||||
car_length,car_width,car_height,car_weight,car_start,car_end
|
||||
)values (#{code},#{type},#{proId},#{projectPart},#{projectContent},#{needTime},#{creator},now(),#{remark}
|
||||
,#{status},#{updater},now(),#{applyType},#{statusType},#{userName},#{needNum}
|
||||
,#{status},#{updater},now(),#{applyType},#{statusType},#{userName},#{needNum},
|
||||
#{carLength},#{carWidth},#{carHeight},#{carWeight},#{carStart},#{carEnd}
|
||||
)
|
||||
</insert>
|
||||
<insert id="addNeedPlanDetails">
|
||||
|
|
@ -30,7 +32,8 @@
|
|||
type=#{type}, pro_id=#{proId}, project_part=#{projectPart},
|
||||
project_content=#{projectContent}, need_time=#{needTime},
|
||||
remark=#{remark}, status=#{status}, updater=#{updater},
|
||||
update_time=now(), status_type=#{statusType},need_num=#{needNum}
|
||||
update_time=now(), status_type=#{statusType},need_num=#{needNum},
|
||||
car_length=#{carLength},car_width=#{carWidth},car_height=#{carHeight},car_weight=#{carWeight},car_start=#{carStart},car_end=#{carEnd}
|
||||
where id=#{id}
|
||||
</update>
|
||||
<update id="updateNeedPlanDetails">
|
||||
|
|
@ -92,7 +95,9 @@
|
|||
cpa.need_time needTime, cpa.creator,DATE_FORMAT(cpa.create_time,'%Y-%m-%d') appLyTime,pro.name proName,
|
||||
cpa.remark, cpa.status, cpa.updater, cpa.update_time updateTime,
|
||||
if(cpa.type=1,'车辆','吊车') typeName ,
|
||||
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName
|
||||
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName,
|
||||
cpa.car_length as carLength,cpa.car_width as carWidth ,cpa.car_height as carHeight ,cpa.car_weight as carWeight,
|
||||
cpa.car_start as carStart ,cpa.car_end as carEnd
|
||||
from car_plan_apply cpa
|
||||
left join bm_project pro on pro.bid_id=cpa.pro_id
|
||||
where cpa.id=#{id}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.gzcar.business.backstage.mapper.CarPersonMapper">
|
||||
<insert id="addCarData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into car_person_resume(id_number, name, phone, remark, create_time, is_active)
|
||||
values (#{idNumber}, #{name}, #{phone}, #{remark}, now(), 1)
|
||||
</insert>
|
||||
|
||||
<update id="updateCarData">
|
||||
update car_person_resume
|
||||
set id_number=#{idNumber},
|
||||
name=#{name},
|
||||
phone=#{phone},
|
||||
remark=#{remark}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCarData">
|
||||
update car_person_resume
|
||||
set is_active=0
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getCarPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarPersonVo">
|
||||
SELECT
|
||||
id,
|
||||
id_number AS idNumber,
|
||||
NAME,
|
||||
phone,
|
||||
remark,
|
||||
certificate_file AS certificateFileList,
|
||||
other_file AS otherFileList
|
||||
FROM
|
||||
car_person_resume
|
||||
WHERE
|
||||
IS_ACTIVE =1
|
||||
<if test="idNumber!=null and idNumber!=''">
|
||||
and id_number like concat('%',#{idNumber},'%')
|
||||
</if>
|
||||
<if test="phone!=null and phone!=''">
|
||||
and phone like concat('%',#{phone},'%')
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="getCarSupDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarPersonVo">
|
||||
SELECT
|
||||
id,
|
||||
id_number AS idNumber,
|
||||
NAME,
|
||||
phone,
|
||||
remark
|
||||
FROM
|
||||
car_person_resume
|
||||
WHERE
|
||||
IS_ACTIVE =1
|
||||
and id = #{id}
|
||||
</select>
|
||||
<!--查询供应商对应的车辆数据-->
|
||||
<select id="getCarListBySup" resultType="com.bonus.gzcar.business.backstage.entity.CarPersonVo">
|
||||
select csi.id,csi.car_num carNum ,csi.brand,csi.type ,csi.ton ,csi.sup_id supId ,cs.`name` supName
|
||||
from car_supplier_info csi
|
||||
left join car_supplier cs on cs.id=csi.sup_id
|
||||
where csi.is_active=1
|
||||
<if test="supId!=null and supId!=''">
|
||||
and csi.sup_id=#{supId}
|
||||
</if>
|
||||
<if test="carNum!=null and carNum!=''">
|
||||
AND INSTR(csi.car_num,#{carNum}) > 0
|
||||
</if>
|
||||
</select>
|
||||
<select id="getUserBySup" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from car_supplier_info
|
||||
where is_active = 1
|
||||
and sup_id = #{id}
|
||||
</select>
|
||||
<select id="getCarNumBySup" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from car_supplier_info
|
||||
where is_active=1 and sup_id=#{supId} and car_num=#{carNum}
|
||||
<if test="id!=null and id!=''">
|
||||
and id!=#{id}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue