diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/FinancialPaymentController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/FinancialPaymentController.java new file mode 100644 index 00000000..a65dab39 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/FinancialPaymentController.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpayment; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemRespVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem.FinancialPaymentItemDO; +import cn.iocoder.yudao.module.bpm.service.financialpayment.FinancialPaymentService; +import cn.iocoder.yudao.module.bpm.service.financialpaymentitem.FinancialPaymentItemService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.validation.Valid; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 财务支付管理") +@RestController +@RequestMapping("/bpm/financial-payment") +@Validated +public class FinancialPaymentController { + + @Resource + private FinancialPaymentService financialPaymentService; + @Resource + private FinancialPaymentItemService financialPaymentItemService; + + @PostMapping("/create") + @Operation(summary = "创建财务支付子表") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment:create')") + public CommonResult createFinancialPayment(@Valid @RequestBody FinancialPaymentSaveVO vo) { + return success(financialPaymentService.createFinancialPayment(vo)); + } + + @PutMapping("/update") + @Operation(summary = "更新财务支付管理") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment:update')") + public CommonResult updateFinancialPayment(@Valid @RequestBody FinancialPaymentSaveReqVO updateReqVO) { + financialPaymentService.updateFinancialPayment(updateReqVO); + return success(true); + } + + @GetMapping("/receive/{id}") + @Operation(summary = "领取财务支付管理") + public CommonResult receive(@PathVariable Long id) { + financialPaymentService.receive(id); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除财务支付管理") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bpm:financial-payment:delete')") + public CommonResult deleteFinancialPayment(@RequestParam("id") Long id) { + financialPaymentService.deleteFinancialPayment(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得财务支付管理") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment:query')") + public CommonResult getFinancialPayment(@RequestParam("id") Long id) { + FinancialPaymentDO financialPayment = financialPaymentService.getFinancialPayment(id); + FinancialPaymentRespVO vo = BeanUtils.toBean(financialPayment, FinancialPaymentRespVO.class); + List list = financialPaymentItemService.getByFinancialPaymentId(id); + List items = BeanUtils.toBean(list, FinancialPaymentItemRespVO.class); + vo.setItems(items); + return success(vo); + } + + @GetMapping("/page") + @Operation(summary = "获得财务支付管理分页") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment:query')") + public CommonResult> getFinancialPaymentPage(@Valid FinancialPaymentPageReqVO pageReqVO) { + PageResult pageResult = financialPaymentService.getFinancialPaymentPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, FinancialPaymentRespVO.class)); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentPageReqVO.java new file mode 100644 index 00000000..4bc21efc --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentPageReqVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 财务支付管理分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class FinancialPaymentPageReqVO extends PageParam { + + @Schema(description = "部门id", example = "13599") + private Long deptId; + + @Schema(description = "申请人的用户名称", example = "13599") + private String nickname; + + @Schema(description = "流程实例id", example = "8972") + private String processInstanceId; + + @Schema(description = "流程类型 1现金支出 2备用金 3采购付款 4报销", example = "2") + private Integer type; + + @Schema(description = "支付状态 0待支付 1分批支付中 2已支付 3拒绝", example = "1") + private Integer status; + + @Schema(description = "领取类型 1未领取 2已领取 3我领取 4其他人领取", example = "16852") + private Integer receiveType; + + @Schema(description = "当前登陆用户id(领取人) 前端不用传") + private Long receiveUserId; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentRespVO.java new file mode 100644 index 00000000..75a2d692 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentRespVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo; + +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemRespVO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 财务支付管理 Response VO") +@Data +public class FinancialPaymentRespVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "81") + private Long id; + + @Schema(description = "申请人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13599") + private Long userId; + + @Schema(description = "申请人的用户名称") + private String nickname; + + @Schema(description = "部门名称") + private String deptName; + + @Schema(description = "流程实例id", example = "8972") + private String processInstanceId; + + @Schema(description = "申请费用原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "不好") + private String reason; + + @Schema(description = "流程类型 1现金支出 2备用金 3采购付款 4报销", example = "2") + private Integer type; + + @Schema(description = "支付状态 0待支付 1分批支付中 2已支付 3拒绝", example = "1") + private Integer status; + + @Schema(description = "领取的财务用户id", example = "16852") + private Long receiveUserId; + + @Schema(description = "领取的财务用户名称", example = "16852") + private String receiveUserNickName; + + @Schema(description = "应该支付金额") + private BigDecimal amountPayable; + + @Schema(description = "实际支付") + private BigDecimal actualPayment; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + + @Schema(description = "子列表") + private List items; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentSaveReqVO.java new file mode 100644 index 00000000..cdfb4e27 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentSaveReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 财务支付管理新增/修改 Request VO") +@Data +public class FinancialPaymentSaveReqVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "81") + private Long id; + + @Schema(description = "申请人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13599") + @NotNull(message = "申请人的用户编号不能为空") + private Long userId; + + @Schema(description = "流程实例id", example = "8972") + private String processInstanceId; + + @Schema(description = "申请费用原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "不好") + @NotEmpty(message = "申请费用原因不能为空") + private String reason; + + @Schema(description = "流程类型 1现金支出 2备用金 3采购付款 4报销", example = "2") + private Integer type; + + @Schema(description = "支付状态 0待支付 1分批支付中 2已支付 3拒绝", example = "1") + private Integer status; + + @Schema(description = "领取的财务用户id", example = "16852") + private Long receiveUserId; + + @Schema(description = "应该支付金额") + private BigDecimal amountPayable; + + @Schema(description = "实际支付") + private BigDecimal actualPayment; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentSaveVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentSaveVO.java new file mode 100644 index 00000000..502e7353 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpayment/vo/FinancialPaymentSaveVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo; + +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemSaveReqVO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 财务支付管理新增/修改 Request VO") +@Data +public class FinancialPaymentSaveVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "81") + private Long id; + + @Schema(description = "状态 1同意 2拒绝", example = "1") + private Integer status; + + @Schema(description = "支付信息") + private FinancialPaymentItemSaveReqVO financialPaymentItemSaveReqVO; +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/FinancialPaymentItemController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/FinancialPaymentItemController.java new file mode 100644 index 00000000..1fb70566 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/FinancialPaymentItemController.java @@ -0,0 +1,73 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemRespVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem.FinancialPaymentItemDO; +import cn.iocoder.yudao.module.bpm.service.financialpaymentitem.FinancialPaymentItemService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.validation.Valid; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 财务支付子表") +@RestController +@RequestMapping("/bpm/financial-payment-item") +@Validated +public class FinancialPaymentItemController { + + @Resource + private FinancialPaymentItemService financialPaymentItemService; + + @PostMapping("/create") + @Operation(summary = "创建财务支付子表") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment-item:create')") + public CommonResult createFinancialPaymentItem(@Valid @RequestBody FinancialPaymentItemSaveReqVO createReqVO) { + return success(financialPaymentItemService.createFinancialPaymentItem(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新财务支付子表") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment-item:update')") + public CommonResult updateFinancialPaymentItem(@Valid @RequestBody FinancialPaymentItemSaveReqVO updateReqVO) { + financialPaymentItemService.updateFinancialPaymentItem(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除财务支付子表") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bpm:financial-payment-item:delete')") + public CommonResult deleteFinancialPaymentItem(@RequestParam("id") Long id) { + financialPaymentItemService.deleteFinancialPaymentItem(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得财务支付子表") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment-item:query')") + public CommonResult getFinancialPaymentItem(@RequestParam("id") Long id) { + FinancialPaymentItemDO financialPaymentItem = financialPaymentItemService.getFinancialPaymentItem(id); + return success(BeanUtils.toBean(financialPaymentItem, FinancialPaymentItemRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得财务支付子表分页") + @PreAuthorize("@ss.hasPermission('bpm:financial-payment-item:query')") + public CommonResult> getFinancialPaymentItemPage(@Valid FinancialPaymentItemPageReqVO pageReqVO) { + PageResult pageResult = financialPaymentItemService.getFinancialPaymentItemPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, FinancialPaymentItemRespVO.class)); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemPageReqVO.java new file mode 100644 index 00000000..98347e5e --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemPageReqVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 财务支付子表分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class FinancialPaymentItemPageReqVO extends PageParam { + + @Schema(description = "财务支付id", example = "7319") + private Long financialPaymentId; + + @Schema(description = "支付金额") + private BigDecimal amount; + + @Schema(description = "备注说明") + private String notes; + + @Schema(description = "附件信息") + private String fileItems; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemRespVO.java new file mode 100644 index 00000000..60b1356c --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemRespVO.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 财务支付子表 Response VO") +@Data +public class FinancialPaymentItemRespVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7277") + private Long id; + + @Schema(description = "财务支付id", example = "7319") + private Long financialPaymentId; + + @Schema(description = "支付金额") + private BigDecimal amount; + + @Schema(description = "备注说明") + private String notes; + + @Schema(description = "附件信息") + private String fileItems; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemSaveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemSaveReqVO.java new file mode 100644 index 00000000..0492c0b9 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/financialpaymentitem/vo/FinancialPaymentItemSaveReqVO.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 财务支付子表新增/修改 Request VO") +@Data +public class FinancialPaymentItemSaveReqVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7277") + private Long id; + + @Schema(description = "财务支付id", example = "7319") + private Long financialPaymentId; + + @Schema(description = "支付金额") + private BigDecimal amount; + + @Schema(description = "备注说明") + private String notes; + + @Schema(description = "附件信息") + private String fileItems; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/financialpayment/FinancialPaymentDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/financialpayment/FinancialPaymentDO.java new file mode 100644 index 00000000..2db601e2 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/financialpayment/FinancialPaymentDO.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +import java.math.BigDecimal; + +/** + * 财务支付管理 DO + * + * @author 艾楷 + */ +@TableName("bpm_financial_payment") +@KeySequence("bpm_financial_payment_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FinancialPaymentDO extends BaseDO { + + /** + * id + */ + @TableId + private Long id; + /** + * 申请人的用户编号 + */ + private Long userId; + /** + * 对应流程类型oa业务id + */ + private Long objectId; + /** + * 流程实例id + */ + private String processInstanceId; + /** + * 申请费用原因 + */ + private String reason; + /** + * 流程类型 1现金支出 2备用金 3采购付款 4报销 + */ + private Integer type; + /** + * 支付状态 0待支付 1分批支付中 2已支付 3拒绝 + */ + private Integer status; + /** + * 领取的财务用户id + */ + private Long receiveUserId; + /** + * 应该支付金额 + */ + private BigDecimal amountPayable; + /** + * 实际支付 + */ + private BigDecimal actualPayment; + /** + * 名称 + */ + @TableField(exist = false) + private String nickname; + /** + * 部门名称 + */ + @TableField(exist = false) + private String deptName; + /** + * 领取人用户名称 + */ + @TableField(exist = false) + private String receiveUserNickName; +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/financialpaymentitem/FinancialPaymentItemDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/financialpaymentitem/FinancialPaymentItemDO.java new file mode 100644 index 00000000..b0f10de8 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/financialpaymentitem/FinancialPaymentItemDO.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem; + +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 财务支付子表 DO + * + * @author 艾楷 + */ +@TableName("bpm_financial_payment_item") +@KeySequence("bpm_financial_payment_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FinancialPaymentItemDO extends BaseDO { + + /** + * id + */ + @TableId + private Long id; + /** + * 财务支付id + */ + private Long financialPaymentId; + /** + * 支付金额 + */ + private BigDecimal amount; + /** + * 备注说明 + */ + private String notes; + /** + * 附件信息 + */ + private String fileItems; + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java index b15971bc..1d16e262 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java @@ -49,6 +49,11 @@ public class BpmOAImprestDO extends BaseDO { */ private Long userId; + /** + * 部门id + */ + private Long deptId; + /** * 费用类型 */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/financialpayment/FinancialPaymentMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/financialpayment/FinancialPaymentMapper.java new file mode 100644 index 00000000..d520f67a --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/financialpayment/FinancialPaymentMapper.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.bpm.dal.mysql.financialpayment; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentPageReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 财务支付管理 Mapper + * + * @author 艾楷 + */ +@Mapper +public interface FinancialPaymentMapper extends BaseMapperX { + + /** + * 分页列表 + * + * @param vo + * @param page + * @return + */ + IPage getFinancialPaymentPage(@Param("vp") FinancialPaymentPageReqVO vo, @Param("page") Page page); +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/financialpaymentitem/FinancialPaymentItemMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/financialpaymentitem/FinancialPaymentItemMapper.java new file mode 100644 index 00000000..846a6d6b --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/financialpaymentitem/FinancialPaymentItemMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.bpm.dal.mysql.financialpaymentitem; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem.FinancialPaymentItemDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.*; + +/** + * 财务支付子表 Mapper + * + * @author 艾楷 + */ +@Mapper +public interface FinancialPaymentItemMapper extends BaseMapperX { + + default PageResult selectPage(FinancialPaymentItemPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(FinancialPaymentItemDO::getFinancialPaymentId, reqVO.getFinancialPaymentId()) + .eqIfPresent(FinancialPaymentItemDO::getAmount, reqVO.getAmount()) + .eqIfPresent(FinancialPaymentItemDO::getNotes, reqVO.getNotes()) + .eqIfPresent(FinancialPaymentItemDO::getFileItems, reqVO.getFileItems()) + .betweenIfPresent(FinancialPaymentItemDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(FinancialPaymentItemDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentService.java new file mode 100644 index 00000000..a0913214 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentService.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.bpm.service.financialpayment; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; + +import javax.validation.Valid; + +/** + * 财务支付管理 Service 接口 + * + * @author 艾楷 + */ +public interface FinancialPaymentService { + + /** + * 创建财务支付管理 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createFinancialPayment(@Valid FinancialPaymentSaveVO vo); + + /** + * 更新财务支付管理 + * + * @param updateReqVO 更新信息 + */ + void updateFinancialPayment(@Valid FinancialPaymentSaveReqVO updateReqVO); + + /** + * 删除财务支付管理 + * + * @param id 编号 + */ + void deleteFinancialPayment(Long id); + + /** + * 获得财务支付管理 + * + * @param id 编号 + * @return 财务支付管理 + */ + FinancialPaymentDO getFinancialPayment(Long id); + + /** + * 获得财务支付管理分页 + * + * @param pageReqVO 分页查询 + * @return 财务支付管理分页 + */ + PageResult getFinancialPaymentPage(FinancialPaymentPageReqVO pageReqVO); + + /** + * 插入财务支付 + * + * @param financialPaymentDO + */ + void save(FinancialPaymentDO financialPaymentDO); + + /** + * 领取 + * + * @param id + */ + void receive(Long id); + + /** + * 更新 + * + * @param financialPayment + */ + void updateById(FinancialPaymentDO financialPayment); +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentServiceImpl.java new file mode 100644 index 00000000..3874be70 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpayment/FinancialPaymentServiceImpl.java @@ -0,0 +1,134 @@ +package cn.iocoder.yudao.module.bpm.service.financialpayment; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpayment.vo.FinancialPaymentSaveVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem.FinancialPaymentItemDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOACashDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAImprestDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAProcurePayDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAReimbursementDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.financialpayment.FinancialPaymentMapper; +import cn.iocoder.yudao.module.bpm.dal.mysql.financialpaymentitem.FinancialPaymentItemMapper; +import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOACashMapper; +import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAImprestMapper; +import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAProcurePayMapper; +import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAReimbursementMapper; +import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; + +/** + * 财务支付管理 Service 实现类 + * + * @author 艾楷 + */ +@Service +@Validated +public class FinancialPaymentServiceImpl implements FinancialPaymentService { + + @Resource + private FinancialPaymentMapper financialPaymentMapper; + @Resource + private FinancialPaymentItemMapper financialPaymentItemMapper; + @Resource + private BpmOACashMapper cashMapper; + @Resource + private BpmOAImprestMapper imprestMapper; + @Resource + private BpmOAProcurePayMapper oAProcurePayMapper; + @Resource + private BpmOAReimbursementMapper reimbursementMapper; + + @Override + public Long createFinancialPayment(FinancialPaymentSaveVO vo) { + FinancialPaymentItemSaveReqVO createReqVO = vo.getFinancialPaymentItemSaveReqVO(); + // 插入子表 + createReqVO.setFinancialPaymentId(vo.getId()); + FinancialPaymentItemDO financialPaymentItem = BeanUtils.toBean(createReqVO, FinancialPaymentItemDO.class); + financialPaymentItemMapper.insert(financialPaymentItem); + + // 查询财务支付信息 - 并且更新 + FinancialPaymentDO financialPayment = this.getFinancialPayment(vo.getId()); + if (vo.getStatus() == 1) { + financialPayment.setActualPayment(financialPayment.getActualPayment().add(financialPaymentItem.getAmount())); + if (financialPayment.getActualPayment().equals(financialPayment.getAmountPayable())) { + financialPayment.setStatus(2); + } else { + financialPayment.setStatus(1); + } + } else { + // TODO: 2024/8/18 - 驳回该流程通过流程实例id 发消息通知发起人 - 更改状态 + financialPayment.setStatus(3); + // -- 修改流程状态 + if (financialPayment.getType() == 1) { + cashMapper.updateById(new BpmOACashDO().setId(financialPayment.getObjectId()).setResult(BpmProcessInstanceResultEnum.BACK.getResult())); + } else if (financialPayment.getType() == 2) { + imprestMapper.updateById(new BpmOAImprestDO().setId(financialPayment.getObjectId()).setResult(BpmProcessInstanceResultEnum.BACK.getResult())); + } else if (financialPayment.getType() == 3) { + oAProcurePayMapper.updateById(new BpmOAProcurePayDO().setId(financialPayment.getObjectId()).setResult(BpmProcessInstanceResultEnum.BACK.getResult())); + } else if (financialPayment.getType() == 4) { + reimbursementMapper.updateById(new BpmOAReimbursementDO().setId(financialPayment.getObjectId()).setResult(BpmProcessInstanceResultEnum.BACK.getResult())); + } + + // --- 发消息通知发起人 + + + } + this.updateById(financialPayment); + // 返回 + return financialPayment.getId(); + } + + @Override + public void updateFinancialPayment(FinancialPaymentSaveReqVO updateReqVO) { + // 更新 + FinancialPaymentDO updateObj = BeanUtils.toBean(updateReqVO, FinancialPaymentDO.class); + financialPaymentMapper.updateById(updateObj); + } + + @Override + public void deleteFinancialPayment(Long id) { + // 删除 + financialPaymentMapper.deleteById(id); + } + + @Override + public FinancialPaymentDO getFinancialPayment(Long id) { + return financialPaymentMapper.selectById(id); + } + + @Override + public PageResult getFinancialPaymentPage(FinancialPaymentPageReqVO pageReqVO) { + pageReqVO.setReceiveUserId(getLoginUserId()); + IPage vos = financialPaymentMapper.getFinancialPaymentPage(pageReqVO, MyBatisUtils.buildPage(pageReqVO)); + return new PageResult<>(vos.getRecords(), vos.getTotal()); + } + + @Override + public void save(FinancialPaymentDO financialPaymentDO) { + financialPaymentMapper.insert(financialPaymentDO); + } + + @Override + public void receive(Long id) { + Long userId = getLoginUserId(); + financialPaymentMapper.updateById(new FinancialPaymentDO().setId(id).setReceiveUserId(userId)); + } + + @Override + public void updateById(FinancialPaymentDO financialPayment) { + financialPaymentMapper.updateById(financialPayment); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpaymentitem/FinancialPaymentItemService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpaymentitem/FinancialPaymentItemService.java new file mode 100644 index 00000000..ca447b94 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpaymentitem/FinancialPaymentItemService.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.bpm.service.financialpaymentitem; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.*; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem.FinancialPaymentItemDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 财务支付子表 Service 接口 + * + * @author 艾楷 + */ +public interface FinancialPaymentItemService { + + /** + * 创建财务支付子表 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createFinancialPaymentItem(@Valid FinancialPaymentItemSaveReqVO createReqVO); + + /** + * 更新财务支付子表 + * + * @param updateReqVO 更新信息 + */ + void updateFinancialPaymentItem(@Valid FinancialPaymentItemSaveReqVO updateReqVO); + + /** + * 删除财务支付子表 + * + * @param id 编号 + */ + void deleteFinancialPaymentItem(Long id); + + /** + * 获得财务支付子表 + * + * @param id 编号 + * @return 财务支付子表 + */ + FinancialPaymentItemDO getFinancialPaymentItem(Long id); + + /** + * 获得财务支付子表分页 + * + * @param pageReqVO 分页查询 + * @return 财务支付子表分页 + */ + PageResult getFinancialPaymentItemPage(FinancialPaymentItemPageReqVO pageReqVO); + + /** + * 根据财务支付id获取财务支付详情子表列表 + * @param financialPaymentId + * @return + */ + List getByFinancialPaymentId(Long financialPaymentId); +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpaymentitem/FinancialPaymentItemServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpaymentitem/FinancialPaymentItemServiceImpl.java new file mode 100644 index 00000000..35656338 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/financialpaymentitem/FinancialPaymentItemServiceImpl.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.bpm.service.financialpaymentitem; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemPageReqVO; +import cn.iocoder.yudao.module.bpm.controller.admin.financialpaymentitem.vo.FinancialPaymentItemSaveReqVO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpaymentitem.FinancialPaymentItemDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.financialpaymentitem.FinancialPaymentItemMapper; +import cn.iocoder.yudao.module.bpm.service.financialpayment.FinancialPaymentService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 财务支付子表 Service 实现类 + * + * @author 艾楷 + */ +@Service +@Validated +public class FinancialPaymentItemServiceImpl implements FinancialPaymentItemService { + + @Resource + private FinancialPaymentItemMapper financialPaymentItemMapper; + + @Resource + private FinancialPaymentService financialPaymentService; + + @Override + public Long createFinancialPaymentItem(FinancialPaymentItemSaveReqVO createReqVO) { + // 插入 + FinancialPaymentItemDO financialPaymentItem = BeanUtils.toBean(createReqVO, FinancialPaymentItemDO.class); + financialPaymentItemMapper.insert(financialPaymentItem); + // 返回 + return financialPaymentItem.getId(); + } + + @Override + public void updateFinancialPaymentItem(FinancialPaymentItemSaveReqVO updateReqVO) { + // 更新 + FinancialPaymentItemDO updateObj = BeanUtils.toBean(updateReqVO, FinancialPaymentItemDO.class); + financialPaymentItemMapper.updateById(updateObj); + } + + @Override + public void deleteFinancialPaymentItem(Long id) { + // 删除 + financialPaymentItemMapper.deleteById(id); + } + + @Override + public FinancialPaymentItemDO getFinancialPaymentItem(Long id) { + return financialPaymentItemMapper.selectById(id); + } + + @Override + public PageResult getFinancialPaymentItemPage(FinancialPaymentItemPageReqVO pageReqVO) { + return financialPaymentItemMapper.selectPage(pageReqVO); + } + + @Override + public List getByFinancialPaymentId(Long financialPaymentId) { + return financialPaymentItemMapper.selectList(new LambdaQueryWrapper() + .eq(FinancialPaymentItemDO::getFinancialPaymentId, financialPaymentId)); + } + +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java index 5c0cefcf..fb4341a7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOACashServiceImpl.java @@ -6,10 +6,12 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.cash.BpmOACashCreateRe import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.procure.BpmOAProcureListEditReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.upload.UploadUserFile; import cn.iocoder.yudao.module.bpm.convert.oa.BpmOACashConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOACashDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAProcureDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOACashMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import cn.iocoder.yudao.module.bpm.service.financialpayment.FinancialPaymentService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.context.annotation.Lazy; @@ -30,11 +32,10 @@ import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.OA_CASH_NOT_E * OA 现金支出 Service 实现类 * * @author 符溶馨 - */ @Service @Validated -public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashService{ +public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashService { /** * OA 现金支出对应的流程定义 KEY @@ -53,6 +54,8 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS @Resource private BpmOAProcureService bpmOAProcureService; + @Resource + private FinancialPaymentService financialPaymentService; @Override public Long createCash(Long userId, BpmOACashCreateReqVO createReqVO) { @@ -60,7 +63,7 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS //插入OA 现金支出申请 BpmOACashDO cash = BpmOACashConvert.INSTANCE.convert(createReqVO).setUserId(userId) .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); - cashMapper.insert(cash) ; + cashMapper.insert(cash); // 发起 BPM 流程 Map processInstanceVariables = new HashMap<>(); @@ -82,10 +85,10 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS ); } - List fileItems = createReqVO.getFileItems() ; + List fileItems = createReqVO.getFileItems(); //这里的逻辑,如果fileItems不为空,且有数据,那么说明是上传了附件的,则需要更工作流文件表对应的实例Id if (fileItems != null && !fileItems.isEmpty()) { - uploadBpmFileProcessInstanceId(processInstanceId,fileItems) ; + uploadBpmFileProcessInstanceId(processInstanceId, fileItems); } return cash.getId(); } @@ -115,6 +118,18 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS .setProcureIds(Collections.singletonList(cash.getProcureId())) ); } + + // -- 插入到财务支付表中 + financialPaymentService.save(new FinancialPaymentDO() + .setUserId(cash.getUserId()) + .setProcessInstanceId(cash.getProcessInstanceId()) + .setReason(cash.getReason()) + .setObjectId(id) + .setType(1) + .setStatus(0) + .setAmountPayable(cash.getTotalMoney()) + ); + } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java index bf4701eb..37434450 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java @@ -9,14 +9,13 @@ import javax.validation.Valid; * 备用金申请 Service 接口 * * @author 符溶馨 - */ public interface BpmOAImprestService { /** * 创建备用金申请 * - * @param userId 用户编号 + * @param userId 用户编号 * @param createReqVO 创建信息 * @return 编号 */ @@ -25,10 +24,10 @@ public interface BpmOAImprestService { /** * 更新备用金申请的状态 * - * @param id 编号 + * @param id 编号 * @param result 结果 */ - void updateImprestResult(Long id, Integer result); + void updateImprestResult(String processInstanceId, Long id, Integer result); /** * 获得备用金申请 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java index 098bb5ae..363cb517 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java @@ -5,9 +5,14 @@ import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.imprest.BpmOAImprestCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.upload.UploadUserFile; import cn.iocoder.yudao.module.bpm.convert.oa.BpmOAImprestConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAImprestDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAImprestMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import cn.iocoder.yudao.module.bpm.service.financialpayment.FinancialPaymentService; +import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; +import org.flowable.engine.runtime.ProcessInstance; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -23,11 +28,10 @@ import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.OA_IMPREST_NO * OA 备用金申请 Service 实现类 * * @author 符溶馨 - */ @Service @Validated -public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAImprestService{ +public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAImprestService { /** * OA 出差对应的流程定义 KEY @@ -39,6 +43,11 @@ public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAIm @Resource private BpmProcessInstanceApi processInstanceApi; + @Resource + @Lazy // 解决循环依赖 + private BpmProcessInstanceService bpmProcessInstanceService; + @Resource + private FinancialPaymentService financialPaymentService; @Override public Long createImprest(Long userId, BpmOAImprestCreateReqVO createReqVO) { @@ -47,7 +56,7 @@ public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAIm BpmOAImprestDO imprest = BpmOAImprestConvert.INSTANCE.convert(createReqVO).setUserId(userId) .setStatus(BpmOAImprestDO.FLAG_FALSE) .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); - imprestMapper.insert(imprest) ; + imprestMapper.insert(imprest); // 发起 BPM 流程 Map processInstanceVariables = new HashMap<>(); @@ -58,19 +67,40 @@ public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAIm // 将工作流的编号,更新到 OA 备用金单中 imprestMapper.updateById(new BpmOAImprestDO().setId(imprest.getId()).setProcessInstanceId(processInstanceId)); - List fileItems = createReqVO.getFileItems() ; + List fileItems = createReqVO.getFileItems(); //这里的逻辑,如果fileItems不为空,且有数据,那么说明是上传了附件的,则需要更工作流文件表对应的实例Id if (fileItems != null && !fileItems.isEmpty()) { - uploadBpmFileProcessInstanceId(processInstanceId,fileItems) ; + uploadBpmFileProcessInstanceId(processInstanceId, fileItems); } return imprest.getId(); } @Override - public void updateImprestResult(Long id, Integer result) { + public void updateImprestResult(String processInstanceId, Long id, Integer result) { validateLeaveExists(id); imprestMapper.updateById(new BpmOAImprestDO().setId(id).setResult(result)); + + //审核通过 (最后节点) + if (BpmProcessInstanceResultEnum.APPROVE.getResult().equals(result)) { + + ProcessInstance instance = bpmProcessInstanceService.getProcessInstance(processInstanceId); + + if (instance.isEnded()) { + //判断是否有采购报销 + BpmOAImprestDO cash = getImprest(id); + // -- 插入到财务支付表中 + financialPaymentService.save(new FinancialPaymentDO() + .setUserId(cash.getUserId()) + .setProcessInstanceId(cash.getProcessInstanceId()) + .setReason(cash.getReason()) + .setObjectId(id) + .setType(2) + .setStatus(0) + .setAmountPayable(cash.getAmount()) + ); + } + } } private void validateLeaveExists(Long id) { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java index a9df985b..db598831 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java @@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.procurepay.BpmOAProcur import cn.iocoder.yudao.module.bpm.controller.admin.upload.UploadUserFile; import cn.iocoder.yudao.module.bpm.convert.oa.BpmOAProcurePayConvert; import cn.iocoder.yudao.module.bpm.convert.oa.BpmOAProcurePayItemConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAProcureDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAProcurePayDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAProcurePayItemDO; @@ -23,6 +24,7 @@ import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAProcurePayMapper; import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmProcessInstanceExtMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; +import cn.iocoder.yudao.module.bpm.service.financialpayment.FinancialPaymentService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import org.flowable.engine.runtime.ProcessInstance; @@ -66,6 +68,8 @@ public class BpmOAProcurePayServiceImpl extends BpmOABaseService implements BpmO @Resource @Lazy // 解决循环依赖 private BpmProcessInstanceService bpmProcessInstanceService; + @Resource + private FinancialPaymentService financialPaymentService; /** * OA 采购支付对应的流程定义 KEY @@ -155,14 +159,30 @@ public class BpmOAProcurePayServiceImpl extends BpmOABaseService implements BpmO // -- 审核通过 (最后节点) if (BpmProcessInstanceResultEnum.APPROVE.getResult().equals(result)) { ProcessInstance instance = bpmProcessInstanceService.getProcessInstance(processInstanceId); - if (instance.isEnded() && !items.isEmpty()) { - List ids = items.stream().map(BpmOAProcurePayItemRespVO::getBpmOaProcureId).collect(Collectors.toList()); - //所有关联的采购申请改为 未支付状态 - oaProcureService.updatePayFlagByIds( - new BpmOAProcureListEditReqVO() - .setPayFlag(BpmOAProcureDO.FLAG_TRUE) - .setProcureIds(ids) + if (instance.isEnded()) { + if (!items.isEmpty()) { + List ids = items.stream().map(BpmOAProcurePayItemRespVO::getBpmOaProcureId).collect(Collectors.toList()); + //所有关联的采购申请改为 已支付状态 + oaProcureService.updatePayFlagByIds( + new BpmOAProcureListEditReqVO() + .setPayFlag(BpmOAProcureDO.FLAG_TRUE) + .setProcureIds(ids) + ); + } + + //判断是否有采购报销 + BpmOAProcurePayDO cash = getOAProcurePay(id); + // -- 插入到财务支付表中 + financialPaymentService.save(new FinancialPaymentDO() + .setUserId(cash.getUserId()) + .setProcessInstanceId(cash.getProcessInstanceId()) + .setReason(cash.getReason()) + .setObjectId(id) + .setType(3) + .setStatus(0) + .setAmountPayable(cash.getTotalMoney()) ); + } } // -- 自己取消 @@ -184,4 +204,4 @@ public class BpmOAProcurePayServiceImpl extends BpmOABaseService implements BpmO oAProcurePayMapper.updateById(new BpmOAProcurePayDO().setId(id).setResult(result)); } -} \ No newline at end of file +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java index b4527eb9..9d8d0906 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java @@ -11,12 +11,14 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.reimbursement.Reimburs import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.reimbursement.ReimbursementDTO; import cn.iocoder.yudao.module.bpm.controller.admin.upload.UploadUserFile; import cn.iocoder.yudao.module.bpm.convert.oa.BpmOAReimbursementConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.financialpayment.FinancialPaymentDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAImprestDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAProcureDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAReimbursementDO; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAImprestMapper; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAReimbursementMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; +import cn.iocoder.yudao.module.bpm.service.financialpayment.FinancialPaymentService; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; @@ -29,7 +31,10 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; @@ -44,7 +49,7 @@ import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.OA_REIMBURSEM */ @Service @Validated -public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements BpmOAReimbursementService{ +public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements BpmOAReimbursementService { /** * OA 请假对应的流程定义 KEY @@ -52,7 +57,7 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B public static final String PROCESS_KEY = "oa_reimbursement"; @Resource - private BpmOAReimbursementMapper reimbursementMapper ; + private BpmOAReimbursementMapper reimbursementMapper; @Resource private BpmProcessInstanceApi processInstanceApi; @@ -76,11 +81,15 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B @Resource private AdminUserApi userApi; + @Resource + private FinancialPaymentService financialPaymentService; + + @Override public Long createReimbursement(Long userId, BpmOAReimbursementCreateReqVO createReqVO) { BpmOAReimbursementDO reimbursement = BpmOAReimbursementConvert.INSTANCE.convert(createReqVO).setUserId(userId) .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); - reimbursementMapper.insert(reimbursement) ; + reimbursementMapper.insert(reimbursement); // 发起 BPM 流程 Map processInstanceVariables = new HashMap<>(); @@ -118,10 +127,10 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B ); } - List fileItems = createReqVO.getFileItems() ; + List fileItems = createReqVO.getFileItems(); //这里的逻辑,如果fileItems不为空,且有数据,那么说明是上传了附件的,则需要更工作流文件表对应的实例Id if (fileItems != null && !fileItems.isEmpty()) { - uploadBpmFileProcessInstanceId(processInstanceId,fileItems) ; + uploadBpmFileProcessInstanceId(processInstanceId, fileItems); } return reimbursement.getId(); } @@ -154,6 +163,7 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B String json = JsonUtils.toJsonString(reimbursements); reimbursements = JsonUtils.parseArray(json, Reimbursement.class); + StringBuilder reason = new StringBuilder(); for (Reimbursement reimbursement : reimbursements) { //报销类别为 采购费时 @@ -161,8 +171,20 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B procureIds.add(reimbursement.getProcureId()); } + reason.append(reimbursement.getDetail()).append(","); } + // -- 插入到财务支付表中 + financialPaymentService.save(new FinancialPaymentDO() + .setUserId(bpmOAReimbursementDO.getUserId()) + .setProcessInstanceId(bpmOAReimbursementDO.getProcessInstanceId()) + .setReason(reason.toString()) + .setObjectId(id) + .setType(4) + .setStatus(0) + .setAmountPayable(bpmOAReimbursementDO.getTotalMoney()) + ); + if (!procureIds.isEmpty()) { //所有关联的采购申请改为 已支付状态 @@ -261,7 +283,7 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B } //获取部门信息map - Map deptMap = deptApi.getDeptMap(convertSet(reimbursement, Reimbursement::getDeptId)); + Map deptMap = deptApi.getDeptMap(convertSet(reimbursement, Reimbursement::getDeptId)); List reimbursementDTOS = BeanUtils.toBean(reimbursement, ReimbursementDTO.class); @@ -270,4 +292,4 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B return bpmOAReimbursementRespVO; } -} \ No newline at end of file +} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAImprestResultListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAImprestResultListener.java index 0c6fbf2a..64aaeff7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAImprestResultListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAImprestResultListener.java @@ -26,6 +26,6 @@ public class BpmOAImprestResultListener extends BpmProcessInstanceResultEventLis @Override protected void onEvent(BpmProcessInstanceResultEvent event) { - imprestService.updateImprestResult(Long.parseLong(event.getBusinessKey()), event.getResult()); + imprestService.updateImprestResult(event.getId(), Long.parseLong(event.getBusinessKey()), event.getResult()); } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml index 51b49331..a0a26050 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml @@ -39,17 +39,17 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/financialpayment/FinancialPaymentMapper.xml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/financialpayment/FinancialPaymentMapper.xml new file mode 100644 index 00000000..e9429b9d --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/financialpayment/FinancialPaymentMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/financialpaymentitem/FinancialPaymentItemMapper.xml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/financialpaymentitem/FinancialPaymentItemMapper.xml new file mode 100644 index 00000000..1b275455 --- /dev/null +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/financialpaymentitem/FinancialPaymentItemMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml index 444790ca..65e07f99 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml @@ -39,17 +39,17 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml index d8cc9a70..fd53d090 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml @@ -39,17 +39,17 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: @@ -80,7 +80,7 @@ xxl: job: enabled: true # 是否开启调度中心,默认为 true 开启 admin: - addresses: http://192.168.1.107:9090/xxl-job-admin # 调度中心部署跟地址 + addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址 executor: appname: ${spring.application.name} # 执行器 AppName ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务"; diff --git a/yudao-module-wms/yudao-module-wms-biz/src/main/resources/application-dev.yaml b/yudao-module-wms/yudao-module-wms-biz/src/main/resources/application-dev.yaml index 444790ca..65e07f99 100644 --- a/yudao-module-wms/yudao-module-wms-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-wms/yudao-module-wms-biz/src/main/resources/application-dev.yaml @@ -39,17 +39,17 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: diff --git a/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/application-dev.yaml b/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/application-dev.yaml index f8193e20..4b44e673 100644 --- a/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/application-dev.yaml +++ b/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/application-dev.yaml @@ -39,17 +39,17 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 driver-class-name: com.mysql.jdbc.Driver username: root - password: root + password: Znalyrds2024 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: