新建发票管理页面

This commit is contained in:
叶锦涛
2025-11-18 10:40:57 +08:00
parent 5bf7ab481f
commit e83fc94334
13 changed files with 1136 additions and 160 deletions

View File

@@ -0,0 +1,53 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.service.IInvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
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.servlet.http.HttpServletRequest;
/**
* 发票管理控制器
*
* @author system
* @date 2025-02-20
*/
@RestController
@RequestMapping("/basicmanage/invoice")
public class InvoiceController {
@Autowired
private IInvoiceService invoiceService;
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票列表
*/
@GetMapping("/page")
public R<?> selectInvoicePage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "10") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票列表
Page<Invoice> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceService.selectInvoicePage(page, isAdmin, userId));
}
}

View File

@@ -0,0 +1,88 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.InvoiceSegment;
import com.openhis.administration.service.IInvoiceSegmentService;
import com.openhis.web.basicmanage.domain.InvoiceSegmentDeleteRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* 发票段管理控制器
*
* @author system
* @date 2025-11-18
*/
@RestController
@RequestMapping("/basicmanage/invoice-segment")
public class InvoiceSegmentController {
@Autowired
private IInvoiceSegmentService invoiceSegmentService;
/**
* 分页查询发票段列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票段列表
*/
@GetMapping("/page")
public R<?> selectInvoiceSegmentPage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "100") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票段列表
Page<InvoiceSegment> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceSegmentService.selectInvoiceSegmentPage(page, isAdmin, userId));
}
/**
* 新增发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/add")
public R<?> addInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置创建人信息
invoiceSegment.setCreateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.insertInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 修改发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/update")
public R<?> updateInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置更新人信息
invoiceSegment.setUpdateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.updateInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 删除发票段
*/
@PostMapping("/delete")
public R<?> delete(@RequestBody InvoiceSegmentDeleteRequest request) {
int rows = invoiceSegmentService.deleteInvoiceSegmentByIds(request.getIds());
return rows > 0 ? R.ok("删除成功") : R.fail("删除失败");
}
}

View File

@@ -0,0 +1,23 @@
package com.openhis.web.basicmanage.domain;
import java.io.Serializable;
/**
* 发票段删除请求类
*
* @author system
* @date 2024-06-19
*/
public class InvoiceSegmentDeleteRequest implements Serializable {
private static final long serialVersionUID = 1L;
private Long[] ids;
public Long[] getIds() {
return ids;
}
public void setIds(Long[] ids) {
this.ids = ids;
}
}

View File

@@ -5,43 +5,32 @@ package com.openhis.web.ybmanage.vo;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 【3201】后台计算结果 DB映射实体
* Settlement3202 Result DB mapping entity
*
* @author SunJQ
* @date 2025-04-15
*/
@Data
public class Settlement3202VO {
/** 医疗费用总额 */
/** Medical Fee Sum */
private BigDecimal medFeeSumAmt;
/** 基金支付总额 */
/** Fund Pay Sum */
private BigDecimal fundPaySumAmt;
/** 个人账户支付总额 */
/** Account Pay */
private BigDecimal acctPay;
/** 个人账户支付总额 */
/** Account Gj Pay */
private BigDecimal acctGjPay;
/** 现金支付总额 */
/** Self Pay Cash */
private BigDecimal selfPayCash;
/** 微信支付总额 */
/** Self Pay WeChat */
private BigDecimal selfPayVx;
/** 阿里支付总额 */
/** Self Pay Alipay */
private BigDecimal selfPayAli;
/** 银行卡支付总额 */
/** Self Pay Bank Card */
private BigDecimal selfPayUnion;
/** 定点医药机构结算笔数 */
/** Settlement Count */
private Integer fixMedInsSetlCnt;
}