PreventRepeatSubmit

This commit is contained in:
sxu 2024-09-27 15:36:56 +08:00
parent b0ff66ed68
commit 4527ac41e8
24 changed files with 1920 additions and 0 deletions

View File

@ -0,0 +1,118 @@
package com.bonus.material.plan.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.material.plan.domain.PlanBorrowDetails;
import com.bonus.material.plan.service.IPlanBorrowDetailsService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.page.TableDataInfo;
/**
* 年度借调计划详细Controller
*
* @author xsheng
* @date 2024-09-27
*/
@Api(tags = "年度借调计划详细接口")
@RestController
@RequestMapping("/plan_borrow_details")
public class PlanBorrowDetailsController extends BaseController
{
@Autowired
private IPlanBorrowDetailsService planBorrowDetailsService;
/**
* 查询年度借调计划详细列表
*/
@ApiOperation(value = "查询年度借调计划详细列表")
@RequiresPermissions("plan:details:list")
@GetMapping("/list")
public TableDataInfo list(PlanBorrowDetails planBorrowDetails)
{
startPage();
List<PlanBorrowDetails> list = planBorrowDetailsService.selectPlanBorrowDetailsList(planBorrowDetails);
return getDataTable(list);
}
/**
* 导出年度借调计划详细列表
*/
@ApiOperation(value = "导出年度借调计划详细列表")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:export")
@SysLog(title = "年度借调计划详细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出年度借调计划详细")
@PostMapping("/export")
public void export(HttpServletResponse response, PlanBorrowDetails planBorrowDetails)
{
List<PlanBorrowDetails> list = planBorrowDetailsService.selectPlanBorrowDetailsList(planBorrowDetails);
ExcelUtil<PlanBorrowDetails> util = new ExcelUtil<PlanBorrowDetails>(PlanBorrowDetails.class);
util.exportExcel(response, list, "年度借调计划详细数据");
}
/**
* 获取年度借调计划详细详细信息
*/
@ApiOperation(value = "获取年度借调计划详细详细信息")
@RequiresPermissions("plan:details:query")
@GetMapping(value = "/{planId}")
public AjaxResult getInfo(@PathVariable("planId") Long planId)
{
return success(planBorrowDetailsService.selectPlanBorrowDetailsByPlanId(planId));
}
/**
* 新增年度借调计划详细
*/
@ApiOperation(value = "新增年度借调计划详细")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:add")
@SysLog(title = "年度借调计划详细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增年度借调计划详细")
@PostMapping
public AjaxResult add(@RequestBody PlanBorrowDetails planBorrowDetails)
{
return toAjax(planBorrowDetailsService.insertPlanBorrowDetails(planBorrowDetails));
}
/**
* 修改年度借调计划详细
*/
@ApiOperation(value = "修改年度借调计划详细")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:edit")
@SysLog(title = "年度借调计划详细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改年度借调计划详细")
@PutMapping
public AjaxResult edit(@RequestBody PlanBorrowDetails planBorrowDetails)
{
return toAjax(planBorrowDetailsService.updatePlanBorrowDetails(planBorrowDetails));
}
/**
* 删除年度借调计划详细
*/
@ApiOperation(value = "删除年度借调计划详细")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:remove")
@SysLog(title = "年度借调计划详细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除年度借调计划详细")
@DeleteMapping("/{planIds}")
public AjaxResult remove(@PathVariable Long[] planIds)
{
return toAjax(planBorrowDetailsService.deletePlanBorrowDetailsByPlanIds(planIds));
}
}

View File

@ -0,0 +1,118 @@
package com.bonus.material.plan.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.material.plan.domain.PlanBorrowInfo;
import com.bonus.material.plan.service.IPlanBorrowInfoService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.page.TableDataInfo;
/**
* 年度借调Controller
*
* @author xsheng
* @date 2024-09-27
*/
@Api(tags = "年度借调接口")
@RestController
@RequestMapping("/plan_borrow_info")
public class PlanBorrowInfoController extends BaseController
{
@Autowired
private IPlanBorrowInfoService planBorrowInfoService;
/**
* 查询年度借调列表
*/
@ApiOperation(value = "查询年度借调列表")
@RequiresPermissions("plan:info:list")
@GetMapping("/list")
public TableDataInfo list(PlanBorrowInfo planBorrowInfo)
{
startPage();
List<PlanBorrowInfo> list = planBorrowInfoService.selectPlanBorrowInfoList(planBorrowInfo);
return getDataTable(list);
}
/**
* 导出年度借调列表
*/
@ApiOperation(value = "导出年度借调列表")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:export")
@SysLog(title = "年度借调", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出年度借调")
@PostMapping("/export")
public void export(HttpServletResponse response, PlanBorrowInfo planBorrowInfo)
{
List<PlanBorrowInfo> list = planBorrowInfoService.selectPlanBorrowInfoList(planBorrowInfo);
ExcelUtil<PlanBorrowInfo> util = new ExcelUtil<PlanBorrowInfo>(PlanBorrowInfo.class);
util.exportExcel(response, list, "年度借调数据");
}
/**
* 获取年度借调详细信息
*/
@ApiOperation(value = "获取年度借调详细信息")
@RequiresPermissions("plan:info:query")
@GetMapping(value = "/{borrowId}")
public AjaxResult getInfo(@PathVariable("borrowId") Long borrowId)
{
return success(planBorrowInfoService.selectPlanBorrowInfoByBorrowId(borrowId));
}
/**
* 新增年度借调
*/
@ApiOperation(value = "新增年度借调")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:add")
@SysLog(title = "年度借调", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增年度借调")
@PostMapping
public AjaxResult add(@RequestBody PlanBorrowInfo planBorrowInfo)
{
return toAjax(planBorrowInfoService.insertPlanBorrowInfo(planBorrowInfo));
}
/**
* 修改年度借调
*/
@ApiOperation(value = "修改年度借调")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:edit")
@SysLog(title = "年度借调", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改年度借调")
@PutMapping
public AjaxResult edit(@RequestBody PlanBorrowInfo planBorrowInfo)
{
return toAjax(planBorrowInfoService.updatePlanBorrowInfo(planBorrowInfo));
}
/**
* 删除年度借调
*/
@ApiOperation(value = "删除年度借调")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:remove")
@SysLog(title = "年度借调", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除年度借调")
@DeleteMapping("/{borrowIds}")
public AjaxResult remove(@PathVariable Long[] borrowIds)
{
return toAjax(planBorrowInfoService.deletePlanBorrowInfoByBorrowIds(borrowIds));
}
}

View File

@ -0,0 +1,118 @@
package com.bonus.material.plan.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.material.plan.domain.PlanNeedDetails;
import com.bonus.material.plan.service.IPlanNeedDetailsService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.page.TableDataInfo;
/**
* 年度计划详细Controller
*
* @author xsheng
* @date 2024-09-27
*/
@Api(tags = "年度计划详细接口")
@RestController
@RequestMapping("/plan_need_details")
public class PlanNeedDetailsController extends BaseController
{
@Autowired
private IPlanNeedDetailsService planNeedDetailsService;
/**
* 查询年度计划详细列表
*/
@ApiOperation(value = "查询年度计划详细列表")
@RequiresPermissions("plan:details:list")
@GetMapping("/list")
public TableDataInfo list(PlanNeedDetails planNeedDetails)
{
startPage();
List<PlanNeedDetails> list = planNeedDetailsService.selectPlanNeedDetailsList(planNeedDetails);
return getDataTable(list);
}
/**
* 导出年度计划详细列表
*/
@ApiOperation(value = "导出年度计划详细列表")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:export")
@SysLog(title = "年度计划详细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出年度计划详细")
@PostMapping("/export")
public void export(HttpServletResponse response, PlanNeedDetails planNeedDetails)
{
List<PlanNeedDetails> list = planNeedDetailsService.selectPlanNeedDetailsList(planNeedDetails);
ExcelUtil<PlanNeedDetails> util = new ExcelUtil<PlanNeedDetails>(PlanNeedDetails.class);
util.exportExcel(response, list, "年度计划详细数据");
}
/**
* 获取年度计划详细详细信息
*/
@ApiOperation(value = "获取年度计划详细详细信息")
@RequiresPermissions("plan:details:query")
@GetMapping(value = "/{planId}")
public AjaxResult getInfo(@PathVariable("planId") Long planId)
{
return success(planNeedDetailsService.selectPlanNeedDetailsByPlanId(planId));
}
/**
* 新增年度计划详细
*/
@ApiOperation(value = "新增年度计划详细")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:add")
@SysLog(title = "年度计划详细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增年度计划详细")
@PostMapping
public AjaxResult add(@RequestBody PlanNeedDetails planNeedDetails)
{
return toAjax(planNeedDetailsService.insertPlanNeedDetails(planNeedDetails));
}
/**
* 修改年度计划详细
*/
@ApiOperation(value = "修改年度计划详细")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:edit")
@SysLog(title = "年度计划详细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改年度计划详细")
@PutMapping
public AjaxResult edit(@RequestBody PlanNeedDetails planNeedDetails)
{
return toAjax(planNeedDetailsService.updatePlanNeedDetails(planNeedDetails));
}
/**
* 删除年度计划详细
*/
@ApiOperation(value = "删除年度计划详细")
@PreventRepeatSubmit
@RequiresPermissions("plan:details:remove")
@SysLog(title = "年度计划详细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除年度计划详细")
@DeleteMapping("/{planIds}")
public AjaxResult remove(@PathVariable Long[] planIds)
{
return toAjax(planNeedDetailsService.deletePlanNeedDetailsByPlanIds(planIds));
}
}

View File

@ -0,0 +1,118 @@
package com.bonus.material.plan.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.material.plan.domain.PlanNeedInfo;
import com.bonus.material.plan.service.IPlanNeedInfoService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.page.TableDataInfo;
/**
* 年度计划Controller
*
* @author xsheng
* @date 2024-09-27
*/
@Api(tags = "年度计划接口")
@RestController
@RequestMapping("/plan_need_info")
public class PlanNeedInfoController extends BaseController
{
@Autowired
private IPlanNeedInfoService planNeedInfoService;
/**
* 查询年度计划列表
*/
@ApiOperation(value = "查询年度计划列表")
@RequiresPermissions("plan:info:list")
@GetMapping("/list")
public TableDataInfo list(PlanNeedInfo planNeedInfo)
{
startPage();
List<PlanNeedInfo> list = planNeedInfoService.selectPlanNeedInfoList(planNeedInfo);
return getDataTable(list);
}
/**
* 导出年度计划列表
*/
@ApiOperation(value = "导出年度计划列表")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:export")
@SysLog(title = "年度计划", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出年度计划")
@PostMapping("/export")
public void export(HttpServletResponse response, PlanNeedInfo planNeedInfo)
{
List<PlanNeedInfo> list = planNeedInfoService.selectPlanNeedInfoList(planNeedInfo);
ExcelUtil<PlanNeedInfo> util = new ExcelUtil<PlanNeedInfo>(PlanNeedInfo.class);
util.exportExcel(response, list, "年度计划数据");
}
/**
* 获取年度计划详细信息
*/
@ApiOperation(value = "获取年度计划详细信息")
@RequiresPermissions("plan:info:query")
@GetMapping(value = "/{planId}")
public AjaxResult getInfo(@PathVariable("planId") Long planId)
{
return success(planNeedInfoService.selectPlanNeedInfoByPlanId(planId));
}
/**
* 新增年度计划
*/
@ApiOperation(value = "新增年度计划")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:add")
@SysLog(title = "年度计划", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增年度计划")
@PostMapping
public AjaxResult add(@RequestBody PlanNeedInfo planNeedInfo)
{
return toAjax(planNeedInfoService.insertPlanNeedInfo(planNeedInfo));
}
/**
* 修改年度计划
*/
@ApiOperation(value = "修改年度计划")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:edit")
@SysLog(title = "年度计划", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改年度计划")
@PutMapping
public AjaxResult edit(@RequestBody PlanNeedInfo planNeedInfo)
{
return toAjax(planNeedInfoService.updatePlanNeedInfo(planNeedInfo));
}
/**
* 删除年度计划
*/
@ApiOperation(value = "删除年度计划")
@PreventRepeatSubmit
@RequiresPermissions("plan:info:remove")
@SysLog(title = "年度计划", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除年度计划")
@DeleteMapping("/{planIds}")
public AjaxResult remove(@PathVariable Long[] planIds)
{
return toAjax(planNeedInfoService.deletePlanNeedInfoByPlanIds(planIds));
}
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.domain;
import java.math.BigDecimal;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
/**
* 年度借调计划详细对象 plan_borrow_details
*
* @author xsheng
* @date 2024-09-27
*/
@Data
@ToString
public class PlanBorrowDetails extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 计划ID */
private Long planId;
/** 物资类型ID */
@Excel(name = "物资类型ID")
@ApiModelProperty(value = "物资类型ID")
private Long typeId;
/** 计划数 */
@Excel(name = "计划数")
@ApiModelProperty(value = "计划数")
private Long planNum;
/** 借出数 */
@Excel(name = "借出数")
@ApiModelProperty(value = "借出数")
private Long borrowNum;
/** 计划单价 */
@Excel(name = "计划单价")
@ApiModelProperty(value = "计划单价")
private BigDecimal planPrice;
/** 计划总价 */
@Excel(name = "计划总价")
@ApiModelProperty(value = "计划总价")
private BigDecimal planCost;
/** 数据所属组织 */
@Excel(name = "数据所属组织")
@ApiModelProperty(value = "数据所属组织")
private Long companyId;
}

View File

@ -0,0 +1,47 @@
package com.bonus.material.plan.domain;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
/**
* 年度借调对象 plan_borrow_info
*
* @author xsheng
* @date 2024-09-27
*/
@Data
@ToString
public class PlanBorrowInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 借调计划ID */
private Long borrowId;
/** 需求单位id */
@Excel(name = "需求单位id")
@ApiModelProperty(value = "需求单位id")
private Long needUnitId;
/** 借出单位id */
@Excel(name = "借出单位id")
@ApiModelProperty(value = "借出单位id")
private Long borrowUnitId;
/** 编号 */
@Excel(name = "编号")
@ApiModelProperty(value = "编号")
private String code;
/** 数据所属组织 */
@Excel(name = "数据所属组织")
@ApiModelProperty(value = "数据所属组织")
private Long companyId;
}

View File

@ -0,0 +1,56 @@
package com.bonus.material.plan.domain;
import java.math.BigDecimal;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
/**
* 年度计划详细对象 plan_need_details
*
* @author xsheng
* @date 2024-09-27
*/
@Data
@ToString
public class PlanNeedDetails extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 计划ID */
private Long planId;
/** 物资类型ID */
@Excel(name = "物资类型ID")
@ApiModelProperty(value = "物资类型ID")
private Long typeId;
/** 计划数 */
@Excel(name = "计划数")
@ApiModelProperty(value = "计划数")
private Long planNum;
/** 计划单价 */
@Excel(name = "计划单价")
@ApiModelProperty(value = "计划单价")
private BigDecimal planPrice;
/** 计划总价 */
@Excel(name = "计划总价")
@ApiModelProperty(value = "计划总价")
private BigDecimal planCost;
/** 数据所属组织 */
@Excel(name = "数据所属组织")
@ApiModelProperty(value = "数据所属组织")
private Long companyId;
}

View File

@ -0,0 +1,42 @@
package com.bonus.material.plan.domain;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
/**
* 年度计划对象 plan_need_info
*
* @author xsheng
* @date 2024-09-27
*/
@Data
@ToString
public class PlanNeedInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 计划ID */
private Long planId;
/** 需求单位id */
@Excel(name = "需求单位id")
@ApiModelProperty(value = "需求单位id")
private Long unitId;
/** 编号 */
@Excel(name = "编号")
@ApiModelProperty(value = "编号")
private String code;
/** 数据所属组织 */
@Excel(name = "数据所属组织")
@ApiModelProperty(value = "数据所属组织")
private Long companyId;
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.mapper;
import java.util.List;
import com.bonus.material.plan.domain.PlanBorrowDetails;
/**
* 年度借调计划详细Mapper接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface PlanBorrowDetailsMapper
{
/**
* 查询年度借调计划详细
*
* @param planId 年度借调计划详细主键
* @return 年度借调计划详细
*/
public PlanBorrowDetails selectPlanBorrowDetailsByPlanId(Long planId);
/**
* 查询年度借调计划详细列表
*
* @param planBorrowDetails 年度借调计划详细
* @return 年度借调计划详细集合
*/
public List<PlanBorrowDetails> selectPlanBorrowDetailsList(PlanBorrowDetails planBorrowDetails);
/**
* 新增年度借调计划详细
*
* @param planBorrowDetails 年度借调计划详细
* @return 结果
*/
public int insertPlanBorrowDetails(PlanBorrowDetails planBorrowDetails);
/**
* 修改年度借调计划详细
*
* @param planBorrowDetails 年度借调计划详细
* @return 结果
*/
public int updatePlanBorrowDetails(PlanBorrowDetails planBorrowDetails);
/**
* 删除年度借调计划详细
*
* @param planId 年度借调计划详细主键
* @return 结果
*/
public int deletePlanBorrowDetailsByPlanId(Long planId);
/**
* 批量删除年度借调计划详细
*
* @param planIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePlanBorrowDetailsByPlanIds(Long[] planIds);
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.mapper;
import java.util.List;
import com.bonus.material.plan.domain.PlanBorrowInfo;
/**
* 年度借调Mapper接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface PlanBorrowInfoMapper
{
/**
* 查询年度借调
*
* @param borrowId 年度借调主键
* @return 年度借调
*/
public PlanBorrowInfo selectPlanBorrowInfoByBorrowId(Long borrowId);
/**
* 查询年度借调列表
*
* @param planBorrowInfo 年度借调
* @return 年度借调集合
*/
public List<PlanBorrowInfo> selectPlanBorrowInfoList(PlanBorrowInfo planBorrowInfo);
/**
* 新增年度借调
*
* @param planBorrowInfo 年度借调
* @return 结果
*/
public int insertPlanBorrowInfo(PlanBorrowInfo planBorrowInfo);
/**
* 修改年度借调
*
* @param planBorrowInfo 年度借调
* @return 结果
*/
public int updatePlanBorrowInfo(PlanBorrowInfo planBorrowInfo);
/**
* 删除年度借调
*
* @param borrowId 年度借调主键
* @return 结果
*/
public int deletePlanBorrowInfoByBorrowId(Long borrowId);
/**
* 批量删除年度借调
*
* @param borrowIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePlanBorrowInfoByBorrowIds(Long[] borrowIds);
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.mapper;
import java.util.List;
import com.bonus.material.plan.domain.PlanNeedDetails;
/**
* 年度计划详细Mapper接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface PlanNeedDetailsMapper
{
/**
* 查询年度计划详细
*
* @param planId 年度计划详细主键
* @return 年度计划详细
*/
public PlanNeedDetails selectPlanNeedDetailsByPlanId(Long planId);
/**
* 查询年度计划详细列表
*
* @param planNeedDetails 年度计划详细
* @return 年度计划详细集合
*/
public List<PlanNeedDetails> selectPlanNeedDetailsList(PlanNeedDetails planNeedDetails);
/**
* 新增年度计划详细
*
* @param planNeedDetails 年度计划详细
* @return 结果
*/
public int insertPlanNeedDetails(PlanNeedDetails planNeedDetails);
/**
* 修改年度计划详细
*
* @param planNeedDetails 年度计划详细
* @return 结果
*/
public int updatePlanNeedDetails(PlanNeedDetails planNeedDetails);
/**
* 删除年度计划详细
*
* @param planId 年度计划详细主键
* @return 结果
*/
public int deletePlanNeedDetailsByPlanId(Long planId);
/**
* 批量删除年度计划详细
*
* @param planIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePlanNeedDetailsByPlanIds(Long[] planIds);
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.mapper;
import java.util.List;
import com.bonus.material.plan.domain.PlanNeedInfo;
/**
* 年度计划Mapper接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface PlanNeedInfoMapper
{
/**
* 查询年度计划
*
* @param planId 年度计划主键
* @return 年度计划
*/
public PlanNeedInfo selectPlanNeedInfoByPlanId(Long planId);
/**
* 查询年度计划列表
*
* @param planNeedInfo 年度计划
* @return 年度计划集合
*/
public List<PlanNeedInfo> selectPlanNeedInfoList(PlanNeedInfo planNeedInfo);
/**
* 新增年度计划
*
* @param planNeedInfo 年度计划
* @return 结果
*/
public int insertPlanNeedInfo(PlanNeedInfo planNeedInfo);
/**
* 修改年度计划
*
* @param planNeedInfo 年度计划
* @return 结果
*/
public int updatePlanNeedInfo(PlanNeedInfo planNeedInfo);
/**
* 删除年度计划
*
* @param planId 年度计划主键
* @return 结果
*/
public int deletePlanNeedInfoByPlanId(Long planId);
/**
* 批量删除年度计划
*
* @param planIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePlanNeedInfoByPlanIds(Long[] planIds);
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.service;
import java.util.List;
import com.bonus.material.plan.domain.PlanBorrowDetails;
/**
* 年度借调计划详细Service接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface IPlanBorrowDetailsService
{
/**
* 查询年度借调计划详细
*
* @param planId 年度借调计划详细主键
* @return 年度借调计划详细
*/
public PlanBorrowDetails selectPlanBorrowDetailsByPlanId(Long planId);
/**
* 查询年度借调计划详细列表
*
* @param planBorrowDetails 年度借调计划详细
* @return 年度借调计划详细集合
*/
public List<PlanBorrowDetails> selectPlanBorrowDetailsList(PlanBorrowDetails planBorrowDetails);
/**
* 新增年度借调计划详细
*
* @param planBorrowDetails 年度借调计划详细
* @return 结果
*/
public int insertPlanBorrowDetails(PlanBorrowDetails planBorrowDetails);
/**
* 修改年度借调计划详细
*
* @param planBorrowDetails 年度借调计划详细
* @return 结果
*/
public int updatePlanBorrowDetails(PlanBorrowDetails planBorrowDetails);
/**
* 批量删除年度借调计划详细
*
* @param planIds 需要删除的年度借调计划详细主键集合
* @return 结果
*/
public int deletePlanBorrowDetailsByPlanIds(Long[] planIds);
/**
* 删除年度借调计划详细信息
*
* @param planId 年度借调计划详细主键
* @return 结果
*/
public int deletePlanBorrowDetailsByPlanId(Long planId);
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.service;
import java.util.List;
import com.bonus.material.plan.domain.PlanBorrowInfo;
/**
* 年度借调Service接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface IPlanBorrowInfoService
{
/**
* 查询年度借调
*
* @param borrowId 年度借调主键
* @return 年度借调
*/
public PlanBorrowInfo selectPlanBorrowInfoByBorrowId(Long borrowId);
/**
* 查询年度借调列表
*
* @param planBorrowInfo 年度借调
* @return 年度借调集合
*/
public List<PlanBorrowInfo> selectPlanBorrowInfoList(PlanBorrowInfo planBorrowInfo);
/**
* 新增年度借调
*
* @param planBorrowInfo 年度借调
* @return 结果
*/
public int insertPlanBorrowInfo(PlanBorrowInfo planBorrowInfo);
/**
* 修改年度借调
*
* @param planBorrowInfo 年度借调
* @return 结果
*/
public int updatePlanBorrowInfo(PlanBorrowInfo planBorrowInfo);
/**
* 批量删除年度借调
*
* @param borrowIds 需要删除的年度借调主键集合
* @return 结果
*/
public int deletePlanBorrowInfoByBorrowIds(Long[] borrowIds);
/**
* 删除年度借调信息
*
* @param borrowId 年度借调主键
* @return 结果
*/
public int deletePlanBorrowInfoByBorrowId(Long borrowId);
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.service;
import java.util.List;
import com.bonus.material.plan.domain.PlanNeedDetails;
/**
* 年度计划详细Service接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface IPlanNeedDetailsService
{
/**
* 查询年度计划详细
*
* @param planId 年度计划详细主键
* @return 年度计划详细
*/
public PlanNeedDetails selectPlanNeedDetailsByPlanId(Long planId);
/**
* 查询年度计划详细列表
*
* @param planNeedDetails 年度计划详细
* @return 年度计划详细集合
*/
public List<PlanNeedDetails> selectPlanNeedDetailsList(PlanNeedDetails planNeedDetails);
/**
* 新增年度计划详细
*
* @param planNeedDetails 年度计划详细
* @return 结果
*/
public int insertPlanNeedDetails(PlanNeedDetails planNeedDetails);
/**
* 修改年度计划详细
*
* @param planNeedDetails 年度计划详细
* @return 结果
*/
public int updatePlanNeedDetails(PlanNeedDetails planNeedDetails);
/**
* 批量删除年度计划详细
*
* @param planIds 需要删除的年度计划详细主键集合
* @return 结果
*/
public int deletePlanNeedDetailsByPlanIds(Long[] planIds);
/**
* 删除年度计划详细信息
*
* @param planId 年度计划详细主键
* @return 结果
*/
public int deletePlanNeedDetailsByPlanId(Long planId);
}

View File

@ -0,0 +1,61 @@
package com.bonus.material.plan.service;
import java.util.List;
import com.bonus.material.plan.domain.PlanNeedInfo;
/**
* 年度计划Service接口
*
* @author xsheng
* @date 2024-09-27
*/
public interface IPlanNeedInfoService
{
/**
* 查询年度计划
*
* @param planId 年度计划主键
* @return 年度计划
*/
public PlanNeedInfo selectPlanNeedInfoByPlanId(Long planId);
/**
* 查询年度计划列表
*
* @param planNeedInfo 年度计划
* @return 年度计划集合
*/
public List<PlanNeedInfo> selectPlanNeedInfoList(PlanNeedInfo planNeedInfo);
/**
* 新增年度计划
*
* @param planNeedInfo 年度计划
* @return 结果
*/
public int insertPlanNeedInfo(PlanNeedInfo planNeedInfo);
/**
* 修改年度计划
*
* @param planNeedInfo 年度计划
* @return 结果
*/
public int updatePlanNeedInfo(PlanNeedInfo planNeedInfo);
/**
* 批量删除年度计划
*
* @param planIds 需要删除的年度计划主键集合
* @return 结果
*/
public int deletePlanNeedInfoByPlanIds(Long[] planIds);
/**
* 删除年度计划信息
*
* @param planId 年度计划主键
* @return 结果
*/
public int deletePlanNeedInfoByPlanId(Long planId);
}

View File

@ -0,0 +1,96 @@
package com.bonus.material.plan.service.impl;
import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.plan.mapper.PlanBorrowDetailsMapper;
import com.bonus.material.plan.domain.PlanBorrowDetails;
import com.bonus.material.plan.service.IPlanBorrowDetailsService;
/**
* 年度借调计划详细Service业务层处理
*
* @author xsheng
* @date 2024-09-27
*/
@Service
public class PlanBorrowDetailsServiceImpl implements IPlanBorrowDetailsService
{
@Autowired
private PlanBorrowDetailsMapper planBorrowDetailsMapper;
/**
* 查询年度借调计划详细
*
* @param planId 年度借调计划详细主键
* @return 年度借调计划详细
*/
@Override
public PlanBorrowDetails selectPlanBorrowDetailsByPlanId(Long planId)
{
return planBorrowDetailsMapper.selectPlanBorrowDetailsByPlanId(planId);
}
/**
* 查询年度借调计划详细列表
*
* @param planBorrowDetails 年度借调计划详细
* @return 年度借调计划详细
*/
@Override
public List<PlanBorrowDetails> selectPlanBorrowDetailsList(PlanBorrowDetails planBorrowDetails)
{
return planBorrowDetailsMapper.selectPlanBorrowDetailsList(planBorrowDetails);
}
/**
* 新增年度借调计划详细
*
* @param planBorrowDetails 年度借调计划详细
* @return 结果
*/
@Override
public int insertPlanBorrowDetails(PlanBorrowDetails planBorrowDetails)
{
planBorrowDetails.setCreateTime(DateUtils.getNowDate());
return planBorrowDetailsMapper.insertPlanBorrowDetails(planBorrowDetails);
}
/**
* 修改年度借调计划详细
*
* @param planBorrowDetails 年度借调计划详细
* @return 结果
*/
@Override
public int updatePlanBorrowDetails(PlanBorrowDetails planBorrowDetails)
{
planBorrowDetails.setUpdateTime(DateUtils.getNowDate());
return planBorrowDetailsMapper.updatePlanBorrowDetails(planBorrowDetails);
}
/**
* 批量删除年度借调计划详细
*
* @param planIds 需要删除的年度借调计划详细主键
* @return 结果
*/
@Override
public int deletePlanBorrowDetailsByPlanIds(Long[] planIds)
{
return planBorrowDetailsMapper.deletePlanBorrowDetailsByPlanIds(planIds);
}
/**
* 删除年度借调计划详细信息
*
* @param planId 年度借调计划详细主键
* @return 结果
*/
@Override
public int deletePlanBorrowDetailsByPlanId(Long planId)
{
return planBorrowDetailsMapper.deletePlanBorrowDetailsByPlanId(planId);
}
}

View File

@ -0,0 +1,96 @@
package com.bonus.material.plan.service.impl;
import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.plan.mapper.PlanBorrowInfoMapper;
import com.bonus.material.plan.domain.PlanBorrowInfo;
import com.bonus.material.plan.service.IPlanBorrowInfoService;
/**
* 年度借调Service业务层处理
*
* @author xsheng
* @date 2024-09-27
*/
@Service
public class PlanBorrowInfoServiceImpl implements IPlanBorrowInfoService
{
@Autowired
private PlanBorrowInfoMapper planBorrowInfoMapper;
/**
* 查询年度借调
*
* @param borrowId 年度借调主键
* @return 年度借调
*/
@Override
public PlanBorrowInfo selectPlanBorrowInfoByBorrowId(Long borrowId)
{
return planBorrowInfoMapper.selectPlanBorrowInfoByBorrowId(borrowId);
}
/**
* 查询年度借调列表
*
* @param planBorrowInfo 年度借调
* @return 年度借调
*/
@Override
public List<PlanBorrowInfo> selectPlanBorrowInfoList(PlanBorrowInfo planBorrowInfo)
{
return planBorrowInfoMapper.selectPlanBorrowInfoList(planBorrowInfo);
}
/**
* 新增年度借调
*
* @param planBorrowInfo 年度借调
* @return 结果
*/
@Override
public int insertPlanBorrowInfo(PlanBorrowInfo planBorrowInfo)
{
planBorrowInfo.setCreateTime(DateUtils.getNowDate());
return planBorrowInfoMapper.insertPlanBorrowInfo(planBorrowInfo);
}
/**
* 修改年度借调
*
* @param planBorrowInfo 年度借调
* @return 结果
*/
@Override
public int updatePlanBorrowInfo(PlanBorrowInfo planBorrowInfo)
{
planBorrowInfo.setUpdateTime(DateUtils.getNowDate());
return planBorrowInfoMapper.updatePlanBorrowInfo(planBorrowInfo);
}
/**
* 批量删除年度借调
*
* @param borrowIds 需要删除的年度借调主键
* @return 结果
*/
@Override
public int deletePlanBorrowInfoByBorrowIds(Long[] borrowIds)
{
return planBorrowInfoMapper.deletePlanBorrowInfoByBorrowIds(borrowIds);
}
/**
* 删除年度借调信息
*
* @param borrowId 年度借调主键
* @return 结果
*/
@Override
public int deletePlanBorrowInfoByBorrowId(Long borrowId)
{
return planBorrowInfoMapper.deletePlanBorrowInfoByBorrowId(borrowId);
}
}

View File

@ -0,0 +1,96 @@
package com.bonus.material.plan.service.impl;
import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.plan.mapper.PlanNeedDetailsMapper;
import com.bonus.material.plan.domain.PlanNeedDetails;
import com.bonus.material.plan.service.IPlanNeedDetailsService;
/**
* 年度计划详细Service业务层处理
*
* @author xsheng
* @date 2024-09-27
*/
@Service
public class PlanNeedDetailsServiceImpl implements IPlanNeedDetailsService
{
@Autowired
private PlanNeedDetailsMapper planNeedDetailsMapper;
/**
* 查询年度计划详细
*
* @param planId 年度计划详细主键
* @return 年度计划详细
*/
@Override
public PlanNeedDetails selectPlanNeedDetailsByPlanId(Long planId)
{
return planNeedDetailsMapper.selectPlanNeedDetailsByPlanId(planId);
}
/**
* 查询年度计划详细列表
*
* @param planNeedDetails 年度计划详细
* @return 年度计划详细
*/
@Override
public List<PlanNeedDetails> selectPlanNeedDetailsList(PlanNeedDetails planNeedDetails)
{
return planNeedDetailsMapper.selectPlanNeedDetailsList(planNeedDetails);
}
/**
* 新增年度计划详细
*
* @param planNeedDetails 年度计划详细
* @return 结果
*/
@Override
public int insertPlanNeedDetails(PlanNeedDetails planNeedDetails)
{
planNeedDetails.setCreateTime(DateUtils.getNowDate());
return planNeedDetailsMapper.insertPlanNeedDetails(planNeedDetails);
}
/**
* 修改年度计划详细
*
* @param planNeedDetails 年度计划详细
* @return 结果
*/
@Override
public int updatePlanNeedDetails(PlanNeedDetails planNeedDetails)
{
planNeedDetails.setUpdateTime(DateUtils.getNowDate());
return planNeedDetailsMapper.updatePlanNeedDetails(planNeedDetails);
}
/**
* 批量删除年度计划详细
*
* @param planIds 需要删除的年度计划详细主键
* @return 结果
*/
@Override
public int deletePlanNeedDetailsByPlanIds(Long[] planIds)
{
return planNeedDetailsMapper.deletePlanNeedDetailsByPlanIds(planIds);
}
/**
* 删除年度计划详细信息
*
* @param planId 年度计划详细主键
* @return 结果
*/
@Override
public int deletePlanNeedDetailsByPlanId(Long planId)
{
return planNeedDetailsMapper.deletePlanNeedDetailsByPlanId(planId);
}
}

View File

@ -0,0 +1,96 @@
package com.bonus.material.plan.service.impl;
import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.plan.mapper.PlanNeedInfoMapper;
import com.bonus.material.plan.domain.PlanNeedInfo;
import com.bonus.material.plan.service.IPlanNeedInfoService;
/**
* 年度计划Service业务层处理
*
* @author xsheng
* @date 2024-09-27
*/
@Service
public class PlanNeedInfoServiceImpl implements IPlanNeedInfoService
{
@Autowired
private PlanNeedInfoMapper planNeedInfoMapper;
/**
* 查询年度计划
*
* @param planId 年度计划主键
* @return 年度计划
*/
@Override
public PlanNeedInfo selectPlanNeedInfoByPlanId(Long planId)
{
return planNeedInfoMapper.selectPlanNeedInfoByPlanId(planId);
}
/**
* 查询年度计划列表
*
* @param planNeedInfo 年度计划
* @return 年度计划
*/
@Override
public List<PlanNeedInfo> selectPlanNeedInfoList(PlanNeedInfo planNeedInfo)
{
return planNeedInfoMapper.selectPlanNeedInfoList(planNeedInfo);
}
/**
* 新增年度计划
*
* @param planNeedInfo 年度计划
* @return 结果
*/
@Override
public int insertPlanNeedInfo(PlanNeedInfo planNeedInfo)
{
planNeedInfo.setCreateTime(DateUtils.getNowDate());
return planNeedInfoMapper.insertPlanNeedInfo(planNeedInfo);
}
/**
* 修改年度计划
*
* @param planNeedInfo 年度计划
* @return 结果
*/
@Override
public int updatePlanNeedInfo(PlanNeedInfo planNeedInfo)
{
planNeedInfo.setUpdateTime(DateUtils.getNowDate());
return planNeedInfoMapper.updatePlanNeedInfo(planNeedInfo);
}
/**
* 批量删除年度计划
*
* @param planIds 需要删除的年度计划主键
* @return 结果
*/
@Override
public int deletePlanNeedInfoByPlanIds(Long[] planIds)
{
return planNeedInfoMapper.deletePlanNeedInfoByPlanIds(planIds);
}
/**
* 删除年度计划信息
*
* @param planId 年度计划主键
* @return 结果
*/
@Override
public int deletePlanNeedInfoByPlanId(Long planId)
{
return planNeedInfoMapper.deletePlanNeedInfoByPlanId(planId);
}
}

View File

@ -0,0 +1,100 @@
<?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.material.plan.mapper.PlanBorrowDetailsMapper">
<resultMap type="com.bonus.material.plan.domain.PlanBorrowDetails" id="PlanBorrowDetailsResult">
<result property="id" column="id" />
<result property="planId" column="plan_id" />
<result property="typeId" column="type_id" />
<result property="planNum" column="plan_num" />
<result property="borrowNum" column="borrow_num" />
<result property="planPrice" column="plan_price" />
<result property="planCost" column="plan_cost" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="companyId" column="company_id" />
</resultMap>
<sql id="selectPlanBorrowDetailsVo">
select id, plan_id, type_id, plan_num, borrow_num, plan_price, plan_cost, create_time, update_by, update_time, remark, company_id from plan_borrow_details
</sql>
<select id="selectPlanBorrowDetailsList" parameterType="com.bonus.material.plan.domain.PlanBorrowDetails" resultMap="PlanBorrowDetailsResult">
<include refid="selectPlanBorrowDetailsVo"/>
<where>
<if test="typeId != null "> and type_id = #{typeId}</if>
<if test="planNum != null "> and plan_num = #{planNum}</if>
<if test="borrowNum != null "> and borrow_num = #{borrowNum}</if>
<if test="planPrice != null "> and plan_price = #{planPrice}</if>
<if test="planCost != null "> and plan_cost = #{planCost}</if>
<if test="companyId != null "> and company_id = #{companyId}</if>
</where>
</select>
<select id="selectPlanBorrowDetailsByPlanId" parameterType="Long" resultMap="PlanBorrowDetailsResult">
<include refid="selectPlanBorrowDetailsVo"/>
where plan_id = #{planId}
</select>
<insert id="insertPlanBorrowDetails" parameterType="com.bonus.material.plan.domain.PlanBorrowDetails" useGeneratedKeys="true" keyProperty="planId">
insert into plan_borrow_details
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="typeId != null">type_id,</if>
<if test="planNum != null">plan_num,</if>
<if test="borrowNum != null">borrow_num,</if>
<if test="planPrice != null">plan_price,</if>
<if test="planCost != null">plan_cost,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="companyId != null">company_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="typeId != null">#{typeId},</if>
<if test="planNum != null">#{planNum},</if>
<if test="borrowNum != null">#{borrowNum},</if>
<if test="planPrice != null">#{planPrice},</if>
<if test="planCost != null">#{planCost},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="companyId != null">#{companyId},</if>
</trim>
</insert>
<update id="updatePlanBorrowDetails" parameterType="com.bonus.material.plan.domain.PlanBorrowDetails">
update plan_borrow_details
<trim prefix="SET" suffixOverrides=",">
<if test="id != null">id = #{id},</if>
<if test="typeId != null">type_id = #{typeId},</if>
<if test="planNum != null">plan_num = #{planNum},</if>
<if test="borrowNum != null">borrow_num = #{borrowNum},</if>
<if test="planPrice != null">plan_price = #{planPrice},</if>
<if test="planCost != null">plan_cost = #{planCost},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="companyId != null">company_id = #{companyId},</if>
</trim>
where plan_id = #{planId}
</update>
<delete id="deletePlanBorrowDetailsByPlanId" parameterType="Long">
delete from plan_borrow_details where plan_id = #{planId}
</delete>
<delete id="deletePlanBorrowDetailsByPlanIds" parameterType="String">
delete from plan_borrow_details where plan_id in
<foreach item="planId" collection="array" open="(" separator="," close=")">
#{planId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,90 @@
<?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.material.plan.mapper.PlanBorrowInfoMapper">
<resultMap type="com.bonus.material.plan.domain.PlanBorrowInfo" id="PlanBorrowInfoResult">
<result property="borrowId" column="borrow_id" />
<result property="needUnitId" column="need_unit_id" />
<result property="borrowUnitId" column="borrow_unit_id" />
<result property="code" column="code" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="companyId" column="company_id" />
</resultMap>
<sql id="selectPlanBorrowInfoVo">
select borrow_id, need_unit_id, borrow_unit_id, code, create_by, create_time, update_by, update_time, remark, company_id from plan_borrow_info
</sql>
<select id="selectPlanBorrowInfoList" parameterType="com.bonus.material.plan.domain.PlanBorrowInfo" resultMap="PlanBorrowInfoResult">
<include refid="selectPlanBorrowInfoVo"/>
<where>
<if test="needUnitId != null "> and need_unit_id = #{needUnitId}</if>
<if test="borrowUnitId != null "> and borrow_unit_id = #{borrowUnitId}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="companyId != null "> and company_id = #{companyId}</if>
</where>
</select>
<select id="selectPlanBorrowInfoByBorrowId" parameterType="Long" resultMap="PlanBorrowInfoResult">
<include refid="selectPlanBorrowInfoVo"/>
where borrow_id = #{borrowId}
</select>
<insert id="insertPlanBorrowInfo" parameterType="com.bonus.material.plan.domain.PlanBorrowInfo" useGeneratedKeys="true" keyProperty="borrowId">
insert into plan_borrow_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="needUnitId != null">need_unit_id,</if>
<if test="borrowUnitId != null">borrow_unit_id,</if>
<if test="code != null">code,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="companyId != null">company_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="needUnitId != null">#{needUnitId},</if>
<if test="borrowUnitId != null">#{borrowUnitId},</if>
<if test="code != null">#{code},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="companyId != null">#{companyId},</if>
</trim>
</insert>
<update id="updatePlanBorrowInfo" parameterType="com.bonus.material.plan.domain.PlanBorrowInfo">
update plan_borrow_info
<trim prefix="SET" suffixOverrides=",">
<if test="needUnitId != null">need_unit_id = #{needUnitId},</if>
<if test="borrowUnitId != null">borrow_unit_id = #{borrowUnitId},</if>
<if test="code != null">code = #{code},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="companyId != null">company_id = #{companyId},</if>
</trim>
where borrow_id = #{borrowId}
</update>
<delete id="deletePlanBorrowInfoByBorrowId" parameterType="Long">
delete from plan_borrow_info where borrow_id = #{borrowId}
</delete>
<delete id="deletePlanBorrowInfoByBorrowIds" parameterType="String">
delete from plan_borrow_info where borrow_id in
<foreach item="borrowId" collection="array" open="(" separator="," close=")">
#{borrowId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,95 @@
<?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.material.plan.mapper.PlanNeedDetailsMapper">
<resultMap type="com.bonus.material.plan.domain.PlanNeedDetails" id="PlanNeedDetailsResult">
<result property="id" column="id" />
<result property="planId" column="plan_id" />
<result property="typeId" column="type_id" />
<result property="planNum" column="plan_num" />
<result property="planPrice" column="plan_price" />
<result property="planCost" column="plan_cost" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="companyId" column="company_id" />
</resultMap>
<sql id="selectPlanNeedDetailsVo">
select id, plan_id, type_id, plan_num, plan_price, plan_cost, create_time, update_by, update_time, remark, company_id from plan_need_details
</sql>
<select id="selectPlanNeedDetailsList" parameterType="com.bonus.material.plan.domain.PlanNeedDetails" resultMap="PlanNeedDetailsResult">
<include refid="selectPlanNeedDetailsVo"/>
<where>
<if test="typeId != null "> and type_id = #{typeId}</if>
<if test="planNum != null "> and plan_num = #{planNum}</if>
<if test="planPrice != null "> and plan_price = #{planPrice}</if>
<if test="planCost != null "> and plan_cost = #{planCost}</if>
<if test="companyId != null "> and company_id = #{companyId}</if>
</where>
</select>
<select id="selectPlanNeedDetailsByPlanId" parameterType="Long" resultMap="PlanNeedDetailsResult">
<include refid="selectPlanNeedDetailsVo"/>
where plan_id = #{planId}
</select>
<insert id="insertPlanNeedDetails" parameterType="com.bonus.material.plan.domain.PlanNeedDetails" useGeneratedKeys="true" keyProperty="planId">
insert into plan_need_details
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="typeId != null">type_id,</if>
<if test="planNum != null">plan_num,</if>
<if test="planPrice != null">plan_price,</if>
<if test="planCost != null">plan_cost,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="companyId != null">company_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="typeId != null">#{typeId},</if>
<if test="planNum != null">#{planNum},</if>
<if test="planPrice != null">#{planPrice},</if>
<if test="planCost != null">#{planCost},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="companyId != null">#{companyId},</if>
</trim>
</insert>
<update id="updatePlanNeedDetails" parameterType="com.bonus.material.plan.domain.PlanNeedDetails">
update plan_need_details
<trim prefix="SET" suffixOverrides=",">
<if test="id != null">id = #{id},</if>
<if test="typeId != null">type_id = #{typeId},</if>
<if test="planNum != null">plan_num = #{planNum},</if>
<if test="planPrice != null">plan_price = #{planPrice},</if>
<if test="planCost != null">plan_cost = #{planCost},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="companyId != null">company_id = #{companyId},</if>
</trim>
where plan_id = #{planId}
</update>
<delete id="deletePlanNeedDetailsByPlanId" parameterType="Long">
delete from plan_need_details where plan_id = #{planId}
</delete>
<delete id="deletePlanNeedDetailsByPlanIds" parameterType="String">
delete from plan_need_details where plan_id in
<foreach item="planId" collection="array" open="(" separator="," close=")">
#{planId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,85 @@
<?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.material.plan.mapper.PlanNeedInfoMapper">
<resultMap type="com.bonus.material.plan.domain.PlanNeedInfo" id="PlanNeedInfoResult">
<result property="planId" column="plan_id" />
<result property="unitId" column="unit_id" />
<result property="code" column="code" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="companyId" column="company_id" />
</resultMap>
<sql id="selectPlanNeedInfoVo">
select plan_id, unit_id, code, create_by, create_time, update_by, update_time, remark, company_id from plan_need_info
</sql>
<select id="selectPlanNeedInfoList" parameterType="com.bonus.material.plan.domain.PlanNeedInfo" resultMap="PlanNeedInfoResult">
<include refid="selectPlanNeedInfoVo"/>
<where>
<if test="unitId != null "> and unit_id = #{unitId}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="companyId != null "> and company_id = #{companyId}</if>
</where>
</select>
<select id="selectPlanNeedInfoByPlanId" parameterType="Long" resultMap="PlanNeedInfoResult">
<include refid="selectPlanNeedInfoVo"/>
where plan_id = #{planId}
</select>
<insert id="insertPlanNeedInfo" parameterType="com.bonus.material.plan.domain.PlanNeedInfo" useGeneratedKeys="true" keyProperty="planId">
insert into plan_need_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="unitId != null">unit_id,</if>
<if test="code != null">code,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="companyId != null">company_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="unitId != null">#{unitId},</if>
<if test="code != null">#{code},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="companyId != null">#{companyId},</if>
</trim>
</insert>
<update id="updatePlanNeedInfo" parameterType="com.bonus.material.plan.domain.PlanNeedInfo">
update plan_need_info
<trim prefix="SET" suffixOverrides=",">
<if test="unitId != null">unit_id = #{unitId},</if>
<if test="code != null">code = #{code},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="companyId != null">company_id = #{companyId},</if>
</trim>
where plan_id = #{planId}
</update>
<delete id="deletePlanNeedInfoByPlanId" parameterType="Long">
delete from plan_need_info where plan_id = #{planId}
</delete>
<delete id="deletePlanNeedInfoByPlanIds" parameterType="String">
delete from plan_need_info where plan_id in
<foreach item="planId" collection="array" open="(" separator="," close=")">
#{planId}
</foreach>
</delete>
</mapper>