This commit is contained in:
LiJianZhao 2025-05-13 16:59:40 +08:00
parent 4a2bca7568
commit cf0cd6834b
7 changed files with 34 additions and 3 deletions

View File

@ -69,8 +69,8 @@ public class GoodsController extends BaseController {
if (goods.getMinPackagingNumber() == null || goods.getMinPackagingNumber() <= 0){
return error("最小包装数量只能为正数");
}
if (goods.getIdCode() != null && goods.getIdCode().isEmpty()){
goods.setIdCode(null);
if (goods.getIdCode() == null || goods.getIdCode().isEmpty()){
goods.setIdCode("");
}
Goods dbGoods = goodsService.createGoods(goods);

View File

@ -54,6 +54,13 @@ public class SocialDirectoryController extends BaseController {
return success(socialDirectoryService.search(keyword, type, page, size));
}
@RequestMapping("searchProducer")
public Result<List<Map<String,Object>>> searchProducer() {
String keyword = parmsUtil.getString("keyword","请输入搜索关键词");
Integer type= parmsUtil.getInteger("type");
return success(socialDirectoryService.searchProducer(keyword, type));
}
@RequestMapping("getByCode")
public Result<SocialDirectoryView> getByCode() {
String code = parmsUtil.getString("code");

View File

@ -1,6 +1,8 @@
package com.syjiaer.clinic.server.entity.goods;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

View File

@ -13,6 +13,8 @@ public class SeeDoctorInfoVo {
private Integer dockerId;
//挂号医生姓名
private String dockerName;
//挂号类型
private Integer registerType;
//医生科室名称
private String sectionName;
//上一次接诊时间
@ -21,4 +23,5 @@ public class SeeDoctorInfoVo {
private Integer seeDoctorCount;
//医保余额
private BigDecimal socialBalance;
}

View File

@ -379,6 +379,7 @@ public class MedicalRecordService extends BaseService {
throw new MessageException("挂号单不存在");
}
SeeDoctorInfoVo vo = new SeeDoctorInfoVo();
vo.setRegisterType(registration.getType());
vo.setPatientInfo(patientInfoMapper.selectById(registration.getPatientInfoId()));
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());

View File

@ -350,7 +350,7 @@ public class GoodsService {
throw new MessageException("商品不存在");
}
List<String> idCodeList = null;
if (dbGoods.getIdCode() == null) {
if (dbGoods.getIdCode() == null || dbGoods.getIdCode().isEmpty()) {
idCodeList = new ArrayList<>();
} else {
idCodeList = new ArrayList<>(Arrays.asList(dbGoods.getIdCode().split(",")));

View File

@ -414,4 +414,22 @@ public class SocialDirectoryService extends BaseService {
}
public List<Map<String,Object>> searchProducer(String keyword, Integer type) {
QueryWrapper<SocialDirectory> codeqw = new QueryWrapper<>();
codeqw.select("producer,count(1) as c");
if (type != null) {
codeqw.eq("type", type);
}
//模糊搜索
if (keyword != null && !keyword.trim().isEmpty()) {
codeqw.and(wrapper->
wrapper.like("name", keyword).or().like("code", keyword).or().like("keyword", keyword)
);
}
codeqw.groupBy("producer");
codeqw.orderByDesc("c");
return socialDirectoryMapper.selectMaps(codeqw);
}
}