8/5 优化1.1入院药品维护,以及响应字段

dev_unify
wangwei 8 months ago
parent fdaef6479a
commit 686a88991a

@ -372,6 +372,14 @@ public class UdiContrastController {
return ResultVOUtils.success(udiRelevanceEntity);
}
@AuthRuleAnnotation("")
@PostMapping("/udi/udirel/updatetDrug")
public BaseResponse updatetDrug(@RequestBody AddProductRequest addProductRequest) {
AddProductRequest udiRelevanceEntity = udiProductService.addDrug(addProductRequest);
return ResultVOUtils.success(udiRelevanceEntity);
}
@PostMapping("/udi/udirel/updateLevelDrug")
public BaseResponse updateLevelDrug(@RequestBody UpdateLevelDrugRequest updateLevelDrugRequest) {
udiProductService.saveOrUpadateLevelDrug(updateLevelDrugRequest);

@ -756,6 +756,40 @@ public class UdiRelevanceController extends BaseController {
}
@AuthRuleAnnotation("")
@PostMapping("/udi/udirel/updateDrugProductById")
@Log(title = "入院药品维护", businessType = BusinessType.UPDATE)
public BaseResponse updateDrugProductById(@RequestBody UdiProductEntity udiProductEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
boolean falg = udiProductService.updateUdiInfoById(udiProductEntity);
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setId(udiProductEntity.getUid());
udiRelevanceEntity.setUseLeverCount(udiProductEntity.getUseLeverCount());
udiRelevanceEntity.setUseLevelDi(udiProductEntity.getUseLevelDi());
udiRelevanceEntity.setUseLevelUnit(udiProductEntity.getUseLevelUnit());
udiRelevanceEntity.setDistributeLevelDi(udiProductEntity.getDistributeLevelDi());
udiRelevanceEntity.setDistributeLevelUnit(udiProductEntity.getDistributeLevelUnit());
udiRelevanceEntity.setDistributeLevelCount(udiProductEntity.getDistributeLevelCount());
udiRelevanceEntity.setUpdateTime(new Date());
boolean b = udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
if (udiProductEntity.getRelSupId() != null) {
UdiRlSupEntity udiRlSupEntity = new UdiRlSupEntity();
udiRlSupEntity.setUpdateTime(new Date());
udiRlSupEntity.setPrice(new BigDecimal(udiProductEntity.getPrice()));
udiRlSupEntity.setId(udiProductEntity.getRelSupId());
udiRlSupService.updateCompanyProductRelevance(udiRlSupEntity);
}
if (falg) {
return ResultVOUtils.success("更新成功");
} else {
return ResultVOUtils.error(999, "更新失败");
}
}
//业务单据选入耗材字典查询列表

@ -62,6 +62,7 @@ public class UdiSyncController {
nameCode = filterUdiRelRequest.getNameCode();
ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest();
productInfoFilterRequest.setAddType(filterUdiRelRequest.getProductsType());
BeanUtil.copyProperties(filterUdiRelRequest, productInfoFilterRequest);
if (StrUtil.isNotEmpty(nameCode)) {
productInfoFilterRequest.setNameCode(nameCode);

@ -135,18 +135,8 @@ public class UdiProductEntity {
@TableField(value = "catalogCode3")
@ApiModelProperty(value = "三级分类名称(部位、功能、品种)")
private Integer catalogCode3;
//
//
@TableField(exist = false)
private Boolean isStack;
private Long id;
@TableField(value = "uuid")
private String uuid;
@ -405,7 +395,7 @@ public class UdiProductEntity {
* 使
*/
@TableField(value = "indate")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date indate;
@ -421,6 +411,12 @@ public class UdiProductEntity {
@TableField(value = "prepnSpec")
private String prepnSpec;
/**
*
*/
@TableField(value = "packMatrial")
private String packMatrial;
/**
*
*/
@ -436,4 +432,18 @@ public class UdiProductEntity {
@TableField(value = "majorStatus")
private Integer majorStatus;
@TableField(exist = false)
private String distributeLevelDi;
@TableField(exist = false)
private String distributeLevelUnit;
@TableField(exist = false)
private Integer distributeLevelCount;
@TableField(exist = false)
private String useLevelDi;
@TableField(exist = false)
private String useLevelUnit;
@TableField(exist = false)
private Integer useLeverCount;
}

@ -178,9 +178,11 @@ public class UdiRelevanceEntity {
private Integer useExpireTime;
@TableField(value = "dispatch")
private Boolean dispatch;
@TableField(value = "groupBuy") //是否可配送
private Boolean groupBuy;
//是否集采产品
@TableField(value = "groupBuy")
private Boolean groupBuy;
//是否可配送
@TableField(value = "isDateBy")
private Integer isDateBy;
@TableField(value = "needCert")

@ -262,4 +262,16 @@ public class AddProductRequest {
private Long id;
private String distributeLevelDi;
private String distributeLevelUnit;
private Integer distributeLevelCount;
private String useLevelDi;
private String useLevelUnit;
private Integer useLeverCount;
/**
*
*/
private String payFeeCode;
}

@ -92,6 +92,7 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String mjfs;
private String categoryName;
private String deviceRecordKey;
private String packMatrial;
private Integer productsType;
private Integer productsType = 1;
}

@ -180,12 +180,51 @@ public class UdiRelevanceResponse {
/**
*
*
*/
private String bzgg;
private String prepnSpec;
/**
*
*/
private String prepnUnit;
/**
*
*/
private Integer majorStatus;
private Integer physicType;
/**
*
*/
private String bzgg;
private String packMatrial;
private String levelUnit;
private String storageCondition;
private String transportCondition;
private Date indate;
private Integer majorType;
private Integer medicareType;
private String productPrice;
private String distributeLevelDi;
private String distributeLevelUnit;
private Integer distributeLevelCount;
private String useLevelDi;
private String useLevelUnit;
private Integer useLeverCount;
private String payFeeCode;
/**
*
*/
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
public class UdiRlSupResponse {
@ -148,4 +150,24 @@ public class UdiRlSupResponse {
private String bzgg;
private String prepnSpec;
private String prepnUnit;
private String packMatrial;
private String storageCondition;
private String transportCondition;
private Integer majorType;
private Integer majorStatus;
private Integer physicType;
private Integer medicareType;
private Date indate;
//药品参数
private String distributeLevelDi;
private String distributeLevelUnit;
private Integer distributeLevelCount;
private String useLevelDi;
private String useLevelUnit;
private Integer useLeverCount;
}

@ -226,6 +226,7 @@ public class UdiProductServiceImpl implements UdiProductService {
@Override
/**
* /
*
@ -241,6 +242,7 @@ public class UdiProductServiceImpl implements UdiProductService {
List<UdiProductEntity> udiProductEntities = udiProductDao.findByUuids(udiRelevanceEntity.getUuid());
for (UdiProductEntity udiProductEntity : udiProductEntities) {
addProductRequest.setNameCode(udiProductEntity.getNameCode());
addProductRequest.setId(udiProductEntity.getId());
BeanUtils.copyProperties(addProductRequest, udiProductEntity);
udiProductEntity.setCpmctymc(addProductRequest.getCpmctymc());
udiProductEntity.setProductsType(2);
@ -250,7 +252,18 @@ public class UdiProductServiceImpl implements UdiProductService {
if (IntUtil.value(udiProductEntity.getPackLevel()) == 1) {
udiProductEntity.setDiType(1);
}
udiProductDao.updateById(udiProductEntity);
udiProductDao.updateUdiInfo(udiProductEntity);
//修改关联表
udiRelevanceEntity.setUseLeverCount(addProductRequest.getUseLeverCount());
udiRelevanceEntity.setUseLevelDi(addProductRequest.getUseLevelDi());
udiRelevanceEntity.setUseLevelUnit(addProductRequest.getUseLevelUnit());
udiRelevanceEntity.setDistributeLevelDi(addProductRequest.getDistributeLevelDi());
udiRelevanceEntity.setDistributeLevelUnit(addProductRequest.getDistributeLevelUnit());
udiRelevanceEntity.setDistributeLevelCount(addProductRequest.getDistributeLevelCount());
udiRelevanceEntity.setPayFeeCode(addProductRequest.getPayFeeCode());
udiRelevanceDao.updateById(udiRelevanceEntity);
}
} else {
udiRelevanceEntity = new UdiRelevanceEntity();
@ -263,6 +276,7 @@ public class UdiProductServiceImpl implements UdiProductService {
udiRelevanceEntity.setProductsType(2);
udiRelevanceEntity.setAttributeType(addProductRequest.getAttributeType());
udiRelevanceEntity.setHcType(addProductRequest.getHcType());
udiRelevanceEntity.setPayFeeCode(addProductRequest.getPayFeeCode());
if (CollUtil.isNotEmpty(addProductRequest.getDrugLevelLists())) {
for (UpdateLevelDrugRequest updateLevelDrugRequest : addProductRequest.getDrugLevelLists()) {
@ -272,8 +286,6 @@ public class UdiProductServiceImpl implements UdiProductService {
}
UdiProductEntity udiProductEntity = new UdiProductEntity();
BeanUtils.copyProperties(updateLevelDrugRequest, udiProductEntity);
BeanUtils.copyProperties(addProductRequest,udiProductEntity);
udiProductEntity.setNameCode(updateLevelDrugRequest.getNameCode());
udiProductEntity.setCpmctymc(addProductRequest.getCpmctymc());
udiProductEntity.setUuid(udiRelevanceEntity.getUuid());
udiProductEntity.setProductsType(2);

@ -313,6 +313,9 @@
<if test="isNewest != null and isNewest != ''">
AND isNewest = #{isNewest}
</if>
<if test="addType != null and addType != ''">
AND addType = #{addType}
</if>
<if test="diType != '' and diType != null">
AND diType = #{diType}
</if>

@ -964,6 +964,54 @@
<if test="catalogCode3 != null">
catalogCode3=#{catalogCode3},
</if>
<if test="requireScanCode != null">
requireScanCode=#{requireScanCode},
</if>
<if test="bzgg != null">
bzgg=#{bzgg},
</if>
<if test="productsType != null">
productsType=#{productsType},
</if>
<if test="levelUnit != null">
levelUnit=#{levelUnit},
</if>
<if test="prepnUnit != null">
prepnUnit=#{prepnUnit},
</if>
<if test="prepnSpec != null">
prepnSpec=#{prepnSpec},
</if>
<if test="specialCode != null">
specialCode=#{specialCode},
</if>
<if test="storageCondition != null">
storageCondition=#{storageCondition},
</if>
<if test="transportCondition != null">
transportCondition=#{transportCondition},
</if>
<if test="useAttribute != null">
useAttribute=#{useAttribute},
</if>
<if test="majorType != null">
majorType=#{majorType},
</if>
<if test="majorStatus != null">
majorStatus=#{majorStatus},
</if>
<if test="physicType != null">
physicType=#{physicType},
</if>
<if test="medicareType != null">
medicareType=#{medicareType},
</if>
<if test="indate != null">
indate=#{indate},
</if>
<if test="packMatrial != null">
packMatrial=#{packMatrial},
</if>
</trim>
where id = #{id}
</update>

@ -475,8 +475,16 @@
basic_products.requireScanCode,
basic_products.bzgg,
basic_products.prepnSpec,
basic_products.prepnUnit
basic_products.prepnUnit,
basic_products.levelUnit,
basic_products.majorStatus,
basic_products.physicType,
basic_products.packMatrial,
basic_products.storageCondition,
basic_products.transportCondition,
basic_products.indate,
basic_products.majorType,
basic_products.medicareType
FROM basic_products
inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid
@ -1177,7 +1185,24 @@
<if test="isStack != null">
isStack=#{isStack},
</if>
<if test="distributeLevelDi != null">
distributeLevelDi=#{distributeLevelDi},
</if>
<if test="distributeLevelUnit != null">
distributeLevelUnit=#{distributeLevelUnit},
</if>
<if test="distributeLevelCount != null">
distributeLevelCount=#{distributeLevelCount},
</if>
<if test="useLevelDi != null">
useLevelDi=#{useLevelDi},
</if>
<if test="useLevelUnit != null">
useLevelUnit=#{useLevelUnit},
</if>
<if test="useLeverCount != null">
useLeverCount=#{useLeverCount},
</if>
</trim>
WHERE id = #{id}
</update>

@ -52,7 +52,14 @@
basic_udirel.lowStockNum,
basic_udirel.overStockNum,
basic_udirel.recentDateTime,
basic_udirel.isDateBy,basic_udirel.isStack,
basic_udirel.isDateBy,
basic_udirel.isStack,
basic_udirel.distributeLevelDi,
basic_udirel.distributeLevelUnit,
basic_udirel.distributeLevelCount,
basic_udirel.useLevelDi,
basic_udirel.useLevelUnit,
basic_udirel.useLeverCount,
bht.name classifyName,
basic_products.id as PRId,
basic_products.originUuid,
@ -127,7 +134,15 @@
basic_products.bzgg,
basic_products.packUnit,
basic_products.prepnSpec,
basic_products.prepnUnit
basic_products.prepnUnit,
basic_products.packMatrial,
basic_products.storageCondition,
basic_products.transportCondition,
basic_products.majorType,
basic_products.majorStatus,
basic_products.physicType,
basic_products.medicareType,
basic_products.indate
FROM company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id

Loading…
Cancel
Save