feat(clinic): 新增药品库及出入库管理模块
- 添加药品库实体类、控制器、服务层和数据访问层 - 添加出入库实体类、控制器、服务层和数据访问层 - 实现药品库与出入库的分页查询、列表查询、详情查询功能 - 支持药品库与出入库的增删改及批量操作 - 提供药品库存实体类定义,为后续库存管理做准备 - 移除部分接口不必要的权限注解,简化访问控制逻辑 - 清理冗余代码注释,优化代码可读性
This commit is contained in:
@@ -30,7 +30,6 @@ public class ClinicAppointmentController extends BaseController {
|
||||
@Resource
|
||||
private ClinicAppointmentService clinicAppointmentService;
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicAppointment:list')")
|
||||
@Operation(summary = "分页查询挂号")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClinicAppointment>> page(ClinicAppointmentParam param) {
|
||||
@@ -59,11 +58,6 @@ public class ClinicAppointmentController extends BaseController {
|
||||
@Operation(summary = "添加挂号")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicAppointment clinicAppointment) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicAppointment.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (clinicAppointmentService.save(clinicAppointment)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ public class ClinicDoctorUserController extends BaseController {
|
||||
@Resource
|
||||
private ClinicDoctorUserService clinicDoctorUserService;
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicDoctorUser:list')")
|
||||
@Operation(summary = "分页查询分销商用户记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClinicDoctorUser>> page(ClinicDoctorUserParam param) {
|
||||
@@ -46,7 +45,6 @@ public class ClinicDoctorUserController extends BaseController {
|
||||
return success(clinicDoctorUserService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicDoctorUser:list')")
|
||||
@Operation(summary = "根据id查询分销商用户记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ClinicDoctorUser> get(@PathVariable("id") Integer id) {
|
||||
@@ -59,11 +57,6 @@ public class ClinicDoctorUserController extends BaseController {
|
||||
@Operation(summary = "添加分销商用户记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicDoctorUser clinicDoctorUser) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicDoctorUser.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (clinicDoctorUserService.save(clinicDoctorUser)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.gxwebsoft.clinic.controller;
|
||||
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicine;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicMedicineService;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Tag(name = "药品库管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/clinic/clinic-medicine")
|
||||
public class ClinicMedicineController extends BaseController {
|
||||
@Resource
|
||||
private ClinicMedicineService clinicMedicineService;
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:list')")
|
||||
@Operation(summary = "分页查询药品库")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClinicMedicine>> page(ClinicMedicineParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:list')")
|
||||
@Operation(summary = "查询全部药品库")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ClinicMedicine>> list(ClinicMedicineParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:list')")
|
||||
@Operation(summary = "根据id查询药品库")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ClinicMedicine> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加药品库")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicMedicine clinicMedicine) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicMedicine.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (clinicMedicineService.save(clinicMedicine)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改药品库")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ClinicMedicine clinicMedicine) {
|
||||
if (clinicMedicineService.updateById(clinicMedicine)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除药品库")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (clinicMedicineService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加药品库")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ClinicMedicine> list) {
|
||||
if (clinicMedicineService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改药品库")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ClinicMedicine> batchParam) {
|
||||
if (batchParam.update(clinicMedicineService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicine:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除药品库")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (clinicMedicineService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.gxwebsoft.clinic.controller;
|
||||
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineInout;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineInoutParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicMedicineInoutService;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入库控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Tag(name = "出入库管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/clinic/clinic-medicine-inout")
|
||||
public class ClinicMedicineInoutController extends BaseController {
|
||||
@Resource
|
||||
private ClinicMedicineInoutService clinicMedicineInoutService;
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:list')")
|
||||
@Operation(summary = "分页查询出入库")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClinicMedicineInout>> page(ClinicMedicineInoutParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineInoutService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:list')")
|
||||
@Operation(summary = "查询全部出入库")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ClinicMedicineInout>> list(ClinicMedicineInoutParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineInoutService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:list')")
|
||||
@Operation(summary = "根据id查询出入库")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ClinicMedicineInout> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineInoutService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加出入库")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicMedicineInout clinicMedicineInout) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicMedicineInout.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (clinicMedicineInoutService.save(clinicMedicineInout)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改出入库")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ClinicMedicineInout clinicMedicineInout) {
|
||||
if (clinicMedicineInoutService.updateById(clinicMedicineInout)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除出入库")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (clinicMedicineInoutService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加出入库")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ClinicMedicineInout> list) {
|
||||
if (clinicMedicineInoutService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改出入库")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ClinicMedicineInout> batchParam) {
|
||||
if (batchParam.update(clinicMedicineInoutService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineInout:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除出入库")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (clinicMedicineInoutService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.gxwebsoft.clinic.controller;
|
||||
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineStock;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineStockParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicMedicineStockService;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库存控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Tag(name = "药品库存管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/clinic/clinic-medicine-stock")
|
||||
public class ClinicMedicineStockController extends BaseController {
|
||||
@Resource
|
||||
private ClinicMedicineStockService clinicMedicineStockService;
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:list')")
|
||||
@Operation(summary = "分页查询药品库存")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClinicMedicineStock>> page(ClinicMedicineStockParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineStockService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:list')")
|
||||
@Operation(summary = "查询全部药品库存")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ClinicMedicineStock>> list(ClinicMedicineStockParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineStockService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:list')")
|
||||
@Operation(summary = "根据id查询药品库存")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ClinicMedicineStock> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(clinicMedicineStockService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加药品库存")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicMedicineStock clinicMedicineStock) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicMedicineStock.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (clinicMedicineStockService.save(clinicMedicineStock)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改药品库存")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ClinicMedicineStock clinicMedicineStock) {
|
||||
if (clinicMedicineStockService.updateById(clinicMedicineStock)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除药品库存")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (clinicMedicineStockService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加药品库存")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ClinicMedicineStock> list) {
|
||||
if (clinicMedicineStockService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改药品库存")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ClinicMedicineStock> batchParam) {
|
||||
if (batchParam.update(clinicMedicineStockService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicMedicineStock:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除药品库存")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (clinicMedicineStockService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -60,10 +61,10 @@ public class ClinicPatientUserController extends BaseController {
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicPatientUser clinicPatientUser) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicPatientUser.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
clinicPatientUser.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (clinicPatientUserService.save(clinicPatientUser)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.gxwebsoft.clinic.controller;
|
||||
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescription;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicPrescriptionService;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
@Tag(name = "处方主表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/clinic/clinic-prescription")
|
||||
public class ClinicPrescriptionController extends BaseController {
|
||||
@Resource
|
||||
private ClinicPrescriptionService clinicPrescriptionService;
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:list')")
|
||||
@Operation(summary = "分页查询处方主表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClinicPrescription>> page(ClinicPrescriptionParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicPrescriptionService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:list')")
|
||||
@Operation(summary = "查询全部处方主表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ClinicPrescription>> list(ClinicPrescriptionParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicPrescriptionService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:list')")
|
||||
@Operation(summary = "根据id查询处方主表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ClinicPrescription> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(clinicPrescriptionService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加处方主表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicPrescription clinicPrescription) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicPrescription.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (clinicPrescriptionService.save(clinicPrescription)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改处方主表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ClinicPrescription clinicPrescription) {
|
||||
if (clinicPrescriptionService.updateById(clinicPrescription)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除处方主表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (clinicPrescriptionService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加处方主表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ClinicPrescription> list) {
|
||||
if (clinicPrescriptionService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改处方主表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ClinicPrescription> batchParam) {
|
||||
if (batchParam.update(clinicPrescriptionService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescription:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除处方主表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (clinicPrescriptionService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.gxwebsoft.clinic.controller;
|
||||
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescriptionItem;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionItemParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicPrescriptionItemService;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
@Tag(name = "处方明细表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/clinic/clinic-prescription-item")
|
||||
public class ClinicPrescriptionItemController extends BaseController {
|
||||
@Resource
|
||||
private ClinicPrescriptionItemService clinicPrescriptionItemService;
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:list')")
|
||||
@Operation(summary = "分页查询处方明细表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClinicPrescriptionItem>> page(ClinicPrescriptionItemParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicPrescriptionItemService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:list')")
|
||||
@Operation(summary = "查询全部处方明细表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ClinicPrescriptionItem>> list(ClinicPrescriptionItemParam param) {
|
||||
// 使用关联查询
|
||||
return success(clinicPrescriptionItemService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:list')")
|
||||
@Operation(summary = "根据id查询处方明细表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ClinicPrescriptionItem> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(clinicPrescriptionItemService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加处方明细表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClinicPrescriptionItem clinicPrescriptionItem) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// clinicPrescriptionItem.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (clinicPrescriptionItemService.save(clinicPrescriptionItem)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改处方明细表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ClinicPrescriptionItem clinicPrescriptionItem) {
|
||||
if (clinicPrescriptionItemService.updateById(clinicPrescriptionItem)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除处方明细表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (clinicPrescriptionItemService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加处方明细表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ClinicPrescriptionItem> list) {
|
||||
if (clinicPrescriptionItemService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改处方明细表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ClinicPrescriptionItem> batchParam) {
|
||||
if (batchParam.update(clinicPrescriptionItemService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('clinic:clinicPrescriptionItem:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除处方明细表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (clinicPrescriptionItemService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.gxwebsoft.clinic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 药品库
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "ClinicMedicine对象", description = "药品库")
|
||||
public class ClinicMedicine implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "药名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "拼音")
|
||||
private String pinyin;
|
||||
|
||||
@Schema(description = "分类(如“清热解毒”、“补气养血”)")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "规格(如“饮片”、“颗粒”)")
|
||||
private String specification;
|
||||
|
||||
@Schema(description = "单位(如“克”、“袋”)")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "单价")
|
||||
private BigDecimal pricePerUnit;
|
||||
|
||||
@Schema(description = "是否活跃")
|
||||
private Integer isActive;
|
||||
|
||||
@Schema(description = "买家用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "商城ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.gxwebsoft.clinic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 出入库
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "ClinicMedicineInout对象", description = "出入库")
|
||||
public class ClinicMedicineInout implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "买家用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "分销商用户id(一级)")
|
||||
private Integer firstUserId;
|
||||
|
||||
@Schema(description = "分销商用户id(二级)")
|
||||
private Integer secondUserId;
|
||||
|
||||
@Schema(description = "分销商用户id(三级)")
|
||||
private Integer thirdUserId;
|
||||
|
||||
@Schema(description = "分销佣金(一级)")
|
||||
private BigDecimal firstMoney;
|
||||
|
||||
@Schema(description = "分销佣金(二级)")
|
||||
private BigDecimal secondMoney;
|
||||
|
||||
@Schema(description = "分销佣金(三级)")
|
||||
private BigDecimal thirdMoney;
|
||||
|
||||
@Schema(description = "单价")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "订单总金额")
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
@Schema(description = "结算金额")
|
||||
private BigDecimal settledPrice;
|
||||
|
||||
@Schema(description = "换算成度")
|
||||
private BigDecimal degreePrice;
|
||||
|
||||
@Schema(description = "实发金额")
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@Schema(description = "税率")
|
||||
private BigDecimal rate;
|
||||
|
||||
@Schema(description = "结算月份")
|
||||
private String month;
|
||||
|
||||
@Schema(description = "订单是否失效(0未失效 1已失效)")
|
||||
private Integer isInvalid;
|
||||
|
||||
@Schema(description = "佣金结算(0未结算 1已结算)")
|
||||
private Integer isSettled;
|
||||
|
||||
@Schema(description = "结算时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime settleTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "商城ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.gxwebsoft.clinic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 药品库存
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "ClinicMedicineStock对象", description = "药品库存")
|
||||
public class ClinicMedicineStock implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "药品")
|
||||
private Integer medicineId;
|
||||
|
||||
@Schema(description = "库存数量")
|
||||
private Integer stockQuantity;
|
||||
|
||||
@Schema(description = "最小库存预警")
|
||||
private Integer minStockLevel;
|
||||
|
||||
@Schema(description = "上次更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastUpdated;
|
||||
|
||||
@Schema(description = "买家用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "商城ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class ClinicPatientUser implements Serializable {
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String mobile;
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "支付密码")
|
||||
private String payPassword;
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.gxwebsoft.clinic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "ClinicPrescription对象", description = "处方主表")
|
||||
public class ClinicPrescription implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "患者")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "医生")
|
||||
private Integer doctorId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "关联就诊表")
|
||||
private Integer visitRecordId;
|
||||
|
||||
@Schema(description = "处方类型 0中药 1西药")
|
||||
private Integer prescriptionType;
|
||||
|
||||
@Schema(description = "诊断结果")
|
||||
private String diagnosis;
|
||||
|
||||
@Schema(description = "治疗方案")
|
||||
private String treatmentPlan;
|
||||
|
||||
@Schema(description = "煎药说明")
|
||||
private String decoctionInstructions;
|
||||
|
||||
@Schema(description = "订单总金额")
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
@Schema(description = "单价")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "实付金额")
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@Schema(description = "订单是否失效(0未失效 1已失效)")
|
||||
private Integer isInvalid;
|
||||
|
||||
@Schema(description = "结算(0未结算 1已结算)")
|
||||
private Integer isSettled;
|
||||
|
||||
@Schema(description = "结算时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime settleTime;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1已完成,2已支付,3已取消")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "商城ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.gxwebsoft.clinic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "ClinicPrescriptionItem对象", description = "处方明细表")
|
||||
public class ClinicPrescriptionItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "关联处方")
|
||||
private Integer prescriptionId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String prescriptionNo;
|
||||
|
||||
@Schema(description = "关联药品")
|
||||
private Integer medicineId;
|
||||
|
||||
@Schema(description = "剂量(如“10g”)")
|
||||
private String dosage;
|
||||
|
||||
@Schema(description = "用法频率(如“每日三次”)")
|
||||
private String usageFrequency;
|
||||
|
||||
@Schema(description = "服用天数")
|
||||
private Integer days;
|
||||
|
||||
@Schema(description = "购买数量")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer quantity;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "用户id")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.clinic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineInout;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineInoutParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入库Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
public interface ClinicMedicineInoutMapper extends BaseMapper<ClinicMedicineInout> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicMedicineInout>
|
||||
*/
|
||||
List<ClinicMedicineInout> selectPageRel(@Param("page") IPage<ClinicMedicineInout> page,
|
||||
@Param("param") ClinicMedicineInoutParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ClinicMedicineInout> selectListRel(@Param("param") ClinicMedicineInoutParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.clinic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicine;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:31
|
||||
*/
|
||||
public interface ClinicMedicineMapper extends BaseMapper<ClinicMedicine> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicMedicine>
|
||||
*/
|
||||
List<ClinicMedicine> selectPageRel(@Param("page") IPage<ClinicMedicine> page,
|
||||
@Param("param") ClinicMedicineParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ClinicMedicine> selectListRel(@Param("param") ClinicMedicineParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.clinic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineStock;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineStockParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库存Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
public interface ClinicMedicineStockMapper extends BaseMapper<ClinicMedicineStock> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicMedicineStock>
|
||||
*/
|
||||
List<ClinicMedicineStock> selectPageRel(@Param("page") IPage<ClinicMedicineStock> page,
|
||||
@Param("param") ClinicMedicineStockParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ClinicMedicineStock> selectListRel(@Param("param") ClinicMedicineStockParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.gxwebsoft.clinic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescriptionItem;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionItemParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
public interface ClinicPrescriptionItemMapper extends BaseMapper<ClinicPrescriptionItem> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicPrescriptionItem>
|
||||
*/
|
||||
List<ClinicPrescriptionItem> selectPageRel(@Param("page") IPage<ClinicPrescriptionItem> page,
|
||||
@Param("param") ClinicPrescriptionItemParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ClinicPrescriptionItem> selectListRel(@Param("param") ClinicPrescriptionItemParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.gxwebsoft.clinic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescription;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
public interface ClinicPrescriptionMapper extends BaseMapper<ClinicPrescription> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicPrescription>
|
||||
*/
|
||||
List<ClinicPrescription> selectPageRel(@Param("page") IPage<ClinicPrescription> page,
|
||||
@Param("param") ClinicPrescriptionParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ClinicPrescription> selectListRel(@Param("param") ClinicPrescriptionParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
<?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.gxwebsoft.clinic.mapper.ClinicMedicineInoutMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM clinic_medicine_inout a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.firstUserId != null">
|
||||
AND a.first_user_id = #{param.firstUserId}
|
||||
</if>
|
||||
<if test="param.secondUserId != null">
|
||||
AND a.second_user_id = #{param.secondUserId}
|
||||
</if>
|
||||
<if test="param.thirdUserId != null">
|
||||
AND a.third_user_id = #{param.thirdUserId}
|
||||
</if>
|
||||
<if test="param.firstMoney != null">
|
||||
AND a.first_money = #{param.firstMoney}
|
||||
</if>
|
||||
<if test="param.secondMoney != null">
|
||||
AND a.second_money = #{param.secondMoney}
|
||||
</if>
|
||||
<if test="param.thirdMoney != null">
|
||||
AND a.third_money = #{param.thirdMoney}
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.orderPrice != null">
|
||||
AND a.order_price = #{param.orderPrice}
|
||||
</if>
|
||||
<if test="param.settledPrice != null">
|
||||
AND a.settled_price = #{param.settledPrice}
|
||||
</if>
|
||||
<if test="param.degreePrice != null">
|
||||
AND a.degree_price = #{param.degreePrice}
|
||||
</if>
|
||||
<if test="param.payPrice != null">
|
||||
AND a.pay_price = #{param.payPrice}
|
||||
</if>
|
||||
<if test="param.rate != null">
|
||||
AND a.rate = #{param.rate}
|
||||
</if>
|
||||
<if test="param.month != null">
|
||||
AND a.month LIKE CONCAT('%', #{param.month}, '%')
|
||||
</if>
|
||||
<if test="param.isInvalid != null">
|
||||
AND a.is_invalid = #{param.isInvalid}
|
||||
</if>
|
||||
<if test="param.isSettled != null">
|
||||
AND a.is_settled = #{param.isSettled}
|
||||
</if>
|
||||
<if test="param.settleTime != null">
|
||||
AND a.settle_time LIKE CONCAT('%', #{param.settleTime}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.clinic.entity.ClinicMedicineInout">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.clinic.entity.ClinicMedicineInout">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?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.gxwebsoft.clinic.mapper.ClinicMedicineMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM clinic_medicine a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.pinyin != null">
|
||||
AND a.pinyin LIKE CONCAT('%', #{param.pinyin}, '%')
|
||||
</if>
|
||||
<if test="param.category != null">
|
||||
AND a.category LIKE CONCAT('%', #{param.category}, '%')
|
||||
</if>
|
||||
<if test="param.specification != null">
|
||||
AND a.specification LIKE CONCAT('%', #{param.specification}, '%')
|
||||
</if>
|
||||
<if test="param.unit != null">
|
||||
AND a.unit LIKE CONCAT('%', #{param.unit}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.pricePerUnit != null">
|
||||
AND a.price_per_unit = #{param.pricePerUnit}
|
||||
</if>
|
||||
<if test="param.isActive != null">
|
||||
AND a.is_active = #{param.isActive}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.clinic.entity.ClinicMedicine">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.clinic.entity.ClinicMedicine">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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.gxwebsoft.clinic.mapper.ClinicMedicineStockMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM clinic_medicine_stock a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.medicineId != null">
|
||||
AND a.medicine_id = #{param.medicineId}
|
||||
</if>
|
||||
<if test="param.stockQuantity != null">
|
||||
AND a.stock_quantity = #{param.stockQuantity}
|
||||
</if>
|
||||
<if test="param.minStockLevel != null">
|
||||
AND a.min_stock_level = #{param.minStockLevel}
|
||||
</if>
|
||||
<if test="param.lastUpdated != null">
|
||||
AND a.last_updated LIKE CONCAT('%', #{param.lastUpdated}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.clinic.entity.ClinicMedicineStock">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.clinic.entity.ClinicMedicineStock">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -19,8 +19,8 @@
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.mobile != null">
|
||||
AND a.mobile LIKE CONCAT('%', #{param.mobile}, '%')
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.payPassword != null">
|
||||
AND a.pay_password LIKE CONCAT('%', #{param.payPassword}, '%')
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<?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.gxwebsoft.clinic.mapper.ClinicPrescriptionItemMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM clinic_prescription_item a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.prescriptionId != null">
|
||||
AND a.prescription_id = #{param.prescriptionId}
|
||||
</if>
|
||||
<if test="param.prescriptionNo != null">
|
||||
AND a.prescription_no LIKE CONCAT('%', #{param.prescriptionNo}, '%')
|
||||
</if>
|
||||
<if test="param.medicineId != null">
|
||||
AND a.medicine_id = #{param.medicineId}
|
||||
</if>
|
||||
<if test="param.dosage != null">
|
||||
AND a.dosage LIKE CONCAT('%', #{param.dosage}, '%')
|
||||
</if>
|
||||
<if test="param.usageFrequency != null">
|
||||
AND a.usage_frequency LIKE CONCAT('%', #{param.usageFrequency}, '%')
|
||||
</if>
|
||||
<if test="param.days != null">
|
||||
AND a.days = #{param.days}
|
||||
</if>
|
||||
<if test="param.amount != null">
|
||||
AND a.amount = #{param.amount}
|
||||
</if>
|
||||
<if test="param.unitPrice != null">
|
||||
AND a.unit_price = #{param.unitPrice}
|
||||
</if>
|
||||
<if test="param.quantity != null">
|
||||
AND a.quantity = #{param.quantity}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.clinic.entity.ClinicPrescriptionItem">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.clinic.entity.ClinicPrescriptionItem">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.gxwebsoft.clinic.mapper.ClinicPrescriptionMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM clinic_prescription a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.doctorId != null">
|
||||
AND a.doctor_id = #{param.doctorId}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.visitRecordId != null">
|
||||
AND a.visit_record_id = #{param.visitRecordId}
|
||||
</if>
|
||||
<if test="param.prescriptionType != null">
|
||||
AND a.prescription_type = #{param.prescriptionType}
|
||||
</if>
|
||||
<if test="param.diagnosis != null">
|
||||
AND a.diagnosis LIKE CONCAT('%', #{param.diagnosis}, '%')
|
||||
</if>
|
||||
<if test="param.treatmentPlan != null">
|
||||
AND a.treatment_plan LIKE CONCAT('%', #{param.treatmentPlan}, '%')
|
||||
</if>
|
||||
<if test="param.decoctionInstructions != null">
|
||||
AND a.decoction_instructions LIKE CONCAT('%', #{param.decoctionInstructions}, '%')
|
||||
</if>
|
||||
<if test="param.orderPrice != null">
|
||||
AND a.order_price = #{param.orderPrice}
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.payPrice != null">
|
||||
AND a.pay_price = #{param.payPrice}
|
||||
</if>
|
||||
<if test="param.isInvalid != null">
|
||||
AND a.is_invalid = #{param.isInvalid}
|
||||
</if>
|
||||
<if test="param.isSettled != null">
|
||||
AND a.is_settled = #{param.isSettled}
|
||||
</if>
|
||||
<if test="param.settleTime != null">
|
||||
AND a.settle_time LIKE CONCAT('%', #{param.settleTime}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.clinic.entity.ClinicPrescription">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.clinic.entity.ClinicPrescription">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gxwebsoft.clinic.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 出入库查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "ClinicMedicineInoutParam对象", description = "出入库查询参数")
|
||||
public class ClinicMedicineInoutParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "买家用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "分销商用户id(一级)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer firstUserId;
|
||||
|
||||
@Schema(description = "分销商用户id(二级)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer secondUserId;
|
||||
|
||||
@Schema(description = "分销商用户id(三级)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer thirdUserId;
|
||||
|
||||
@Schema(description = "分销佣金(一级)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal firstMoney;
|
||||
|
||||
@Schema(description = "分销佣金(二级)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal secondMoney;
|
||||
|
||||
@Schema(description = "分销佣金(三级)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal thirdMoney;
|
||||
|
||||
@Schema(description = "单价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "订单总金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
@Schema(description = "结算金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal settledPrice;
|
||||
|
||||
@Schema(description = "换算成度")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal degreePrice;
|
||||
|
||||
@Schema(description = "实发金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@Schema(description = "税率")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal rate;
|
||||
|
||||
@Schema(description = "结算月份")
|
||||
private String month;
|
||||
|
||||
@Schema(description = "订单是否失效(0未失效 1已失效)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isInvalid;
|
||||
|
||||
@Schema(description = "佣金结算(0未结算 1已结算)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isSettled;
|
||||
|
||||
@Schema(description = "结算时间")
|
||||
private String settleTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.gxwebsoft.clinic.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 药品库查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "ClinicMedicineParam对象", description = "药品库查询参数")
|
||||
public class ClinicMedicineParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "药名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "拼音")
|
||||
private String pinyin;
|
||||
|
||||
@Schema(description = "分类(如“清热解毒”、“补气养血”)")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "规格(如“饮片”、“颗粒”)")
|
||||
private String specification;
|
||||
|
||||
@Schema(description = "单位(如“克”、“袋”)")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "单价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal pricePerUnit;
|
||||
|
||||
@Schema(description = "是否活跃")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isActive;
|
||||
|
||||
@Schema(description = "买家用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.gxwebsoft.clinic.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 药品库存查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "ClinicMedicineStockParam对象", description = "药品库存查询参数")
|
||||
public class ClinicMedicineStockParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "药品")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer medicineId;
|
||||
|
||||
@Schema(description = "库存数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer stockQuantity;
|
||||
|
||||
@Schema(description = "最小库存预警")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer minStockLevel;
|
||||
|
||||
@Schema(description = "上次更新时间")
|
||||
private String lastUpdated;
|
||||
|
||||
@Schema(description = "买家用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class ClinicPatientUserParam extends BaseParam {
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String mobile;
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "支付密码")
|
||||
private String payPassword;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.gxwebsoft.clinic.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "ClinicPrescriptionItemParam对象", description = "处方明细表 查询参数")
|
||||
public class ClinicPrescriptionItemParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "关联处方")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer prescriptionId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String prescriptionNo;
|
||||
|
||||
@Schema(description = "关联药品")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer medicineId;
|
||||
|
||||
@Schema(description = "剂量(如“10g”)")
|
||||
private String dosage;
|
||||
|
||||
@Schema(description = "用法频率(如“每日三次”)")
|
||||
private String usageFrequency;
|
||||
|
||||
@Schema(description = "服用天数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer days;
|
||||
|
||||
@Schema(description = "购买数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "单价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Schema(description = "数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer quantity;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "用户id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.gxwebsoft.clinic.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "ClinicPrescriptionParam对象", description = "处方主表查询参数")
|
||||
public class ClinicPrescriptionParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "患者")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "医生")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer doctorId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "关联就诊表")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer visitRecordId;
|
||||
|
||||
@Schema(description = "处方类型 0中药 1西药")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer prescriptionType;
|
||||
|
||||
@Schema(description = "诊断结果")
|
||||
private String diagnosis;
|
||||
|
||||
@Schema(description = "治疗方案")
|
||||
private String treatmentPlan;
|
||||
|
||||
@Schema(description = "煎药说明")
|
||||
private String decoctionInstructions;
|
||||
|
||||
@Schema(description = "订单总金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
@Schema(description = "单价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "实付金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@Schema(description = "订单是否失效(0未失效 1已失效)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isInvalid;
|
||||
|
||||
@Schema(description = "结算(0未结算 1已结算)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isSettled;
|
||||
|
||||
@Schema(description = "结算时间")
|
||||
private String settleTime;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1已完成,2已支付,3已取消")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.clinic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineInout;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineInoutParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入库Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
public interface ClinicMedicineInoutService extends IService<ClinicMedicineInout> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<ClinicMedicineInout>
|
||||
*/
|
||||
PageResult<ClinicMedicineInout> pageRel(ClinicMedicineInoutParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicMedicineInout>
|
||||
*/
|
||||
List<ClinicMedicineInout> listRel(ClinicMedicineInoutParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return ClinicMedicineInout
|
||||
*/
|
||||
ClinicMedicineInout getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.clinic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicine;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:31
|
||||
*/
|
||||
public interface ClinicMedicineService extends IService<ClinicMedicine> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<ClinicMedicine>
|
||||
*/
|
||||
PageResult<ClinicMedicine> pageRel(ClinicMedicineParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicMedicine>
|
||||
*/
|
||||
List<ClinicMedicine> listRel(ClinicMedicineParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return ClinicMedicine
|
||||
*/
|
||||
ClinicMedicine getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.clinic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineStock;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineStockParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库存Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
public interface ClinicMedicineStockService extends IService<ClinicMedicineStock> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<ClinicMedicineStock>
|
||||
*/
|
||||
PageResult<ClinicMedicineStock> pageRel(ClinicMedicineStockParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicMedicineStock>
|
||||
*/
|
||||
List<ClinicMedicineStock> listRel(ClinicMedicineStockParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return ClinicMedicineStock
|
||||
*/
|
||||
ClinicMedicineStock getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.clinic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescriptionItem;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionItemParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
public interface ClinicPrescriptionItemService extends IService<ClinicPrescriptionItem> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<ClinicPrescriptionItem>
|
||||
*/
|
||||
PageResult<ClinicPrescriptionItem> pageRel(ClinicPrescriptionItemParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicPrescriptionItem>
|
||||
*/
|
||||
List<ClinicPrescriptionItem> listRel(ClinicPrescriptionItemParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return ClinicPrescriptionItem
|
||||
*/
|
||||
ClinicPrescriptionItem getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.clinic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescription;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
public interface ClinicPrescriptionService extends IService<ClinicPrescription> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<ClinicPrescription>
|
||||
*/
|
||||
PageResult<ClinicPrescription> pageRel(ClinicPrescriptionParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<ClinicPrescription>
|
||||
*/
|
||||
List<ClinicPrescription> listRel(ClinicPrescriptionParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return ClinicPrescription
|
||||
*/
|
||||
ClinicPrescription getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.clinic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineInout;
|
||||
import com.gxwebsoft.clinic.mapper.ClinicMedicineInoutMapper;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineInoutParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicMedicineInoutService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入库Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Service
|
||||
public class ClinicMedicineInoutServiceImpl extends ServiceImpl<ClinicMedicineInoutMapper, ClinicMedicineInout> implements ClinicMedicineInoutService {
|
||||
|
||||
@Override
|
||||
public PageResult<ClinicMedicineInout> pageRel(ClinicMedicineInoutParam param) {
|
||||
PageParam<ClinicMedicineInout, ClinicMedicineInoutParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<ClinicMedicineInout> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ClinicMedicineInout> listRel(ClinicMedicineInoutParam param) {
|
||||
List<ClinicMedicineInout> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<ClinicMedicineInout, ClinicMedicineInoutParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClinicMedicineInout getByIdRel(Integer id) {
|
||||
ClinicMedicineInoutParam param = new ClinicMedicineInoutParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.clinic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicine;
|
||||
import com.gxwebsoft.clinic.mapper.ClinicMedicineMapper;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicMedicineService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:31
|
||||
*/
|
||||
@Service
|
||||
public class ClinicMedicineServiceImpl extends ServiceImpl<ClinicMedicineMapper, ClinicMedicine> implements ClinicMedicineService {
|
||||
|
||||
@Override
|
||||
public PageResult<ClinicMedicine> pageRel(ClinicMedicineParam param) {
|
||||
PageParam<ClinicMedicine, ClinicMedicineParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<ClinicMedicine> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ClinicMedicine> listRel(ClinicMedicineParam param) {
|
||||
List<ClinicMedicine> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<ClinicMedicine, ClinicMedicineParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClinicMedicine getByIdRel(Integer id) {
|
||||
ClinicMedicineParam param = new ClinicMedicineParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.clinic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.clinic.entity.ClinicMedicineStock;
|
||||
import com.gxwebsoft.clinic.mapper.ClinicMedicineStockMapper;
|
||||
import com.gxwebsoft.clinic.param.ClinicMedicineStockParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicMedicineStockService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品库存Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:06:32
|
||||
*/
|
||||
@Service
|
||||
public class ClinicMedicineStockServiceImpl extends ServiceImpl<ClinicMedicineStockMapper, ClinicMedicineStock> implements ClinicMedicineStockService {
|
||||
|
||||
@Override
|
||||
public PageResult<ClinicMedicineStock> pageRel(ClinicMedicineStockParam param) {
|
||||
PageParam<ClinicMedicineStock, ClinicMedicineStockParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<ClinicMedicineStock> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ClinicMedicineStock> listRel(ClinicMedicineStockParam param) {
|
||||
List<ClinicMedicineStock> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<ClinicMedicineStock, ClinicMedicineStockParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClinicMedicineStock getByIdRel(Integer id) {
|
||||
ClinicMedicineStockParam param = new ClinicMedicineStockParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.gxwebsoft.clinic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescriptionItem;
|
||||
import com.gxwebsoft.clinic.mapper.ClinicPrescriptionItemMapper;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionItemParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicPrescriptionItemService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
@Service
|
||||
public class ClinicPrescriptionItemServiceImpl extends ServiceImpl<ClinicPrescriptionItemMapper, ClinicPrescriptionItem> implements ClinicPrescriptionItemService {
|
||||
|
||||
@Override
|
||||
public PageResult<ClinicPrescriptionItem> pageRel(ClinicPrescriptionItemParam param) {
|
||||
PageParam<ClinicPrescriptionItem, ClinicPrescriptionItemParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<ClinicPrescriptionItem> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ClinicPrescriptionItem> listRel(ClinicPrescriptionItemParam param) {
|
||||
List<ClinicPrescriptionItem> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<ClinicPrescriptionItem, ClinicPrescriptionItemParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClinicPrescriptionItem getByIdRel(Integer id) {
|
||||
ClinicPrescriptionItemParam param = new ClinicPrescriptionItemParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.gxwebsoft.clinic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.clinic.entity.ClinicPrescription;
|
||||
import com.gxwebsoft.clinic.mapper.ClinicPrescriptionMapper;
|
||||
import com.gxwebsoft.clinic.param.ClinicPrescriptionParam;
|
||||
import com.gxwebsoft.clinic.service.ClinicPrescriptionService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-10-22 02:01:13
|
||||
*/
|
||||
@Service
|
||||
public class ClinicPrescriptionServiceImpl extends ServiceImpl<ClinicPrescriptionMapper, ClinicPrescription> implements ClinicPrescriptionService {
|
||||
|
||||
@Override
|
||||
public PageResult<ClinicPrescription> pageRel(ClinicPrescriptionParam param) {
|
||||
PageParam<ClinicPrescription, ClinicPrescriptionParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<ClinicPrescription> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ClinicPrescription> listRel(ClinicPrescriptionParam param) {
|
||||
List<ClinicPrescription> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<ClinicPrescription, ClinicPrescriptionParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClinicPrescription getByIdRel(Integer id) {
|
||||
ClinicPrescriptionParam param = new ClinicPrescriptionParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -46,7 +46,6 @@ public class ShopUserController extends BaseController {
|
||||
return success(shopUserService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopUser:list')")
|
||||
@Operation(summary = "根据userId查询用户记录表")
|
||||
@GetMapping("/{userId}")
|
||||
public ApiResult<ShopUser> get(@PathVariable("userId") Integer userId) {
|
||||
|
||||
Reference in New Issue
Block a user