公司业绩管理,分包商管理,分包人员管理
This commit is contained in:
parent
5252de466b
commit
06681250d6
|
|
@ -3,16 +3,33 @@ package com.bonus.common.enums;
|
|||
public enum TableType {
|
||||
|
||||
/**
|
||||
* 关键人员信息表
|
||||
* 关键人员信息
|
||||
*/
|
||||
TB_KEY_PEOPLE("tb_key_people", "关键人员信息表"),
|
||||
TB_KEY_PEOPLE("tb_key_people", "关键人员信息"),
|
||||
/**
|
||||
* 项目其他人员管理
|
||||
*/
|
||||
TB_OTHER_PEOPLE("tb_other_people", "项目其他人员管理");
|
||||
TB_OTHER_PEOPLE("tb_other_people", "项目其他人员管理"),
|
||||
|
||||
/**
|
||||
* 公司业绩管理
|
||||
*/
|
||||
TB_COMPANY_PERF("tb_company_perf", "公司业绩管理"),
|
||||
|
||||
/**
|
||||
* 业绩关键人员信息
|
||||
*/
|
||||
TB_COMPANY_PERF_REL("tb_company_perf_rel", "业绩关键人员信息"),
|
||||
|
||||
/**
|
||||
* 分包商
|
||||
*/
|
||||
TB_SUB("tb_sub", "分包商"),
|
||||
|
||||
/**
|
||||
* 分包商人员信息
|
||||
*/
|
||||
TB_SUB_PEOPLE("tb_sub_people", "分包商人员信息");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,138 @@
|
|||
package com.bonus.tool.controller.search;
|
||||
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.utils.poi.ExcelUtil;
|
||||
import com.bonus.tool.dto.TbCompanyPerfVo;
|
||||
import com.bonus.tool.service.TbCompanyPerfService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司业绩管理
|
||||
* @author 马三炮
|
||||
* @date 2025/4/22
|
||||
*/
|
||||
public class TbCompanyPerfController {
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/tbCompanyPerf")
|
||||
public class TbCompanyPerfController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private TbCompanyPerfService tbCompanyPerfService;
|
||||
|
||||
/**
|
||||
* 公司业绩管理列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "公司业绩管理列表查询")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@GetMapping("/getTbCompanyPerfList")
|
||||
public TableDataInfo getTbCompanyPerfList(TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
try {
|
||||
startPage();
|
||||
List<TbCompanyPerfVo> tbCompanyPerfList = tbCompanyPerfService.getTbCompanyPerfList(tbCompanyPerfVo);
|
||||
return getDataTable(tbCompanyPerfList);
|
||||
}catch (Exception e){
|
||||
log.info("公司业绩管理列表失败{}",e.getMessage());
|
||||
return getDataTableError(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "公司业绩管理详情")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:query')")
|
||||
@PostMapping("/getTbCompanyPerfById")
|
||||
public AjaxResult getTbCompanyPerfById(@RequestBody TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
try {
|
||||
TbCompanyPerfVo tbCompanyPerf = tbCompanyPerfService.getTbCompanyPerfById(tbCompanyPerfVo);
|
||||
return success(tbCompanyPerf);
|
||||
}catch (Exception e){
|
||||
log.info("公司业绩管理详情失败{}",e.getMessage());
|
||||
return error("公司业绩管理详情失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "公司业绩管理新增")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:add')")
|
||||
@PostMapping("/addTbCompanyPerf")
|
||||
public AjaxResult addTbCompanyPerf(@RequestBody TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
try {
|
||||
tbCompanyPerfService.addTbCompanyPerf(tbCompanyPerfVo);
|
||||
return success("新增公司业绩管理成功");
|
||||
}catch (Exception e){
|
||||
log.info("新增公司业绩管理失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "公司业绩管理修改")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:add')")
|
||||
@PostMapping("/updateTbCompanyPerf")
|
||||
public AjaxResult updateTbCompanyPerf(@RequestBody TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
try {
|
||||
tbCompanyPerfService.updateTbCompanyPerf(tbCompanyPerfVo);
|
||||
return success("修改公司业绩管理成功");
|
||||
}catch (Exception e){
|
||||
log.info("修改公司业绩管理失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "公司业绩管理删除")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:add')")
|
||||
@PostMapping("/delTbCompanyPerf")
|
||||
public AjaxResult delTbCompanyPerf(@RequestBody TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
try {
|
||||
tbCompanyPerfService.delTbCompanyPerf(tbCompanyPerfVo);
|
||||
return success("删除公司业绩管理成功");
|
||||
}catch (Exception e){
|
||||
log.info("删除公司业绩管理失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理导出
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "公司业绩管理导出")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:del')")
|
||||
@PostMapping("/tbCompanyPerfExport")
|
||||
public void tbCompanyPerfExport(HttpServletResponse response, TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
try {
|
||||
List<TbCompanyPerfVo> tbCompanyPerfList = tbCompanyPerfService.getTbCompanyPerfList(tbCompanyPerfVo);
|
||||
ExcelUtil<TbCompanyPerfVo> util = new ExcelUtil<>(TbCompanyPerfVo.class);
|
||||
util.exportExcel(response, tbCompanyPerfList, "公司业绩管理");
|
||||
}catch (Exception e){
|
||||
log.info("导出失败{}",e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public class TbKeyPeopleController extends BaseController {
|
|||
return success("关键人员修改成功");
|
||||
}catch (Exception e){
|
||||
log.info("关键人员修改失败{}",e.getMessage());
|
||||
return error(null);
|
||||
return error("关键人员修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ public class TbKeyPeopleController extends BaseController {
|
|||
return success("关键人员删除成功");
|
||||
}catch (Exception e){
|
||||
log.info("关键人员删除失败{}",e.getMessage());
|
||||
return error(null);
|
||||
return error("关键人员删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -129,15 +129,33 @@ public class TbKeyPeopleController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "关键人员导出")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:del')")
|
||||
@PostMapping("/TbKeyPeopleExport")
|
||||
public void TbKeyPeopleExport(HttpServletResponse response,TbKeyPeopleVo tbKeyPeopleVo) {
|
||||
@PostMapping("/tbKeyPeopleExport")
|
||||
public void tbKeyPeopleExport(HttpServletResponse response,TbKeyPeopleVo tbKeyPeopleVo) {
|
||||
try {
|
||||
List<TbKeyPeopleVo> tbKeyPeopleVoList = tbKeyPeopleServcie.getTbKeyPeopleList(tbKeyPeopleVo);
|
||||
ExcelUtil<TbKeyPeopleVo> util = new ExcelUtil<TbKeyPeopleVo>(TbKeyPeopleVo.class);
|
||||
ExcelUtil<TbKeyPeopleVo> util = new ExcelUtil<>(TbKeyPeopleVo.class);
|
||||
util.exportExcel(response, tbKeyPeopleVoList, "关键人员信息");
|
||||
}catch (Exception e){
|
||||
log.info("导出失败{}",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键人员查询所有
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "关键人员查询所有")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@GetMapping("/getTbKeyPeopleAll")
|
||||
public TableDataInfo getTbKeyPeopleAll(TbKeyPeopleVo tbKeyPeopleVo) {
|
||||
try {
|
||||
List<TbKeyPeopleVo> tbKeyPeopleVoList = tbKeyPeopleServcie.getTbKeyPeopleList(tbKeyPeopleVo);
|
||||
return getDataTable(tbKeyPeopleVoList);
|
||||
}catch (Exception e){
|
||||
log.info("关键人员查询所有失败{}",e.getMessage());
|
||||
return getDataTableError(null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.bonus.common.core.controller.BaseController;
|
|||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.utils.poi.ExcelUtil;
|
||||
import com.bonus.tool.dto.TbKeyPeopleVo;
|
||||
import com.bonus.tool.dto.TbOtherPeopleVo;
|
||||
import com.bonus.tool.service.TbOtherPeopleService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -61,7 +60,7 @@ public class TbOtherPeopleController extends BaseController {
|
|||
return success(tbKeyPeople);
|
||||
}catch (Exception e){
|
||||
log.info("其他人员详情失败{}",e.getMessage());
|
||||
return error(null);
|
||||
return error("其他人员详情失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +96,7 @@ public class TbOtherPeopleController extends BaseController {
|
|||
return success("关键人员修改成功");
|
||||
}catch (Exception e){
|
||||
log.info("关键人员修改失败{}",e.getMessage());
|
||||
return error(null);
|
||||
return error("其他人员删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +114,7 @@ public class TbOtherPeopleController extends BaseController {
|
|||
return success("其他人员删除成功");
|
||||
}catch (Exception e){
|
||||
log.info("其他人员删除失败{}",e.getMessage());
|
||||
return error(null);
|
||||
return error("其他人员删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -126,11 +125,11 @@ public class TbOtherPeopleController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "关键人员导出")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:del')")
|
||||
@PostMapping("/TbOtherPeopleExport")
|
||||
public void TbOtherPeopleExport(HttpServletResponse response, TbOtherPeopleVo tbOtherPeopleVo) {
|
||||
@PostMapping("/tbOtherPeopleExport")
|
||||
public void tbOtherPeopleExport(HttpServletResponse response, TbOtherPeopleVo tbOtherPeopleVo) {
|
||||
try {
|
||||
List<TbOtherPeopleVo> tbKeyPeopleVoList = tbOtherPeopleService.getTbOtherPeopleList(tbOtherPeopleVo);
|
||||
ExcelUtil<TbOtherPeopleVo> util = new ExcelUtil<TbOtherPeopleVo>(TbOtherPeopleVo.class);
|
||||
ExcelUtil<TbOtherPeopleVo> util = new ExcelUtil<>(TbOtherPeopleVo.class);
|
||||
util.exportExcel(response, tbKeyPeopleVoList, "其他人员信息");
|
||||
}catch (Exception e){
|
||||
log.info("导出失败{}",e.getMessage());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,138 @@
|
|||
package com.bonus.tool.controller.search;
|
||||
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.utils.poi.ExcelUtil;
|
||||
import com.bonus.tool.dto.TbSubVo;
|
||||
import com.bonus.tool.service.TbSubService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分包商表
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/tbSub")
|
||||
public class TbSubController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private TbSubService tbSubService;
|
||||
|
||||
/**
|
||||
* 分包商列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商列表查询")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@GetMapping("/getTbSubList")
|
||||
public TableDataInfo getTbSubList(TbSubVo tbSubVo) {
|
||||
try {
|
||||
startPage();
|
||||
List<TbSubVo> tbSubVoList = tbSubService.getTbSubList(tbSubVo);
|
||||
return getDataTable(tbSubVoList);
|
||||
}catch (Exception e){
|
||||
log.info("分包商列表失败{}",e.getMessage());
|
||||
return getDataTableError(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商详情")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/getTbSubById")
|
||||
public AjaxResult getTbSubById(@RequestBody TbSubVo tbSubVo) {
|
||||
try {
|
||||
TbSubVo tbSub = tbSubService.getTbSubById(tbSubVo);
|
||||
return success(tbSub);
|
||||
}catch (Exception e){
|
||||
log.info("分包商详情失败{}",e.getMessage());
|
||||
return error("分包商详情失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商新增")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/addTbSub")
|
||||
public AjaxResult addTbSub(@RequestBody TbSubVo tbSubVo) {
|
||||
try {
|
||||
tbSubService.addTbSub(tbSubVo);
|
||||
return success("分包商新增成功");
|
||||
}catch (Exception e){
|
||||
log.info("分包商新增失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商修改")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/updateTbSub")
|
||||
public AjaxResult updateTbSub(@RequestBody TbSubVo tbSubVo) {
|
||||
try {
|
||||
tbSubService.updateTbSub(tbSubVo);
|
||||
return success("分包商修改成功");
|
||||
}catch (Exception e){
|
||||
log.info("分包商修改失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商删除")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/delTbSub")
|
||||
public AjaxResult delTbSub(@RequestBody TbSubVo tbSubVo) {
|
||||
try {
|
||||
tbSubService.delTbSub(tbSubVo);
|
||||
return success("分包商删除成功");
|
||||
}catch (Exception e){
|
||||
log.info("分包商删除失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商管理导出
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商管理导出")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:del')")
|
||||
@PostMapping("/tbSubExport")
|
||||
public void tbSubExport(HttpServletResponse response, TbSubVo tbSubVo) {
|
||||
try {
|
||||
List<TbSubVo> tbSubVoList = tbSubService.getTbSubList(tbSubVo);
|
||||
ExcelUtil<TbSubVo> util = new ExcelUtil<>(TbSubVo.class);
|
||||
util.exportExcel(response, tbSubVoList, "分包商管理");
|
||||
}catch (Exception e){
|
||||
log.info("导出失败{}",e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
package com.bonus.tool.controller.search;
|
||||
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.utils.poi.ExcelUtil;
|
||||
import com.bonus.tool.dto.TbSubPeopleVo;
|
||||
import com.bonus.tool.service.TbSubPeopleService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分包商人员信息
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/tbSubPeople")
|
||||
public class TbSubPeopleController extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private TbSubPeopleService tbSubPeopleService;
|
||||
|
||||
/**
|
||||
* 分包商人员信息列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商人员信息列表查询")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@GetMapping("/getTbSubPeopleList")
|
||||
public TableDataInfo getTbSubPeopleList(TbSubPeopleVo tbSubPeopleVo) {
|
||||
try {
|
||||
startPage();
|
||||
List<TbSubPeopleVo> tbSubPeopleList = tbSubPeopleService.getTbSubPeopleList(tbSubPeopleVo);
|
||||
return getDataTable(tbSubPeopleList);
|
||||
}catch (Exception e){
|
||||
log.info("分包商人员信息列表失败{}",e.getMessage());
|
||||
return getDataTableError(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商人员信息详情")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/getTbSubPeopleById")
|
||||
public AjaxResult getTbSubPeopleById(@RequestBody TbSubPeopleVo tbSubPeopleVo) {
|
||||
try {
|
||||
TbSubPeopleVo tbSubPeople = tbSubPeopleService.getTbSubPeopleById(tbSubPeopleVo);
|
||||
return success(tbSubPeople);
|
||||
}catch (Exception e){
|
||||
log.info("分包商人员信息详情失败{}",e.getMessage());
|
||||
return error("分包商人员信息详情失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商人员信息新增")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/addTbSubPeople")
|
||||
public AjaxResult addTbSubPeople(@RequestBody TbSubPeopleVo tbSubPeopleVo) {
|
||||
try {
|
||||
tbSubPeopleService.addTbSubPeople(tbSubPeopleVo);
|
||||
return success("分包商人员信息成功");
|
||||
}catch (Exception e){
|
||||
log.info("分包商人员信息失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商人员信息修改")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/updateTbSubPeople")
|
||||
public AjaxResult updateTbSubPeople(@RequestBody TbSubPeopleVo tbSubPeopleVo) {
|
||||
try {
|
||||
tbSubPeopleService.updateTbSubPeople(tbSubPeopleVo);
|
||||
return success("分包商人员信息修改成功");
|
||||
}catch (Exception e){
|
||||
log.info("分包商人员信息修改失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商人员信息删除")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@PostMapping("/delTbSubPeople")
|
||||
public AjaxResult delTbSubPeople(@RequestBody TbSubPeopleVo tbSubPeopleVo) {
|
||||
try {
|
||||
tbSubPeopleService.delTbSubPeople(tbSubPeopleVo);
|
||||
return success("分包商人员信息删除成功");
|
||||
}catch (Exception e){
|
||||
log.info("分包商人员信息删除失败{}",e.getMessage());
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息列表查询全部
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商人员信息列表查询全部")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:list')")
|
||||
@GetMapping("/getTbSubPeopleAll")
|
||||
public TableDataInfo getTbSubPeopleAll(TbSubPeopleVo tbSubPeopleVo) {
|
||||
try {
|
||||
List<TbSubPeopleVo> tbSubPeopleList = tbSubPeopleService.getTbSubPeopleList(tbSubPeopleVo);
|
||||
return getDataTable(tbSubPeopleList);
|
||||
}catch (Exception e){
|
||||
log.info("分包商人员信息列表失败{}",e.getMessage());
|
||||
return getDataTableError(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息导出
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分包商人员信息导出")
|
||||
// @PreAuthorize("@ss.hasPermi('key:people:del')")
|
||||
@PostMapping("/tbSubExport")
|
||||
public void tbSubExport(HttpServletResponse response, TbSubPeopleVo tbSubPeopleVo) {
|
||||
try {
|
||||
List<TbSubPeopleVo> tbSubPeopleList = tbSubPeopleService.getTbSubPeopleList(tbSubPeopleVo);
|
||||
ExcelUtil<TbSubPeopleVo> util = new ExcelUtil<>(TbSubPeopleVo.class);
|
||||
util.exportExcel(response, tbSubPeopleList, "分包商人员信息");
|
||||
}catch (Exception e){
|
||||
log.info("导出失败{}",e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@ package com.bonus.tool.dto;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/22
|
||||
|
|
@ -29,8 +31,23 @@ public class TbCompanyPerfRelVo {
|
|||
*/
|
||||
private String keyUser;
|
||||
|
||||
/**
|
||||
* 关键人员姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 业绩数据id
|
||||
*/
|
||||
private String perfId;
|
||||
private Long perfId;
|
||||
|
||||
/***
|
||||
* 附件集合
|
||||
*/
|
||||
private List<TbFileSourceVo> tbFileSourceVoList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.bonus.tool.dto;
|
||||
|
||||
import com.bonus.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -20,52 +23,68 @@ public class TbCompanyPerfVo {
|
|||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@Excel(name = "工程名称", sort = 1)
|
||||
private String proName;
|
||||
|
||||
/**
|
||||
* 电压等级
|
||||
*/
|
||||
@Excel(name = "电压等级", sort = 2)
|
||||
private String voltage;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@Excel(name = "开始时间", sort = 3)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@Excel(name = "结束时间", sort = 4)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private String endTime;
|
||||
|
||||
|
||||
/**
|
||||
* 竣工日期
|
||||
*/
|
||||
@Excel(name = "结束时间", sort = 5)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private String stopTime;
|
||||
|
||||
/**
|
||||
* 变电站座数
|
||||
*/
|
||||
@Excel(name = "变电站座数", sort = 6)
|
||||
private String stationNum;
|
||||
|
||||
/**
|
||||
* 线路建设规模
|
||||
*/
|
||||
@Excel(name = "线路建设规模", sort = 7)
|
||||
private String lineScale;
|
||||
|
||||
/**
|
||||
* 承包范围
|
||||
*/
|
||||
@Excel(name = "承包范围", sort = 8)
|
||||
private String contractRang;
|
||||
|
||||
/**
|
||||
* 业主单位
|
||||
*/
|
||||
@Excel(name = "业主单位", sort = 9)
|
||||
private String ownerUnit;
|
||||
|
||||
/**
|
||||
* 业主联系方式
|
||||
*/
|
||||
@Excel(name = "业主联系方式", sort = 10)
|
||||
private String ownerPhone;
|
||||
|
||||
/**
|
||||
|
|
@ -87,5 +106,10 @@ public class TbCompanyPerfVo {
|
|||
/**
|
||||
* 关键人员列表
|
||||
*/
|
||||
List<TbCompanyPerfRelVo> TbCompanyPerfRelList;
|
||||
List<TbCompanyPerfRelVo> tbCompanyPerfRelList;
|
||||
|
||||
/***
|
||||
* 附件集合
|
||||
*/
|
||||
private List<TbFileSourceVo> tbFileSourceVoList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ public class TbFileSourceVo {
|
|||
*文件类型 (自己按照每个表进行自己定义 建议统一用数字)
|
||||
* tb_key_people 1:身份证正面,2:身份证反面,3:资格证,4:其他资质
|
||||
* tb_other_people 1:身份证正面,2:身份证反面,3:资格证,4:其他资质
|
||||
* tb_company_perf 1:合同
|
||||
* tb_company_perf_rel 1:业绩证明
|
||||
* tb_sub 1:公司资质
|
||||
* tb_sub_people 1:身份证正面,2:身份证反面,3:资格证,4:其他资质
|
||||
*/
|
||||
private String fileType;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,87 @@
|
|||
package com.bonus.tool.dto;
|
||||
|
||||
import com.bonus.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@Data
|
||||
public class TbSubPeopleVo {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名", sort = 2)
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@Excel(name = "身份证号码", sort = 3)
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 职称
|
||||
*/
|
||||
@Excel(name = "职称", sort = 4)
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 资格证书
|
||||
*/
|
||||
@Excel(name = "资格证书", sort = 5)
|
||||
private String diploma;
|
||||
|
||||
|
||||
/**
|
||||
* 证书编号
|
||||
*/
|
||||
@Excel(name = "证书编号", sort = 6)
|
||||
private String diplomaNum;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createUser;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateUser;
|
||||
|
||||
/**
|
||||
* 分包商id
|
||||
*/
|
||||
private Long subId;
|
||||
|
||||
/**
|
||||
* 分包商名称
|
||||
*/
|
||||
@Excel(name = "分包商名称", sort = 1)
|
||||
private String subName;
|
||||
|
||||
/***
|
||||
* 附件集合
|
||||
*/
|
||||
private List<TbFileSourceVo> tbFileSourceVoList;
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.bonus.tool.dto;
|
||||
|
||||
import com.bonus.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@Data
|
||||
public class TbSubVo {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分包商名称
|
||||
*/
|
||||
@Excel(name = "分包商名称", sort = 1)
|
||||
private String subName;
|
||||
|
||||
|
||||
/**
|
||||
* 公司地址
|
||||
*/
|
||||
@Excel(name = "公司地址", sort = 4)
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@Excel(name = "负责人", sort = 2)
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@Excel(name = "联系方式", sort = 3)
|
||||
private String userPhone;
|
||||
|
||||
/**
|
||||
* 公司资质
|
||||
*/
|
||||
private String companyQu;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateUser;
|
||||
|
||||
/***
|
||||
* 附件集合
|
||||
*/
|
||||
private List<TbFileSourceVo> tbFileSourceVoList;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.bonus.tool.mapper;
|
||||
|
||||
import com.bonus.tool.dto.TbCompanyPerfVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbCompanyPerfMapper {
|
||||
List<TbCompanyPerfVo> getTbCompanyPerfList(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
TbCompanyPerfVo getTbCompanyPerfById(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
TbCompanyPerfVo getTbCompanyPerfByProName(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
void addTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
void updateTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
void delTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.bonus.tool.mapper;
|
||||
|
||||
import com.bonus.tool.dto.TbCompanyPerfRelVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbCompanyPerfRelMapper {
|
||||
List<TbCompanyPerfRelVo> getTbCompanyPerRelByPerfId(Long perfId);
|
||||
|
||||
void addTbCompanyPerRel(TbCompanyPerfRelVo tbCompanyPerfRelVo);
|
||||
|
||||
void delTbCompanyPerRelByPerfId(Long perfId);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.bonus.tool.mapper;
|
||||
|
||||
import com.bonus.tool.dto.TbSubVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbSubMapper {
|
||||
List<TbSubVo> getTbSubList(TbSubVo tbSubVo);
|
||||
|
||||
TbSubVo getTbSubById(TbSubVo tbSubVo);
|
||||
|
||||
TbSubVo addTbSub(TbSubVo tbSubVo);
|
||||
|
||||
TbSubVo getTbSubBySubName(TbSubVo tbSubVo);
|
||||
|
||||
void updateTbSub(TbSubVo tbSubVo);
|
||||
|
||||
void delTbSub(TbSubVo tbSubVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.bonus.tool.mapper;
|
||||
|
||||
import com.bonus.tool.dto.TbSubPeopleVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
public interface TbSubPeopleMapper {
|
||||
|
||||
List<TbSubPeopleVo> getTbSubPeopleList(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
TbSubPeopleVo getTbSubPeopleById(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
TbSubPeopleVo getTbSubByIdCard(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
void addTbSub(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
void updateTbSubPeople(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
void delTbSubPeople(TbSubPeopleVo tbSubPeopleVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.bonus.tool.service;
|
||||
|
||||
import com.bonus.tool.dto.TbCompanyPerfRelVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbCompanyPerfRelService {
|
||||
/**
|
||||
* 获取业绩表关联关键人员
|
||||
* @param perfId
|
||||
* @return
|
||||
*/
|
||||
List<TbCompanyPerfRelVo> getTbCompanyPerRelByPerfId(Long perfId);
|
||||
|
||||
/**
|
||||
* 保存关键人员
|
||||
*
|
||||
* @param tbCompanyPerfRelList
|
||||
* @param perfId
|
||||
*/
|
||||
void addTbCompanyPerRelList(List<TbCompanyPerfRelVo> tbCompanyPerfRelList, Long perfId);
|
||||
|
||||
/**
|
||||
* 删除业绩表关联关键人员
|
||||
* @param perfId
|
||||
*/
|
||||
void delTbCompanyPerRelByPerfId(Long perfId) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.bonus.tool.service;
|
||||
|
||||
import com.bonus.tool.dto.TbCompanyPerfVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbCompanyPerfService {
|
||||
/**
|
||||
* 公司业绩管理列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
List<TbCompanyPerfVo> getTbCompanyPerfList(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
/**
|
||||
* 公司业绩管理详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
TbCompanyPerfVo getTbCompanyPerfById(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
/**
|
||||
* 公司业绩管理新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void addTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo);
|
||||
|
||||
/**
|
||||
* 公司业绩管理修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void updateTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo) throws Exception;
|
||||
|
||||
/**
|
||||
* 公司业绩管理删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void delTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo) throws Exception;
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.bonus.tool.service;
|
||||
|
||||
import com.bonus.tool.dto.TbKeyPeopleVo;
|
||||
import com.bonus.tool.dto.TbOtherPeopleVo;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package com.bonus.tool.service;
|
||||
|
||||
import com.bonus.tool.dto.TbSubPeopleVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbSubPeopleService {
|
||||
/**
|
||||
* 分包商人员信息列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
List<TbSubPeopleVo> getTbSubPeopleList(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
/**
|
||||
* 分包商人员信息详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
TbSubPeopleVo getTbSubPeopleById(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
/**
|
||||
* 分包商人员信息新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void addTbSubPeople(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
/**
|
||||
* 分包商人员信息修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void updateTbSubPeople(TbSubPeopleVo tbSubPeopleVo);
|
||||
|
||||
/**
|
||||
* 分包商人员信息删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void delTbSubPeople(TbSubPeopleVo tbSubPeopleVo) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.bonus.tool.service;
|
||||
|
||||
import com.bonus.tool.dto.TbSubVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbSubService {
|
||||
/**
|
||||
* 分包商列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
List<TbSubVo> getTbSubList(TbSubVo tbSubVo);
|
||||
|
||||
/**
|
||||
* 分包商详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
TbSubVo getTbSubById(TbSubVo tbSubVo);
|
||||
|
||||
/**
|
||||
* 分包商新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void addTbSub(TbSubVo tbSubVo);
|
||||
|
||||
/**
|
||||
* 分包商修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void updateTbSub(TbSubVo tbSubVo);
|
||||
|
||||
/**
|
||||
* 分包商删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
void delTbSub(TbSubVo tbSubVo) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.bonus.tool.service.impl;
|
||||
|
||||
import com.bonus.common.enums.TableType;
|
||||
import com.bonus.system.service.ISysFileService;
|
||||
import com.bonus.tool.dto.TbCompanyPerfRelVo;
|
||||
import com.bonus.tool.dto.TbFileSourceVo;
|
||||
import com.bonus.tool.mapper.TbCompanyPerfRelMapper;
|
||||
import com.bonus.tool.service.TbCompanyPerfRelService;
|
||||
import com.bonus.tool.service.TbFileSourceService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbCompanyPerfRelServiceImpl implements TbCompanyPerfRelService {
|
||||
|
||||
@Resource
|
||||
private TbCompanyPerfRelMapper tbCompanyPerfRelMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private TbFileSourceService tbFileSourceService;
|
||||
|
||||
@Resource
|
||||
private ISysFileService iSysFileService;
|
||||
|
||||
@Override
|
||||
public List<TbCompanyPerfRelVo> getTbCompanyPerRelByPerfId(Long perfId) {
|
||||
List<TbCompanyPerfRelVo> tbCompanyPerfRelList = tbCompanyPerfRelMapper.getTbCompanyPerRelByPerfId(perfId);
|
||||
if (!tbCompanyPerfRelList.isEmpty()){
|
||||
for (TbCompanyPerfRelVo tbCompanyPerfRelVo:tbCompanyPerfRelList) {
|
||||
//获取附件信息
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbCompanyPerfRelVo.getId(), TableType.TB_COMPANY_PERF_REL.getCode());
|
||||
tbCompanyPerfRelVo.setTbFileSourceVoList(tbFileSourceVoList);
|
||||
}
|
||||
}
|
||||
return tbCompanyPerfRelList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addTbCompanyPerRelList(List<TbCompanyPerfRelVo> tbCompanyPerfRelList, Long perfId) {
|
||||
for (TbCompanyPerfRelVo tbCompanyPerfRelVo:tbCompanyPerfRelList) {
|
||||
tbCompanyPerfRelVo.setPerfId(perfId);
|
||||
tbCompanyPerfRelMapper.addTbCompanyPerRel(tbCompanyPerfRelVo);
|
||||
//保存附件信息
|
||||
tbFileSourceService.addTbFileSource(tbCompanyPerfRelVo.getTbFileSourceVoList(),tbCompanyPerfRelVo.getId(), TableType.TB_COMPANY_PERF_REL.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delTbCompanyPerRelByPerfId(Long perfId) throws Exception {
|
||||
//获取公司业绩下的关键人员信息
|
||||
tbCompanyPerfRelMapper.delTbCompanyPerRelByPerfId(perfId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
package com.bonus.tool.service.impl;
|
||||
|
||||
import com.bonus.common.enums.TableType;
|
||||
import com.bonus.common.exception.ServiceException;
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.service.ISysFileService;
|
||||
import com.bonus.tool.dto.TbCompanyPerfRelVo;
|
||||
import com.bonus.tool.dto.TbCompanyPerfVo;
|
||||
import com.bonus.tool.dto.TbFileSourceVo;
|
||||
import com.bonus.tool.mapper.TbCompanyPerfMapper;
|
||||
import com.bonus.tool.service.TbCompanyPerfRelService;
|
||||
import com.bonus.tool.service.TbCompanyPerfService;
|
||||
import com.bonus.tool.service.TbFileSourceService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbCompanyPerfServiceImpl implements TbCompanyPerfService {
|
||||
|
||||
@Resource
|
||||
private TbCompanyPerfMapper tbCompanyPerfMapper;
|
||||
|
||||
@Resource
|
||||
private TbCompanyPerfRelService tbCompanyPerfRelService;
|
||||
|
||||
@Resource
|
||||
private TbFileSourceService tbFileSourceService;
|
||||
|
||||
@Resource
|
||||
private ISysFileService iSysFileService;
|
||||
|
||||
/**
|
||||
* 公司业绩管理列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TbCompanyPerfVo> getTbCompanyPerfList(TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
//获取公司业绩列表
|
||||
List<TbCompanyPerfVo> tbCompanyPerfList = tbCompanyPerfMapper.getTbCompanyPerfList(tbCompanyPerfVo);
|
||||
if(!tbCompanyPerfList.isEmpty()){
|
||||
for (TbCompanyPerfVo tbCompanyPerf:tbCompanyPerfList) {
|
||||
//获取项目关键人员信息
|
||||
List<TbCompanyPerfRelVo> tbCompanyPerfRelList = tbCompanyPerfRelService.getTbCompanyPerRelByPerfId(tbCompanyPerf.getId());
|
||||
tbCompanyPerf.setTbCompanyPerfRelList(tbCompanyPerfRelList);
|
||||
//获取附件信息
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbCompanyPerf.getId(), TableType.TB_COMPANY_PERF.getCode());
|
||||
tbCompanyPerf.setTbFileSourceVoList(tbFileSourceVoList);
|
||||
}
|
||||
}
|
||||
return tbCompanyPerfList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TbCompanyPerfVo getTbCompanyPerfById(TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
TbCompanyPerfVo tbCompanyPerf = tbCompanyPerfMapper.getTbCompanyPerfById(tbCompanyPerfVo);
|
||||
//获取项目关键人员信息
|
||||
List<TbCompanyPerfRelVo> tbCompanyPerfRelList = tbCompanyPerfRelService.getTbCompanyPerRelByPerfId(tbCompanyPerf.getId());
|
||||
tbCompanyPerf.setTbCompanyPerfRelList(tbCompanyPerfRelList);
|
||||
//获取附件信息
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbCompanyPerf.getId(), TableType.TB_COMPANY_PERF.getCode());
|
||||
tbCompanyPerf.setTbFileSourceVoList(tbFileSourceVoList);
|
||||
return tbCompanyPerf;
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void addTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
TbCompanyPerfVo tbCompanyPerfOld = tbCompanyPerfMapper.getTbCompanyPerfByProName(tbCompanyPerfVo);
|
||||
if (StringUtils.isNotNull(tbCompanyPerfOld)){
|
||||
throw new ServiceException("工程已存在");
|
||||
}
|
||||
tbCompanyPerfVo.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbCompanyPerfVo.setCreateTime(new Date());
|
||||
tbCompanyPerfMapper.addTbCompanyPerf(tbCompanyPerfVo);
|
||||
tbFileSourceService.addTbFileSource(tbCompanyPerfVo.getTbFileSourceVoList(),tbCompanyPerfVo.getId(), TableType.TB_COMPANY_PERF.getCode());
|
||||
//保存关键人信息
|
||||
tbCompanyPerfRelService.addTbCompanyPerRelList(tbCompanyPerfVo.getTbCompanyPerfRelList(),tbCompanyPerfVo.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo) {
|
||||
try {
|
||||
TbCompanyPerfVo tbCompanyPerfOld = tbCompanyPerfMapper.getTbCompanyPerfByProName(tbCompanyPerfVo);
|
||||
if (StringUtils.isNotNull(tbCompanyPerfOld) && !tbCompanyPerfOld.getId().equals(tbCompanyPerfVo.getId()) ){
|
||||
throw new ServiceException("工程已存在");
|
||||
}
|
||||
tbCompanyPerfMapper.updateTbCompanyPerf(tbCompanyPerfVo);
|
||||
tbFileSourceService.delTbFileSource(tbCompanyPerfVo.getId(),TableType.TB_COMPANY_PERF.getCode());
|
||||
tbFileSourceService.addTbFileSource(tbCompanyPerfVo.getTbFileSourceVoList(),tbCompanyPerfVo.getId(),TableType.TB_COMPANY_PERF.getCode());
|
||||
//删除关键人信息
|
||||
tbCompanyPerfRelService.delTbCompanyPerRelByPerfId(tbCompanyPerfVo.getId());
|
||||
//保存关键人信息
|
||||
tbCompanyPerfRelService.addTbCompanyPerRelList(tbCompanyPerfVo.getTbCompanyPerfRelList(),tbCompanyPerfVo.getId());
|
||||
}catch (Exception e){
|
||||
log.error("公司业绩管理修改失败{}",e.getMessage());
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司业绩管理删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delTbCompanyPerf(TbCompanyPerfVo tbCompanyPerfVo) throws Exception {
|
||||
//公司业绩管理删除
|
||||
tbCompanyPerfMapper.delTbCompanyPerf(tbCompanyPerfVo);
|
||||
//获取公司业绩管理附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbCompanyPerfVo.getId(),TableType.TB_COMPANY_PERF.getCode());
|
||||
//删除服务器图片
|
||||
if (!tbFileSourceVoList.isEmpty()){
|
||||
for (TbFileSourceVo tbFileSource:tbFileSourceVoList) {
|
||||
iSysFileService.deleteFile(tbFileSource.getFilePath());
|
||||
}
|
||||
}
|
||||
//删除附件信息
|
||||
tbFileSourceService.delTbFileSource(tbCompanyPerfVo.getId(),TableType.TB_COMPANY_PERF.getCode());
|
||||
//删除关键人信息
|
||||
tbCompanyPerfRelService.delTbCompanyPerRelByPerfId(tbCompanyPerfVo.getId());
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.bonus.tool.service.impl;
|
|||
|
||||
|
||||
import com.bonus.common.enums.TableType;
|
||||
import com.bonus.common.exception.ServiceException;
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.service.ISysFileService;
|
||||
|
|
@ -78,7 +79,7 @@ public class TbKeyPeopleServiceImpl implements TbKeyPeopleServcie {
|
|||
public void addTbKeyPeople(TbKeyPeopleVo tbKeyPeopleVo) {
|
||||
TbKeyPeopleVo tbKeyPeopleOld = tbKeyPeopleMapper.getTbKeyPeopleByIdCard(tbKeyPeopleVo);
|
||||
if (StringUtils.isNotNull(tbKeyPeopleOld)){
|
||||
throw new RuntimeException("身份证已存在");
|
||||
throw new ServiceException("身份证已存在");
|
||||
}
|
||||
tbKeyPeopleVo.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbKeyPeopleVo.setCreateTime(new Date());
|
||||
|
|
@ -94,6 +95,10 @@ public class TbKeyPeopleServiceImpl implements TbKeyPeopleServcie {
|
|||
@Override
|
||||
@Transactional
|
||||
public void updateTbKeyPeople(TbKeyPeopleVo tbKeyPeopleVo) {
|
||||
TbKeyPeopleVo tbKeyPeopleOld = tbKeyPeopleMapper.getTbKeyPeopleByIdCard(tbKeyPeopleVo);
|
||||
if (StringUtils.isNotNull(tbKeyPeopleOld)){
|
||||
throw new ServiceException("身份证已存在");
|
||||
}
|
||||
tbKeyPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbKeyPeopleMapper.updateTbKeyPeople(tbKeyPeopleVo);
|
||||
tbFileSourceService.delTbFileSource(tbKeyPeopleVo.getId(),TableType.TB_KEY_PEOPLE.getCode());
|
||||
|
|
@ -108,8 +113,6 @@ public class TbKeyPeopleServiceImpl implements TbKeyPeopleServcie {
|
|||
@Transactional
|
||||
public void delTbKeyPeople(TbKeyPeopleVo tbKeyPeopleVo) throws Exception {
|
||||
tbKeyPeopleMapper.delTbKeyPeople(tbKeyPeopleVo);
|
||||
tbFileSourceService.delTbFileSource(tbKeyPeopleVo.getId(),TableType.TB_KEY_PEOPLE.getCode());
|
||||
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbKeyPeopleVo.getId(),TableType.TB_KEY_PEOPLE.getCode());
|
||||
//删除服务器图片
|
||||
|
|
@ -118,5 +121,7 @@ public class TbKeyPeopleServiceImpl implements TbKeyPeopleServcie {
|
|||
iSysFileService.deleteFile(TbFileSource.getFilePath());
|
||||
}
|
||||
}
|
||||
//删除附件信息表中信息
|
||||
tbFileSourceService.delTbFileSource(tbKeyPeopleVo.getId(),TableType.TB_KEY_PEOPLE.getCode());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package com.bonus.tool.service.impl;
|
||||
|
||||
import com.bonus.common.enums.TableType;
|
||||
import com.bonus.common.exception.ServiceException;
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.service.ISysFileService;
|
||||
import com.bonus.tool.dto.TbFileSourceVo;
|
||||
import com.bonus.tool.dto.TbKeyPeopleVo;
|
||||
import com.bonus.tool.dto.TbOtherPeopleVo;
|
||||
import com.bonus.tool.mapper.TbOtherPeopleMapper;
|
||||
import com.bonus.tool.service.TbFileSourceService;
|
||||
|
|
@ -78,7 +78,7 @@ public class TbOtherPeopleServiceImpl implements TbOtherPeopleService {
|
|||
public void addTbOtherPeople(TbOtherPeopleVo tbOtherPeopleVo) {
|
||||
TbOtherPeopleVo tbOtherPeopleOld = tbOtherPeopleMapper.getTbOtherPeopleByIdCard(tbOtherPeopleVo);
|
||||
if (StringUtils.isNotNull(tbOtherPeopleOld)){
|
||||
throw new RuntimeException("身份证已存在");
|
||||
throw new ServiceException("身份证已存在");
|
||||
}
|
||||
tbOtherPeopleVo.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbOtherPeopleVo.setCreateTime(new Date());
|
||||
|
|
@ -87,9 +87,18 @@ public class TbOtherPeopleServiceImpl implements TbOtherPeopleService {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* 其他人员修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateTbOtherPeople(TbOtherPeopleVo tbOtherPeopleVo) {
|
||||
TbOtherPeopleVo tbOtherPeopleOld = tbOtherPeopleMapper.getTbOtherPeopleByIdCard(tbOtherPeopleVo);
|
||||
if (StringUtils.isNotNull(tbOtherPeopleOld)){
|
||||
throw new ServiceException("身份证已存在");
|
||||
}
|
||||
tbOtherPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbOtherPeopleMapper.updateTbOtherPeople(tbOtherPeopleVo);
|
||||
tbFileSourceService.delTbFileSource(tbOtherPeopleVo.getId(),TableType.TB_OTHER_PEOPLE.getCode());
|
||||
|
|
@ -106,8 +115,6 @@ public class TbOtherPeopleServiceImpl implements TbOtherPeopleService {
|
|||
@Transactional
|
||||
public void delTbOtherPeople(TbOtherPeopleVo tbOtherPeopleVo) throws Exception {
|
||||
tbOtherPeopleMapper.delTbOtherPeople(tbOtherPeopleVo);
|
||||
tbFileSourceService.delTbFileSource(tbOtherPeopleVo.getId(),TableType.TB_OTHER_PEOPLE.getCode());
|
||||
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbOtherPeopleVo.getId(),TableType.TB_OTHER_PEOPLE.getCode());
|
||||
//删除服务器图片
|
||||
|
|
@ -116,5 +123,7 @@ public class TbOtherPeopleServiceImpl implements TbOtherPeopleService {
|
|||
iSysFileService.deleteFile(tbFileSource.getFilePath());
|
||||
}
|
||||
}
|
||||
//删除附件信息表中信息
|
||||
tbFileSourceService.delTbFileSource(tbOtherPeopleVo.getId(),TableType.TB_OTHER_PEOPLE.getCode());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,128 @@
|
|||
package com.bonus.tool.service.impl;
|
||||
|
||||
import com.bonus.common.enums.TableType;
|
||||
import com.bonus.common.exception.ServiceException;
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.service.ISysFileService;
|
||||
import com.bonus.tool.dto.TbFileSourceVo;
|
||||
import com.bonus.tool.dto.TbSubPeopleVo;
|
||||
import com.bonus.tool.mapper.TbSubPeopleMapper;
|
||||
import com.bonus.tool.service.TbFileSourceService;
|
||||
import com.bonus.tool.service.TbSubPeopleService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbSubPeopleServiceImpl implements TbSubPeopleService {
|
||||
|
||||
@Resource
|
||||
private TbSubPeopleMapper tbSubPeopleMapper;
|
||||
|
||||
@Resource
|
||||
private TbFileSourceService tbFileSourceService;
|
||||
|
||||
@Resource
|
||||
private ISysFileService iSysFileService;
|
||||
|
||||
/**
|
||||
* 分包商人员信息列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TbSubPeopleVo> getTbSubPeopleList(TbSubPeopleVo tbSubPeopleVo) {
|
||||
//获取人员信息列表
|
||||
List<TbSubPeopleVo> tbSubPeopleList = tbSubPeopleMapper.getTbSubPeopleList(tbSubPeopleVo);
|
||||
if (tbSubPeopleList.size()>0){
|
||||
for (TbSubPeopleVo tbSubPeople: tbSubPeopleList) {
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbSubPeople.getId(), TableType.TB_SUB_PEOPLE.getCode());
|
||||
tbSubPeople.setTbFileSourceVoList(tbFileSourceVoList);
|
||||
}
|
||||
}
|
||||
return tbSubPeopleList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TbSubPeopleVo getTbSubPeopleById(TbSubPeopleVo tbSubPeopleVo) {
|
||||
TbSubPeopleVo tbSubPeople = tbSubPeopleMapper.getTbSubPeopleById(tbSubPeopleVo);
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbSubPeople.getId(), TableType.TB_SUB_PEOPLE.getCode());
|
||||
tbSubPeople.setTbFileSourceVoList(tbFileSourceVoList);
|
||||
return tbSubPeople;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void addTbSubPeople(TbSubPeopleVo tbSubPeopleVo) {
|
||||
TbSubPeopleVo tbSubPeopleOld = tbSubPeopleMapper.getTbSubByIdCard(tbSubPeopleVo);
|
||||
if (StringUtils.isNotNull(tbSubPeopleOld)){
|
||||
throw new ServiceException("身份证号码已存在");
|
||||
}
|
||||
tbSubPeopleVo.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbSubPeopleVo.setCreateTime(new Date());
|
||||
tbSubPeopleMapper.addTbSub(tbSubPeopleVo);
|
||||
tbFileSourceService.addTbFileSource(tbSubPeopleVo.getTbFileSourceVoList(),tbSubPeopleVo.getId(), TableType.TB_SUB_PEOPLE.getCode());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateTbSubPeople(TbSubPeopleVo tbSubPeopleVo) {
|
||||
TbSubPeopleVo tbSubPeopleOld = tbSubPeopleMapper.getTbSubByIdCard(tbSubPeopleVo);
|
||||
if (StringUtils.isNotNull(tbSubPeopleOld)){
|
||||
throw new ServiceException("身份证号码已存在");
|
||||
}
|
||||
tbSubPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbSubPeopleMapper.updateTbSubPeople(tbSubPeopleVo);
|
||||
tbFileSourceService.delTbFileSource(tbSubPeopleVo.getId(),TableType.TB_SUB_PEOPLE.getCode());
|
||||
tbFileSourceService.addTbFileSource(tbSubPeopleVo.getTbFileSourceVoList(),tbSubPeopleVo.getId(),TableType.TB_SUB_PEOPLE.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商人员信息删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delTbSubPeople(TbSubPeopleVo tbSubPeopleVo) throws Exception {
|
||||
tbSubPeopleMapper.delTbSubPeople(tbSubPeopleVo);
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbSubPeopleVo.getId(),TableType.TB_SUB_PEOPLE.getCode());
|
||||
//删除服务器图片
|
||||
if (tbFileSourceVoList.size()>0){
|
||||
for (TbFileSourceVo tbFileSource:tbFileSourceVoList) {
|
||||
iSysFileService.deleteFile(tbFileSource.getFilePath());
|
||||
}
|
||||
}
|
||||
//删除附件信息表中信息
|
||||
tbFileSourceService.delTbFileSource(tbSubPeopleVo.getId(),TableType.TB_SUB_PEOPLE.getCode());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
package com.bonus.tool.service.impl;
|
||||
|
||||
import com.bonus.common.enums.TableType;
|
||||
import com.bonus.common.exception.ServiceException;
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.system.service.ISysFileService;
|
||||
import com.bonus.tool.dto.TbFileSourceVo;
|
||||
import com.bonus.tool.dto.TbSubVo;
|
||||
import com.bonus.tool.mapper.TbSubMapper;
|
||||
import com.bonus.tool.service.TbFileSourceService;
|
||||
import com.bonus.tool.service.TbSubService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/23
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbSubServiceImpl implements TbSubService {
|
||||
|
||||
@Resource
|
||||
private TbSubMapper tbSubMapper;
|
||||
|
||||
@Resource
|
||||
private TbFileSourceService tbFileSourceService;
|
||||
|
||||
@Resource
|
||||
private ISysFileService iSysFileService;
|
||||
|
||||
|
||||
/**
|
||||
* 分包商列表查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TbSubVo> getTbSubList(TbSubVo tbSubVo) {
|
||||
//获取人员信息列表
|
||||
List<TbSubVo> tbSubVoList = tbSubMapper.getTbSubList(tbSubVo);
|
||||
if (tbSubVoList.size()>0){
|
||||
for (TbSubVo tbSub: tbSubVoList) {
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbSub.getId(), TableType.TB_SUB.getCode());
|
||||
tbSub.setTbFileSourceVoList(tbFileSourceVoList);
|
||||
}
|
||||
}
|
||||
return tbSubVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TbSubVo getTbSubById(TbSubVo tbSubVo) {
|
||||
TbSubVo tbSub = tbSubMapper.getTbSubById(tbSubVo);
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbSub.getId(), TableType.TB_SUB.getCode());
|
||||
tbSub.setTbFileSourceVoList(tbFileSourceVoList);
|
||||
return tbSub;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商新增
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void addTbSub(TbSubVo tbSubVo) {
|
||||
TbSubVo tbSubOld = tbSubMapper.getTbSubBySubName(tbSubVo);
|
||||
if (StringUtils.isNotNull(tbSubOld)){
|
||||
throw new ServiceException("分包商名称已存在");
|
||||
}
|
||||
tbSubVo.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbSubVo.setCreateTime(new Date());
|
||||
tbSubMapper.addTbSub(tbSubVo);
|
||||
tbFileSourceService.addTbFileSource(tbSubVo.getTbFileSourceVoList(),tbSubVo.getId(), TableType.TB_SUB.getCode());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateTbSub(TbSubVo tbSubVo) {
|
||||
TbSubVo tbSubOld = tbSubMapper.getTbSubBySubName(tbSubVo);
|
||||
if (StringUtils.isNotNull(tbSubOld)){
|
||||
throw new ServiceException("分包商名称已存在");
|
||||
}
|
||||
tbSubVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||
tbSubMapper.updateTbSub(tbSubVo);
|
||||
tbFileSourceService.delTbFileSource(tbSubVo.getId(),TableType.TB_SUB.getCode());
|
||||
tbFileSourceService.addTbFileSource(tbSubVo.getTbFileSourceVoList(),tbSubVo.getId(),TableType.TB_SUB.getCode());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分包商删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delTbSub(TbSubVo tbSubVo) throws Exception {
|
||||
tbSubMapper.delTbSub(tbSubVo);
|
||||
//获取人员附件
|
||||
List<TbFileSourceVo> tbFileSourceVoList = tbFileSourceService.getTbFileSourceList(tbSubVo.getId(),TableType.TB_SUB.getCode());
|
||||
//删除服务器图片
|
||||
if (tbFileSourceVoList.size()>0){
|
||||
for (TbFileSourceVo tbFileSource:tbFileSourceVoList) {
|
||||
iSysFileService.deleteFile(tbFileSource.getFilePath());
|
||||
}
|
||||
}
|
||||
//删除附件信息表中信息
|
||||
tbFileSourceService.delTbFileSource(tbSubVo.getId(),TableType.TB_SUB.getCode());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<?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.tool.mapper.TbCompanyPerfMapper">
|
||||
<insert id="addTbCompanyPerf" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_company_perf
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="proName != null and proName != ''">pro_name,</if>
|
||||
<if test="voltage != null and voltage != ''">voltage,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null ">end_time,</if>
|
||||
<if test="stopTime != null ">stop_time,</if>
|
||||
<if test="stationNum != null and stationNum != ''">station_num,</if>
|
||||
<if test="lineScale != null ">line_scale,</if>
|
||||
<if test="contractRang != null and contractRang != ''">contract_rang,</if>
|
||||
<if test="ownerUnit != null and ownerUnit != ''">owner_unit,</if>
|
||||
<if test="ownerPhone != null and ownerPhone != ''">owner_phone,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="createUser != null and createUser != ''">create_user,</if>
|
||||
del_flag
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="proName != null and proName != ''">#{proName},</if>
|
||||
<if test="voltage != null and voltage != ''">#{voltage},</if>
|
||||
<if test="startTime != null ">#{startTime},</if>
|
||||
<if test="endTime != null ">#{endTime},</if>
|
||||
<if test="stopTime != null ">#{stopTime},</if>
|
||||
<if test="stationNum != null and stationNum != ''">#{stationNum},</if>
|
||||
<if test="lineScale != null ">#{lineScale},</if>
|
||||
<if test="contractRang != null and contractRang != ''">#{contractRang},</if>
|
||||
<if test="ownerUnit != null and ownerUnit != ''">#{ownerUnit},</if>
|
||||
<if test="ownerPhone != null and ownerPhone != ''">#{ownerPhone},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="createUser != null and createUser != ''">#{createUser},</if>
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateTbCompanyPerf">
|
||||
update tb_company_perf
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="proName != null">pro_name = #{proName},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="stopTime != null">stop_time = #{stopTime},</if>
|
||||
<if test="stationNum != null">station_num = #{stationNum},</if>
|
||||
<if test="lineScale != null">line_scale = #{lineScale},</if>
|
||||
<if test="contractRang != null">contract_rang = #{contractRang},</if>
|
||||
<if test="ownerUnit != null">owner_unit = #{ownerUnit},</if>
|
||||
<if test="ownerPhone != null">owner_phone = #{ownerPhone},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="delTbCompanyPerf">
|
||||
update tb_company_perf set del_flag=1 where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="getTbCompanyPerfList" resultType="com.bonus.tool.dto.TbCompanyPerfVo">
|
||||
select id as id ,pro_name as proName,voltage as voltage,start_time as startTime,end_time as endTime,
|
||||
stop_time as stopTime,station_num as stationNum,line_scale as lineScale,contract_rang as contractRang,
|
||||
owner_unit as ownerUnit,owner_phone as ownerPhone,create_time as createTime, create_user as createUser,
|
||||
update_time as updateTime
|
||||
from tb_company_perf where del_flag =0
|
||||
<if test="proName != '' and proName != null">and pro_name = #{proName}</if>
|
||||
<if test="startTime != null"> and start_time >= STR_TO_DATE(#{startTime}, '%Y-%m-%d')</if>
|
||||
<if test="endTime != null"> and STR_TO_DATE(#{endTime}, '%Y-%m-%d ') >= end_time </if>
|
||||
</select>
|
||||
<select id="getTbCompanyPerfById" resultType="com.bonus.tool.dto.TbCompanyPerfVo">
|
||||
select id,pro_name,voltage,start_time,end_time,stop_time,station_num,line_scale,contract_rang,
|
||||
owner_unit,owner_phone,create_time,create_user,update_time
|
||||
from tb_company_perf where id =#{id}
|
||||
</select>
|
||||
<select id="getTbCompanyPerfByProName" resultType="com.bonus.tool.dto.TbCompanyPerfVo">
|
||||
select id,pro_name,voltage,start_time,end_time,stop_time,station_num,line_scale,contract_rang,
|
||||
owner_unit,owner_phone,create_time,create_user,update_time
|
||||
from tb_company_perf where pro_name =#{proName} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?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.tool.mapper.TbCompanyPerfRelMapper">
|
||||
<insert id="addTbCompanyPerRel" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_company_perf_rel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="workContent != null and workContent != ''">work_content,</if>
|
||||
<if test="keyUser != null">key_user,</if>
|
||||
<if test="perfId != null ">perf_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="workContent != null and workContent != ''">#{workContent},</if>
|
||||
<if test="keyUser != null ">#{keyUser},</if>
|
||||
<if test="perfId != null ">#{perfId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<delete id="delTbCompanyPerRelByPerfId">
|
||||
delete from tb_company_perf_rel where perf_id = #{perfId}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getTbCompanyPerRelByPerfId" resultType="com.bonus.tool.dto.TbCompanyPerfRelVo">
|
||||
select tcpr.id as id,tcpr.title as title,tcpr.work_content as workContent,tcpr.key_user as keyUser,
|
||||
tcpr.perf_id as perfId,tkp.user_name as userName,tkp.id_card as idCard
|
||||
from tb_company_perf_rel tcpr
|
||||
left join tb_key_people tkp on tcpr.key_user = tkp.id
|
||||
where tcpr.perf_id = #{perfId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -88,6 +88,6 @@
|
|||
<select id="getTbKeyPeopleByIdCard" resultType="com.bonus.tool.dto.TbKeyPeopleVo">
|
||||
select id,user_name,id_card,user_phone,education,alma_mater,title,position,major,diploma,
|
||||
diploma_num,level,is_normal,create_time,create_user,update_time,update_user
|
||||
from tb_key_people where id_card = #{idCard}
|
||||
from tb_key_people where id_card = #{idCard} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -82,6 +82,6 @@
|
|||
<select id="getTbOtherPeopleByIdCard" resultType="com.bonus.tool.dto.TbOtherPeopleVo">
|
||||
select id,user_name,id_card,user_phone,qualification,work_type,title,major,diploma,
|
||||
diploma_num,level,is_normal,create_time,create_user,update_time,update_user
|
||||
from tb_other_people where id_card = #{idCard}
|
||||
from tb_other_people where id_card = #{idCard} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
<?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.tool.mapper.TbSubMapper">
|
||||
<insert id="addTbSub" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_sub
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="subName != null and subName != ''">sub_name,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="userPhone != null ">user_phone,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="createUser != null ">create_user,</if>
|
||||
del_flag
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="subName != null and subName != ''">#{subName},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="userName != null ">#{userName},</if>
|
||||
<if test="userPhone != null ">#{userPhone},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="createUser != null ">#{createUser},</if>
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateTbSub">
|
||||
update tb_sub
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="subName != null">sub_name = #{subName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="userPhone != null">user_phone = #{userPhone},</if>
|
||||
<if test="updateUser != null">update_user = #{updateUser},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="delTbSub">
|
||||
update tb_sub set del_flag = 1 where id =#{id}
|
||||
</delete>
|
||||
|
||||
<select id="getTbSubList" resultType="com.bonus.tool.dto.TbSubVo">
|
||||
select id,sub_name,address,user_name,user_phone,create_time,create_user
|
||||
from tb_sub where del_flag = 0
|
||||
<if test="subName != '' and subName != null">and sub_name = #{subName}</if>
|
||||
</select>
|
||||
<select id="getTbSubById" resultType="com.bonus.tool.dto.TbSubVo">
|
||||
select id,sub_name,address,user_name,user_phone,create_time,create_user
|
||||
from tb_sub where id = #{id}
|
||||
</select>
|
||||
<select id="getTbSubBySubName" resultType="com.bonus.tool.dto.TbSubVo">
|
||||
select id,sub_name,address,user_name,user_phone,create_time,create_user
|
||||
from tb_sub where sub_name = #{subName} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?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.tool.mapper.TbSubPeopleMapper">
|
||||
<insert id="addTbSub" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_sub
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="diploma != null ">diploma,</if>
|
||||
<if test="diplomaNum != null ">diploma_num,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="createUser != null ">create_user,</if>
|
||||
<if test="subId != null ">sub_id,</if>
|
||||
del_flag
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||
<if test="title != null ">#{title},</if>
|
||||
<if test="diploma != null ">#{diploma},</if>
|
||||
<if test="diplomaNum != null ">#{diplomaNum},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="createUser != null ">#{createUser},</if>
|
||||
<if test="subId != null ">#{subId},</if>
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateTbSubPeople">
|
||||
update tb_sub_people
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="diploma != null">diploma = #{diploma},</if>
|
||||
<if test="diplomaNum != null">diploma_num = #{diplomaNum},</if>
|
||||
<if test="subId != null">sub_id = #{subId},</if>
|
||||
<if test="updateUser != null">update_user = #{updateUser},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="delTbSubPeople">
|
||||
update tb_sub_people set del_flag = 1 where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="getTbSubPeopleList" resultType="com.bonus.tool.dto.TbSubPeopleVo">
|
||||
select tsp.id as id ,tsp.user_name as userName,tsp.id_card as idCard,tsp.title as title,tsp.diploma as diploma,
|
||||
tsp.diploma_num as diplomaNum,ts.sub_name as subName
|
||||
from tb_sub_people tsp
|
||||
left join tb_sub ts on tsp.sub_id = ts.id
|
||||
where del_flag = 0
|
||||
<if test="userName != '' and userName != null">and user_name = #{userName}</if>
|
||||
<if test="title != '' and title != null">and title = #{title}</if>
|
||||
<if test="diploma != '' and diploma != null">and diploma = #{diploma}</if>
|
||||
</select>
|
||||
<select id="getTbSubPeopleById" resultType="com.bonus.tool.dto.TbSubPeopleVo">
|
||||
select id,user_name,id_card,title,diploma,diploma_num
|
||||
from tb_sub_people where id = #{id}
|
||||
</select>
|
||||
<select id="getTbSubByIdCard" resultType="com.bonus.tool.dto.TbSubPeopleVo">
|
||||
select id,user_name,id_card,title,diploma,diploma_num
|
||||
from tb_sub_people where id_card = #{idCard} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue