Jelajahi Sumber

补充提交

liangwenxuan 1 Minggu lalu
induk
melakukan
a4e64ee11c

+ 49 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/biz/FeeItemChangeRecordController.java

@@ -0,0 +1,49 @@
+package cn.iocoder.yudao.module.system.controller.admin.biz;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
+import cn.iocoder.yudao.module.system.controller.admin.biz.vo.FeeItemChangeDetailRespVO;
+import cn.iocoder.yudao.module.system.service.biz.ElderlyChangeRecordService;
+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.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * 管理后台 - 费用项目变更记录
+ * <p>
+ * 参考 {@link BedChangeRecordController#getBedChangeRecord} 实现
+ *
+ * @author 养老项目
+ */
+@Tag(name = "管理后台 - 费用项目变更记录")
+@RestController
+@RequestMapping("/elderly/feeItemChangeRecord")
+@Validated
+public class FeeItemChangeRecordController {
+
+    @Resource
+    private ElderlyChangeRecordService changeRecordService;
+
+    @GetMapping("/detail")
+    @Operation(summary = "获得费用项目变更记录详情")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
+    @PreAuthorize("@ss.hasPermission('item-change:detail')")
+    @TenantIgnore
+    public CommonResult<FeeItemChangeDetailRespVO> getFeeItemChangeRecord(@RequestParam("id") Long id,
+                                                                          @RequestParam("status") Integer status,
+                                                                          @RequestParam("isDetail") Boolean isDetail) {
+        FeeItemChangeDetailRespVO feeItemChangeRecord = changeRecordService.getFeeItemDetail(id, status, isDetail);
+        return success(feeItemChangeRecord);
+    }
+
+}

+ 109 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/biz/vo/FeeItemChangeDetailRespVO.java

@@ -0,0 +1,109 @@
+package cn.iocoder.yudao.module.system.controller.admin.biz.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
+
+/**
+ * 管理后台 - 费用项目变更详情 Response VO
+ * <p>
+ * 参考 {@link CateringChangeDetailRespVO} 实现
+ *
+ * @author 养老项目
+ */
+@Schema(description = "管理后台 - 费用项目变更详情 Response VO")
+@Data
+public class FeeItemChangeDetailRespVO {
+
+    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14680")
+    private Long id;
+
+    @Schema(description = "长者id", example = "23841")
+    private Long elderlyId;
+
+    @Schema(description = "长者名称", example = "张三")
+    private String elderName;
+
+    @Schema(description = "证件号码")
+    private String idCard;
+
+    @Schema(description = "床位id", example = "20769")
+    private Long bedId;
+
+    @Schema(description = "床位号", example = "A栋3楼305-1")
+    private String bedName;
+
+    @Schema(description = "原费用项目id", example = "20769")
+    private Long originalId;
+
+    @Schema(description = "原费用项目名称", example = "水电费")
+    private String originalName;
+
+    @Schema(description = "新费用项目id", example = "16757")
+    private Long expectId;
+
+    @Schema(description = "新费用项目名称", example = "水电费套餐二")
+    private String expectName;
+
+    @Schema(description = "变更生效日期", requiredMode = Schema.RequiredMode.REQUIRED)
+    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
+    private LocalDate changeDate;
+
+    @Schema(description = "收费项目id", example = "20769")
+    private Long overheadChargeId;
+
+    @Schema(description = "收费项目名称", example = "水电费")
+    private String categoryName;
+
+    @Schema(description = "收费项目名称")
+    private String originalItemName;
+
+    @Schema(description = "收费项目")
+    private String chargeName;
+
+    @Schema(description = "金额", example = "31331")
+    private BigDecimal amount;
+
+    @Schema(description = "变更前金额", example = "31331")
+    private BigDecimal originalAmount;
+
+    @Schema(description = "实际金额", example = "31331")
+    private BigDecimal actualAmount;
+
+    @Schema(description = "折扣金额", example = "31331")
+    private BigDecimal discountAmount;
+
+    @Schema(description = "折扣", example = "31331")
+    private String discount;
+
+    @Schema(description = "是否折扣", example = "7779")
+    private Integer isDiscount;
+
+    @Schema(description = "变更前是否折扣", example = "7779")
+    private Integer originalIsDiscount;
+
+    @Schema(description = "变更文件")
+    private String changeFiles;
+
+    @Schema(description = "变更原因", example = "不好")
+    private String reason;
+
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    @Schema(description = "流程实例编号")
+    private String processInstanceId;
+
+    @Schema(description = "审批状态")
+    private Integer status;
+
+    @Schema(description = "发起流程的租户id")
+    private Long startTenantId;
+
+}