deb
This commit is contained in:
parent
b0a5fd76f5
commit
e6d05506d8
|
|
@ -0,0 +1,13 @@
|
|||
package com.syjiaer.clinic.server.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChargeSourceEnum {
|
||||
CHARGE(0,"门诊收费");
|
||||
private final Integer type;
|
||||
private final String desc;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.syjiaer.clinic.server.common.enums;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChargeTypeEnum {
|
||||
CHARGE(1,"收费"),
|
||||
REFUND(0,"退费");
|
||||
private final Integer chargeType;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
|
|
@ -79,7 +80,7 @@ public class ChargeController extends BaseController {
|
|||
* 每日收费报表
|
||||
*/
|
||||
@RequestMapping("/dailyChargingReport")
|
||||
public Result<Map<String, RetailOrderDailyChargingReportVo>> dailyChargingReport() {
|
||||
public Result<List<RetailOrderDailyChargingReportVo>> dailyChargingReport() {
|
||||
String startDateStr = parmsUtil.getString("startDate", "请选择开始时间");
|
||||
String endDateStr = parmsUtil.getString("endDate", "请选择结束时间");
|
||||
LocalDateTime startDateTime = DateUtil.getDateTime(startDateStr);
|
||||
|
|
@ -89,4 +90,12 @@ public class ChargeController extends BaseController {
|
|||
return success(chargeService.dailyChargingReport(startDateTime, endDateTime));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/getListByPatientId")
|
||||
public Result<List<ChargeOrder>> getListByPatientId() {
|
||||
Integer patientId = parmsUtil.getInteger("patientId");
|
||||
return success(chargeService.getListByPatientId(patientId));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
package com.syjiaer.clinic.server.controller.patient;
|
||||
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||
import com.syjiaer.clinic.server.entity.vip.Vip;
|
||||
import com.syjiaer.clinic.server.service.patient.PatientInfoService;
|
||||
import com.syjiaer.clinic.server.service.vip.VipLevelConfigService;
|
||||
import com.syjiaer.clinic.server.service.vip.VipService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 商品 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/vip/vip")
|
||||
public class PatientController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private PatientInfoService patientInfoService;
|
||||
|
||||
@RequestMapping("/create")
|
||||
public Result<Object> create() {
|
||||
PatientInfo patientInfo = parmsUtil.getObject("vipInfo", PatientInfo.class);
|
||||
patientInfoService.create(patientInfo);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
@RequestMapping("/update")
|
||||
public Result<Object> update() {
|
||||
PatientInfo patientInfo = parmsUtil.getObject("vipInfo", PatientInfo.class);
|
||||
patientInfoService.update(patientInfo);
|
||||
return success();
|
||||
}
|
||||
|
||||
@RequestMapping("/delete")
|
||||
public Result<Integer> delete() {
|
||||
int patientId = parmsUtil.getInteger("id", "ID不能为空");
|
||||
return success(patientInfoService.removeById(patientId));
|
||||
}
|
||||
|
||||
@RequestMapping("/list")
|
||||
public Result<Page<PatientInfo>> selectList() {
|
||||
String keyword = parmsUtil.getString("keyword");
|
||||
int page = parmsUtil.getInteger("page", "请输入页码");
|
||||
int pageSize = parmsUtil.getInteger("pageSize", "请输入每页条数");
|
||||
Page<PatientInfo> list = patientInfoService.pageList(keyword, page, pageSize);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@RequestMapping("/get")
|
||||
public Result<PatientInfo> get() {
|
||||
int id = parmsUtil.getInteger("id", "ID不能为空");
|
||||
PatientInfo patientInfo = patientInfoService.getById(id);
|
||||
return success(patientInfo);
|
||||
}
|
||||
|
||||
@RequestMapping("/search")
|
||||
public Result<List<PatientInfo>> search() {
|
||||
String keyword = parmsUtil.getString("keyword", "关键字不能为空");
|
||||
List<PatientInfo> list = patientInfoService.search(keyword);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@RequestMapping("/changeLevel")
|
||||
public Result<Object> changeLevel() {
|
||||
int vipId = parmsUtil.getInteger("vipId", "会员ID不能为空");
|
||||
int levelId = parmsUtil.getInteger("levelId", "等级id不能为空");
|
||||
patientInfoService.changeLevel(vipId, levelId);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -14,77 +14,77 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 商品 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/vip/vip")
|
||||
public class VipController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private VipService vipService;
|
||||
@Autowired
|
||||
private VipLevelConfigService vipLevelConfigService;
|
||||
|
||||
@RequestMapping("/create")
|
||||
public Result<Object> create() {
|
||||
Vip vip = parmsUtil.getObject("vipInfo", Vip.class);
|
||||
vipService.create(vip);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
@RequestMapping("/update")
|
||||
public Result<Object> update() {
|
||||
Vip vip = parmsUtil.getObject("vipInfo", Vip.class);
|
||||
|
||||
vipService.update(vip);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
@RequestMapping("/delete")
|
||||
public Result<Integer> delete() {
|
||||
int vipId = parmsUtil.getInteger("id", "ID不能为空");
|
||||
return success(vipService.removeById(vipId));
|
||||
}
|
||||
|
||||
@RequestMapping("/list")
|
||||
public Result<Page<Vip>> selectList() {
|
||||
String keyword = parmsUtil.getString("keyword");
|
||||
int page = parmsUtil.getInteger("page", "请输入页码");
|
||||
int pageSize = parmsUtil.getInteger("pageSize", "请输入每页条数");
|
||||
Page<Vip> list = vipService.pageList(keyword, page, pageSize);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@RequestMapping("/get")
|
||||
public Result<Vip> get() {
|
||||
int id = parmsUtil.getInteger("id", "ID不能为空");
|
||||
Vip vip = vipService.getById(id);
|
||||
return success(vip);
|
||||
}
|
||||
|
||||
@RequestMapping("/search")
|
||||
public Result<List<Vip>> search() {
|
||||
String keyword = parmsUtil.getString("keyword", "关键字不能为空");
|
||||
List<Vip> list = vipService.search(keyword);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@RequestMapping("/changeLevel")
|
||||
public Result changeLevel() {
|
||||
int vipId = parmsUtil.getInteger("vipId", "会员ID不能为空");
|
||||
int levelId = parmsUtil.getInteger("levelId", "等级id不能为空");
|
||||
vipService.changeLevel(vipId, levelId);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
///**
|
||||
// * <p>
|
||||
// * 商品 前端控制器
|
||||
// * </p>
|
||||
// *
|
||||
// * @author NiuZiYuan
|
||||
// * @since 2025-02-21
|
||||
// */
|
||||
//@RestController
|
||||
//@RequestMapping("/vip/vip")
|
||||
//public class VipController extends BaseController {
|
||||
//
|
||||
// @Autowired
|
||||
// private VipService vipService;
|
||||
// @Autowired
|
||||
// private VipLevelConfigService vipLevelConfigService;
|
||||
//
|
||||
// @RequestMapping("/create")
|
||||
// public Result<Object> create() {
|
||||
// Vip vip = parmsUtil.getObject("vipInfo", Vip.class);
|
||||
// vipService.create(vip);
|
||||
//
|
||||
// return success();
|
||||
// }
|
||||
//
|
||||
// @RequestMapping("/update")
|
||||
// public Result<Object> update() {
|
||||
// Vip vip = parmsUtil.getObject("vipInfo", Vip.class);
|
||||
//
|
||||
// vipService.update(vip);
|
||||
//
|
||||
// return success();
|
||||
// }
|
||||
//
|
||||
// @RequestMapping("/delete")
|
||||
// public Result<Integer> delete() {
|
||||
// int vipId = parmsUtil.getInteger("id", "ID不能为空");
|
||||
// return success(vipService.removeById(vipId));
|
||||
// }
|
||||
//
|
||||
// @RequestMapping("/list")
|
||||
// public Result<Page<Vip>> selectList() {
|
||||
// String keyword = parmsUtil.getString("keyword");
|
||||
// int page = parmsUtil.getInteger("page", "请输入页码");
|
||||
// int pageSize = parmsUtil.getInteger("pageSize", "请输入每页条数");
|
||||
// Page<Vip> list = vipService.pageList(keyword, page, pageSize);
|
||||
// return success(list);
|
||||
// }
|
||||
//
|
||||
// @RequestMapping("/get")
|
||||
// public Result<Vip> get() {
|
||||
// int id = parmsUtil.getInteger("id", "ID不能为空");
|
||||
// Vip vip = vipService.getById(id);
|
||||
// return success(vip);
|
||||
// }
|
||||
//
|
||||
// @RequestMapping("/search")
|
||||
// public Result<List<Vip>> search() {
|
||||
// String keyword = parmsUtil.getString("keyword", "关键字不能为空");
|
||||
// List<Vip> list = vipService.search(keyword);
|
||||
// return success(list);
|
||||
// }
|
||||
//
|
||||
// @RequestMapping("/changeLevel")
|
||||
// public Result changeLevel() {
|
||||
// int vipId = parmsUtil.getInteger("vipId", "会员ID不能为空");
|
||||
// int levelId = parmsUtil.getInteger("levelId", "等级id不能为空");
|
||||
// vipService.changeLevel(vipId, levelId);
|
||||
//
|
||||
// return success();
|
||||
// }
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||
import com.syjiaer.clinic.server.entity.vip.VipIntegralLog;
|
||||
import com.syjiaer.clinic.server.entity.vip.dto.VipIntegralLogQuery;
|
||||
import com.syjiaer.clinic.server.service.patient.PatientInfoService;
|
||||
import com.syjiaer.clinic.server.service.vip.VipIntegralLogService;
|
||||
import com.syjiaer.clinic.server.service.vip.VipService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -17,17 +19,17 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequestMapping("/vip/integral")
|
||||
public class VipIntegralController extends BaseController {
|
||||
@Autowired
|
||||
private VipService vipService;
|
||||
@Autowired
|
||||
private VipIntegralLogService vipIntegralLogService;
|
||||
@Autowired
|
||||
private PatientInfoService patientInfoService;
|
||||
|
||||
@RequestMapping("/add")
|
||||
public Result add(){
|
||||
Integer vipId = parmsUtil.getInteger("vipId","请输入会员id");
|
||||
Integer Integral = parmsUtil.getInteger("integral","请输入积分");
|
||||
String remark = parmsUtil.getString("remark","请输入备注");
|
||||
vipService.changeIntegral(vipId,Integral,remark);
|
||||
patientInfoService.changeIntegral(vipId,Integral,remark);
|
||||
return success();
|
||||
}
|
||||
@RequestMapping("/list")
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
|
|||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-04-27
|
||||
* @since 2025-04-29
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
@ -73,4 +73,7 @@ public class ChargeOrder implements Serializable {
|
|||
|
||||
@ApiModelProperty("总成本")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@ApiModelProperty("销售人id")
|
||||
private Integer salePersionId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,5 +87,5 @@ public class PatientInfo implements Serializable {
|
|||
private BigDecimal balance;
|
||||
|
||||
@ApiModelProperty("生日")
|
||||
private LocalDate brithday;
|
||||
private LocalDate birthday;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class PatientRegistration implements Serializable {
|
|||
@ApiModelProperty("患者手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("就诊类型")
|
||||
@ApiModelProperty("就诊类型 初诊 复诊")
|
||||
private Short visitType;
|
||||
|
||||
@ApiModelProperty("挂号时间")
|
||||
|
|
@ -69,11 +69,11 @@ public class PatientRegistration implements Serializable {
|
|||
@ApiModelProperty("逻辑删除")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("挂号类型")
|
||||
@ApiModelProperty("挂号类型 1普通挂号 2医保挂号")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
@ApiModelProperty("1男 2女")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty("病人id")
|
||||
private Integer patientInfoId;
|
||||
|
|
|
|||
|
|
@ -10,16 +10,11 @@ import com.syjiaer.clinic.server.common.api.output.OM2207A;
|
|||
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||
import com.syjiaer.clinic.server.common.config.Config;
|
||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||
import com.syjiaer.clinic.server.common.enums.InventorySocialTypeEnum;
|
||||
import com.syjiaer.clinic.server.common.enums.InventoryTypeEnum;
|
||||
import com.syjiaer.clinic.server.common.enums.RetailOrderPayTypeEnum;
|
||||
import com.syjiaer.clinic.server.common.enums.RetailOrderStatusEnum;
|
||||
import com.syjiaer.clinic.server.common.enums.*;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.util.StringUtil;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.entity.charge.ChargeGoodsList;
|
||||
import com.syjiaer.clinic.server.entity.charge.ChargeItemList;
|
||||
import com.syjiaer.clinic.server.entity.charge.ChargeOrder;
|
||||
import com.syjiaer.clinic.server.entity.charge.*;
|
||||
import com.syjiaer.clinic.server.entity.charge.dto.ChargeQuery;
|
||||
import com.syjiaer.clinic.server.entity.charge.dto.ChargeSaveDto;
|
||||
import com.syjiaer.clinic.server.entity.charge.vo.ChargeDetailVo;
|
||||
|
|
@ -35,11 +30,14 @@ import com.syjiaer.clinic.server.entity.item.Item;
|
|||
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
||||
import com.syjiaer.clinic.server.entity.social.SocialDirectory;
|
||||
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||
import com.syjiaer.clinic.server.entity.social.SocialUser;
|
||||
import com.syjiaer.clinic.server.mapper.charge.ChargeGoodsListMapper;
|
||||
import com.syjiaer.clinic.server.mapper.charge.ChargeItemListMapper;
|
||||
import com.syjiaer.clinic.server.mapper.charge.ChargeLogMapper;
|
||||
import com.syjiaer.clinic.server.mapper.charge.ChargeOrderMapper;
|
||||
import com.syjiaer.clinic.server.mapper.diagnosis.DiagnosisMapper;
|
||||
import com.syjiaer.clinic.server.mapper.diagnosis.DiagnosisMedicalGoodsListMapper;
|
||||
|
|
@ -54,6 +52,7 @@ import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
|||
import com.syjiaer.clinic.server.mapper.patient.PatientRegistrationMapper;
|
||||
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryMapper;
|
||||
import com.syjiaer.clinic.server.mapper.social.SocialItemMapper;
|
||||
import com.syjiaer.clinic.server.mapper.social.SocialUserMapper;
|
||||
import com.syjiaer.clinic.server.service.BaseService;
|
||||
import com.syjiaer.clinic.server.service.charge.vo.PaymentMethodVo;
|
||||
import com.syjiaer.clinic.server.service.charge.vo.RetailOrderDailyChargingReportVo;
|
||||
|
|
@ -69,16 +68,17 @@ import java.math.BigDecimal;
|
|||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class ChargeService extends BaseService {
|
||||
@Autowired
|
||||
private ChargeOrderMapper chargeOrderMapper;
|
||||
@Autowired
|
||||
private ChargeLogMapper chargeLogMapper;
|
||||
@Autowired
|
||||
private SocialUserMapper socialUserMapper;
|
||||
@Autowired
|
||||
private ChargeItemListMapper chargeItemListMapper;
|
||||
@Autowired
|
||||
private ChargeGoodsListMapper chargeGoodsListMapper;
|
||||
|
|
@ -129,7 +129,7 @@ public class ChargeService extends BaseService {
|
|||
}
|
||||
Diagnosis diagnosis = diagnosisMapper.selectById(dto.getId());
|
||||
//清除该诊断的病例信息
|
||||
if (diagnosis != null){
|
||||
if (diagnosis != null) {
|
||||
String diaCode = diagnosis.getCode();
|
||||
diagnosisMedicalGoodsListMapper.delete(new QueryWrapper<DiagnosisMedicalGoodsList>().eq("diagnosis_code", diaCode));
|
||||
diagnosisMedicalItemListMapper.delete(new QueryWrapper<DiagnosisMedicalItemList>().eq("diagnosis_code", diaCode));
|
||||
|
|
@ -137,8 +137,8 @@ public class ChargeService extends BaseService {
|
|||
DiagnosisMedicalRecord medicalRecord = new DiagnosisMedicalRecord();
|
||||
BeanUtils.copyProperties(dto.getDiagnosisMedicalRecord(), medicalRecord);
|
||||
diagnosisMedicalRecordMapper.updateById(medicalRecord);
|
||||
List<DiagnosisMedicalItemList> mdItmeList= new ArrayList<>();
|
||||
for (ChargeItemListVo item : dto.getItemDetail()){
|
||||
List<DiagnosisMedicalItemList> mdItmeList = new ArrayList<>();
|
||||
for (ChargeItemListVo item : dto.getItemDetail()) {
|
||||
DiagnosisMedicalItemList itemDetail = new DiagnosisMedicalItemList();
|
||||
itemDetail.setItemId(item.getId());
|
||||
itemDetail.setDiagnosisCode(diaCode);
|
||||
|
|
@ -150,8 +150,8 @@ public class ChargeService extends BaseService {
|
|||
mdItmeList.add(itemDetail);
|
||||
}
|
||||
diagnosisMedicalItemListMapper.insert(mdItmeList);
|
||||
List<DiagnosisMedicalGoodsList> mdGoodsList= new ArrayList<>();
|
||||
for (ChargeGoodsListVo goods : dto.getGoodsDetail()){
|
||||
List<DiagnosisMedicalGoodsList> mdGoodsList = new ArrayList<>();
|
||||
for (ChargeGoodsListVo goods : dto.getGoodsDetail()) {
|
||||
DiagnosisMedicalGoodsList goodDetail = new DiagnosisMedicalGoodsList();
|
||||
goodDetail.setGoodsId(goods.getId());
|
||||
goodDetail.setDiagnosisCode(diaCode);
|
||||
|
|
@ -169,14 +169,14 @@ public class ChargeService extends BaseService {
|
|||
|
||||
QueryWrapper<ChargeOrder> listWrapper = new QueryWrapper<>();
|
||||
listWrapper.eq("diagnosis_code", dto.getDiagnosisMedicalRecord().getDiagnosisCode());
|
||||
listWrapper.eq("status",RetailOrderStatusEnum.FINISHED.getCode());
|
||||
listWrapper.eq("status", RetailOrderStatusEnum.FINISHED.getCode());
|
||||
List<ChargeOrder> dbList = chargeOrderMapper.selectList(listWrapper);
|
||||
if (!dbList.isEmpty()){
|
||||
if (!dbList.isEmpty()) {
|
||||
throw new MessageException("该诊断已完成收费");
|
||||
}
|
||||
QueryWrapper<ChargeOrder> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("diagnosis_code", dto.getDiagnosisMedicalRecord().getDiagnosisCode());
|
||||
queryWrapper.eq("status",RetailOrderStatusEnum.UNFINISHED.getCode());
|
||||
queryWrapper.eq("status", RetailOrderStatusEnum.UNFINISHED.getCode());
|
||||
chargeOrderMapper.delete(queryWrapper);
|
||||
|
||||
ManagerUser user = getManagerUser();
|
||||
|
|
@ -202,7 +202,7 @@ public class ChargeService extends BaseService {
|
|||
itemList.setCreateDate(nowLocalDate);
|
||||
itemList.setCreateTime(nowLocalDateTime);
|
||||
chargeServiceLists.add(itemList);
|
||||
BigDecimal subPrice =service.getSelectedPrice().multiply(BigDecimal.valueOf(service.getSelectedNum()));
|
||||
BigDecimal subPrice = service.getSelectedPrice().multiply(BigDecimal.valueOf(service.getSelectedNum()));
|
||||
preTotalPrice = preTotalPrice.add(subPrice);
|
||||
totalPrice = totalPrice.add(subPrice);
|
||||
}
|
||||
|
|
@ -284,7 +284,7 @@ public class ChargeService extends BaseService {
|
|||
return resultPage;
|
||||
}
|
||||
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public ChargeOrder updateOrCreate(ChargeOrderDto dto) {
|
||||
// //创建患者
|
||||
// PatientInfo patientInfo = dto.getPatientInfo();
|
||||
|
|
@ -348,6 +348,8 @@ public class ChargeService extends BaseService {
|
|||
}
|
||||
inventoryLogMapper.insert(logs);
|
||||
}
|
||||
//记录收费日志
|
||||
this.recordChargeLog(order, ChargeSourceEnum.CHARGE, ChargeTypeEnum.CHARGE);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -371,7 +373,7 @@ public class ChargeService extends BaseService {
|
|||
im2205.setPsnNo(registration.getPsnNo());
|
||||
im2205.setExpContent("");
|
||||
socialRequest.call2205(im2205);
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
|
@ -437,7 +439,7 @@ public class ChargeService extends BaseService {
|
|||
ChargeOrder order = chargeOrderMapper.selectByCode(changeOrderCode);
|
||||
Diagnosis diagnosis = diagnosisMapper.selectByCode(order.getDiagnosisCode());
|
||||
//预支付只需要卡号
|
||||
String cardNumber = mdtrtCertNo.substring(0,mdtrtCertNo.indexOf("|"));
|
||||
String cardNumber = mdtrtCertNo.substring(0, mdtrtCertNo.indexOf("|"));
|
||||
PatientRegistration registration = patientRegistrationMapper.selectById(diagnosis.getRegistrationId());
|
||||
|
||||
IM2206A im2206A = new IM2206A();
|
||||
|
|
@ -483,7 +485,7 @@ public class ChargeService extends BaseService {
|
|||
OM2207A om2207A = socialRequest.call2207A(im2207A);
|
||||
//完成订单
|
||||
chargeService.completeOrder(order.getId(), RetailOrderPayTypeEnum.MEDICARE.getCode());
|
||||
return om2207A;
|
||||
return om2207A;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -494,8 +496,8 @@ public class ChargeService extends BaseService {
|
|||
* @param endDateTime
|
||||
* @return
|
||||
*/
|
||||
public Map<String, RetailOrderDailyChargingReportVo> dailyChargingReport(LocalDateTime startDateTime, LocalDateTime endDateTime) {
|
||||
Map<String, RetailOrderDailyChargingReportVo> result = new HashMap<>();
|
||||
public List<RetailOrderDailyChargingReportVo> dailyChargingReport(LocalDateTime startDateTime, LocalDateTime endDateTime) {
|
||||
Map<String, RetailOrderDailyChargingReportVo> result = new TreeMap<>();
|
||||
QueryWrapper<ChargeOrder> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.between("create_datetime", startDateTime, endDateTime)
|
||||
.eq("status", RetailOrderStatusEnum.FINISHED.getCode())
|
||||
|
|
@ -518,13 +520,21 @@ public class ChargeService extends BaseService {
|
|||
}
|
||||
result.put(dateKey, retailOrderDailyChargingReportVo);
|
||||
}
|
||||
|
||||
List<RetailOrderDailyChargingReportVo> voList = new ArrayList<>();
|
||||
result.forEach((key, value) -> {
|
||||
BigDecimal grossMargin = value.getTotalMoney().subtract(value.getTotalCost());
|
||||
value.setGrossMargin(grossMargin);
|
||||
value.setGrossProfitRate(String.format("%.2f%%", grossMargin.divide(value.getTotalMoney(), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100"))));
|
||||
BigDecimal divisor = value.getTotalMoney();
|
||||
if (divisor.compareTo(BigDecimal.ZERO) == 0) {
|
||||
// 处理除数为零的情况,例如抛出自定义异常或返回默认值
|
||||
value.setGrossProfitRate("0.00%");
|
||||
}else {
|
||||
value.setGrossProfitRate(String.format("%.2f%%", grossMargin.divide(value.getTotalMoney(), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100"))));
|
||||
}
|
||||
value.setDate(LocalDate.parse(key));
|
||||
voList.add(value);
|
||||
});
|
||||
return result;
|
||||
return voList;
|
||||
}
|
||||
|
||||
//获取各支付方式支付的金额
|
||||
|
|
@ -553,6 +563,79 @@ public class ChargeService extends BaseService {
|
|||
public ChargeOrder getByCode(String code) {
|
||||
QueryWrapper<ChargeOrder> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("code", code);
|
||||
return chargeOrderMapper.selectOne(queryWrapper);
|
||||
return chargeOrderMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询患者消费记录
|
||||
*
|
||||
* @param patientId
|
||||
* @return
|
||||
*/
|
||||
public List<ChargeOrder> getListByPatientId(Integer patientId) {
|
||||
QueryWrapper<ChargeOrder> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("patient_id", patientId);
|
||||
return chargeOrderMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 收款 退款 记录
|
||||
*/
|
||||
public void recordChargeLog(ChargeOrder chargeOrder, ChargeSourceEnum sourceEnum, ChargeTypeEnum chargeType){
|
||||
ChargeLog chargeLog = new ChargeLog();
|
||||
String customer = null;
|
||||
if (chargeOrder.getPatientId() != null){
|
||||
PatientInfo patient = patientInfoMapper.selectById(chargeOrder.getPatientId());
|
||||
customer = patient.getName();
|
||||
}else if (chargeOrder.getSocialUserId() != null){
|
||||
SocialUser socialUser = socialUserMapper.selectById(chargeOrder.getSocialUserId());
|
||||
customer = socialUser.getPsnName();
|
||||
}else {
|
||||
customer = "-";
|
||||
}
|
||||
chargeLog.setSource(sourceEnum.getType());
|
||||
chargeLog.setCustomer(customer);
|
||||
chargeLog.setType(chargeType.getChargeType());
|
||||
chargeLog.setOriginalPrice(chargeOrder.getPreTotalPrice());
|
||||
chargeLog.setReceivable(chargeOrder.getTotalPrice());
|
||||
chargeLog.setNetReceipts(chargeOrder.getTotalPrice());
|
||||
chargeLog.setDiscount(chargeOrder.getTotalPrice().subtract(chargeOrder.getPreTotalPrice()));
|
||||
chargeLog.setPayType(chargeOrder.getPayType());
|
||||
if (chargeOrder.getSalePersionId() != null){
|
||||
OrganizationMember organizationMember = organizationMemberMapper.selectById(chargeOrder.getSalePersionId());
|
||||
chargeLog.setSalePersonName(organizationMember.getName());
|
||||
chargeLog.setSalePersonId(chargeOrder.getSalePersionId());
|
||||
}
|
||||
chargeLog.setChargeTime(LocalDateTime.now());
|
||||
chargeLog.setProjectCode(chargeOrder.getCode());
|
||||
chargeLogMapper.insert(chargeLog);
|
||||
}
|
||||
/**
|
||||
* 销售库存变更 日志
|
||||
*/
|
||||
public void recordChargeInventoryLog(InventoryLog log,ChargeOrder chargeOrder){
|
||||
ChargeInventoryLog chargeInventoryLog = new ChargeInventoryLog();
|
||||
chargeInventoryLog.setChargeOrderCode(chargeOrder.getCode());
|
||||
chargeInventoryLog.setGoodsId(log.getGoodsId());
|
||||
chargeInventoryLog.setInventoryId(log.getInventoryId());
|
||||
chargeInventoryLog.setNumber(log.getChangeWholeNumber());
|
||||
Goods dbGoods = goodsMapper.selectById(log.getGoodsId());
|
||||
chargeInventoryLog.setTrdnFlag(false);
|
||||
chargeInventoryLog.setUnit(dbGoods.getPackagingUnit());
|
||||
chargeInventoryLog.setNumber(log.getChangeWholeNumber());
|
||||
if (log.getChangeFragmentNumber() > 0 ){
|
||||
chargeInventoryLog.setTrdnFlag(true);
|
||||
chargeInventoryLog.setUnit(dbGoods.getMinPackagingUnit());
|
||||
chargeInventoryLog.setNumber(log.getChangeWholeNumber()*dbGoods.getMinPackagingNumber()+log.getChangeFragmentNumber());
|
||||
}
|
||||
QueryWrapper<ChargeGoodsList> listWrapper = new QueryWrapper<>();
|
||||
listWrapper.eq("charge_order_code",chargeOrder.getCode());
|
||||
listWrapper.eq("goods_id",log.getGoodsId());
|
||||
ChargeGoodsList chargeGoodsList = chargeGoodsListMapper.selectOne(listWrapper);
|
||||
// chargeInventoryLog.setUnitPrice(chargeGoodsList.getUnitPrice());
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import java.time.LocalDate;
|
|||
|
||||
@Data
|
||||
public class RetailOrderDailyChargingReportVo {
|
||||
//日期
|
||||
private LocalDate date;
|
||||
//总金额
|
||||
private BigDecimal totalMoney;
|
||||
//总成本
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.syjiaer.clinic.server.service.patient;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||
import com.syjiaer.clinic.server.entity.vip.Vip;
|
||||
import com.syjiaer.clinic.server.entity.vip.VipExpLog;
|
||||
|
|
@ -15,31 +16,37 @@ import com.syjiaer.clinic.server.mapper.vip.VipLevelConfigMapper;
|
|||
import com.syjiaer.clinic.server.service.BaseService;
|
||||
import com.syjiaer.clinic.server.service.vip.VipLevelConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class PatientInfoService extends BaseService {
|
||||
@Autowired
|
||||
@Lazy
|
||||
private PatientInfoService patientInfoService;
|
||||
@Autowired
|
||||
private PatientInfoMapper patientInfoMapper;
|
||||
@Autowired
|
||||
private VipLevelConfigMapper vipLevelConfigMapper;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private VipLevelConfigService vipLevelConfigService;
|
||||
@Autowired
|
||||
private VipExpLogMapper vipExpLogMapper;
|
||||
@Autowired
|
||||
private VipIntegralLogMapper vipIntegralLogMapper;
|
||||
|
||||
public void save(PatientInfo patientInfo){
|
||||
public PatientInfo save(PatientInfo patientInfo){
|
||||
patientInfo.setCreateDatetime(LocalDateTime.now());
|
||||
if (patientInfo.getBrithday() != null) {
|
||||
if (patientInfo.getBirthday() != null) {
|
||||
int currentYear = LocalDate.now().getYear();
|
||||
int birthYear = patientInfo.getBrithday().getYear();
|
||||
int birthYear = patientInfo.getBirthday().getYear();
|
||||
patientInfo.setAge(currentYear - birthYear);
|
||||
}
|
||||
VipLevelConfig level = vipLevelConfigService.getByExp(patientInfo.getExp());
|
||||
|
|
@ -50,7 +57,7 @@ public class PatientInfoService extends BaseService {
|
|||
}
|
||||
|
||||
QueryWrapper<PatientInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("certno", patientInfo.getPhone());
|
||||
queryWrapper.eq("cert_no", patientInfo.getPhone());
|
||||
PatientInfo dbInfo = patientInfoMapper.selectOne(queryWrapper);
|
||||
if (dbInfo != null){
|
||||
patientInfo.setId(dbInfo.getId());
|
||||
|
|
@ -60,6 +67,7 @@ public class PatientInfoService extends BaseService {
|
|||
patientInfo.setBalance(null);
|
||||
}
|
||||
patientInfoMapper.insertOrUpdate(patientInfo);
|
||||
return patientInfo;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -144,4 +152,122 @@ public class PatientInfoService extends BaseService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新建vip
|
||||
* @param patientInfo
|
||||
*/
|
||||
public void create(PatientInfo patientInfo) {
|
||||
patientInfo.setCreateDatetime(LocalDateTime.now());
|
||||
Integer exp = patientInfo.getExp();
|
||||
if (patientInfo.getBirthday() != null) {
|
||||
int currentYear = LocalDate.now().getYear();
|
||||
int birthYear = patientInfo.getBirthday().getYear();
|
||||
patientInfo.setAge(currentYear - birthYear);
|
||||
}
|
||||
patientInfo.setExp(0);
|
||||
VipLevelConfig level = vipLevelConfigService.getByExp(patientInfo.getExp());
|
||||
if (level != null){
|
||||
patientInfo.setLevelId(level.getLevelId());
|
||||
}else {
|
||||
patientInfo.setLevelId(0);
|
||||
}
|
||||
|
||||
patientInfoMapper.insert(patientInfo);
|
||||
if (exp != null && exp > 0){
|
||||
patientInfoService.changeExp(patientInfo.getId(), exp, "会员创建");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新vip基本信息 经验值和积分不更新
|
||||
* @param patientInfo
|
||||
*/
|
||||
public void update(PatientInfo patientInfo) {
|
||||
patientInfo.setExp(null);
|
||||
patientInfo.setLevelId(null);
|
||||
patientInfoMapper.updateById(patientInfo);
|
||||
}
|
||||
|
||||
public int removeById(int vipId) {
|
||||
return patientInfoMapper.deleteById(vipId);
|
||||
}
|
||||
|
||||
/**
|
||||
* vip分页查询
|
||||
* @param keyword
|
||||
* @param pageNum
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
public Page<PatientInfo> pageList(String keyword, int pageNum, int pageSize) {
|
||||
QueryWrapper<PatientInfo> queryWrapper = new QueryWrapper<>();
|
||||
if (keyword != null && !keyword.isEmpty()){
|
||||
queryWrapper.like("name",keyword);
|
||||
queryWrapper.or().like("phone",keyword);
|
||||
queryWrapper.or().like("cert_no",keyword);
|
||||
}
|
||||
return pageHelper(pageNum, pageSize, queryWrapper, patientInfoMapper, "create_datetime", false);
|
||||
}
|
||||
|
||||
public PatientInfo getById(int id) {
|
||||
return patientInfoMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名称 手机号 身份证搜索vip
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
public List<PatientInfo> search(String keyword) {
|
||||
QueryWrapper<PatientInfo> query = new QueryWrapper<>();
|
||||
query.like("name", keyword);
|
||||
query.or().like("phone", keyword);
|
||||
query.or().like("cert_no", keyword);
|
||||
return patientInfoMapper.selectList(query);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 改变vip等级
|
||||
* @param patientId
|
||||
* @param levelId
|
||||
*/
|
||||
public void changeLevel(int patientId, int levelId) {
|
||||
QueryWrapper<VipLevelConfig> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("level_id", levelId);
|
||||
VipLevelConfig levelConfig = vipLevelConfigMapper.selectOne(queryWrapper);
|
||||
if (levelConfig == null) {
|
||||
throw new MessageException("等级不存在");
|
||||
}
|
||||
PatientInfo patientInfo = patientInfoMapper.selectById(patientId);
|
||||
int changeExp = levelConfig.getStartExp() - patientInfo.getExp();
|
||||
patientInfoService.changeExp(patientId, changeExp, "会员等级修改");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 刷新所有vip等级信息
|
||||
*/
|
||||
public void reFreshAllVipLevel() {
|
||||
//更新所有vip的等级
|
||||
QueryWrapper<PatientInfo> patientQuery = new QueryWrapper<>();
|
||||
patientQuery.select("id,exp");
|
||||
List<PatientInfo> patientList = patientInfoMapper.selectList(patientQuery);
|
||||
Iterator<PatientInfo> iterator = patientList.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
PatientInfo patientInfo = iterator.next();
|
||||
VipLevelConfig levelConfig = vipLevelConfigService.getByExp(patientInfo.getExp());
|
||||
if (levelConfig != null) {
|
||||
patientInfo.setLevelId(levelConfig.getLevelId());
|
||||
} else {
|
||||
patientInfo.setLevelId(0);
|
||||
}
|
||||
patientInfo.setExp(null);
|
||||
|
||||
}
|
||||
patientInfoMapper.updateById(patientList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ public class PatientRegistrationService extends BaseService {
|
|||
@Autowired
|
||||
private PatientInfoMapper patientInfoMapper;
|
||||
@Autowired
|
||||
private PatientInfoService patientInfoService;
|
||||
@Autowired
|
||||
private OrganizationMemberMapper organizationMemberMapper;
|
||||
@Autowired
|
||||
private OrganizationSectionMapper organizationSectionMapper;
|
||||
|
|
@ -84,17 +86,9 @@ public class PatientRegistrationService extends BaseService {
|
|||
patientInfo.setAge(registrationParam.getAge());
|
||||
patientInfo.setCertType(registrationParam.getCertType());
|
||||
patientInfo.setCertNo(registrationParam.getCertNo());
|
||||
PatientInfo dbPatientInfo = patientInfoService.save(patientInfo);
|
||||
|
||||
QueryWrapper<PatientInfo> patientInfoQuery = new QueryWrapper<>();
|
||||
patientInfoQuery.eq("cert_no", registrationParam.getCertNo());
|
||||
List<PatientInfo> patientInfoList = patientInfoMapper.selectList(patientInfoQuery);
|
||||
if (patientInfoList.isEmpty()) {
|
||||
patientInfoMapper.insert(patientInfo);
|
||||
} else {
|
||||
patientInfo.setId(patientInfoList.get(0).getId());
|
||||
patientInfoMapper.updateById(patientInfo);
|
||||
}
|
||||
registrationParam.setPatientInfoId(patientInfo.getId());
|
||||
registrationParam.setPatientInfoId(dbPatientInfo.getId());
|
||||
}
|
||||
PatientRegistration registration = new PatientRegistration();
|
||||
BeanUtils.copyProperties(registrationParam, registration);
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||
import com.syjiaer.clinic.server.entity.vip.Vip;
|
||||
import com.syjiaer.clinic.server.entity.vip.VipIntegralLog;
|
||||
import com.syjiaer.clinic.server.entity.vip.dto.VipIntegralLogQuery;
|
||||
import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
||||
import com.syjiaer.clinic.server.mapper.vip.VipIntegralLogMapper;
|
||||
import com.syjiaer.clinic.server.mapper.vip.VipLevelConfigMapper;
|
||||
import com.syjiaer.clinic.server.mapper.vip.VipMapper;
|
||||
|
|
@ -18,12 +20,10 @@ import java.util.List;
|
|||
|
||||
@Service
|
||||
public class VipIntegralLogService extends BaseService {
|
||||
@Autowired
|
||||
private VipMapper vipMapper;
|
||||
@Autowired
|
||||
private VipLevelConfigMapper vipLevelConfigMapper;
|
||||
@Autowired
|
||||
private VipIntegralLogMapper vipIntegralLogMapper;
|
||||
@Autowired
|
||||
private PatientInfoMapper patientInfoMapper;
|
||||
|
||||
public Page<VipIntegralLog> pageList(VipIntegralLogQuery query) {
|
||||
if (query == null){
|
||||
|
|
@ -35,12 +35,12 @@ public class VipIntegralLogService extends BaseService {
|
|||
if (query.getPageSize() == null || query.getPageSize() == 0){
|
||||
query.setPageSize(Constants.DetailPageSize);
|
||||
}
|
||||
Vip vip = null;
|
||||
PatientInfo patientInfo = null;
|
||||
if (query.getVipId() != null){
|
||||
vip = vipMapper.selectById(query.getVipId());
|
||||
patientInfo = patientInfoMapper.selectById(query.getVipId());
|
||||
}
|
||||
if (vip == null){
|
||||
throw new MessageException("会员不存在");
|
||||
if (patientInfo == null){
|
||||
throw new MessageException("患者不存在");
|
||||
}
|
||||
|
||||
QueryWrapper<VipIntegralLog> queryWrapper = new QueryWrapper<>();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|||
import com.syjiaer.clinic.server.entity.vip.VipLevelConfig;
|
||||
import com.syjiaer.clinic.server.mapper.vip.VipLevelConfigMapper;
|
||||
import com.syjiaer.clinic.server.service.BaseService;
|
||||
import com.syjiaer.clinic.server.service.patient.PatientInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -17,7 +19,7 @@ public class VipLevelConfigService extends BaseService {
|
|||
@Autowired
|
||||
private VipLevelConfigMapper vipLevelConfigMapper;
|
||||
@Autowired
|
||||
private VipService vipService;
|
||||
private PatientInfoService patientInfoService;
|
||||
|
||||
/**
|
||||
* 根据经验值获取会员等级
|
||||
|
|
@ -102,14 +104,14 @@ public class VipLevelConfigService extends BaseService {
|
|||
for (VipLevelConfig levelConfig : insertList){
|
||||
vipLevelConfigMapper.insert(levelConfig);
|
||||
}
|
||||
vipService.reFreshAllVipLevel();
|
||||
patientInfoService.reFreshAllVipLevel();
|
||||
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer delete(int id) {
|
||||
Integer count = vipLevelConfigMapper.deleteById(id);
|
||||
vipService.reFreshAllVipLevel();
|
||||
patientInfoService.reFreshAllVipLevel();
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue