liusheng
2024-03-15 4c42cd3d556ea72d70ea43a734cc38acd6b81e74
代码提交
已添加2个文件
已修改12个文件
587 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundtaxController.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFundtax.java 142 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/FundTaxVO.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/SpSelectExpertfee.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceFundMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceFundtaxMapper.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundtaxService.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundtaxServiceImpl.java 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceFundtaxMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
@@ -1,8 +1,6 @@
package com.ruoyi.web.controller.project;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.NotRepeatCommit;
import com.ruoyi.common.annotation.RepeatSubmit;
@@ -10,14 +8,12 @@
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.tax.TaxtUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.DtoConversionUtils;
@@ -26,7 +22,6 @@
import com.ruoyi.project.domain.vo.*;
import com.ruoyi.project.mapper.ServiceFunddetailMapper;
import com.ruoyi.project.service.*;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysUserService;
import freemarker.template.Configuration;
@@ -36,12 +31,9 @@
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Options;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
@@ -202,6 +194,17 @@
        return getCustomDataTable(list, pageNum, pageSize);
    }
    /**
     * æ ¹æ®æƒé™æ˜¾ç¤ºå®¡æ ¸åˆ—表
     */
    @ApiOperation("根据权限显示审核列表")
    @Log(title = "根据权限显示审核列表", businessType = BusinessType.OTHER)
    @PostMapping("/getExpertfeeList")
    public TableDataInfo getExpertfeeList(@RequestBody SpSelectExpertfee spSelectExpertfee) {
        List<SpFinancialExpensesFundOut> expertfeeList = serviceFundService.getExpertfeeList(spSelectExpertfee);
        return getCustomDataTable(expertfeeList, spSelectExpertfee.getPageNum(), spSelectExpertfee.getPageSize());
    }
    @ApiOperation("查询费用申请主列表")
    //@PreAuthorize("@ss.hasPermi('project:fund:list')")
    @GetMapping(value = "/getInfo/{infoid}")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundtaxController.java
@@ -7,7 +7,12 @@
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.project.domain.ServiceFund;
import com.ruoyi.project.domain.ServiceFundtax;
import com.ruoyi.project.domain.vo.FundTaxVO;
import com.ruoyi.project.domain.vo.TotalTaxVO;
import com.ruoyi.project.service.IServiceFundService;
import com.ruoyi.project.service.IServiceFunddetailService;
import com.ruoyi.project.service.IServiceFundtaxService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -16,21 +21,26 @@
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
 * ä¸“家费用算税申请主Controller
 *
 *
 * @author ruoyi
 * @date 2024-03-13
 */
@Api("专家费用算税申请主")
@RestController
@RequestMapping("/system/fundtax")
public class ServiceFundtaxController extends BaseController
{
@RequestMapping("/project/fundtax")
public class ServiceFundtaxController extends BaseController {
    @Autowired
    private IServiceFundtaxService serviceFundtaxService;
    @Autowired
    private IServiceFundService serviceFundService;
    /**
     * æŸ¥è¯¢ä¸“家费用算税申请主列表
@@ -38,8 +48,7 @@
    @ApiOperation("查询专家费用算税申请主列表")
    @PreAuthorize("@ss.hasPermi('system:fundtax:list')")
    @GetMapping("/list")
    public TableDataInfo list(ServiceFundtax serviceFundtax)
    {
    public TableDataInfo list(ServiceFundtax serviceFundtax) {
        startPage();
        List<ServiceFundtax> list = serviceFundtaxService.queryList(serviceFundtax);
        return getDataTable(list);
@@ -52,8 +61,7 @@
    @PreAuthorize("@ss.hasPermi('system:fundtax:export')")
    @Log(title = "专家费用算税申请主", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(ServiceFundtax serviceFundtax)
    {
    public AjaxResult export(ServiceFundtax serviceFundtax) {
        List<ServiceFundtax> list = serviceFundtaxService.queryList(serviceFundtax);
        ExcelUtil<ServiceFundtax> util = new ExcelUtil<ServiceFundtax>(ServiceFundtax.class);
        return util.exportExcel(list, "专家费用算税申请主数据");
@@ -64,23 +72,9 @@
     */
    @ApiOperation("获取专家费用算税申请主详细信息")
    @PreAuthorize("@ss.hasPermi('system:fundtax:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return AjaxResult.success(serviceFundtaxService.getById(id));
    }
    /**
     * æ–°å¢žä¸“家费用算税申请主
     */
    @ApiOperation("新增专家费用算税申请主")
    @PreAuthorize("@ss.hasPermi('system:fundtax:add')")
    @Log(title = "专家费用算税申请主", businessType = BusinessType.INSERT)
    @PostMapping
    @RepeatSubmit
    public AjaxResult add(@RequestBody ServiceFundtax serviceFundtax)
    {
        return toAjax(serviceFundtaxService.save(serviceFundtax));
    }
    /**
@@ -89,10 +83,9 @@
    @ApiOperation("修改专家费用算税申请主")
    @PreAuthorize("@ss.hasPermi('system:fundtax:edit')")
    @Log(title = "专家费用算税申请主", businessType = BusinessType.UPDATE)
    @PutMapping
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceFundtax serviceFundtax)
    {
    @PostMapping("/edit")
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceFundtax serviceFundtax) {
        return toAjax(serviceFundtaxService.updateById(serviceFundtax));
    }
@@ -102,9 +95,55 @@
    @ApiOperation("删除专家费用算税申请主")
    @PreAuthorize("@ss.hasPermi('system:fundtax:remove')")
    @Log(title = "专家费用算税申请主", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(serviceFundtaxService.removeByIds(Arrays.asList(ids)));
    @GetMapping("/remove/id")
    public AjaxResult remove(@PathVariable Long id) {
        ServiceFundtax serviceFundtax = new ServiceFundtax();
        serviceFundtax.setDel_flag(1);
        serviceFundtax.setId(id);
        return toAjax(serviceFundtaxService.updateById(serviceFundtax));
    }
    /**
     * æ–°å¢žä¸“家费用算税申请主
     */
    @ApiOperation("新增专家费用算税申请主")
    @PreAuthorize("@ss.hasPermi('system:fundtax:add')")
    @Log(title = "专家费用算税申请主", businessType = BusinessType.INSERT)
    @PostMapping("/addFundTax")
    public AjaxResult addFundTax(@RequestBody List<ServiceFund> fundList) {
        ServiceFundtax serviceFundtax = new ServiceFundtax();
        serviceFundtax.setTaxedtime(new Date());
        serviceFundtax.setApplyno(UUID.randomUUID().toString());
        boolean save = serviceFundtaxService.save(serviceFundtax);
        for (ServiceFund serviceFund : fundList) {
            serviceFund.setFundTaxId(serviceFundtax.getId());
            serviceFundService.updateById(serviceFund);
        }
        return toAjax(save);
    }
    /**
     * èŽ·å–fundTaxid的最大值
     *
     * @return
     */
    @ApiOperation("获取fundTaxid的最大值")
    @GetMapping(value = "/getMaxFundTaxId")
    public AjaxResult getMaxFundTaxId() {
        Integer maxFundTaxId = serviceFundtaxService.getMaxFundTaxId();
        return success(maxFundTaxId.toString());
    }
    /**
     * æ‰¹é‡ç®—税
     *
     * @param fundTaxVO
     * @return
     */
    @ApiOperation("批量算税")
    @PostMapping(value = "/batchFundTax")
    public AjaxResult batchFundTax(@RequestBody FundTaxVO fundTaxVO) {
        return toAjax(serviceFundtaxService.batchFundTax(fundTaxVO));
    }
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java
@@ -380,6 +380,13 @@
    @Excel(name = "绩效:1、月度、2季度、3年度")
    private Integer performancetype;
    /**
     * ä¸“家费用算税申请主表ID
     */
    @ApiModelProperty("专家费用算税申请主表ID")
    @Excel(name = "专家费用算税申请主表ID")
    private Long fundTaxId;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFundtax.java
@@ -1,6 +1,7 @@
package com.ruoyi.project.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
@@ -11,181 +12,252 @@
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * ä¸“家费用算税申请主对象 service_fundtax
 *
 *
 * @author ruoyi
 * @date 2024-03-13
 */
@Data
@ApiModel("专家费用算税申请主")
public class ServiceFundtax extends BaseEntity
{
public class ServiceFundtax extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    /**
     * ä¸»é”®id
     */
    @ApiModelProperty("主键id")
    //数据库自增改成@TableId(type = IdType.AUTO)
    @TableId(type = IdType.AUTO)
    private Long id;
    /** ç”³è¯·ç¼–号 */
    /**
     * ç”³è¯·ç¼–号
     */
    @ApiModelProperty("申请编号")
    @Excel(name = "申请编号")
    private String applyno;
    /** ç®—税时间 */
    /**
     * ç®—税时间
     */
    @ApiModelProperty("算税时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "算税时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date taxedtime;
    /** ç”³è¯·äººç¼–号 */
    /**
     * ç”³è¯·äººç¼–号
     */
    @ApiModelProperty("申请人编号")
    @Excel(name = "申请人编号")
    private String userno;
    /** ç”³è¯·äººå§“名 */
    /**
     * ç”³è¯·äººå§“名
     */
    @ApiModelProperty("申请人姓名")
    @Excel(name = "申请人姓名")
    private String username;
    /** éƒ¨é—¨ç¼–号 */
    /**
     * éƒ¨é—¨ç¼–号
     */
    @ApiModelProperty("部门编号")
    @Excel(name = "部门编号")
    private String deptmentno;
    /** éƒ¨é—¨åç§° */
    /**
     * éƒ¨é—¨åç§°
     */
    @ApiModelProperty("部门名称")
    @Excel(name = "部门名称")
    private String deptmentname;
    /** éƒ¨é—¨ä¸»ç®¡å·¥å· */
    /**
     * éƒ¨é—¨ä¸»ç®¡å·¥å·
     */
    @ApiModelProperty("部门主管工号")
    @Excel(name = "部门主管工号")
    private String managerno;
    /** éƒ¨é—¨ä¸»ç®¡åå­— */
    /**
     * éƒ¨é—¨ä¸»ç®¡åå­—
     */
    @ApiModelProperty("部门主管名字")
    @Excel(name = "部门主管名字")
    private String managername;
    /** ç¨Žå‰é‡‘额合计 */
    /**
     * ç¨Žå‰é‡‘额合计
     */
    @ApiModelProperty("税前金额合计")
    @Excel(name = "税前金额合计")
    private BigDecimal pretaxamount;
    /** ç¨ŽåŽé‡‘额合计 */
    /**
     * ç¨ŽåŽé‡‘额合计
     */
    @ApiModelProperty("税后金额合计")
    @Excel(name = "税后金额合计")
    private BigDecimal taxedamount;
    /** è´¹ç”¨æ€»é‡‘额 */
    /**
     * è´¹ç”¨æ€»é‡‘额
     */
    @ApiModelProperty("费用总金额")
    @Excel(name = "费用总金额")
    private BigDecimal taxamount;
    /** åŒ»å­¦æˆæœ¬åˆè®¡ */
    /**
     * åŒ»å­¦æˆæœ¬åˆè®¡
     */
    @ApiModelProperty("医学成本合计")
    @Excel(name = "医学成本合计")
    private BigDecimal medicalcost;
    /** é—体修复支持成本合计 */
    /**
     * é—体修复支持成本合计
     */
    @ApiModelProperty("遗体修复支持成本合计")
    @Excel(name = "遗体修复支持成本合计")
    private BigDecimal bodymaintaincost;
    /** å™¨å®˜èŽ·å–æˆæœ¬åˆè®¡ */
    /**
     * å™¨å®˜èŽ·å–æˆæœ¬åˆè®¡
     */
    @ApiModelProperty("器官获取成本合计")
    @Excel(name = "器官获取成本合计")
    private BigDecimal organgaincost;
    /** å™¨å®˜åŒ»å­¦æ”¯æŒæˆæœ¬ */
    /**
     * å™¨å®˜åŒ»å­¦æ”¯æŒæˆæœ¬
     */
    @ApiModelProperty("器官医学支持成本")
    @Excel(name = "器官医学支持成本")
    private BigDecimal organmaintaincost;
    /** è®°å½•状态 */
    /**
     * è®°å½•状态
     */
    @ApiModelProperty("记录状态")
    @Excel(name = "记录状态")
    private Long recordstatus;
    /** é¢„审状态:1、待预审;2、预算通过,等待纸质报销材料;3、收到纸质报销材料 */
    /**
     * é¢„审状态:1、待预审;2、预算通过,等待纸质报销材料;3、收到纸质报销材料
     */
    @ApiModelProperty("预审状态:1、待预审;2、预算通过,等待纸质报销材料;3、收到纸质报销材料")
    @Excel(name = "预审状态:1、待预审;2、预算通过,等待纸质报销材料;3、收到纸质报销材料")
    private Long checkstatus;
    /** å½“前审核级别 å¤„于哪个阶段 0:申请;1:一级审核;2:二级审核;3:三级审核等 */
    /**
     * å½“前审核级别 å¤„于哪个阶段 0:申请;1:一级审核;2:二级审核;3:三级审核等
     */
    @ApiModelProperty("当前审核级别 å¤„于哪个阶段 0:申请;1:一级审核;2:二级审核;3:三级审核等")
    @Excel(name = "当前审核级别 å¤„于哪个阶段 0:申请;1:一级审核;2:二级审核;3:三级审核等")
    private Long flowlevel;
    /** è´¢åŠ¡é€€å›ž199;上传医院100; */
    /**
     * è´¢åŠ¡é€€å›ž199;上传医院100;
     */
    @ApiModelProperty("财务退回199;上传医院100;")
    @Excel(name = "财务退回199;上传医院100;")
    private Long backflowlevel;
    /** å‘放状态 */
    /**
     * å‘放状态
     */
    @ApiModelProperty("发放状态")
    @Excel(name = "发放状态")
    private String isdistribute;
    /** ä»˜æ¬¾æ—¥æœŸ */
    /**
     * ä»˜æ¬¾æ—¥æœŸ
     */
    @ApiModelProperty("付款日期")
    @Excel(name = "付款日期")
    private String riqi;
    /** ä¸­å¿ƒç­¾å­— */
    /**
     * ä¸­å¿ƒç­¾å­—
     */
    @ApiModelProperty("中心签字")
    @Excel(name = "中心签字")
    private String opochecker;
    /** è´¢åŠ¡å‰¯é™¢é•¿ç­¾å­— */
    /**
     * è´¢åŠ¡å‰¯é™¢é•¿ç­¾å­—
     */
    @ApiModelProperty("财务副院长签字")
    @Excel(name = "财务副院长签字")
    private String finvicepresident;
    /** ä¸šåŠ¡å‰¯é™¢é•¿ç­¾å­— */
    /**
     * ä¸šåŠ¡å‰¯é™¢é•¿ç­¾å­—
     */
    @ApiModelProperty("业务副院长签字")
    @Excel(name = "业务副院长签字")
    private String busvicepresident;
    /** é™¢é•¿å®¡æ‰¹ */
    /**
     * é™¢é•¿å®¡æ‰¹
     */
    @ApiModelProperty("院长审批")
    @Excel(name = "院长审批")
    private String president;
    /** åŠžå…¬å®¤ä¸»ä»»ç­¾å­— */
    /**
     * åŠžå…¬å®¤ä¸»ä»»ç­¾å­—
     */
    @ApiModelProperty("办公室主任签字")
    @Excel(name = "办公室主任签字")
    private String officedirector;
    /** è´¢åŠ¡å®¤ä¸»ä»»ç­¾å­— */
    /**
     * è´¢åŠ¡å®¤ä¸»ä»»ç­¾å­—
     */
    @ApiModelProperty("财务室主任签字")
    @Excel(name = "财务室主任签字")
    private String financedirector;
    /** è´¢åŠ¡å®¡æ ¸ */
    /**
     * è´¢åŠ¡å®¡æ ¸
     */
    @ApiModelProperty("财务审核")
    @Excel(name = "财务审核")
    private String financechecher;
    /** æ•°æ®æ˜¯å¦å…è®¸è¿›å…¥shared表   0:否     1:是,2:已进入 */
    /**
     * æ•°æ®æ˜¯å¦å…è®¸è¿›å…¥shared表   0:否     1:是,2:已进入
     */
    @ApiModelProperty("数据是否允许进入shared表   0:否     1:是,2:已进入")
    @Excel(name = "数据是否允许进入shared表   0:否     1:是,2:已进入")
    private String uploadflag;
    /** ä¸Šä¼ æ—¶é—´ */
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @ApiModelProperty("上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date uploadtime;
    /** æ¥ç”¨è®°å½•插入分享表失败 */
    /**
     * æ¥ç”¨è®°å½•插入分享表失败
     */
    @ApiModelProperty("来用记录插入分享表失败")
    @Excel(name = "来用记录插入分享表失败")
    private String updownremark;
    /**
     * serviceFunds集合
     */
    @ApiModelProperty("serviceFunds集合")
    @TableField(exist = false)
    private List<ServiceFund> serviceFunds;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/FundTaxVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package com.ruoyi.project.domain.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * åˆè®¡ä¸ªç¨Ž
 *
 * @author ls
 */
@Data
public class FundTaxVO {
    /**
     * fundTaxid
     */
    @ApiModelProperty("fundTaxid")
    Long fundTaxId;
    /**
     * æ–°å¢žï¼š0   ä¿®æ”¹ï¼š1
     */
    @ApiModelProperty("操作 :新增:0   ä¿®æ”¹ï¼š1")
    Integer addOrupdate;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/SpSelectExpertfee.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
package com.ruoyi.project.domain.vo;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class SpSelectExpertfee extends PageDomain {
    /**
     * ä¸šåŠ¡ç±»åž‹ï¼Œå–å€¼1-5,1是专家费
     */
    @ApiModelProperty("业务类型,取值1-5,1是专家费")
    private Integer paApplyType;
    /**
     * æçŒ®è€…,可以模糊搜索
     */
    @ApiModelProperty("捐献者,可以模糊搜索")
    private String donorname = "";
    /**
     * å®¡æ ¸äººï¼Œ047是陈慕华
     */
    @ApiModelProperty("审核人,047是陈慕华")
    private String pacheckno = "";
    /**
     * å®¡æ ¸çŠ¶æ€ï¼š0是未审核
     */
    @ApiModelProperty("审核状态:0是未审核")
    private Integer checkstatus = null;
    /**
     * éƒ¨é—¨ç¼–号
     */
    @ApiModelProperty("部门编号")
    private String padepartno = "";
    /**
     * ç»åŠžäººï¼Œæ”¯æŒæ¨¡ç³Šæœç´¢
     */
    @ApiModelProperty("经办人,支持模糊搜索")
    private String pausername = "";
}
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceFundMapper.java
@@ -36,4 +36,6 @@
    List<SpFinancialExpensesFundOut> getListBypower(@Param("PAUSERNO") String PAUSERNO, @Param("PAFUNDTYPE") Integer PAFUNDTYPE, @Param("PAAPPLICANT") String PAAPPLICANT, @Param("PAAPPLICATIONBEGTIME") String PAAPPLICATIONBEGTIME, @Param("PAAPPLICATIONENDTIME") String PAAPPLICATIONENDTIME, @Param("PADEPARTMENT") String PADEPARTMENT, @Param("CHECKFLAG") Integer CHECKFLAG, @Param("APPLYTYPE") Integer APPLYTYPE, @Param("CHECKSTATUS") Integer CHECKSTATUS,@Param("donorname")String donorname);
    List<SpFinancialExpensesFundOut> getExpertfeeList(@Param("PAAPPLYTYPE") Integer PAAPPLYTYPE, @Param("DONORNAME") String DONORNAME, @Param("PACHECKNO") String PACHECKNO, @Param("CHECKSTATUS") Integer CHECKSTATUS, @Param("PADEPARTNO") String PADEPARTNO, @Param("PAUSERNAME") String PAUSERNAME);
}
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceFundtaxMapper.java
@@ -3,17 +3,18 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.project.domain.ServiceFundtax;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * ä¸“家费用算税申请主Mapper接口
 *
 *
 * @author ruoyi
 * @date 2024-03-13
 */
public interface ServiceFundtaxMapper extends BaseMapper<ServiceFundtax>
{
@Mapper
public interface ServiceFundtaxMapper extends BaseMapper<ServiceFundtax> {
    /**
     * æŸ¥è¯¢ä¸“家费用算税申请主列表
     *
@@ -21,4 +22,11 @@
     * @return ä¸“家费用算税申请主集合
     */
    public List<ServiceFundtax> selectServiceFundtaxList(ServiceFundtax serviceFundtax);
    /**
     * èŽ·å–ID最大值
     *
     * @return
     */
    public Integer getMaxFundTaxId();
}
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java
@@ -53,6 +53,8 @@
    List<SpFinancialExpensesFundOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE, Integer CHECKSTATUS, String donorname);
    List<SpFinancialExpensesFundOut> getExpertfeeList(SpSelectExpertfee spSelectExpertfee);
    int countItem(Long infoid, Long itemid);
    Long addOrUpdateNew(ServiceFundVO serviceFundVO);
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundtaxService.java
@@ -2,23 +2,29 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.project.domain.ServiceFundtax;
import com.ruoyi.project.domain.vo.FundTaxVO;
import com.ruoyi.project.domain.vo.TotalTaxVO;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
 * ä¸“家费用算税申请主Service接口
 *
 *
 * @author ruoyi
 * @date 2024-03-13
 */
public interface IServiceFundtaxService extends IService<ServiceFundtax>
{
public interface IServiceFundtaxService extends IService<ServiceFundtax> {
    /**
     * æŸ¥è¯¢ä¸“家费用算税申请主列表
     *
     *
     * @param serviceFundtax ä¸“家费用算税申请主
     * @return ä¸“家费用算税申请主集合
     */
    public List<ServiceFundtax> queryList(ServiceFundtax serviceFundtax);
    public Integer getMaxFundTaxId();
    public Boolean batchFundTax(FundTaxVO fundTaxVO);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -88,6 +88,9 @@
        if (serviceFund.getId() != null) {
            wrappers.eq(ServiceFund::getId, serviceFund.getId());
        }
        if (serviceFund.getFundTaxId() != null) {
            wrappers.eq(ServiceFund::getFundTaxId, serviceFund.getFundTaxId());
        }
        if (StringUtils.isNotBlank(serviceFund.getUserno())) {
            wrappers.eq(ServiceFund::getUserno, serviceFund.getUserno());
        }
@@ -684,6 +687,11 @@
    }
    @Override
    public List<SpFinancialExpensesFundOut> getExpertfeeList(SpSelectExpertfee spSelectExpertfee) {
        return serviceFundMapper.getExpertfeeList(spSelectExpertfee.getPaApplyType(), spSelectExpertfee.getDonorname(), spSelectExpertfee.getPacheckno(), spSelectExpertfee.getCheckstatus(), spSelectExpertfee.getPadepartno(), spSelectExpertfee.getPausername());
    }
    @Override
    public int countItem(Long infoid, Long itemid) {
        List<ServiceFund> serviceFunds = serviceFundMapper.getInfoByInfoId(infoid);
        int count = 0;
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundtaxServiceImpl.java
@@ -3,131 +3,179 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.domain.ServiceFund;
import com.ruoyi.project.domain.ServiceFunddetail;
import com.ruoyi.project.domain.ServiceFundtax;
import com.ruoyi.project.domain.vo.FundTaxVO;
import com.ruoyi.project.mapper.ServiceFunddetailMapper;
import com.ruoyi.project.mapper.ServiceFundtaxMapper;
import com.ruoyi.project.service.IServiceFundService;
import com.ruoyi.project.service.IServiceFunddetailService;
import com.ruoyi.project.service.IServiceFundtaxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
 * ä¸“家费用算税申请主Service业务层处理
 *
 *
 * @author ruoyi
 * @date 2024-03-13
 */
@Service
public class ServiceFundtaxServiceImpl extends ServiceImpl<ServiceFundtaxMapper, ServiceFundtax> implements IServiceFundtaxService
{
public class ServiceFundtaxServiceImpl extends ServiceImpl<ServiceFundtaxMapper, ServiceFundtax> implements IServiceFundtaxService {
    @Autowired
    private ServiceFunddetailMapper serviceFunddetailMapper;
    @Autowired
    private IServiceFunddetailService serviceFunddetailService;
    @Autowired
    private IServiceFundService serviceFundService;
    @Autowired
    private ServiceFundtaxMapper serviceFundtaxMapper;
    /**
     * æŸ¥è¯¢ä¸“家费用算税申请主列表
     *
     *
     * @param serviceFundtax ä¸“家费用算税申请主
     * @return ä¸“家费用算税申请主
     */
    @Override
    public List<ServiceFundtax> queryList(ServiceFundtax serviceFundtax) {
        LambdaQueryWrapper<ServiceFundtax> wrappers = Wrappers.lambdaQuery();
        if (StringUtils.isNotBlank(serviceFundtax.getApplyno())){
            wrappers.eq(ServiceFundtax::getApplyno ,serviceFundtax.getApplyno());
        if (StringUtils.isNotBlank(serviceFundtax.getApplyno())) {
            wrappers.eq(ServiceFundtax::getApplyno, serviceFundtax.getApplyno());
        }
        if (serviceFundtax.getTaxedtime() != null){
            wrappers.eq(ServiceFundtax::getTaxedtime ,serviceFundtax.getTaxedtime());
        if (serviceFundtax.getTaxedtime() != null) {
            wrappers.eq(ServiceFundtax::getTaxedtime, serviceFundtax.getTaxedtime());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getUserno())){
            wrappers.eq(ServiceFundtax::getUserno ,serviceFundtax.getUserno());
        if (StringUtils.isNotBlank(serviceFundtax.getUserno())) {
            wrappers.eq(ServiceFundtax::getUserno, serviceFundtax.getUserno());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getUsername())){
            wrappers.like(ServiceFundtax::getUsername ,serviceFundtax.getUsername());
        if (StringUtils.isNotBlank(serviceFundtax.getUsername())) {
            wrappers.like(ServiceFundtax::getUsername, serviceFundtax.getUsername());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getDeptmentno())){
            wrappers.eq(ServiceFundtax::getDeptmentno ,serviceFundtax.getDeptmentno());
        if (StringUtils.isNotBlank(serviceFundtax.getDeptmentno())) {
            wrappers.eq(ServiceFundtax::getDeptmentno, serviceFundtax.getDeptmentno());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getDeptmentname())){
            wrappers.like(ServiceFundtax::getDeptmentname ,serviceFundtax.getDeptmentname());
        if (StringUtils.isNotBlank(serviceFundtax.getDeptmentname())) {
            wrappers.like(ServiceFundtax::getDeptmentname, serviceFundtax.getDeptmentname());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getManagerno())){
            wrappers.eq(ServiceFundtax::getManagerno ,serviceFundtax.getManagerno());
        if (StringUtils.isNotBlank(serviceFundtax.getManagerno())) {
            wrappers.eq(ServiceFundtax::getManagerno, serviceFundtax.getManagerno());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getManagername())){
            wrappers.like(ServiceFundtax::getManagername ,serviceFundtax.getManagername());
        if (StringUtils.isNotBlank(serviceFundtax.getManagername())) {
            wrappers.like(ServiceFundtax::getManagername, serviceFundtax.getManagername());
        }
        if (serviceFundtax.getPretaxamount() != null){
            wrappers.eq(ServiceFundtax::getPretaxamount ,serviceFundtax.getPretaxamount());
        if (serviceFundtax.getPretaxamount() != null) {
            wrappers.eq(ServiceFundtax::getPretaxamount, serviceFundtax.getPretaxamount());
        }
        if (serviceFundtax.getTaxedamount() != null){
            wrappers.eq(ServiceFundtax::getTaxedamount ,serviceFundtax.getTaxedamount());
        if (serviceFundtax.getTaxedamount() != null) {
            wrappers.eq(ServiceFundtax::getTaxedamount, serviceFundtax.getTaxedamount());
        }
        if (serviceFundtax.getTaxamount() != null){
            wrappers.eq(ServiceFundtax::getTaxamount ,serviceFundtax.getTaxamount());
        if (serviceFundtax.getTaxamount() != null) {
            wrappers.eq(ServiceFundtax::getTaxamount, serviceFundtax.getTaxamount());
        }
        if (serviceFundtax.getMedicalcost() != null){
            wrappers.eq(ServiceFundtax::getMedicalcost ,serviceFundtax.getMedicalcost());
        if (serviceFundtax.getMedicalcost() != null) {
            wrappers.eq(ServiceFundtax::getMedicalcost, serviceFundtax.getMedicalcost());
        }
        if (serviceFundtax.getBodymaintaincost() != null){
            wrappers.eq(ServiceFundtax::getBodymaintaincost ,serviceFundtax.getBodymaintaincost());
        if (serviceFundtax.getBodymaintaincost() != null) {
            wrappers.eq(ServiceFundtax::getBodymaintaincost, serviceFundtax.getBodymaintaincost());
        }
        if (serviceFundtax.getOrgangaincost() != null){
            wrappers.eq(ServiceFundtax::getOrgangaincost ,serviceFundtax.getOrgangaincost());
        if (serviceFundtax.getOrgangaincost() != null) {
            wrappers.eq(ServiceFundtax::getOrgangaincost, serviceFundtax.getOrgangaincost());
        }
        if (serviceFundtax.getOrganmaintaincost() != null){
            wrappers.eq(ServiceFundtax::getOrganmaintaincost ,serviceFundtax.getOrganmaintaincost());
        if (serviceFundtax.getOrganmaintaincost() != null) {
            wrappers.eq(ServiceFundtax::getOrganmaintaincost, serviceFundtax.getOrganmaintaincost());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getRemark())){
            wrappers.eq(ServiceFundtax::getRemark ,serviceFundtax.getRemark());
        if (StringUtils.isNotBlank(serviceFundtax.getRemark())) {
            wrappers.eq(ServiceFundtax::getRemark, serviceFundtax.getRemark());
        }
        if (serviceFundtax.getRecordstatus() != null){
            wrappers.eq(ServiceFundtax::getRecordstatus ,serviceFundtax.getRecordstatus());
        if (serviceFundtax.getRecordstatus() != null) {
            wrappers.eq(ServiceFundtax::getRecordstatus, serviceFundtax.getRecordstatus());
        }
        if (serviceFundtax.getCheckstatus() != null){
            wrappers.eq(ServiceFundtax::getCheckstatus ,serviceFundtax.getCheckstatus());
        if (serviceFundtax.getCheckstatus() != null) {
            wrappers.eq(ServiceFundtax::getCheckstatus, serviceFundtax.getCheckstatus());
        }
        if (serviceFundtax.getFlowlevel() != null){
            wrappers.eq(ServiceFundtax::getFlowlevel ,serviceFundtax.getFlowlevel());
        if (serviceFundtax.getFlowlevel() != null) {
            wrappers.eq(ServiceFundtax::getFlowlevel, serviceFundtax.getFlowlevel());
        }
        if (serviceFundtax.getBackflowlevel() != null){
            wrappers.eq(ServiceFundtax::getBackflowlevel ,serviceFundtax.getBackflowlevel());
        if (serviceFundtax.getBackflowlevel() != null) {
            wrappers.eq(ServiceFundtax::getBackflowlevel, serviceFundtax.getBackflowlevel());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getIsdistribute())){
            wrappers.eq(ServiceFundtax::getIsdistribute ,serviceFundtax.getIsdistribute());
        if (StringUtils.isNotBlank(serviceFundtax.getIsdistribute())) {
            wrappers.eq(ServiceFundtax::getIsdistribute, serviceFundtax.getIsdistribute());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getRiqi())){
            wrappers.eq(ServiceFundtax::getRiqi ,serviceFundtax.getRiqi());
        if (StringUtils.isNotBlank(serviceFundtax.getRiqi())) {
            wrappers.eq(ServiceFundtax::getRiqi, serviceFundtax.getRiqi());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getOpochecker())){
            wrappers.eq(ServiceFundtax::getOpochecker ,serviceFundtax.getOpochecker());
        if (StringUtils.isNotBlank(serviceFundtax.getOpochecker())) {
            wrappers.eq(ServiceFundtax::getOpochecker, serviceFundtax.getOpochecker());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getFinvicepresident())){
            wrappers.eq(ServiceFundtax::getFinvicepresident ,serviceFundtax.getFinvicepresident());
        if (StringUtils.isNotBlank(serviceFundtax.getFinvicepresident())) {
            wrappers.eq(ServiceFundtax::getFinvicepresident, serviceFundtax.getFinvicepresident());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getBusvicepresident())){
            wrappers.eq(ServiceFundtax::getBusvicepresident ,serviceFundtax.getBusvicepresident());
        if (StringUtils.isNotBlank(serviceFundtax.getBusvicepresident())) {
            wrappers.eq(ServiceFundtax::getBusvicepresident, serviceFundtax.getBusvicepresident());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getPresident())){
            wrappers.eq(ServiceFundtax::getPresident ,serviceFundtax.getPresident());
        if (StringUtils.isNotBlank(serviceFundtax.getPresident())) {
            wrappers.eq(ServiceFundtax::getPresident, serviceFundtax.getPresident());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getOfficedirector())){
            wrappers.eq(ServiceFundtax::getOfficedirector ,serviceFundtax.getOfficedirector());
        if (StringUtils.isNotBlank(serviceFundtax.getOfficedirector())) {
            wrappers.eq(ServiceFundtax::getOfficedirector, serviceFundtax.getOfficedirector());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getFinancedirector())){
            wrappers.eq(ServiceFundtax::getFinancedirector ,serviceFundtax.getFinancedirector());
        if (StringUtils.isNotBlank(serviceFundtax.getFinancedirector())) {
            wrappers.eq(ServiceFundtax::getFinancedirector, serviceFundtax.getFinancedirector());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getFinancechecher())){
            wrappers.eq(ServiceFundtax::getFinancechecher ,serviceFundtax.getFinancechecher());
        if (StringUtils.isNotBlank(serviceFundtax.getFinancechecher())) {
            wrappers.eq(ServiceFundtax::getFinancechecher, serviceFundtax.getFinancechecher());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getUploadflag())){
            wrappers.eq(ServiceFundtax::getUploadflag ,serviceFundtax.getUploadflag());
        if (StringUtils.isNotBlank(serviceFundtax.getUploadflag())) {
            wrappers.eq(ServiceFundtax::getUploadflag, serviceFundtax.getUploadflag());
        }
        if (serviceFundtax.getUploadtime() != null){
            wrappers.eq(ServiceFundtax::getUploadtime ,serviceFundtax.getUploadtime());
        if (serviceFundtax.getUploadtime() != null) {
            wrappers.eq(ServiceFundtax::getUploadtime, serviceFundtax.getUploadtime());
        }
        if (StringUtils.isNotBlank(serviceFundtax.getUpdownremark())){
            wrappers.eq(ServiceFundtax::getUpdownremark ,serviceFundtax.getUpdownremark());
        if (StringUtils.isNotBlank(serviceFundtax.getUpdownremark())) {
            wrappers.eq(ServiceFundtax::getUpdownremark, serviceFundtax.getUpdownremark());
        }
        return this.list(wrappers);
    }
    @Override
    public Integer getMaxFundTaxId() {
        return serviceFundtaxMapper.getMaxFundTaxId();
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Boolean batchFundTax(FundTaxVO fundTaxVO) {
        if (fundTaxVO.getFundTaxId() == null) {
            throw new BaseException("分批算税出问题了,请检查后再进行计算");
        }
        if (fundTaxVO.getAddOrupdate() == 1) {
            Integer maxFundTaxId = serviceFundtaxMapper.getMaxFundTaxId();
            if (fundTaxVO.getFundTaxId() != maxFundTaxId.longValue()) {
                throw new BaseException("该批数据不能算税");
            }
        }
        ServiceFund serviceFund = new ServiceFund();
        serviceFund.setFundTaxId(fundTaxVO.getFundTaxId());
        serviceFund.setDel_flag(0);
        List<ServiceFund> serviceFunds = serviceFundService.selectServiceFundList(serviceFund);
        for (ServiceFund serviceFund1 : serviceFunds) {
            ServiceFunddetail serviceFunddetail = new ServiceFunddetail();
            serviceFunddetail.setFundid(serviceFund1.getId());
            List<ServiceFunddetail> serviceFunddetails = serviceFunddetailMapper.selectServiceFunddetailList(serviceFunddetail);
            serviceFunddetailService.calculateTax(serviceFunddetails);
        }
        return true;
    }
}
ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml
@@ -64,6 +64,7 @@
        <result property="uploadStates" column="upload_states"/>
        <result property="notes" column="notes"/>
        <result property="jxrq" column="jxrq"/>
        <result property="fundTaxId" column="fund_tax_id"/>
    </resultMap>
    <sql id="selectServiceFundVo">
@@ -125,7 +126,8 @@
               fundtaxtime,
               upload_states,
               jxrq,
               notes
               notes,
               fund_tax_id
        from service_fund
    </sql>
@@ -135,6 +137,7 @@
        where del_flag = '0'
        <if test="donorno != null  and donorno != ''">and DonorNo = #{donorno}</if>
        <if test="fundTaxId != null ">and fund_tax_id = #{fundTaxId}</if>
        <if test="userno != null  and userno != ''">and UserNo = #{userno}</if>
        <if test="username != null  and username != ''">and UserName like concat('%', #{username}, '%')</if>
        <if test="applytype != null  and applytype != ''">and ApplyType = #{applytype}</if>
@@ -207,6 +210,7 @@
        `service_fund`.`PretaxCost` AS `pretaxcost`,
        `service_fund`.`TaxedCost` AS `taxedcost`,
        `service_fund`.`jxrq` AS `jxrq`,
        `service_fund`.`fund_tax_id` AS `fundTaxId`,
        `service_funddetail`.`ID` AS `fdid`,
        `service_funddetail`.`fundID` AS `fundid`,
        `service_funddetail`.`BeneficiaryName` AS `beneficiaryname`,
@@ -261,4 +265,9 @@
            resultType="com.ruoyi.project.domain.vo.SpFinancialExpensesFundOut">
        call SP_FINANCIAL_EXPENSES(#{PAUSERNO,mode=IN,jdbcType=VARCHAR},#{PAFUNDTYPE,mode=IN,jdbcType=INTEGER},#{PAAPPLICANT,mode=IN,jdbcType=VARCHAR},#{PAAPPLICATIONBEGTIME,mode=IN,jdbcType=VARCHAR},#{PAAPPLICATIONENDTIME,mode=IN,jdbcType=VARCHAR},#{PADEPARTMENT,mode=IN,jdbcType=VARCHAR},#{CHECKFLAG,mode=IN,jdbcType=INTEGER},#{APPLYTYPE,mode=IN,jdbcType=INTEGER},#{CHECKSTATUS,mode=IN,jdbcType=INTEGER},#{donorname,mode=IN,jdbcType=VARCHAR})
    </select>
    <select id="getExpertfeeList" statementType="CALLABLE"
            resultType="com.ruoyi.project.domain.vo.SpFinancialExpensesFundOut">
        call SP_SELECT_EXPERTFEE(#{PAAPPLYTYPE,mode=IN,jdbcType=INTEGER},#{DONORNAME,mode=IN,jdbcType=VARCHAR},#{PACHECKNO,mode=IN,jdbcType=VARCHAR},#{CHECKSTATUS,mode=IN,jdbcType=INTEGER},#{PADEPARTNO,mode=IN,jdbcType=VARCHAR},#{PAUSERNAME,mode=IN,jdbcType=VARCHAR})
    </select>
</mapper>
ruoyi-project/src/main/resources/mapper/project/ServiceFundtaxMapper.xml
@@ -132,4 +132,10 @@
        </where>
    </select>
    <select id="getMaxFundTaxId" resultType="integer">
        select max(id) maxid
        from service_fund
        where del_flag = 0;
    </select>
</mapper>