Merge remote-tracking branch 'origin/dev' into dev
commit
4040437030
@ -0,0 +1,136 @@
|
||||
package org.dromara.oa.erp.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.oa.erp.domain.vo.ErpProjectAcceptanceVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpProjectAcceptanceBo;
|
||||
import org.dromara.oa.erp.service.IErpProjectAcceptanceService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目验收确认
|
||||
* 前端访问路由地址为:/oa/erp/projectAcceptance
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/erp/projectAcceptance")
|
||||
public class ErpProjectAcceptanceController extends BaseController {
|
||||
|
||||
private final IErpProjectAcceptanceService erpProjectAcceptanceService;
|
||||
|
||||
/**
|
||||
* 查询项目验收确认列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ErpProjectAcceptanceVo> list(ErpProjectAcceptanceBo bo, PageQuery pageQuery) {
|
||||
return erpProjectAcceptanceService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目验收确认列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:export")
|
||||
@Log(title = "项目验收确认", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ErpProjectAcceptanceBo bo, HttpServletResponse response) {
|
||||
List<ErpProjectAcceptanceVo> list = erpProjectAcceptanceService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "项目验收确认", ErpProjectAcceptanceVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目验收确认详细信息
|
||||
*
|
||||
* @param acceptanceId 主键
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:query")
|
||||
@GetMapping("/{acceptanceId}")
|
||||
public R<ErpProjectAcceptanceVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("acceptanceId") Long acceptanceId) {
|
||||
return R.ok(erpProjectAcceptanceService.queryById(acceptanceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目验收确认
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:add")
|
||||
@Log(title = "项目验收确认", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ErpProjectAcceptanceBo bo) {
|
||||
return toAjax(erpProjectAcceptanceService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目验收确认
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:edit")
|
||||
@Log(title = "项目验收确认", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ErpProjectAcceptanceBo bo) {
|
||||
return toAjax(erpProjectAcceptanceService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目验收确认
|
||||
*
|
||||
* @param acceptanceIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:remove")
|
||||
@Log(title = "项目验收确认", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{acceptanceIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] acceptanceIds) {
|
||||
return toAjax(erpProjectAcceptanceService.deleteWithValidByIds(java.util.Arrays.asList(acceptanceIds), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目ID准备验收信息
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:query")
|
||||
@GetMapping("/prepareByProjectId/{projectId}")
|
||||
public R<ErpProjectAcceptanceVo> prepareByProjectId(@PathVariable Long projectId) {
|
||||
return R.ok(erpProjectAcceptanceService.prepareByProjectId(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交项目验收确认并发起流程
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectAcceptance:add")
|
||||
@Log(title = "项目验收确认", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/submitAndFlowStart")
|
||||
public R<ErpProjectAcceptanceVo> submitAndFlowStart(@Validated(AddGroup.class) @RequestBody ErpProjectAcceptanceBo bo) {
|
||||
return R.ok(erpProjectAcceptanceService.submitAndFlowStart(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉框查询项目验收确认列表
|
||||
*/
|
||||
@GetMapping("/getErpProjectAcceptanceList")
|
||||
public R<List<ErpProjectAcceptanceVo>> getErpProjectAcceptanceList(ErpProjectAcceptanceBo bo) {
|
||||
List<ErpProjectAcceptanceVo> list = erpProjectAcceptanceService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
package org.dromara.oa.erp.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.oa.erp.domain.vo.ErpProjectReceivingVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpProjectReceivingBo;
|
||||
import org.dromara.oa.erp.service.IErpProjectReceivingService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目收货确认
|
||||
* 前端访问路由地址为:/oa/erp/projectReceiving
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/erp/projectReceiving")
|
||||
public class ErpProjectReceivingController extends BaseController {
|
||||
|
||||
private final IErpProjectReceivingService erpProjectReceivingService;
|
||||
|
||||
/**
|
||||
* 查询项目收货确认列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ErpProjectReceivingVo> list(ErpProjectReceivingBo bo, PageQuery pageQuery) {
|
||||
return erpProjectReceivingService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目收货确认列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:export")
|
||||
@Log(title = "项目收货确认", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ErpProjectReceivingBo bo, HttpServletResponse response) {
|
||||
List<ErpProjectReceivingVo> list = erpProjectReceivingService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "项目收货确认", ErpProjectReceivingVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目收货确认详细信息
|
||||
*
|
||||
* @param receivingId 主键
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:query")
|
||||
@GetMapping("/{receivingId}")
|
||||
public R<ErpProjectReceivingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("receivingId") Long receivingId) {
|
||||
return R.ok(erpProjectReceivingService.queryById(receivingId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目收货确认
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:add")
|
||||
@Log(title = "项目收货确认", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ErpProjectReceivingBo bo) {
|
||||
return toAjax(erpProjectReceivingService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目收货确认
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:edit")
|
||||
@Log(title = "项目收货确认", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ErpProjectReceivingBo bo) {
|
||||
return toAjax(erpProjectReceivingService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目收货确认
|
||||
*
|
||||
* @param receivingIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:remove")
|
||||
@Log(title = "项目收货确认", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{receivingIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] receivingIds) {
|
||||
return toAjax(erpProjectReceivingService.deleteWithValidByIds(java.util.Arrays.asList(receivingIds), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目ID准备收货信息
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:query")
|
||||
@GetMapping("/prepareByProjectId/{projectId}")
|
||||
public R<ErpProjectReceivingVo> prepareByProjectId(@PathVariable Long projectId) {
|
||||
return R.ok(erpProjectReceivingService.prepareByProjectId(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交项目收货确认并发起流程
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:projectReceiving:add")
|
||||
@Log(title = "项目收货确认", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/submitAndFlowStart")
|
||||
public R<ErpProjectReceivingVo> submitAndFlowStart(@Validated(AddGroup.class) @RequestBody ErpProjectReceivingBo bo) {
|
||||
return R.ok(erpProjectReceivingService.submitAndFlowStart(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉框查询项目收货确认列表
|
||||
*/
|
||||
@GetMapping("/getErpProjectReceivingList")
|
||||
public R<List<ErpProjectReceivingVo>> getErpProjectReceivingList(ErpProjectReceivingBo bo) {
|
||||
List<ErpProjectReceivingVo> list = erpProjectReceivingService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package org.dromara.oa.erp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.oa.erp.domain.ErpProjectAcceptance;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目验收确认视图对象 erp_project_acceptance
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ErpProjectAcceptance.class)
|
||||
public class ErpProjectAcceptanceVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 验收确认ID
|
||||
*/
|
||||
@ExcelProperty(value = "验收确认ID")
|
||||
private Long acceptanceId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 项目号
|
||||
*/
|
||||
@ExcelProperty(value = "项目号")
|
||||
private String projectCode;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 验收确认编号
|
||||
*/
|
||||
@ExcelProperty(value = "验收确认编号")
|
||||
private String acceptanceCode;
|
||||
|
||||
/**
|
||||
* 项目经理
|
||||
*/
|
||||
@ExcelProperty(value = "项目经理")
|
||||
private Long managerId;
|
||||
|
||||
/**
|
||||
* 项目经理姓名
|
||||
*/
|
||||
@ExcelProperty(value = "项目经理姓名")
|
||||
private String projectManagerName;
|
||||
|
||||
/**
|
||||
* 验收日期
|
||||
*/
|
||||
@ExcelProperty(value = "验收日期")
|
||||
private Date acceptanceDate;
|
||||
|
||||
/**
|
||||
* 验收单附件
|
||||
*/
|
||||
@ExcelProperty(value = "验收单附件")
|
||||
private String ossId;
|
||||
|
||||
/**
|
||||
* 部门负责人
|
||||
*/
|
||||
@ExcelProperty(value = "部门负责人")
|
||||
private Long chargeId;
|
||||
|
||||
/**
|
||||
* 分管副总
|
||||
*/
|
||||
@ExcelProperty(value = "分管副总")
|
||||
private Long deputyId;
|
||||
|
||||
/**
|
||||
* 部门负责人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "部门负责人姓名")
|
||||
private String chargeName;
|
||||
|
||||
/**
|
||||
* 分管副总姓名
|
||||
*/
|
||||
@ExcelProperty(value = "分管副总姓名")
|
||||
private String deputyName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 项目状态(1暂存 2审批中 3可用)
|
||||
*/
|
||||
@ExcelProperty(value = "项目状态")
|
||||
private String acceptanceStatus;
|
||||
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
@ExcelProperty(value = "流程状态")
|
||||
private String flowStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package org.dromara.oa.erp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.oa.erp.domain.ErpProjectReceiving;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目收货确认视图对象 erp_project_receiving
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ErpProjectReceiving.class)
|
||||
public class ErpProjectReceivingVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 收货确认ID
|
||||
*/
|
||||
@ExcelProperty(value = "收货确认ID")
|
||||
private Long receivingId;
|
||||
|
||||
/**
|
||||
* 项目号
|
||||
*/
|
||||
@ExcelProperty(value = "项目号")
|
||||
private String projectCode;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 项目经理
|
||||
*/
|
||||
@ExcelProperty(value = "项目经理")
|
||||
private Long managerId;
|
||||
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
@ExcelProperty(value = "到货日期")
|
||||
private Date arrivalDate;
|
||||
|
||||
/**
|
||||
* 收货单附件
|
||||
*/
|
||||
@ExcelProperty(value = "收货单附件")
|
||||
private String ossId;
|
||||
|
||||
/**
|
||||
* 项目经理姓名
|
||||
*/
|
||||
@ExcelProperty(value = "项目经理姓名")
|
||||
private String projectManagerName;
|
||||
|
||||
/**
|
||||
* 部门负责人
|
||||
*/
|
||||
@ExcelProperty(value = "部门负责人")
|
||||
private Long chargeId;
|
||||
|
||||
/**
|
||||
* 分管副总
|
||||
*/
|
||||
@ExcelProperty(value = "分管副总")
|
||||
private Long deputyId;
|
||||
|
||||
/**
|
||||
* 部门负责人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "部门负责人姓名")
|
||||
private String chargeName;
|
||||
|
||||
/**
|
||||
* 分管副总姓名
|
||||
*/
|
||||
@ExcelProperty(value = "分管副总姓名")
|
||||
private String deputyName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 项目状态(1暂存 2审批中 3可用)
|
||||
*/
|
||||
@ExcelProperty(value = "项目状态")
|
||||
private String receivingStatus;
|
||||
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
@ExcelProperty(value = "流程状态")
|
||||
private String flowStatus;
|
||||
|
||||
/**
|
||||
* 收货确认编号
|
||||
*/
|
||||
@ExcelProperty(value = "收货确认编号")
|
||||
private String receivingCode;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
package org.dromara.oa.erp.service;
|
||||
|
||||
import org.dromara.oa.erp.domain.ErpProjectAcceptance;
|
||||
import org.dromara.oa.erp.domain.vo.ErpProjectAcceptanceVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpProjectAcceptanceBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目验收确认Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface IErpProjectAcceptanceService {
|
||||
|
||||
/**
|
||||
* 查询项目验收确认
|
||||
*
|
||||
* @param acceptanceId 主键
|
||||
* @return 项目验收确认
|
||||
*/
|
||||
ErpProjectAcceptanceVo queryById(Long acceptanceId);
|
||||
|
||||
/**
|
||||
* 分页查询项目验收确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 项目验收确认分页列表
|
||||
*/
|
||||
TableDataInfo<ErpProjectAcceptanceVo> queryPageList(ErpProjectAcceptanceBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的项目验收确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 项目验收确认列表
|
||||
*/
|
||||
List<ErpProjectAcceptanceVo> queryList(ErpProjectAcceptanceBo bo);
|
||||
|
||||
/**
|
||||
* 新增项目验收确认
|
||||
*
|
||||
* @param bo 项目验收确认
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ErpProjectAcceptanceBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目验收确认
|
||||
*
|
||||
* @param bo 项目验收确认
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ErpProjectAcceptanceBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除项目验收确认信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据项目ID准备验收信息
|
||||
*
|
||||
* @param projectId 项目ID
|
||||
* @return 项目验收确认信息
|
||||
*/
|
||||
ErpProjectAcceptanceVo prepareByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 提交项目验收确认并发起流程
|
||||
*
|
||||
* @param bo 项目验收确认
|
||||
* @return 项目验收确认信息
|
||||
*/
|
||||
ErpProjectAcceptanceVo submitAndFlowStart(ErpProjectAcceptanceBo bo);
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package org.dromara.oa.erp.service;
|
||||
|
||||
import org.dromara.oa.erp.domain.ErpProjectReceiving;
|
||||
import org.dromara.oa.erp.domain.vo.ErpProjectReceivingVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpProjectReceivingBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目收货确认Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface IErpProjectReceivingService {
|
||||
|
||||
/**
|
||||
* 查询项目收货确认
|
||||
*
|
||||
* @param receivingId 主键
|
||||
* @return 项目收货确认
|
||||
*/
|
||||
ErpProjectReceivingVo queryById(Long receivingId);
|
||||
|
||||
/**
|
||||
* 分页查询项目收货确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 项目收货确认分页列表
|
||||
*/
|
||||
TableDataInfo<ErpProjectReceivingVo> queryPageList(ErpProjectReceivingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的项目收货确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 项目收货确认列表
|
||||
*/
|
||||
List<ErpProjectReceivingVo> queryList(ErpProjectReceivingBo bo);
|
||||
|
||||
/**
|
||||
* 新增项目收货确认
|
||||
*
|
||||
* @param bo 项目收货确认
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ErpProjectReceivingBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目收货确认
|
||||
*
|
||||
* @param bo 项目收货确认
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ErpProjectReceivingBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除项目收货确认信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据项目ID准备收货信息
|
||||
*
|
||||
* @param projectId 项目ID
|
||||
* @return 项目收货确认信息
|
||||
*/
|
||||
ErpProjectReceivingVo prepareByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 提交项目收货确认并发起流程
|
||||
*
|
||||
* @param bo 项目收货确认
|
||||
* @return 项目收货确认信息
|
||||
*/
|
||||
ErpProjectReceivingVo submitAndFlowStart(ErpProjectReceivingBo bo);
|
||||
}
|
||||
@ -0,0 +1,243 @@
|
||||
<?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="org.dromara.oa.erp.mapper.ErpProjectAcceptanceMapper">
|
||||
<resultMap type="org.dromara.oa.erp.domain.vo.ErpProjectAcceptanceVo" id="ErpProjectAcceptanceResult">
|
||||
<id property="acceptanceId" column="acceptance_id"/>
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="projectCode" column="project_code"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="managerId" column="manager_id"/>
|
||||
<result property="projectManagerName" column="projectManagerName"/>
|
||||
<result property="acceptanceDate" column="acceptance_date"/>
|
||||
<result property="ossId" column="oss_id"/>
|
||||
<result property="acceptanceCode" column="acceptance_code"/>
|
||||
<result property="chargeId" column="charge_id"/>
|
||||
<result property="chargeName" column="chargeName"/>
|
||||
<result property="deputyId" column="deputy_id"/>
|
||||
<result property="deputyName" column="deputyName"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="acceptanceStatus" column="acceptance_status"/>
|
||||
<result property="flowStatus" column="flow_status"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomErpProjectAcceptanceVoList" resultMap="ErpProjectAcceptanceResult">
|
||||
select t.acceptance_id, t.project_id, t.tenant_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.acceptance_date, t.oss_id, t.acceptance_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.acceptance_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_acceptance t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询详情 -->
|
||||
<select id="selectCustomErpProjectAcceptanceVoById" resultMap="ErpProjectAcceptanceResult">
|
||||
select t.acceptance_id, t.project_id, t.tenant_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.acceptance_date, t.oss_id, t.acceptance_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.acceptance_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_acceptance t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
where t.acceptance_id = #{acceptanceId}
|
||||
</select>
|
||||
|
||||
<!-- 批量查询 - 根据ID列表 -->
|
||||
<select id="selectCustomErpProjectAcceptanceVoByIds" resultMap="ErpProjectAcceptanceResult">
|
||||
select t.acceptance_id, t.tenant_id, t.project_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.acceptance_date, t.oss_id, t.acceptance_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.acceptance_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_acceptance t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
where t.acceptance_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 统计查询 -->
|
||||
<select id="countCustomErpProjectAcceptance" resultType="java.lang.Long">
|
||||
select count(1) from erp_project_acceptance t
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(带自定义条件) -->
|
||||
<select id="selectCustomErpProjectAcceptanceVoPage" resultMap="ErpProjectAcceptanceResult">
|
||||
select t.acceptance_id, t.tenant_id, t.project_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.acceptance_date, t.oss_id, t.acceptance_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.acceptance_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_acceptance t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsertErpProjectAcceptance">
|
||||
insert into erp_project_acceptance(
|
||||
tenant_id,
|
||||
|
||||
project_id,
|
||||
|
||||
project_code,
|
||||
|
||||
project_name,
|
||||
|
||||
manager_id,
|
||||
|
||||
acceptance_date,
|
||||
|
||||
oss_id,
|
||||
|
||||
acceptance_code,
|
||||
|
||||
charge_id,
|
||||
|
||||
deputy_id,
|
||||
|
||||
remark,
|
||||
|
||||
del_flag,
|
||||
|
||||
create_dept,
|
||||
|
||||
create_by,
|
||||
|
||||
create_time,
|
||||
|
||||
update_by,
|
||||
|
||||
update_time
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.tenantId},
|
||||
|
||||
#{item.projectId},
|
||||
|
||||
#{item.projectCode},
|
||||
|
||||
#{item.projectName},
|
||||
|
||||
#{item.managerId},
|
||||
|
||||
#{item.acceptanceDate},
|
||||
|
||||
#{item.ossId},
|
||||
|
||||
#{item.acceptanceCode},
|
||||
|
||||
#{item.chargeId},
|
||||
|
||||
#{item.deputyId},
|
||||
|
||||
#{item.remark},
|
||||
|
||||
#{item.delFlag},
|
||||
|
||||
#{item.createDept},
|
||||
|
||||
#{item.createBy},
|
||||
|
||||
#{item.createTime},
|
||||
|
||||
#{item.updateBy},
|
||||
|
||||
#{item.updateTime}
|
||||
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="batchUpdateErpProjectAcceptance">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update erp_project_acceptance
|
||||
<set>
|
||||
<if test="item.tenantId != null and item.tenantId != ''">
|
||||
tenant_id = #{item.tenantId},
|
||||
</if>
|
||||
<if test="item.projectId != null">
|
||||
project_id = #{item.projectId},
|
||||
</if>
|
||||
<if test="item.projectCode != null and item.projectCode != ''">
|
||||
project_code = #{item.projectCode},
|
||||
</if>
|
||||
<if test="item.projectName != null and item.projectName != ''">
|
||||
project_name = #{item.projectName},
|
||||
</if>
|
||||
<if test="item.managerId != null">
|
||||
manager_id = #{item.managerId},
|
||||
</if>
|
||||
<if test="item.acceptanceDate != null">
|
||||
acceptance_date = #{item.acceptanceDate},
|
||||
</if>
|
||||
<if test="item.ossId != null and item.ossId != ''">
|
||||
oss_id = #{item.ossId},
|
||||
</if>
|
||||
<if test="item.acceptanceCode != null and item.acceptanceCode != ''">
|
||||
acceptance_code = #{item.acceptanceCode},
|
||||
</if>
|
||||
<if test="item.chargeId != null">
|
||||
charge_id = #{item.chargeId},
|
||||
</if>
|
||||
<if test="item.deputyId != null">
|
||||
deputy_id = #{item.deputyId},
|
||||
</if>
|
||||
<if test="item.remark != null and item.remark != ''">
|
||||
remark = #{item.remark},
|
||||
</if>
|
||||
<if test="item.delFlag != null and item.delFlag != ''">
|
||||
del_flag = #{item.delFlag},
|
||||
</if>
|
||||
<if test="item.createDept != null">
|
||||
create_dept = #{item.createDept},
|
||||
</if>
|
||||
<if test="item.createBy != null">
|
||||
create_by = #{item.createBy},
|
||||
</if>
|
||||
<if test="item.createTime != null">
|
||||
create_time = #{item.createTime},
|
||||
</if>
|
||||
<if test="item.updateBy != null">
|
||||
update_by = #{item.updateBy},
|
||||
</if>
|
||||
<if test="item.updateTime != null">
|
||||
update_time = #{item.updateTime}
|
||||
</if>
|
||||
</set>
|
||||
where acceptance_id = #{item.acceptanceId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据自定义条件删除 -->
|
||||
<delete id="deleteCustomErpProjectAcceptance">
|
||||
delete from erp_project_acceptance
|
||||
${ew.getCustomSqlSegment}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID列表批量删除 -->
|
||||
<delete id="deleteCustomErpProjectAcceptanceByIds">
|
||||
delete from erp_project_acceptance
|
||||
where acceptance_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="existsErpProjectAcceptance" resultType="java.lang.Boolean">
|
||||
select count(1) > 0 from erp_project_acceptance t
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -1,14 +1,97 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.oa.erp.mapper.ErpProjectPurchaseMaterialMapper">
|
||||
<resultMap type="org.dromara.oa.erp.domain.vo.ErpProjectPurchaseMaterialVo" id="ErpProjectPurchaseMaterialResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomErpProjectPurchaseMaterialVoList" resultMap="ErpProjectPurchaseMaterialResult">
|
||||
select purchase_material_id, tenant_id, project_purchase_id, relation_details_id, spare_flag, purchase_plan_flag, material_flag, material_id, relation_material_id, material_code, material_name, specification_description, unit_id, need_purchase_amount, purchase_amount, arrival_time, serial_number, remark, active_flag, del_flag, create_dept, create_by, create_time, update_by, update_time from erp_project_purchase_material t
|
||||
select t.purchase_material_id,
|
||||
t.tenant_id,
|
||||
t.project_purchase_id,
|
||||
t.relation_details_id,
|
||||
t.spare_flag,
|
||||
t.purchase_plan_flag,
|
||||
t.material_flag,
|
||||
t.material_id,
|
||||
t.relation_material_id,
|
||||
t.material_code,
|
||||
t.material_name,
|
||||
t.specification_description,
|
||||
t.unit_id,
|
||||
t.need_purchase_amount,
|
||||
t.purchase_amount,
|
||||
t.arrival_time,
|
||||
t.serial_number,
|
||||
t.remark,
|
||||
t.active_flag,
|
||||
t.del_flag,
|
||||
t.create_dept,
|
||||
t.create_by,
|
||||
t.create_time,
|
||||
t.update_by,
|
||||
t.update_time,
|
||||
COALESCE(bmc.material_code, cm_m.material_code) as relation_material_code,
|
||||
COALESCE(bmc.material_name, cm.product_name) as relation_material_name,
|
||||
u.unit_name
|
||||
from erp_project_purchase_material t
|
||||
left join erp_budget_material_cost bmc on bmc.material_cost_id = t.relation_details_id and t.spare_flag = '0'
|
||||
left join erp_contract_material cm on cm.contract_material_id = t.relation_details_id and t.spare_flag = '1'
|
||||
left join base_material_info m on m.material_id = t.material_id
|
||||
left join base_material_info cm_m on cm_m.material_id = cm.material_id
|
||||
left join base_relation_material r on r.relation_material_id = t.relation_material_id
|
||||
left join base_unit_info u on u.unit_id = t.unit_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="selectContractMaterialsByProjectId"
|
||||
resultType="org.dromara.oa.erp.domain.vo.ErpProjectPurchaseMaterialVo">
|
||||
select t.contract_material_id as relation_details_id,
|
||||
1 as spare_flag,
|
||||
null as purchase_plan_flag,
|
||||
t.material_flag,
|
||||
t.material_id,
|
||||
t.relation_material_id,
|
||||
m.material_code as material_code,
|
||||
COALESCE(m.material_name, t.product_name) as material_name,
|
||||
t.specification_description,
|
||||
t.unit_id,
|
||||
u.unit_name,
|
||||
t.amount as need_purchase_amount,
|
||||
t.amount as purchase_amount,
|
||||
m.material_code as relation_material_code,
|
||||
COALESCE(m.material_name, t.product_name) as relation_material_name
|
||||
from erp_contract_material t
|
||||
left join erp_project_contracts pc on pc.contract_id = t.contract_id and pc.del_flag = '0'
|
||||
left join base_material_info m on m.material_id = t.material_id
|
||||
left join base_unit_info u on u.unit_id = t.unit_id
|
||||
where t.del_flag = '0'
|
||||
and pc.project_id = #{projectId}
|
||||
</select>
|
||||
|
||||
<select id="selectBudgetMaterialsByProjectId"
|
||||
resultType="org.dromara.oa.erp.domain.vo.ErpProjectPurchaseMaterialVo">
|
||||
select t.material_cost_id as relation_details_id,
|
||||
0 as spare_flag,
|
||||
null as purchase_plan_flag,
|
||||
case when t.material_id is not null then 1 else 0 end as material_flag,
|
||||
t.material_id,
|
||||
t.relation_material_id,
|
||||
t.material_code as material_code,
|
||||
t.material_name as material_name,
|
||||
t.remark as specification_description,
|
||||
t.unit_id,
|
||||
u.unit_name,
|
||||
t.amount as need_purchase_amount,
|
||||
t.amount as purchase_amount,
|
||||
t.material_code as relation_material_code,
|
||||
t.material_name as relation_material_name
|
||||
from erp_budget_material_cost t
|
||||
left join base_unit_info u on u.unit_id = t.unit_id
|
||||
where t.del_flag = '0'
|
||||
and t.project_id = #{projectId}
|
||||
order by t.material_cost_id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -0,0 +1,243 @@
|
||||
<?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="org.dromara.oa.erp.mapper.ErpProjectReceivingMapper">
|
||||
<resultMap type="org.dromara.oa.erp.domain.vo.ErpProjectReceivingVo" id="ErpProjectReceivingResult">
|
||||
<id property="receivingId" column="receiving_id"/>
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="projectCode" column="project_code"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="managerId" column="manager_id"/>
|
||||
<result property="projectManagerName" column="projectManagerName"/>
|
||||
<result property="arrivalDate" column="arrival_date"/>
|
||||
<result property="ossId" column="oss_id"/>
|
||||
<result property="receivingCode" column="receiving_code"/>
|
||||
<result property="chargeId" column="charge_id"/>
|
||||
<result property="chargeName" column="chargeName"/>
|
||||
<result property="deputyId" column="deputy_id"/>
|
||||
<result property="deputyName" column="deputyName"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="receivingStatus" column="receiving_status"/>
|
||||
<result property="flowStatus" column="flow_status"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomErpProjectReceivingVoList" resultMap="ErpProjectReceivingResult">
|
||||
select t.receiving_id, t.tenant_id, t.project_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.arrival_date, t.oss_id, t.receiving_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.receiving_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_receiving t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询详情 -->
|
||||
<select id="selectCustomErpProjectReceivingVoById" resultMap="ErpProjectReceivingResult">
|
||||
select t.receiving_id, t.tenant_id, t.project_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.arrival_date, t.oss_id, t.receiving_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.receiving_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_receiving t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
where t.receiving_id = #{receivingId}
|
||||
</select>
|
||||
|
||||
<!-- 批量查询 - 根据ID列表 -->
|
||||
<select id="selectCustomErpProjectReceivingVoByIds" resultMap="ErpProjectReceivingResult">
|
||||
select t.receiving_id, t.tenant_id, t.project_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.arrival_date, t.oss_id, t.receiving_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.receiving_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_receiving t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
where t.receiving_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 统计查询 -->
|
||||
<select id="countCustomErpProjectReceiving" resultType="java.lang.Long">
|
||||
select count(1) from erp_project_receiving t
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(带自定义条件) -->
|
||||
<select id="selectCustomErpProjectReceivingVoPage" resultMap="ErpProjectReceivingResult">
|
||||
select t.receiving_id, t.tenant_id, t.project_id, t.project_code, t.project_name, t.manager_id, u1.nick_name as projectManagerName,
|
||||
t.arrival_date, t.oss_id, t.receiving_code,
|
||||
t.charge_id, u3.nick_name as chargeName, t.deputy_id, u4.nick_name as deputyName, t.remark, t.receiving_status, t.flow_status, t.del_flag, t.create_dept, t.create_by, t.create_time, t.update_by, t.update_time
|
||||
from erp_project_receiving t
|
||||
left join sys_user u1 on t.manager_id = u1.user_id
|
||||
left join sys_user u3 on t.charge_id = u3.user_id
|
||||
left join sys_user u4 on t.deputy_id = u4.user_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsertErpProjectReceiving">
|
||||
insert into erp_project_receiving(
|
||||
tenant_id,
|
||||
|
||||
project_id,
|
||||
|
||||
project_code,
|
||||
|
||||
project_name,
|
||||
|
||||
manager_id,
|
||||
|
||||
arrival_date,
|
||||
|
||||
oss_id,
|
||||
|
||||
receiving_code,
|
||||
|
||||
charge_id,
|
||||
|
||||
deputy_id,
|
||||
|
||||
remark,
|
||||
|
||||
del_flag,
|
||||
|
||||
create_dept,
|
||||
|
||||
create_by,
|
||||
|
||||
create_time,
|
||||
|
||||
update_by,
|
||||
|
||||
update_time
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.tenantId},
|
||||
|
||||
#{item.projectId},
|
||||
|
||||
#{item.projectCode},
|
||||
|
||||
#{item.projectName},
|
||||
|
||||
#{item.managerId},
|
||||
|
||||
#{item.arrivalDate},
|
||||
|
||||
#{item.ossId},
|
||||
|
||||
#{item.receivingCode},
|
||||
|
||||
#{item.chargeId},
|
||||
|
||||
#{item.deputyId},
|
||||
|
||||
#{item.remark},
|
||||
|
||||
#{item.delFlag},
|
||||
|
||||
#{item.createDept},
|
||||
|
||||
#{item.createBy},
|
||||
|
||||
#{item.createTime},
|
||||
|
||||
#{item.updateBy},
|
||||
|
||||
#{item.updateTime}
|
||||
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="batchUpdateErpProjectReceiving">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update erp_project_receiving
|
||||
<set>
|
||||
<if test="item.tenantId != null and item.tenantId != ''">
|
||||
tenant_id = #{item.tenantId},
|
||||
</if>
|
||||
<if test="item.projectId != null">
|
||||
project_id = #{item.projectId},
|
||||
</if>
|
||||
<if test="item.projectCode != null and item.projectCode != ''">
|
||||
project_code = #{item.projectCode},
|
||||
</if>
|
||||
<if test="item.projectName != null and item.projectName != ''">
|
||||
project_name = #{item.projectName},
|
||||
</if>
|
||||
<if test="item.managerId != null">
|
||||
manager_id = #{item.managerId},
|
||||
</if>
|
||||
<if test="item.arrivalDate != null">
|
||||
arrival_date = #{item.arrivalDate},
|
||||
</if>
|
||||
<if test="item.ossId != null and item.ossId != ''">
|
||||
oss_id = #{item.ossId},
|
||||
</if>
|
||||
<if test="item.receivingCode != null and item.receivingCode != ''">
|
||||
receiving_code = #{item.receivingCode},
|
||||
</if>
|
||||
<if test="item.chargeId != null">
|
||||
charge_id = #{item.chargeId},
|
||||
</if>
|
||||
<if test="item.deputyId != null">
|
||||
deputy_id = #{item.deputyId},
|
||||
</if>
|
||||
<if test="item.remark != null and item.remark != ''">
|
||||
remark = #{item.remark},
|
||||
</if>
|
||||
<if test="item.delFlag != null and item.delFlag != ''">
|
||||
del_flag = #{item.delFlag},
|
||||
</if>
|
||||
<if test="item.createDept != null">
|
||||
create_dept = #{item.createDept},
|
||||
</if>
|
||||
<if test="item.createBy != null">
|
||||
create_by = #{item.createBy},
|
||||
</if>
|
||||
<if test="item.createTime != null">
|
||||
create_time = #{item.createTime},
|
||||
</if>
|
||||
<if test="item.updateBy != null">
|
||||
update_by = #{item.updateBy},
|
||||
</if>
|
||||
<if test="item.updateTime != null">
|
||||
update_time = #{item.updateTime}
|
||||
</if>
|
||||
</set>
|
||||
where receiving_id = #{item.receivingId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据自定义条件删除 -->
|
||||
<delete id="deleteCustomErpProjectReceiving">
|
||||
delete from erp_project_receiving
|
||||
${ew.getCustomSqlSegment}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID列表批量删除 -->
|
||||
<delete id="deleteCustomErpProjectReceivingByIds">
|
||||
delete from erp_project_receiving
|
||||
where receiving_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="existsErpProjectReceiving" resultType="java.lang.Boolean">
|
||||
select count(1) > 0 from erp_project_receiving t
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue