
28 changed files with 1448 additions and 2 deletions
@ -0,0 +1,45 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApply extends BaseEntity { |
||||
|
private static final long serialVersionUID = 4492743919444158176L; |
||||
|
|
||||
|
private String billNo; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String createDeptSid; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDeptName; |
||||
|
@ApiModelProperty("附件") |
||||
|
private String file; |
||||
|
@ApiModelProperty("创建组织sid") |
||||
|
private String createOrgSid; |
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("分公司") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("办结日期") |
||||
|
private String closeDate; |
||||
|
@ApiModelProperty("实例id") |
||||
|
private String procInstId; |
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private String procDefId; |
||||
|
@ApiModelProperty("任务iD") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("环节iD") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply; |
||||
|
|
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailVo; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebilldetail.AsBusclaimInvoiceBillDetailVo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApplyDetailsVo { |
||||
|
|
||||
|
private String sid; |
||||
|
private String createBySid; |
||||
|
private String createByName; |
||||
|
private String orgPath; |
||||
|
|
||||
|
private String createTime; |
||||
|
|
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String createDeptSid; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDeptName; |
||||
|
|
||||
|
private List<String> fileList = new ArrayList<>(); |
||||
|
private String remarks; |
||||
|
|
||||
|
private List<AsBusclaimCheckApplyDetailVo> detailList = new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply; |
||||
|
|
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailDto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApplyDto { |
||||
|
|
||||
|
private String sid; |
||||
|
private String createBySid; |
||||
|
private String createByName; |
||||
|
private String orgPath; |
||||
|
|
||||
|
private String createTime; |
||||
|
|
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String createDeptSid; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDeptName; |
||||
|
|
||||
|
private List<String> fileList = new ArrayList<>(); |
||||
|
private String remarks; |
||||
|
|
||||
|
private List<AsBusclaimCheckApplyDetailDto> detailsList = new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApplyQuery implements Query { |
||||
|
private static final long serialVersionUID = -4951117831018159357L; |
||||
|
|
||||
|
@ApiModelProperty("分公司") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDeptName; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("单据编号") |
||||
|
private String billNo; |
||||
|
@ApiModelProperty("申请日期开始时间") |
||||
|
private String createTimeStart; |
||||
|
@ApiModelProperty("申请日期结束时间") |
||||
|
private String createTimeEnd; |
||||
|
@ApiModelProperty("办结日期开始时间") |
||||
|
private String closeDateStart; |
||||
|
@ApiModelProperty("办结日期结束时间") |
||||
|
private String closeDateEnd; |
||||
|
|
||||
|
private String createBySid; |
||||
|
private String orgPath; |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApplyVo { |
||||
|
|
||||
|
//sid
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; |
||||
|
@ApiModelProperty("单据编号") |
||||
|
private String billNo; |
||||
|
@ApiModelProperty("分公司") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDeptName; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("申请日期") |
||||
|
private String createTime; |
||||
|
@ApiModelProperty("办结日期") |
||||
|
private String closeDate; |
||||
|
private String file; |
||||
|
|
||||
|
private List<String> fileList = new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class BusclaimCheckApplyDelegateQuery { |
||||
|
|
||||
|
private String userSid; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务Id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("审批人sid") |
||||
|
private String assignee; |
||||
|
@ApiModelProperty("填写意见") |
||||
|
private String views; |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class BusclaimCheckApplyNodeQuery { |
||||
|
|
||||
|
@ApiModelProperty(value = "环节定义id") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
private String businessSid; |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class BusclaimCheckApplyNodeVo { |
||||
|
|
||||
|
@ApiModelProperty(value = "节点名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "节点id") |
||||
|
private String id; |
||||
|
@ApiModelProperty(value = "审批组") |
||||
|
private List<String> candidateGroups; |
||||
|
@ApiModelProperty(value = "是否是最后环节") |
||||
|
private String endTask; |
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class BusclaimCheckApplyTaskQuery { |
||||
|
|
||||
|
/** |
||||
|
* 终止、驳回、撤回 |
||||
|
*/ |
||||
|
@ApiModelProperty("任务Id") |
||||
|
@NotBlank(message = "参数错误:taskId") |
||||
|
private String taskId; |
||||
|
/** |
||||
|
* 终止、驳回、撤回 |
||||
|
*/ |
||||
|
@ApiModelProperty("业务sid") |
||||
|
@NotBlank(message = "参数错误:businessSid") |
||||
|
private String businessSid; |
||||
|
/** |
||||
|
* 终止、驳回 |
||||
|
*/ |
||||
|
@ApiModelProperty("任务意见") |
||||
|
private String comment; |
||||
|
/** |
||||
|
* 终止、撤回、驳回 |
||||
|
*/ |
||||
|
@ApiModelProperty("用户Sid") |
||||
|
private String userSid; |
||||
|
/** |
||||
|
* 终止 |
||||
|
*/ |
||||
|
@ApiModelProperty("流程实例Id") |
||||
|
private String instanceId; |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class CompleteBusclaimCheckApplyDto { |
||||
|
|
||||
|
@ApiModelProperty(value = "用户sid") |
||||
|
@NotBlank(message = "参数错误:userSid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty(value = "用户全路径sid") |
||||
|
private String orgSidPath; |
||||
|
@ApiModelProperty(value = "节点id") |
||||
|
@NotBlank(message = "参数错误:taskDefKey") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "任务id") |
||||
|
@NotBlank(message = "参数错误:taskId") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty(value = "流程id") |
||||
|
@NotBlank(message = "参数错误:instanceId") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty(value = "意见") |
||||
|
private String comment; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
@NotBlank(message = "参数错误:businessSid") |
||||
|
private String businessSid; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapply.flowable; |
||||
|
|
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApplyDto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SubmitBusclaimCheckApplyDto extends AsBusclaimCheckApplyDto { |
||||
|
|
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapplydetail; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApplyDetail extends BaseEntity { |
||||
|
private static final long serialVersionUID = -2991848535556294459L; |
||||
|
|
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("索赔单号") |
||||
|
private String claimBillNo; |
||||
|
@ApiModelProperty("维修工单号") |
||||
|
private String repairBillNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehmark; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("开票申请sid") |
||||
|
private String billInvoiceSid; |
||||
|
@ApiModelProperty("开票明细sid") |
||||
|
private String billInvoiceDetailSid; |
||||
|
@ApiModelProperty("索赔工时费") |
||||
|
private BigDecimal claimHourAmount; |
||||
|
@ApiModelProperty("索赔材料费") |
||||
|
private BigDecimal claimGoodsAmount; |
||||
|
@ApiModelProperty("外出费") |
||||
|
private BigDecimal claimOutAmount; |
||||
|
@ApiModelProperty("厂家补助费") |
||||
|
private BigDecimal claimSubsidyAmount; |
||||
|
@ApiModelProperty("其他费用") |
||||
|
private BigDecimal claimOtherAmount; |
||||
|
@ApiModelProperty("预留") |
||||
|
private BigDecimal reserved; |
||||
|
@ApiModelProperty("原因") |
||||
|
private String reason; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapplydetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApplyDetailDto { |
||||
|
|
||||
|
@ApiModelProperty("索赔单号") |
||||
|
private String claimBillNo; |
||||
|
@ApiModelProperty("维修工单号") |
||||
|
private String repairBillNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehmark; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("开票申请sid") |
||||
|
private String billInvoiceSid; |
||||
|
@ApiModelProperty("开票明细sid") |
||||
|
private String billInvoiceDetailSid; |
||||
|
@ApiModelProperty("索赔工时费") |
||||
|
private String claimHourAmount; |
||||
|
@ApiModelProperty("索赔材料费") |
||||
|
private String claimGoodsAmount; |
||||
|
@ApiModelProperty("外出费") |
||||
|
private String claimOutAmount; |
||||
|
@ApiModelProperty("厂家补助费") |
||||
|
private String claimSubsidyAmount; |
||||
|
@ApiModelProperty("其他费用") |
||||
|
private String claimOtherAmount; |
||||
|
@ApiModelProperty("预留") |
||||
|
private String reserved; |
||||
|
@ApiModelProperty("原因") |
||||
|
private String reason; |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.yxt.anrui.as.api.asbusclaimcheckapplydetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AsBusclaimCheckApplyDetailVo { |
||||
|
|
||||
|
@ApiModelProperty("索赔单号") |
||||
|
private String claimBillNo; |
||||
|
@ApiModelProperty("维修工单号") |
||||
|
private String repairBillNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehmark; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("开票申请sid") |
||||
|
private String billInvoiceSid; |
||||
|
@ApiModelProperty("开票明细sid") |
||||
|
private String billInvoiceDetailSid; |
||||
|
@ApiModelProperty("索赔工时费") |
||||
|
private String claimHourAmount; |
||||
|
@ApiModelProperty("索赔材料费") |
||||
|
private String claimGoodsAmount; |
||||
|
@ApiModelProperty("外出费") |
||||
|
private String claimOutAmount; |
||||
|
@ApiModelProperty("厂家补助费") |
||||
|
private String claimSubsidyAmount; |
||||
|
@ApiModelProperty("其他费用") |
||||
|
private String claimOtherAmount; |
||||
|
@ApiModelProperty("预留") |
||||
|
private String reserved; |
||||
|
@ApiModelProperty("原因") |
||||
|
private String reason; |
||||
|
|
||||
|
//工单:工时费
|
||||
|
private String hourAmount1; |
||||
|
|
||||
|
//工单材料费
|
||||
|
private String goodsAmount1; |
||||
|
|
||||
|
//工单外出费
|
||||
|
private String claimOutAmount1; |
||||
|
|
||||
|
//工单厂家补助
|
||||
|
private String claimSubsidyAmount1; |
||||
|
|
||||
|
//工单其他费用
|
||||
|
private String claimOtherAmount1; |
||||
|
|
||||
|
//工单合计
|
||||
|
private String all1; |
||||
|
|
||||
|
//索赔开票工时费
|
||||
|
private String claimHourAmount2; |
||||
|
|
||||
|
//索赔开票材料费
|
||||
|
private String claimGoodsAmount2; |
||||
|
|
||||
|
//索赔开票外出费
|
||||
|
private String claimOutAmount2; |
||||
|
|
||||
|
//索赔开票厂家补助
|
||||
|
private String claimSubsidyAmount2; |
||||
|
|
||||
|
//索赔开票其他金额
|
||||
|
private String claimOtherAmount2; |
||||
|
|
||||
|
//合计
|
||||
|
private String all2; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.anrui.as.biz.asbusclaimcheckapply; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApply; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApplyVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface AsBusclaimCheckApplyMapper extends BaseMapper<AsBusclaimCheckApply> { |
||||
|
IPage<AsBusclaimCheckApplyVo> listPage(IPage<AsBusclaimCheckApply> page, @Param(Constants.WRAPPER) QueryWrapper<AsBusclaimCheckApply> qw); |
||||
|
|
||||
|
int selectBySid(String join); |
||||
|
|
||||
|
int updateFlowFiled(Map<String, Object> beanToMap); |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.as.biz.asbusclaimcheckapply.AsBusclaimCheckApplyMapper"> |
||||
|
<select id="listPage" resultType="com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApplyVo"> |
||||
|
select a.sid, |
||||
|
a.nodeState, |
||||
|
a.billNo, |
||||
|
a.useOrgName, |
||||
|
a.createDeptName, |
||||
|
a.createByName, |
||||
|
DATE_FORMAT(a.createTime, '%Y-%m-%d') as createTime, |
||||
|
a.closeDate, |
||||
|
a.file |
||||
|
from as_busclaim_check_apply a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectBySid" resultType="int"> |
||||
|
select count(*) |
||||
|
from as_busclaim_check_apply |
||||
|
where length(nodeState) > 0 |
||||
|
and find_in_set(sid, #{list}) |
||||
|
</select> |
||||
|
|
||||
|
<update id="updateFlowFiled"> |
||||
|
UPDATE as_busclaim_check_apply |
||||
|
SET nodeState=#{nodeState} |
||||
|
<if test="taskDefKey != null and taskDefKey != ''"> |
||||
|
, taskDefKey=#{taskDefKey} |
||||
|
</if> |
||||
|
<if test="procDefId != null and procDefId != ''"> |
||||
|
, procDefId=#{procDefId} |
||||
|
</if> |
||||
|
<if test="procInsId != null and procInsId != ''"> |
||||
|
, procInstId=#{procInsId} |
||||
|
</if> |
||||
|
<if test="taskId != null and taskId != ''"> |
||||
|
, taskId=#{taskId} |
||||
|
</if> |
||||
|
WHERE sid = #{sid} |
||||
|
</update> |
||||
|
</mapper> |
@ -0,0 +1,115 @@ |
|||||
|
package com.yxt.anrui.as.biz.asbusclaimcheckapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApplyDetailsVo; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApplyDto; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApplyQuery; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.AsBusclaimCheckApplyVo; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.flowable.*; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebill.AsBusclaimInvoiceBillDetailsVo; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebill.AsBusclaimInvoiceBillDto; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebill.AsBusclaimInvoiceBillQuery; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebill.AsBusclaimInvoiceBillVo; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebill.flowable.*; |
||||
|
import com.yxt.anrui.as.feign.flowable.flow.BusinessVariables; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.cloud.openfeign.SpringQueryMap; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: 索赔调整申请 |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@RestController |
||||
|
@RequestMapping("v1/AsBusclaimCheckApply") |
||||
|
public class AsBusclaimCheckApplyRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private AsBusclaimCheckApplyService asBusclaimCheckApplyService; |
||||
|
|
||||
|
@PostMapping("/listPage") |
||||
|
@ApiOperation("索赔单调整分页") |
||||
|
ResultBean<PagerVo<AsBusclaimCheckApplyVo>> listPage(@RequestBody PagerQuery<AsBusclaimCheckApplyQuery> pagerQuery) { |
||||
|
ResultBean<PagerVo<AsBusclaimCheckApplyVo>> rb = ResultBean.fireFail(); |
||||
|
PagerVo<AsBusclaimCheckApplyVo> pv = asBusclaimCheckApplyService.listPage(pagerQuery); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/saveOrUpdateBill") |
||||
|
@ApiOperation("新增修改保存") |
||||
|
ResultBean<String> saveOrUpdateBill(@RequestBody AsBusclaimCheckApplyDto dto) { |
||||
|
return asBusclaimCheckApplyService.saveOrUpdateBill(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("删除/批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
ResultBean delBySids(@RequestBody String[] sids) { |
||||
|
return asBusclaimCheckApplyService.delAllBySids(sids); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/details") |
||||
|
@ApiOperation("详情") |
||||
|
ResultBean<AsBusclaimCheckApplyDetailsVo> details(@RequestParam("sid") String sid) { |
||||
|
return asBusclaimCheckApplyService.details(sid); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("提交") |
||||
|
@PostMapping("/submitApply") |
||||
|
public ResultBean submitApply(@Valid @RequestBody SubmitBusclaimCheckApplyDto dto) { |
||||
|
return asBusclaimCheckApplyService.submitApply(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "办理(同意)") |
||||
|
@PostMapping("/complete") |
||||
|
public ResultBean complete(@Valid @RequestBody CompleteBusclaimCheckApplyDto query) { |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
bv.setModelId(""); |
||||
|
return asBusclaimCheckApplyService.complete(bv); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "获取上一个环节") |
||||
|
@GetMapping(value = "/getPreviousNodesForReject") |
||||
|
ResultBean<List<BusclaimCheckApplyNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap BusclaimCheckApplyNodeQuery query) { |
||||
|
return asBusclaimCheckApplyService.getPreviousNodesForReject(query); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "获取下一个环节") |
||||
|
@GetMapping(value = "/getNextNodesForSubmit") |
||||
|
ResultBean<List<BusclaimCheckApplyNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap BusclaimCheckApplyNodeQuery query) { |
||||
|
return asBusclaimCheckApplyService.getNextNodesForSubmit(query); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "驳回任务") |
||||
|
@PostMapping(value = "/reject") |
||||
|
public ResultBean taskReject(@Valid @RequestBody BusclaimCheckApplyTaskQuery query) { |
||||
|
return asBusclaimCheckApplyService.taskReject(query); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "撤回流程") |
||||
|
@PostMapping(value = "/revokeProcess") |
||||
|
public ResultBean revokeProcess(@Valid @RequestBody BusclaimCheckApplyTaskQuery query) { |
||||
|
return asBusclaimCheckApplyService.revokeProcess(query); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "终止任务") |
||||
|
@PostMapping(value = "/breakProcess") |
||||
|
public ResultBean breakProcess(@Valid @RequestBody BusclaimCheckApplyTaskQuery query) { |
||||
|
return asBusclaimCheckApplyService.breakProcess(query); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "加签") |
||||
|
@PostMapping(value = "/delegate") |
||||
|
@ResponseBody |
||||
|
public ResultBean delegate(@RequestBody BusclaimCheckApplyDelegateQuery query) { |
||||
|
return asBusclaimCheckApplyService.delegate(query); |
||||
|
} |
||||
|
} |
@ -0,0 +1,530 @@ |
|||||
|
package com.yxt.anrui.as.biz.asbusclaimcheckapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
||||
|
import com.yxt.anrui.as.api.asbusclaimbill.AsBusclaimBill; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.*; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapply.flowable.*; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailDto; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailVo; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebilldetail.AsBusclaimInvoiceBillDetail; |
||||
|
import com.yxt.anrui.as.biz.asbusclaimbill.AsBusclaimBillService; |
||||
|
import com.yxt.anrui.as.biz.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailMapper; |
||||
|
import com.yxt.anrui.as.biz.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailService; |
||||
|
import com.yxt.anrui.as.biz.asbusclaiminvoicebilldetail.AsBusclaimInvoiceBillDetailService; |
||||
|
import com.yxt.anrui.as.feign.flowable.flow.BusinessVariables; |
||||
|
import com.yxt.anrui.as.feign.flowable.flow.FlowableFeign; |
||||
|
import com.yxt.anrui.as.feign.flowable.flow.ProcDefEnum; |
||||
|
import com.yxt.anrui.as.feign.flowable.flow.UpdateFlowFieldVo; |
||||
|
import com.yxt.anrui.as.feign.flowable.flow2.FlowDelegateQuery; |
||||
|
import com.yxt.anrui.as.feign.flowable.flow2.FlowFeign; |
||||
|
import com.yxt.anrui.as.feign.flowable.flowtask.FlowTaskFeign; |
||||
|
import com.yxt.anrui.as.feign.flowable.flowtask.FlowTaskVo; |
||||
|
import com.yxt.anrui.as.feign.flowable.flowtask.LatestTaskVo; |
||||
|
import com.yxt.anrui.as.feign.message.MessageFeign; |
||||
|
import com.yxt.anrui.as.feign.message.MessageFlowVo; |
||||
|
import com.yxt.anrui.as.feign.message.MessageFlowableQuery; |
||||
|
import com.yxt.anrui.as.feign.portal.sysorganization.SysOrganizationFeign; |
||||
|
import com.yxt.anrui.as.feign.portal.sysorganization.SysOrganizationVo; |
||||
|
import com.yxt.common.base.config.component.FileUploadComponent; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import java.util.concurrent.*; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class AsBusclaimCheckApplyService extends MybatisBaseService<AsBusclaimCheckApplyMapper, AsBusclaimCheckApply> { |
||||
|
|
||||
|
@Autowired |
||||
|
private FileUploadComponent fileUploadComponent; |
||||
|
@Autowired |
||||
|
private AsBusclaimCheckApplyDetailService asBusclaimCheckApplyDetailService; |
||||
|
@Autowired |
||||
|
private AsBusclaimCheckApplyDetailMapper asBusclaimCheckApplyDetailMapper; |
||||
|
@Autowired |
||||
|
private AsBusclaimBillService asBusclaimBillService; |
||||
|
@Autowired |
||||
|
private AsBusclaimInvoiceBillDetailService asBusclaimInvoiceBillDetailService; |
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
@Autowired |
||||
|
private FlowFeign flowFeign; |
||||
|
@Autowired |
||||
|
private MessageFeign messageFeign; |
||||
|
@Autowired |
||||
|
private FlowTaskFeign flowTaskFeign; |
||||
|
@Autowired |
||||
|
private FlowableFeign flowableFeign; |
||||
|
|
||||
|
|
||||
|
public PagerVo<AsBusclaimCheckApplyVo> listPage(PagerQuery<AsBusclaimCheckApplyQuery> pagerQuery) { |
||||
|
AsBusclaimCheckApplyQuery query = pagerQuery.getParams(); |
||||
|
QueryWrapper<AsBusclaimCheckApply> qw = new QueryWrapper<>(); |
||||
|
//ToDo:添加查询条件
|
||||
|
//分公司
|
||||
|
if (StringUtils.isNotBlank(query.getUseOrgName())) { |
||||
|
qw.like("a.useOrgName", query.getUseOrgName()); |
||||
|
} |
||||
|
//申请部门
|
||||
|
if (StringUtils.isNotBlank(query.getCreateDeptName())) { |
||||
|
qw.like("a.createDeptName", query.getCreateDeptName()); |
||||
|
} |
||||
|
//申请人
|
||||
|
if (StringUtils.isNotBlank(query.getCreateByName())) { |
||||
|
qw.like("a.createByName", query.getCreateByName()); |
||||
|
} |
||||
|
//单据编号
|
||||
|
if (StringUtils.isNotBlank(query.getBillNo())) { |
||||
|
qw.like("a.billNo", query.getBillNo()); |
||||
|
} |
||||
|
//申请日期开始时间-申请日期结束时间
|
||||
|
qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (a.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). |
||||
|
apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (a.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" |
||||
|
); |
||||
|
//办结日期开始时间-办结日期结束时间
|
||||
|
qw.apply(StringUtils.isNotBlank(query.getCloseDateStart()), "date_format (a.closeDate,'%Y-%m-%d') >= date_format('" + query.getCloseDateStart() + "','%Y-%m-%d')"). |
||||
|
apply(StringUtils.isNotBlank(query.getCloseDateEnd()), "date_format (a.closeDate,'%Y-%m-%d') <= date_format('" + query.getCloseDateEnd() + "','%Y-%m-%d')" |
||||
|
); |
||||
|
IPage<AsBusclaimCheckApply> page = PagerUtil.queryToPage(pagerQuery); |
||||
|
IPage<AsBusclaimCheckApplyVo> pagging = baseMapper.listPage(page, qw); |
||||
|
List<AsBusclaimCheckApplyVo> records = pagging.getRecords(); |
||||
|
records.removeAll(Collections.singleton(null)); |
||||
|
if (!records.isEmpty()) { |
||||
|
for (int i = 0; i < records.size(); i++) { |
||||
|
AsBusclaimCheckApplyVo asBusclaimCheckApplyVo = records.get(i); |
||||
|
String file = asBusclaimCheckApplyVo.getFile(); |
||||
|
if (StringUtils.isNotBlank(file)) { |
||||
|
List<String> processFile = Arrays.asList(file.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); |
||||
|
asBusclaimCheckApplyVo.setFileList(processFile); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
PagerVo<AsBusclaimCheckApplyVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> saveOrUpdateBill(AsBusclaimCheckApplyDto dto) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
String sid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(sid)) { |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = new AsBusclaimCheckApply(); |
||||
|
BeanUtil.copyProperties(dto, asBusclaimCheckApply, "sid"); |
||||
|
asBusclaimCheckApply.setCreateBySid(dto.getCreateBySid()); |
||||
|
sid = asBusclaimCheckApply.getSid(); |
||||
|
List<String> fileList = dto.getFileList(); |
||||
|
fileList.removeAll(Collections.singleton(null)); |
||||
|
if (!fileList.isEmpty()) { |
||||
|
String files = String.join(",", fileList).replaceAll(fileUploadComponent.getUrlPrefix(), ""); |
||||
|
asBusclaimCheckApply.setFile(files); |
||||
|
} |
||||
|
List<AsBusclaimCheckApplyDetailDto> detailList = dto.getDetailsList(); |
||||
|
detailList.removeAll(Collections.singleton(null)); |
||||
|
if (!detailList.isEmpty()) { |
||||
|
asBusclaimCheckApplyDetailService.saveOrUpdateDetails(sid, detailList); |
||||
|
} |
||||
|
baseMapper.insert(asBusclaimCheckApply); |
||||
|
|
||||
|
} else { |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(sid); |
||||
|
if (asBusclaimCheckApply == null) { |
||||
|
return rb.setMsg("该单据不存在"); |
||||
|
} |
||||
|
BeanUtil.copyProperties(dto, asBusclaimCheckApply, "sid"); |
||||
|
List<String> fileList = dto.getFileList(); |
||||
|
fileList.removeAll(Collections.singleton(null)); |
||||
|
if (!fileList.isEmpty()) { |
||||
|
String files = String.join(",", fileList).replaceAll(fileUploadComponent.getUrlPrefix(), ""); |
||||
|
asBusclaimCheckApply.setFile(files); |
||||
|
} |
||||
|
List<AsBusclaimCheckApplyDetailDto> detailList = dto.getDetailsList(); |
||||
|
detailList.removeAll(Collections.singleton(null)); |
||||
|
if (!detailList.isEmpty()) { |
||||
|
asBusclaimCheckApplyDetailService.saveOrUpdateDetails(sid, detailList); |
||||
|
} |
||||
|
baseMapper.updateById(asBusclaimCheckApply); |
||||
|
} |
||||
|
return rb.success().setData(sid); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delAllBySids(String[] sids) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
//查询该sid中是否有流程不是待提交的
|
||||
|
int count = baseMapper.selectBySid(StringUtils.join(sids, ",")); |
||||
|
if (count > 0) { |
||||
|
return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败"); |
||||
|
} |
||||
|
List<String> sidss = Arrays.asList(sids); |
||||
|
for (int i = 0; i < sidss.size(); i++) { |
||||
|
asBusclaimCheckApplyDetailMapper.deleteByMainSid(sidss.get(i)); |
||||
|
} |
||||
|
delBySids(sids); |
||||
|
return rb.success().setMsg("删除成功"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<AsBusclaimCheckApplyDetailsVo> details(String sid) { |
||||
|
ResultBean<AsBusclaimCheckApplyDetailsVo> rb = ResultBean.fireFail(); |
||||
|
AsBusclaimCheckApplyDetailsVo asBusclaimCheckApplyDetailsVo = new AsBusclaimCheckApplyDetailsVo(); |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(sid); |
||||
|
if (asBusclaimCheckApply == null) { |
||||
|
return rb.setMsg("该单据不存在"); |
||||
|
} |
||||
|
BeanUtil.copyProperties(asBusclaimCheckApply, asBusclaimCheckApplyDetailsVo); |
||||
|
if (StringUtils.isNotBlank(asBusclaimCheckApply.getFile())) { |
||||
|
List<String> fileList = Arrays.asList(asBusclaimCheckApply.getFile().split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); |
||||
|
asBusclaimCheckApplyDetailsVo.setFileList(fileList); |
||||
|
} |
||||
|
List<AsBusclaimCheckApplyDetailVo> detailList = asBusclaimCheckApplyDetailService.selectDetails(sid); |
||||
|
detailList.removeAll(Collections.singleton(null)); |
||||
|
if (!detailList.isEmpty()) { |
||||
|
for (int i = 0; i < detailList.size(); i++) { |
||||
|
AsBusclaimCheckApplyDetailVo asBusclaimCheckApplyDetailVo = detailList.get(i); |
||||
|
String billNo = asBusclaimCheckApplyDetailVo.getClaimBillNo(); |
||||
|
AsBusclaimBill asBusclaimBill = asBusclaimBillService.selectByBillNo(billNo); |
||||
|
if (asBusclaimBill != null) { |
||||
|
asBusclaimCheckApplyDetailVo.setHourAmount1(asBusclaimBill.getHourAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setGoodsAmount1(asBusclaimBill.getGoodsAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setClaimOutAmount1(asBusclaimBill.getClaimOutAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setClaimSubsidyAmount1(asBusclaimBill.getClaimSubsidyAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setClaimOtherAmount1(asBusclaimBill.getClaimOtherAmount().toString()); |
||||
|
} |
||||
|
AsBusclaimInvoiceBillDetail asBusclaimInvoiceBillDetail = asBusclaimInvoiceBillDetailService.fetchBySid(asBusclaimCheckApplyDetailVo.getBillInvoiceDetailSid()); |
||||
|
if (asBusclaimInvoiceBillDetail != null) { |
||||
|
asBusclaimCheckApplyDetailVo.setClaimHourAmount2(asBusclaimInvoiceBillDetail.getClaimHourAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setClaimGoodsAmount2(asBusclaimInvoiceBillDetail.getClaimGoodsAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setClaimOutAmount2(asBusclaimInvoiceBillDetail.getClaimOutAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setClaimSubsidyAmount2(asBusclaimInvoiceBillDetail.getClaimSubsidyAmount().toString()); |
||||
|
asBusclaimCheckApplyDetailVo.setClaimOtherAmount2(asBusclaimInvoiceBillDetail.getClaimOtherAmount().toString()); |
||||
|
} |
||||
|
} |
||||
|
asBusclaimCheckApplyDetailsVo.setDetailList(detailList); |
||||
|
} |
||||
|
return rb.success().setData(asBusclaimCheckApplyDetailsVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean submitApply(SubmitBusclaimCheckApplyDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(dto.getSid()); |
||||
|
int r = submitBusinessData(dto, asBusclaimCheckApply); |
||||
|
if (r == 3) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
if (r == 0) { |
||||
|
return rb.setMsg("操作失败!提交的数据不一致"); |
||||
|
} |
||||
|
ResultBean<String> resultBean = saveOrUpdateBill(dto); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
String businessSid = resultBean.getData(); |
||||
|
asBusclaimCheckApply = fetchBySid(businessSid); |
||||
|
//创建BusinessVariables实体对象
|
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
//用户的部门全路径sid
|
||||
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(asBusclaimCheckApply.getCreateDeptSid()).getData(); |
||||
|
if (sysOrganization != null) { |
||||
|
bv.setOrgSidPath(sysOrganization.getOrgSidPath()); |
||||
|
} |
||||
|
bv.setBusinessSid(businessSid); |
||||
|
bv.setUserSid(dto.getCreateBySid()); |
||||
|
bv.setFormVariables(variables); |
||||
|
if (r == 1) { |
||||
|
//ToDo:流程定义id
|
||||
|
bv.setModelId(""); |
||||
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv); |
||||
|
if (!voResultBean.getSuccess()) { |
||||
|
return rb.setMsg(voResultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = voResultBean.getData(); |
||||
|
updateFlowFiled(BeanUtil.beanToMap(ufVo)); |
||||
|
asBusclaimCheckApply = fetchBySid(businessSid); |
||||
|
//==================================添加线程
|
||||
|
try { |
||||
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
||||
|
.setNameFormat("demo-pool-%d").build(); |
||||
|
ExecutorService pool = new ThreadPoolExecutor(2, 100, |
||||
|
0L, TimeUnit.MILLISECONDS, |
||||
|
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
||||
|
AsBusclaimCheckApply finalAsBusclaimCheckApply = asBusclaimCheckApply; |
||||
|
Future future1 = pool.submit(() -> { |
||||
|
//极光推送
|
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("索赔单调整申请"); |
||||
|
messageFlowableQuery.setMsgContent(finalAsBusclaimCheckApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
messageFlowableQuery.setMsgTitle("索赔单调整申请"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
}); |
||||
|
} catch (Exception e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
//==================================添加线程
|
||||
|
return voResultBean; |
||||
|
} |
||||
|
if (r == 2) { |
||||
|
// ToDo:驳回到发起人后再次提交
|
||||
|
if (StringUtils.isBlank(dto.getInstanceId())) { |
||||
|
return rb.setMsg("参数错误:instanceId"); |
||||
|
} |
||||
|
bv.setTaskId(asBusclaimCheckApply.getTaskId()); |
||||
|
bv.setTaskDefKey(asBusclaimCheckApply.getTaskDefKey()); |
||||
|
bv.setComment("重新提交"); |
||||
|
bv.setInstanceId(dto.getInstanceId()); |
||||
|
return complete(bv); |
||||
|
} |
||||
|
return rb; |
||||
|
} |
||||
|
|
||||
|
private int updateFlowFiled(Map<String, Object> beanToMap) { |
||||
|
return baseMapper.updateFlowFiled(beanToMap); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private int submitBusinessData(SubmitBusclaimCheckApplyDto dto, AsBusclaimCheckApply asBusclaimCheckApply) { |
||||
|
int r = 0; |
||||
|
if (StringUtils.isBlank(dto.getSid())) { |
||||
|
r = 1; |
||||
|
} else { |
||||
|
if (asBusclaimCheckApply != null) { |
||||
|
String businessTaskId = asBusclaimCheckApply.getTaskId(); |
||||
|
if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) { |
||||
|
//新提交
|
||||
|
r = 1; |
||||
|
} else if (StringUtils.isNotBlank(businessTaskId) && businessTaskId.equals(dto.getTaskId())) { |
||||
|
//二次提交//只有数据一致的时候才能进行下一步
|
||||
|
r = 2; |
||||
|
} |
||||
|
} else { |
||||
|
r = 3; |
||||
|
} |
||||
|
} |
||||
|
return r; |
||||
|
} |
||||
|
|
||||
|
public ResultBean complete(BusinessVariables bv) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String businessSid = bv.getBusinessSid(); |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(businessSid); |
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
bv.setFormVariables(variables); |
||||
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(asBusclaimCheckApply.getCreateDeptSid()).getData(); |
||||
|
if (sysOrganization != null) { |
||||
|
bv.setOrgSidPath(sysOrganization.getOrgSidPath()); |
||||
|
} |
||||
|
bv.setModelId(asBusclaimCheckApply.getProcDefId()); |
||||
|
if (bv.getTaskId().equals(asBusclaimCheckApply.getTaskId())) { |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
||||
|
asBusclaimCheckApply = fetchBySid(businessSid); |
||||
|
asBusclaimCheckApply.setCloseDate(DateUtil.today()); |
||||
|
baseMapper.updateById(asBusclaimCheckApply); |
||||
|
} else { |
||||
|
//极光推送
|
||||
|
asBusclaimCheckApply = fetchBySid(businessSid); |
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
messageFlowVo.setProcDefId(asBusclaimCheckApply.getProcDefId()); |
||||
|
messageFlowVo.setProcInsId(asBusclaimCheckApply.getProcInstId()); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("索赔单调整申请"); |
||||
|
messageFlowableQuery.setMsgContent(asBusclaimCheckApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
messageFlowableQuery.setMsgTitle("索赔单调整申请"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} else { |
||||
|
return rb.setMsg("操作失败!提交的数据不一致"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<BusclaimCheckApplyNodeVo>> getPreviousNodesForReject(BusclaimCheckApplyNodeQuery query) { |
||||
|
ResultBean<List<BusclaimCheckApplyNodeVo>> rb = ResultBean.fireFail(); |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(query.getBusinessSid()); |
||||
|
bv.setModelId(asBusclaimCheckApply.getProcDefId()); |
||||
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
||||
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
||||
|
List<BusclaimCheckApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), BusclaimCheckApplyNodeVo.class)).collect(Collectors.toList()); |
||||
|
return rb.success().setData(voList); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<BusclaimCheckApplyNodeVo>> getNextNodesForSubmit(BusclaimCheckApplyNodeQuery query) { |
||||
|
ResultBean<List<BusclaimCheckApplyNodeVo>> rb = ResultBean.fireFail(); |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(query.getBusinessSid()); |
||||
|
bv.setModelId(asBusclaimCheckApply.getProcDefId()); |
||||
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
||||
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
||||
|
List<BusclaimCheckApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), BusclaimCheckApplyNodeVo.class)).collect(Collectors.toList()); |
||||
|
return rb.success().setData(voList); |
||||
|
} |
||||
|
|
||||
|
public ResultBean taskReject(BusclaimCheckApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String businessSid = query.getBusinessSid(); |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(businessSid); |
||||
|
if (asBusclaimCheckApply == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
String businessTaskId = asBusclaimCheckApply.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
if (StringUtils.isBlank(query.getComment())) { |
||||
|
return rb.setMsg("请填写意见"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(ufVo); |
||||
|
//更新业务中的流程相关的参数
|
||||
|
updateFlowFiled(map); |
||||
|
//极光推送
|
||||
|
asBusclaimCheckApply = fetchBySid(businessSid); |
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
String procId = asBusclaimCheckApply.getProcInstId(); |
||||
|
messageFlowVo.setProcInsId(procId); |
||||
|
messageFlowVo.setProcDefId(asBusclaimCheckApply.getProcDefId()); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("索赔单调整申请"); |
||||
|
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(procId); |
||||
|
String nextName = listResultBean.getData().get(0).getName_(); |
||||
|
String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); |
||||
|
if ("发起申请".equals(nextName)) { |
||||
|
messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); |
||||
|
} else { |
||||
|
messageFlowableQuery.setMsgContent(asBusclaimCheckApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
} |
||||
|
|
||||
|
messageFlowableQuery.setMsgTitle("索赔单调整申请"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean revokeProcess(BusclaimCheckApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(query.getBusinessSid()); |
||||
|
String businessTaskId = asBusclaimCheckApply.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败,提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean breakProcess(BusclaimCheckApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
if (StringUtils.isBlank(query.getInstanceId())) { |
||||
|
return rb.setMsg("参数错误:instanceId"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getComment())) { |
||||
|
return rb.setMsg("请填写意见"); |
||||
|
} |
||||
|
AsBusclaimCheckApply asBusclaimCheckApply = fetchBySid(query.getBusinessSid()); |
||||
|
String businessTaskId = asBusclaimCheckApply.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (query.getUserSid().equals(asBusclaimCheckApply.getCreateBySid())) { |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
||||
|
updateFlowFiled(map); |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} else { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
||||
|
updateFlowFiled(map); |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delegate(BusclaimCheckApplyDelegateQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
FlowDelegateQuery delegateQuery = new FlowDelegateQuery(); |
||||
|
BeanUtil.copyProperties(query, delegateQuery); |
||||
|
flowFeign.delegate(delegateQuery); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.anrui.as.biz.asbusclaimcheckapplydetail; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetail; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface AsBusclaimCheckApplyDetailMapper extends BaseMapper<AsBusclaimCheckApplyDetail> { |
||||
|
int deleteByMainSid(String sid); |
||||
|
|
||||
|
List<AsBusclaimCheckApplyDetailVo> selectDetails(String sid); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.as.biz.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailMapper"> |
||||
|
<delete id="deleteByMainSid"> |
||||
|
delete |
||||
|
from as_busclaim_check_apply_detail |
||||
|
where billSid = #{sid} |
||||
|
</delete> |
||||
|
|
||||
|
<select id="selectDetails" |
||||
|
resultType="com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailVo"> |
||||
|
select a.claimBillNo, |
||||
|
a.repairBillNo, |
||||
|
a.vehmark, |
||||
|
a.vinNo, |
||||
|
a.claimHourAmount, |
||||
|
a.claimGoodsAmount, |
||||
|
a.claimOutAmount, |
||||
|
a.claimSubsidyAmount, |
||||
|
a.claimOtherAmount, |
||||
|
a.repairBillNo, |
||||
|
a.reserved, |
||||
|
a.reason, |
||||
|
a.claimBillNo, |
||||
|
a.billInvoiceSid, |
||||
|
a.billInvoiceDetailSid |
||||
|
from as_busclaim_check_apply_detail a |
||||
|
where billSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.anrui.as.biz.asbusclaimcheckapplydetail; |
||||
|
|
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@RestController |
||||
|
@RequestMapping("v1/AsBusclaimCheckApplyDetail") |
||||
|
public class AsBusclaimCheckApplyDetailRest { |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.anrui.as.biz.asbusclaimcheckapplydetail; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetail; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailDto; |
||||
|
import com.yxt.anrui.as.api.asbusclaimcheckapplydetail.AsBusclaimCheckApplyDetailVo; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebilldetail.AsBusclaimInvoiceBillDetail; |
||||
|
import com.yxt.anrui.as.api.asbusclaiminvoicebilldetail.AsBusclaimInvoiceBillDetailDto; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class AsBusclaimCheckApplyDetailService extends MybatisBaseService<AsBusclaimCheckApplyDetailMapper, AsBusclaimCheckApplyDetail> { |
||||
|
public void saveOrUpdateDetails(String sid, List<AsBusclaimCheckApplyDetailDto> detailList) { |
||||
|
baseMapper.deleteByMainSid(sid); |
||||
|
for (int i = 0; i < detailList.size(); i++) { |
||||
|
AsBusclaimCheckApplyDetailDto dto = detailList.get(i); |
||||
|
AsBusclaimCheckApplyDetail asBusclaimCheckApplyDetail = new AsBusclaimCheckApplyDetail(); |
||||
|
BeanUtil.copyProperties(dto, asBusclaimCheckApplyDetail, "sid"); |
||||
|
asBusclaimCheckApplyDetail.setBillSid(sid); |
||||
|
baseMapper.insert(asBusclaimCheckApplyDetail); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public List<AsBusclaimCheckApplyDetailVo> selectDetails(String sid) { |
||||
|
return baseMapper.selectDetails(sid); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue