parent
ce0790af0e
commit
1a57b13eb4
@ -0,0 +1,116 @@
|
||||
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.ErpFinAccountInstallmentVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountInstallmentBo;
|
||||
import org.dromara.oa.erp.service.IErpFinAccountInstallmentService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 分款信息
|
||||
* 前端访问路由地址为:/oa/erp/finAccountInstallment
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-03-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/finAccountInstallment")
|
||||
public class ErpFinAccountInstallmentController extends BaseController {
|
||||
|
||||
private final IErpFinAccountInstallmentService erpFinAccountInstallmentService;
|
||||
|
||||
/**
|
||||
* 查询分款信息列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountInstallment:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ErpFinAccountInstallmentVo> list(ErpFinAccountInstallmentBo bo, PageQuery pageQuery) {
|
||||
return erpFinAccountInstallmentService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出分款信息列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountInstallment:export")
|
||||
@Log(title = "分款信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ErpFinAccountInstallmentBo bo, HttpServletResponse response) {
|
||||
List<ErpFinAccountInstallmentVo> list = erpFinAccountInstallmentService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "分款信息", ErpFinAccountInstallmentVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分款信息详细信息
|
||||
*
|
||||
* @param accountInstallmentId 主键
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountInstallment:query")
|
||||
@GetMapping("/{accountInstallmentId}")
|
||||
public R<ErpFinAccountInstallmentVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("accountInstallmentId") Long accountInstallmentId) {
|
||||
return R.ok(erpFinAccountInstallmentService.queryById(accountInstallmentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分款信息
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountInstallment:add")
|
||||
@Log(title = "分款信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ErpFinAccountInstallmentBo bo) {
|
||||
return toAjax(erpFinAccountInstallmentService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分款信息
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountInstallment:edit")
|
||||
@Log(title = "分款信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ErpFinAccountInstallmentBo bo) {
|
||||
return toAjax(erpFinAccountInstallmentService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分款信息
|
||||
*
|
||||
* @param accountInstallmentIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountInstallment:remove")
|
||||
@Log(title = "分款信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{accountInstallmentIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("accountInstallmentIds") Long[] accountInstallmentIds) {
|
||||
return toAjax(erpFinAccountInstallmentService.deleteWithValidByIds(List.of(accountInstallmentIds), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉框查询分款信息列表
|
||||
*/
|
||||
@GetMapping("/getErpFinAccountInstallmentList")
|
||||
public R<List<ErpFinAccountInstallmentVo>> getErpFinAccountInstallmentList(ErpFinAccountInstallmentBo bo) {
|
||||
List<ErpFinAccountInstallmentVo> list = erpFinAccountInstallmentService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,144 @@
|
||||
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.dromara.oa.erp.domain.ErpFinAccountReceivableStage;
|
||||
import org.dromara.oa.erp.domain.bo.ErpContractPaymentMethodBo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountReceivableStageBo;
|
||||
import org.dromara.oa.erp.domain.vo.ErpContractPaymentMethodVo;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableStageVo;
|
||||
import org.dromara.oa.erp.service.IErpFinAccountReceivableStageService;
|
||||
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.ErpFinAccountReceivableVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountReceivableBo;
|
||||
import org.dromara.oa.erp.service.IErpFinAccountReceivableService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 应收款信息
|
||||
* 前端访问路由地址为:/oa/erp/finAccountReceivable
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-02-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/erp/finAccountReceivable")
|
||||
public class ErpFinAccountReceivableController extends BaseController {
|
||||
|
||||
private final IErpFinAccountReceivableService erpFinAccountReceivableService;
|
||||
|
||||
private final IErpFinAccountReceivableStageService erpFinAccountReceivableStageService;
|
||||
|
||||
/**
|
||||
* 查询应收款信息列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountReceivable:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ErpFinAccountReceivableVo> list(ErpFinAccountReceivableBo bo, PageQuery pageQuery) {
|
||||
return erpFinAccountReceivableService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出应收款信息列表
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountReceivable:export")
|
||||
@Log(title = "应收款信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ErpFinAccountReceivableBo bo, HttpServletResponse response) {
|
||||
List<ErpFinAccountReceivableVo> list = erpFinAccountReceivableService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "应收款信息", ErpFinAccountReceivableVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应收款信息详细信息
|
||||
*
|
||||
* @param accountReceivableId 主键
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountReceivable:query")
|
||||
@GetMapping("/{accountReceivableId}")
|
||||
public R<ErpFinAccountReceivableVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("accountReceivableId") Long accountReceivableId) {
|
||||
return R.ok(erpFinAccountReceivableService.getAccountReceivableWithProjectByReceivableId(accountReceivableId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增应收款信息
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountReceivable:add")
|
||||
@Log(title = "应收款信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ErpFinAccountReceivableBo bo) {
|
||||
return toAjax(erpFinAccountReceivableService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应收款信息
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountReceivable:edit")
|
||||
@Log(title = "应收款信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ErpFinAccountReceivableBo bo) {
|
||||
return toAjax(erpFinAccountReceivableService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应收款信息
|
||||
*
|
||||
* @param accountReceivableIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("oa/erp:finAccountReceivable:remove")
|
||||
@Log(title = "应收款信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{accountReceivableIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("accountReceivableIds") Long[] accountReceivableIds) {
|
||||
return toAjax(erpFinAccountReceivableService.deleteWithValidByIds(List.of(accountReceivableIds), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉框查询应收款信息列表
|
||||
*/
|
||||
@GetMapping("/getErpFinAccountReceivableList")
|
||||
public R<List<ErpFinAccountReceivableVo>> getErpFinAccountReceivableList(ErpFinAccountReceivableBo bo) {
|
||||
List<ErpFinAccountReceivableVo> list = erpFinAccountReceivableService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询应收款节点信息列表,right join 应收款节点信息erp_fin_account_receivable_stage
|
||||
*/
|
||||
@GetMapping("/getErpFinAccountReceivableStageList")
|
||||
public R<List<ErpFinAccountReceivableStageVo>> getErpFinAccountReceivableStageList(ErpFinAccountReceivableStageBo bo) {
|
||||
List<ErpFinAccountReceivableStageVo> list = erpFinAccountReceivableStageService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询合同付款方式列表,left join base_payment_stage
|
||||
*/
|
||||
@GetMapping("/getErpContractPaymentMethodJoinList")
|
||||
public R<List<ErpContractPaymentMethodVo>> getErpContractPaymentMethodJoinList(ErpContractPaymentMethodBo bo) {
|
||||
List<ErpContractPaymentMethodVo> list = erpFinAccountReceivableStageService.queryContractPaymentMethodJoinList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package org.dromara.oa.erp.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountInstallmentDetail;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountInstallmentDetailVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 分款明细信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-03-09
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
public interface ErpFinAccountInstallmentDetailMapper extends BaseMapperPlus<ErpFinAccountInstallmentDetail, ErpFinAccountInstallmentDetailVo> {
|
||||
|
||||
/**
|
||||
* 查询分款明细信息列表
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 条件
|
||||
* @return 分款明细信息集合
|
||||
*/
|
||||
public Page<ErpFinAccountInstallmentDetailVo> selectCustomErpFinAccountInstallmentDetailVoList(@Param("page") Page<ErpFinAccountInstallmentDetailVo> page, @Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountInstallmentDetail> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询分款明细信息列表
|
||||
*
|
||||
* @param queryWrapper 条件
|
||||
* @return 分款明细信息集合
|
||||
*/
|
||||
public List<ErpFinAccountInstallmentDetailVo> selectCustomErpFinAccountInstallmentDetailVoList(@Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountInstallmentDetail> queryWrapper);
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package org.dromara.oa.erp.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountInstallment;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountInstallmentVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 分款信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-03-09
|
||||
*/
|
||||
public interface ErpFinAccountInstallmentMapper extends BaseMapperPlus<ErpFinAccountInstallment, ErpFinAccountInstallmentVo> {
|
||||
|
||||
/**
|
||||
* 查询分款信息列表
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 条件
|
||||
* @return 分款信息集合
|
||||
*/
|
||||
public Page<ErpFinAccountInstallmentVo> selectCustomErpFinAccountInstallmentVoList(@Param("page") Page<ErpFinAccountInstallmentVo> page, @Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountInstallment> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询分款信息列表
|
||||
*
|
||||
* @param queryWrapper 条件
|
||||
* @return 分款信息集合
|
||||
*/
|
||||
public List<ErpFinAccountInstallmentVo> selectCustomErpFinAccountInstallmentVoList(@Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountInstallment> queryWrapper);
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package org.dromara.oa.erp.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountReceivable;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 应收款信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-02-25
|
||||
*/
|
||||
public interface ErpFinAccountReceivableMapper extends BaseMapperPlus<ErpFinAccountReceivable, ErpFinAccountReceivableVo> {
|
||||
|
||||
/**
|
||||
* 查询应收款信息列表
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 条件
|
||||
* @return 应收款信息集合
|
||||
*/
|
||||
public Page<ErpFinAccountReceivableVo> selectCustomErpFinAccountReceivableVoList(@Param("page") Page<ErpFinAccountReceivableVo> page, @Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountReceivable> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询应收款信息列表
|
||||
*
|
||||
* @param queryWrapper 条件
|
||||
* @return 应收款信息集合
|
||||
*/
|
||||
public List<ErpFinAccountReceivableVo> selectCustomErpFinAccountReceivableVoList(@Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountReceivable> queryWrapper);
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package org.dromara.oa.erp.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountReceivableStage;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableStageVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 应收款节点信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-02-24
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
public interface ErpFinAccountReceivableStageMapper extends BaseMapperPlus<ErpFinAccountReceivableStage, ErpFinAccountReceivableStageVo> {
|
||||
|
||||
/**
|
||||
* 查询应收款节点信息列表
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 条件
|
||||
* @return 应收款节点信息集合
|
||||
*/
|
||||
public Page<ErpFinAccountReceivableStageVo> selectCustomErpFinAccountReceivableStageVoList(@Param("page") Page<ErpFinAccountReceivableStageVo> page, @Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountReceivableStage> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询应收款节点信息列表
|
||||
*
|
||||
* @param queryWrapper 条件
|
||||
* @return 应收款节点信息集合
|
||||
*/
|
||||
public List<ErpFinAccountReceivableStageVo> selectCustomErpFinAccountReceivableStageVoList(@Param(Constants.WRAPPER) MPJLambdaWrapper<ErpFinAccountReceivableStage> queryWrapper);
|
||||
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package org.dromara.oa.erp.service;
|
||||
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountInstallment;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountInstallmentVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountInstallmentBo;
|
||||
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 xins
|
||||
* @date 2026-03-09
|
||||
*/
|
||||
public interface IErpFinAccountInstallmentService {
|
||||
|
||||
/**
|
||||
* 查询分款信息
|
||||
*
|
||||
* @param accountInstallmentId 主键
|
||||
* @return 分款信息
|
||||
*/
|
||||
ErpFinAccountInstallmentVo queryById(Long accountInstallmentId);
|
||||
|
||||
/**
|
||||
* 分页查询分款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 分款信息分页列表
|
||||
*/
|
||||
TableDataInfo<ErpFinAccountInstallmentVo> queryPageList(ErpFinAccountInstallmentBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的分款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 分款信息列表
|
||||
*/
|
||||
List<ErpFinAccountInstallmentVo> queryList(ErpFinAccountInstallmentBo bo);
|
||||
|
||||
/**
|
||||
* 新增分款信息
|
||||
*
|
||||
* @param bo 分款信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ErpFinAccountInstallmentBo bo);
|
||||
|
||||
/**
|
||||
* 修改分款信息
|
||||
*
|
||||
* @param bo 分款信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ErpFinAccountInstallmentBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除分款信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package org.dromara.oa.erp.service;
|
||||
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountReceivable;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountReceivableBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.oa.erp.domain.vo.ErpProjectInfoVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应收款信息Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-02-25
|
||||
*/
|
||||
public interface IErpFinAccountReceivableService {
|
||||
|
||||
/**
|
||||
* 查询应收款信息
|
||||
*
|
||||
* @param accountReceivableId 主键
|
||||
* @return 应收款信息
|
||||
*/
|
||||
ErpFinAccountReceivableVo queryById(Long accountReceivableId);
|
||||
|
||||
/**
|
||||
* 分页查询应收款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 应收款信息分页列表
|
||||
*/
|
||||
TableDataInfo<ErpFinAccountReceivableVo> queryPageList(ErpFinAccountReceivableBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的应收款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 应收款信息列表
|
||||
*/
|
||||
List<ErpFinAccountReceivableVo> queryList(ErpFinAccountReceivableBo bo);
|
||||
|
||||
/**
|
||||
* 新增应收款信息
|
||||
*
|
||||
* @param bo 应收款信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ErpFinAccountReceivableBo bo);
|
||||
|
||||
/**
|
||||
* 修改应收款信息
|
||||
*
|
||||
* @param bo 应收款信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ErpFinAccountReceivableBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除应收款信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 查询符合条件的应收款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 应收款信息列表
|
||||
*/
|
||||
public List<ErpFinAccountReceivableVo> queryJoinList(ErpFinAccountReceivableBo bo);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param accountReceivableId
|
||||
* @return ErpProjectInfoVo
|
||||
*/
|
||||
public ErpFinAccountReceivableVo getAccountReceivableWithProjectByReceivableId(Long accountReceivableId);
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package org.dromara.oa.erp.service;
|
||||
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountReceivableStage;
|
||||
import org.dromara.oa.erp.domain.bo.ErpContractPaymentMethodBo;
|
||||
import org.dromara.oa.erp.domain.vo.ErpContractPaymentMethodVo;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableStageVo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountReceivableStageBo;
|
||||
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 xins
|
||||
* @date 2026-02-24
|
||||
*/
|
||||
public interface IErpFinAccountReceivableStageService {
|
||||
|
||||
/**
|
||||
* 查询应收款节点信息
|
||||
*
|
||||
* @param receivableStageId 主键
|
||||
* @return 应收款节点信息
|
||||
*/
|
||||
ErpFinAccountReceivableStageVo queryById(Long receivableStageId);
|
||||
|
||||
/**
|
||||
* 分页查询应收款节点信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 应收款节点信息分页列表
|
||||
*/
|
||||
TableDataInfo<ErpFinAccountReceivableStageVo> queryPageList(ErpFinAccountReceivableStageBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的应收款节点信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 应收款节点信息列表
|
||||
*/
|
||||
List<ErpFinAccountReceivableStageVo> queryList(ErpFinAccountReceivableStageBo bo);
|
||||
|
||||
/**
|
||||
* 新增应收款节点信息
|
||||
*
|
||||
* @param bo 应收款节点信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(ErpFinAccountReceivableStageBo bo);
|
||||
|
||||
/**
|
||||
* 修改应收款节点信息
|
||||
*
|
||||
* @param bo 应收款节点信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ErpFinAccountReceivableStageBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除应收款节点信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
|
||||
/**
|
||||
* 查询符合条件的合同付款方式列表,left join base_payment_stage
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 合同付款方式列表
|
||||
*/
|
||||
public List<ErpContractPaymentMethodVo> queryContractPaymentMethodJoinList(ErpContractPaymentMethodBo bo);
|
||||
}
|
||||
@ -0,0 +1,142 @@
|
||||
package org.dromara.oa.erp.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountInstallmentBo;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountInstallmentVo;
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountInstallment;
|
||||
import org.dromara.oa.erp.mapper.ErpFinAccountInstallmentMapper;
|
||||
import org.dromara.oa.erp.service.IErpFinAccountInstallmentService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 分款信息Service业务层处理
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-03-09
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ErpFinAccountInstallmentServiceImpl implements IErpFinAccountInstallmentService {
|
||||
|
||||
private final ErpFinAccountInstallmentMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询分款信息
|
||||
*
|
||||
* @param accountInstallmentId 主键
|
||||
* @return 分款信息
|
||||
*/
|
||||
@Override
|
||||
public ErpFinAccountInstallmentVo queryById(Long accountInstallmentId){
|
||||
return baseMapper.selectVoById(accountInstallmentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询分款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 分款信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ErpFinAccountInstallmentVo> queryPageList(ErpFinAccountInstallmentBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<ErpFinAccountInstallment> lqw = buildQueryWrapper(bo);
|
||||
Page<ErpFinAccountInstallmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的分款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 分款信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<ErpFinAccountInstallmentVo> queryList(ErpFinAccountInstallmentBo bo) {
|
||||
MPJLambdaWrapper<ErpFinAccountInstallment> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<ErpFinAccountInstallment> buildQueryWrapper(ErpFinAccountInstallmentBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<ErpFinAccountInstallment> lqw = JoinWrappers.lambda(ErpFinAccountInstallment.class)
|
||||
.selectAll(ErpFinAccountInstallment.class)
|
||||
.eq(StringUtils.isNotBlank(bo.getInstallmentCode()), ErpFinAccountInstallment::getInstallmentCode, bo.getInstallmentCode())
|
||||
.eq(bo.getCustomerId() != null, ErpFinAccountInstallment::getCustomerId, bo.getCustomerId())
|
||||
.like(StringUtils.isNotBlank(bo.getCustomerName()), ErpFinAccountInstallment::getCustomerName, bo.getCustomerName())
|
||||
.eq(StringUtils.isNotBlank(bo.getCurrency()), ErpFinAccountInstallment::getCurrency, bo.getCurrency())
|
||||
.eq(bo.getPaymentAmount() != null, ErpFinAccountInstallment::getPaymentAmount, bo.getPaymentAmount())
|
||||
.eq(bo.getPaymentDate() != null, ErpFinAccountInstallment::getPaymentDate, bo.getPaymentDate())
|
||||
.eq(bo.getDispatchUserId() != null, ErpFinAccountInstallment::getDispatchUserId, bo.getDispatchUserId())
|
||||
.eq(bo.getDispatchDeptId() != null, ErpFinAccountInstallment::getDispatchDeptId, bo.getDispatchDeptId())
|
||||
.eq(bo.getDispatchDate() != null, ErpFinAccountInstallment::getDispatchDate, bo.getDispatchDate())
|
||||
.eq(StringUtils.isNotBlank(bo.getInstallmentStatus()), ErpFinAccountInstallment::getInstallmentStatus, bo.getInstallmentStatus())
|
||||
.eq(bo.getAccountManageId() != null, ErpFinAccountInstallment::getAccountManageId, bo.getAccountManageId())
|
||||
;
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分款信息
|
||||
*
|
||||
* @param bo 分款信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ErpFinAccountInstallmentBo bo) {
|
||||
ErpFinAccountInstallment add = MapstructUtils.convert(bo, ErpFinAccountInstallment.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setAccountInstallmentId(add.getAccountInstallmentId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分款信息
|
||||
*
|
||||
* @param bo 分款信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ErpFinAccountInstallmentBo bo) {
|
||||
ErpFinAccountInstallment update = MapstructUtils.convert(bo, ErpFinAccountInstallment.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ErpFinAccountInstallment entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除分款信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,250 @@
|
||||
package org.dromara.oa.erp.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.oa.erp.constant.ProjectCategoryConstant;
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountReceivableStage;
|
||||
import org.dromara.oa.erp.domain.ErpProjectInfo;
|
||||
import org.dromara.oa.erp.domain.bo.ErpProjectInfoBo;
|
||||
import org.dromara.oa.erp.domain.vo.ErpProjectInfoVo;
|
||||
import org.dromara.oa.erp.mapper.ErpFinAccountReceivableStageMapper;
|
||||
import org.dromara.oa.erp.mapper.ErpProjectInfoMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.oa.erp.domain.bo.ErpFinAccountReceivableBo;
|
||||
import org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableVo;
|
||||
import org.dromara.oa.erp.domain.ErpFinAccountReceivable;
|
||||
import org.dromara.oa.erp.mapper.ErpFinAccountReceivableMapper;
|
||||
import org.dromara.oa.erp.service.IErpFinAccountReceivableService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 应收款信息Service业务层处理
|
||||
*
|
||||
* @author xins
|
||||
* @date 2026-02-25
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ErpFinAccountReceivableServiceImpl implements IErpFinAccountReceivableService {
|
||||
|
||||
private final ErpFinAccountReceivableMapper baseMapper;
|
||||
|
||||
private final ErpFinAccountReceivableStageMapper stageMapper;
|
||||
|
||||
private final ErpProjectInfoMapper erpProjectInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询应收款信息
|
||||
*
|
||||
* @param accountReceivableId 主键
|
||||
* @return 应收款信息
|
||||
*/
|
||||
@Override
|
||||
public ErpFinAccountReceivableVo queryById(Long accountReceivableId) {
|
||||
return baseMapper.selectVoById(accountReceivableId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询应收款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 应收款信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ErpFinAccountReceivableVo> queryPageList(ErpFinAccountReceivableBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<ErpFinAccountReceivable> lqw = buildJoinQueryWrapper(bo);
|
||||
Page<ErpFinAccountReceivableVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的应收款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 应收款信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<ErpFinAccountReceivableVo> queryList(ErpFinAccountReceivableBo bo) {
|
||||
MPJLambdaWrapper<ErpFinAccountReceivable> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<ErpFinAccountReceivable> buildQueryWrapper(ErpFinAccountReceivableBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<ErpFinAccountReceivable> lqw = JoinWrappers.lambda(ErpFinAccountReceivable.class)
|
||||
.selectAll(ErpFinAccountReceivable.class)
|
||||
.eq(StringUtils.isNotBlank(bo.getInvoiceCode()), ErpFinAccountReceivable::getInvoiceCode, bo.getInvoiceCode())
|
||||
.eq(bo.getProjectId() != null, ErpFinAccountReceivable::getProjectId, bo.getProjectId())
|
||||
.eq(bo.getProjectCategory() != null, ErpFinAccountReceivable::getProjectCategory, bo.getProjectCategory())
|
||||
.eq(StringUtils.isNotBlank(bo.getProjectType()), ErpFinAccountReceivable::getProjectType, bo.getProjectType())
|
||||
.eq(bo.getContractId() != null, ErpFinAccountReceivable::getContractId, bo.getContractId())
|
||||
.eq(StringUtils.isNotBlank(bo.getGeneralContractor()), ErpFinAccountReceivable::getGeneralContractor, bo.getGeneralContractor())
|
||||
.eq(StringUtils.isNotBlank(bo.getCustomerAbbreviation()), ErpFinAccountReceivable::getCustomerAbbreviation, bo.getCustomerAbbreviation())
|
||||
.eq(StringUtils.isNotBlank(bo.getContractParties()), ErpFinAccountReceivable::getContractParties, bo.getContractParties())
|
||||
.eq(StringUtils.isNotBlank(bo.getWbsElement()), ErpFinAccountReceivable::getWbsElement, bo.getWbsElement())
|
||||
.eq(StringUtils.isNotBlank(bo.getLineItem()), ErpFinAccountReceivable::getLineItem, bo.getLineItem())
|
||||
.eq(StringUtils.isNotBlank(bo.getFinProjectStatus()), ErpFinAccountReceivable::getFinProjectStatus, bo.getFinProjectStatus())
|
||||
.eq(bo.getSettlementMonth() != null, ErpFinAccountReceivable::getSettlementMonth, bo.getSettlementMonth())
|
||||
.eq(bo.getIncome() != null, ErpFinAccountReceivable::getIncome, bo.getIncome())
|
||||
.eq(bo.getBackToBackRatio() != null, ErpFinAccountReceivable::getBackToBackRatio, bo.getBackToBackRatio())
|
||||
.eq(StringUtils.isNotBlank(bo.getCurrency()), ErpFinAccountReceivable::getCurrency, bo.getCurrency())
|
||||
.eq(bo.getInvoiceAmount() != null, ErpFinAccountReceivable::getInvoiceAmount, bo.getInvoiceAmount())
|
||||
.eq(bo.getTotalPrice() != null, ErpFinAccountReceivable::getTotalPrice, bo.getTotalPrice())
|
||||
.eq(bo.getTotalPriceHighway() != null, ErpFinAccountReceivable::getTotalPriceHighway, bo.getTotalPriceHighway())
|
||||
.eq(bo.getTotalPriceOri() != null, ErpFinAccountReceivable::getTotalPriceOri, bo.getTotalPriceOri())
|
||||
.eq(bo.getExchangeRate() != null, ErpFinAccountReceivable::getExchangeRate, bo.getExchangeRate());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增应收款信息
|
||||
*
|
||||
* @param bo 应收款信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(ErpFinAccountReceivableBo bo) {
|
||||
ErpFinAccountReceivable add = MapstructUtils.convert(bo, ErpFinAccountReceivable.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
List<ErpFinAccountReceivableStage> stageList = bo.getFinAccountReceivableStageList();
|
||||
stageList.forEach(stage -> {
|
||||
stage.setAccountReceivableId(add.getAccountReceivableId());
|
||||
});
|
||||
stageMapper.insertBatch(stageList);
|
||||
bo.setAccountReceivableId(add.getAccountReceivableId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应收款信息
|
||||
*
|
||||
* @param bo 应收款信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(ErpFinAccountReceivableBo bo) {
|
||||
ErpFinAccountReceivable update = MapstructUtils.convert(bo, ErpFinAccountReceivable.class);
|
||||
validEntityBeforeSave(update);
|
||||
List<ErpFinAccountReceivableStage> stageList = bo.getFinAccountReceivableStageList();
|
||||
stageMapper.insertOrUpdateBatch(stageList);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ErpFinAccountReceivable entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除应收款信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询符合条件的应收款信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 应收款信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<ErpFinAccountReceivableVo> queryJoinList(ErpFinAccountReceivableBo bo) {
|
||||
MPJLambdaWrapper<ErpFinAccountReceivable> lqw = buildJoinQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<ErpFinAccountReceivable> buildJoinQueryWrapper(ErpFinAccountReceivableBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<ErpFinAccountReceivable> lqw = JoinWrappers.lambda(ErpFinAccountReceivable.class)
|
||||
.selectAll(ErpFinAccountReceivable.class)
|
||||
.select(ErpProjectInfo::getProjectCode)
|
||||
.select(ErpProjectInfo::getProjectName)
|
||||
.leftJoin(ErpProjectInfo.class, ErpProjectInfo::getProjectId, ErpFinAccountReceivable::getProjectId)
|
||||
.eq(StringUtils.isNotBlank(bo.getInvoiceCode()), ErpFinAccountReceivable::getInvoiceCode, bo.getInvoiceCode())
|
||||
.eq(bo.getProjectId() != null, ErpFinAccountReceivable::getProjectId, bo.getProjectId())
|
||||
.eq(bo.getProjectCategory() != null, ErpFinAccountReceivable::getProjectCategory, bo.getProjectCategory())
|
||||
.eq(StringUtils.isNotBlank(bo.getProjectType()), ErpFinAccountReceivable::getProjectType, bo.getProjectType())
|
||||
.eq(bo.getContractId() != null, ErpFinAccountReceivable::getContractId, bo.getContractId())
|
||||
.eq(StringUtils.isNotBlank(bo.getGeneralContractor()), ErpFinAccountReceivable::getGeneralContractor, bo.getGeneralContractor())
|
||||
.eq(StringUtils.isNotBlank(bo.getCustomerAbbreviation()), ErpFinAccountReceivable::getCustomerAbbreviation, bo.getCustomerAbbreviation())
|
||||
.eq(StringUtils.isNotBlank(bo.getContractParties()), ErpFinAccountReceivable::getContractParties, bo.getContractParties())
|
||||
.eq(StringUtils.isNotBlank(bo.getWbsElement()), ErpFinAccountReceivable::getWbsElement, bo.getWbsElement())
|
||||
.eq(StringUtils.isNotBlank(bo.getLineItem()), ErpFinAccountReceivable::getLineItem, bo.getLineItem())
|
||||
.eq(StringUtils.isNotBlank(bo.getFinProjectStatus()), ErpFinAccountReceivable::getFinProjectStatus, bo.getFinProjectStatus())
|
||||
.eq(bo.getSettlementMonth() != null, ErpFinAccountReceivable::getSettlementMonth, bo.getSettlementMonth())
|
||||
.eq(bo.getIncome() != null, ErpFinAccountReceivable::getIncome, bo.getIncome())
|
||||
.eq(bo.getBackToBackRatio() != null, ErpFinAccountReceivable::getBackToBackRatio, bo.getBackToBackRatio())
|
||||
.eq(StringUtils.isNotBlank(bo.getCurrency()), ErpFinAccountReceivable::getCurrency, bo.getCurrency())
|
||||
.eq(bo.getInvoiceAmount() != null, ErpFinAccountReceivable::getInvoiceAmount, bo.getInvoiceAmount())
|
||||
.eq(bo.getTotalPrice() != null, ErpFinAccountReceivable::getTotalPrice, bo.getTotalPrice())
|
||||
.eq(bo.getTotalPriceHighway() != null, ErpFinAccountReceivable::getTotalPriceHighway, bo.getTotalPriceHighway())
|
||||
.eq(bo.getTotalPriceOri() != null, ErpFinAccountReceivable::getTotalPriceOri, bo.getTotalPriceOri())
|
||||
.eq(bo.getExchangeRate() != null, ErpFinAccountReceivable::getExchangeRate, bo.getExchangeRate());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param accountReceivableId
|
||||
* @return ErpProjectInfoVo
|
||||
*/
|
||||
@Override
|
||||
public ErpFinAccountReceivableVo getAccountReceivableWithProjectByReceivableId(Long accountReceivableId) {
|
||||
ErpFinAccountReceivableVo erpFinAccountReceivableVo = this.queryById(accountReceivableId);
|
||||
ErpProjectInfoVo erpProjectInfoVo = this.queryJoinProjectByProjectId(erpFinAccountReceivableVo.getProjectId());
|
||||
erpFinAccountReceivableVo.setErpProjectInfoVo(erpProjectInfoVo);
|
||||
return erpFinAccountReceivableVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目ID获取项目信息,主要提供财务应收款使用
|
||||
*
|
||||
* @param projectId 项目ID
|
||||
* @return 项目信息
|
||||
*/
|
||||
private ErpProjectInfoVo queryJoinProjectByProjectId(Long projectId) {
|
||||
ErpProjectInfoVo erpProjectInfoVo = new ErpProjectInfoVo();
|
||||
|
||||
MPJLambdaWrapper<ErpProjectInfo> lqw = JoinWrappers.lambda(ErpProjectInfo.class)
|
||||
.selectAll(ErpProjectInfo.class)
|
||||
.eq(projectId != null, ErpProjectInfo::getProjectId, projectId);
|
||||
List<ErpProjectInfoVo> erpProjectInfoVoList = erpProjectInfoMapper.selectErpProjectInfoVoJoinList(lqw);
|
||||
if (erpProjectInfoVoList != null && !erpProjectInfoVoList.isEmpty()) {
|
||||
erpProjectInfoVo = erpProjectInfoVoList.get(0);
|
||||
}
|
||||
return erpProjectInfoVo;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
<?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.ErpFinAccountInstallmentMapper">
|
||||
<resultMap type="org.dromara.oa.erp.domain.vo.ErpFinAccountInstallmentVo" id="ErpFinAccountInstallmentResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomErpFinAccountInstallmentVoList" resultMap="ErpFinAccountInstallmentResult">
|
||||
select account_installment_id, tenant_id, installment_code, customer_id, customer_name, currency, payment_amount, payment_date, remark, dispatch_user_id, dispatch_dept_id, dispatch_date, installment_status, account_manage_id, create_dept, create_by, create_time, update_by, update_time from erp_fin_account_installment t
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,14 @@
|
||||
<?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.ErpFinAccountReceivableMapper">
|
||||
<resultMap type="org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableVo" id="ErpFinAccountReceivableResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomErpFinAccountReceivableVoList" resultMap="ErpFinAccountReceivableResult">
|
||||
select account_receivable_id, tenant_id, invoice_code, project_id, project_category, project_type, contract_id, general_contractor, customer_abbreviation, contract_parties, wbs_element, line_item, fin_project_status, settlement_month, income, back_to_back_ratio, currency, invoice_amount, total_price, total_price_highway, total_price_ori, exchange_rate, remark, create_dept, create_by, create_time, update_by, update_time from erp_fin_account_receivable t
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,14 @@
|
||||
<?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.ErpFinAccountReceivableStageMapper">
|
||||
<resultMap type="org.dromara.oa.erp.domain.vo.ErpFinAccountReceivableStageVo" id="ErpFinAccountReceivableStageResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCustomErpFinAccountReceivableStageVoList" resultMap="ErpFinAccountReceivableStageResult">
|
||||
select receivable_stage_id, account_receivable_id, payment_stage_id, stage_name, stage_amount, payment_percentage, payment_deadline, payment_description, stage_required_date, stage_real_date, settlement_date, warranty_period, create_dept, create_by, create_time, update_by, update_time from erp_fin_account_receivable_stage t
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue