物料添加医保报销机构优惠字段
This commit is contained in:
parent
68cc381b0a
commit
10f28c8c06
|
|
@ -117,4 +117,13 @@ public class InvoicingApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "通过物料id获取物料信息", notes = "通过物料id获取物料信息")
|
||||||
|
@AutoLog(value = "通过物料id获取物料信息")
|
||||||
|
@GetMapping(value = "/queryWlInfoByWlId")
|
||||||
|
public Result<MaterialInfoEntity> queryWlInfoByWlId(MaterialInfoEntity materialInfoEntity) {
|
||||||
|
MaterialInfoEntity info = invoicingApi.queryWlInfoByWlId(materialInfoEntity);
|
||||||
|
return Result.OK(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,4 +76,10 @@ public class CgdInfoEntity implements Serializable {
|
||||||
private String procurementPrice;
|
private String procurementPrice;
|
||||||
/**到货单间*/
|
/**到货单间*/
|
||||||
private String arrivalPrice;
|
private String arrivalPrice;
|
||||||
|
/**物料类别*/
|
||||||
|
private String categoryId;
|
||||||
|
/**物料类型*/
|
||||||
|
private String typeId;
|
||||||
|
/**用药类型*/
|
||||||
|
private String medicationId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,18 @@ public class MaterialInfoEntity implements Serializable {
|
||||||
private String kcsl;//库存数量
|
private String kcsl;//库存数量
|
||||||
@Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id")
|
@Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id")
|
||||||
private String nuId;//库房id
|
private String nuId;//库房id
|
||||||
|
/**是否医保报销 0否 1是*/
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
private java.lang.String izYbbx;
|
||||||
|
/**是否机构优惠 0否 1是*/
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
private java.lang.String izJgyh;
|
||||||
|
|
||||||
private java.lang.String wlParamInfo;
|
private java.lang.String wlParamInfo;
|
||||||
private java.lang.String isWaring;//是否预警 1:是 0:否
|
private java.lang.String isWaring;//是否预警 1:是 0:否
|
||||||
|
private java.lang.String izYbbxName;
|
||||||
|
private java.lang.String izJgyhName;
|
||||||
|
private java.lang.String izEnabledName;
|
||||||
|
private java.lang.String wlId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,6 @@ public interface IInvoicingApi {
|
||||||
NuBaseInfoEntity queryNuInfoByNuId(NuBaseInfoEntity nuBaseInfoEntityDto);
|
NuBaseInfoEntity queryNuInfoByNuId(NuBaseInfoEntity nuBaseInfoEntityDto);
|
||||||
|
|
||||||
List<CgdMainEntity> generatedPurchaserder(List<CgdMainEntity> cgdMainList);
|
List<CgdMainEntity> generatedPurchaserder(List<CgdMainEntity> cgdMainList);
|
||||||
|
|
||||||
|
MaterialInfoEntity queryWlInfoByWlId(MaterialInfoEntity materialInfoEntity);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,19 @@ public class ConfigMaterialInfo implements Serializable {
|
||||||
@Dict(dicCode = "wl_tag_type")
|
@Dict(dicCode = "wl_tag_type")
|
||||||
private String tagType;
|
private String tagType;
|
||||||
|
|
||||||
|
/**是否医保报销 0否 1是*/
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
private java.lang.String izYbbx;
|
||||||
|
/**是否机构优惠 0否 1是*/
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
private java.lang.String izJgyh;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String izYbbxName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String izJgyhName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String izEnabledName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String treeId;//树id,用于查询
|
private String treeId;//树id,用于查询
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.nu.entity.MaterialInfoEntity;
|
||||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
||||||
|
|
@ -20,4 +21,6 @@ public interface ConfigMaterialInfoMapper extends BaseMapper<ConfigMaterialInfo>
|
||||||
void editQyty(ConfigMaterialInfo configMaterialInfo);
|
void editQyty(ConfigMaterialInfo configMaterialInfo);
|
||||||
|
|
||||||
IPage<ConfigMaterialInfo> getConfiguredList(Page<ConfigMaterialInfo> page, @Param("param") ConfigMaterialInfo configMaterialInfo);
|
IPage<ConfigMaterialInfo> getConfiguredList(Page<ConfigMaterialInfo> page, @Param("param") ConfigMaterialInfo configMaterialInfo);
|
||||||
|
|
||||||
|
ConfigMaterialInfo queryWlInfoByWlId(@Param("wlId") String wlId,@Param("nuId") String nuId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,12 @@
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryWlInfoByWlId" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo">
|
||||||
|
select a.*,b.kcsl,c.item_text as izYbbxName,d.item_text as izJgyhName,e.item_text as izEnabledName from nu_config_material_info a
|
||||||
|
left join nu_warehouse_material_info b on a.id = b.wl_id and b.nu_id = #{nuId}
|
||||||
|
left join sys_dict_item c on a.iz_ybbx = c.item_value and c.dict_id = 'a7adbcd86c37f7dbc9b66945c82ef9e6'
|
||||||
|
left join sys_dict_item d on a.iz_jgyh = d.item_value and d.dict_id = 'a7adbcd86c37f7dbc9b66945c82ef9e6'
|
||||||
|
left join sys_dict_item e on a.iz_enabled = e.item_value and e.dict_id = '1900072409995653121'
|
||||||
|
where a.id = #{wlId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -123,6 +123,13 @@ public class NuInvoicingCgdInfo implements Serializable {
|
||||||
@Excel(name = "到货单间", width = 15)
|
@Excel(name = "到货单间", width = 15)
|
||||||
@ApiModelProperty(value = "到货单间")
|
@ApiModelProperty(value = "到货单间")
|
||||||
private String arrivalPrice;
|
private String arrivalPrice;
|
||||||
|
/**物料类别*/
|
||||||
|
private String categoryId;
|
||||||
|
/**物料类型*/
|
||||||
|
private String typeId;
|
||||||
|
/**用药类型*/
|
||||||
|
private String medicationId;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String kcsl;
|
private String kcsl;
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,6 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
@Autowired
|
@Autowired
|
||||||
private NuInvoicingCgdMainMapper cgdMainMapper;
|
private NuInvoicingCgdMainMapper cgdMainMapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BlWarehouseMaterialInfoMapper warehouseMaterialInfoMapper;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ConfigMaterialInfoMapper configMaterialInfoMapper;
|
private ConfigMaterialInfoMapper configMaterialInfoMapper;
|
||||||
|
|
||||||
|
|
@ -98,13 +95,13 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
String wlId = nuInvoicingCgdInfo.getWlId();
|
String wlId = nuInvoicingCgdInfo.getWlId();
|
||||||
QueryWrapper<BlWarehouseMaterialInfo> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<BlWarehouseMaterialInfo> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("nu_id",nuId).eq("wl_id",wlId);
|
queryWrapper.eq("nu_id",nuId).eq("wl_id",wlId);
|
||||||
BlWarehouseMaterialInfo warehouseMaterialInfo = warehouseMaterialInfoMapper.selectOne(queryWrapper);
|
BlWarehouseMaterialInfo warehouseMaterialInfo = mterialInfoMapper.selectOne(queryWrapper);
|
||||||
String czqkcl = warehouseMaterialInfo.getKcsl();//操作前库存量
|
String czqkcl = warehouseMaterialInfo.getKcsl();//操作前库存量
|
||||||
if(warehouseMaterialInfo != null){
|
if(warehouseMaterialInfo != null){
|
||||||
String kcsl = warehouseMaterialInfo.getKcsl();
|
String kcsl = warehouseMaterialInfo.getKcsl();
|
||||||
if(StringUtils.isNotBlank(kcsl)){
|
if(StringUtils.isNotBlank(kcsl)){
|
||||||
warehouseMaterialInfo.setKcsl(String.valueOf(Integer.parseInt(kcsl) + Integer.parseInt(nuInvoicingCgdInfo.getRksl())));
|
warehouseMaterialInfo.setKcsl(String.valueOf(Integer.parseInt(kcsl) + Integer.parseInt(nuInvoicingCgdInfo.getRksl())));
|
||||||
warehouseMaterialInfoMapper.updateById(warehouseMaterialInfo);
|
mterialInfoMapper.updateById(warehouseMaterialInfo);
|
||||||
|
|
||||||
|
|
||||||
NuWarehouseMaterialCrkInfo crkInfo = new NuWarehouseMaterialCrkInfo();
|
NuWarehouseMaterialCrkInfo crkInfo = new NuWarehouseMaterialCrkInfo();
|
||||||
|
|
@ -177,7 +174,7 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
queryWrapper.apply("kcsl <= lower_limit");
|
queryWrapper.apply("kcsl <= lower_limit");
|
||||||
}
|
}
|
||||||
Page<BlWarehouseMaterialInfo> page = new Page<>(pageNo, pageSize);
|
Page<BlWarehouseMaterialInfo> page = new Page<>(pageNo, pageSize);
|
||||||
List<BlWarehouseMaterialInfo> list = warehouseMaterialInfoMapper.selectList(page,queryWrapper);
|
List<BlWarehouseMaterialInfo> list = mterialInfoMapper.selectList(page,queryWrapper);
|
||||||
IPage<MaterialInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
IPage<MaterialInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
||||||
entityPage.setRecords(BeanUtil.copyToList(list, MaterialInfoEntity.class));
|
entityPage.setRecords(BeanUtil.copyToList(list, MaterialInfoEntity.class));
|
||||||
return entityPage;
|
return entityPage;
|
||||||
|
|
@ -205,8 +202,6 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
if(info.getPurchaseQuantity()!=null && info.getPurchaseQuantity()>0){
|
if(info.getPurchaseQuantity()!=null && info.getPurchaseQuantity()>0){
|
||||||
//获取物料基础信息
|
//获取物料基础信息
|
||||||
ConfigMaterialInfo ConfigMaterialInfo = configMaterialInfoMapper.selectById(info.getWlId());
|
ConfigMaterialInfo ConfigMaterialInfo = configMaterialInfoMapper.selectById(info.getWlId());
|
||||||
//获取物料上限下限
|
|
||||||
BlWarehouseMaterialInfo warehouseMaterialInfo = warehouseMaterialInfoMapper.selectOne(new QueryWrapper<BlWarehouseMaterialInfo>().eq("wl_id",info.getWlId()).eq("nu_id",info.getNuId()));
|
|
||||||
info.setWlName(ConfigMaterialInfo.getMaterialName());
|
info.setWlName(ConfigMaterialInfo.getMaterialName());
|
||||||
info.setWlMaterialNo(ConfigMaterialInfo.getMaterialNo());
|
info.setWlMaterialNo(ConfigMaterialInfo.getMaterialNo());
|
||||||
info.setWlSpecificationModel(ConfigMaterialInfo.getSpecificationModel());
|
info.setWlSpecificationModel(ConfigMaterialInfo.getSpecificationModel());
|
||||||
|
|
@ -363,6 +358,7 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
return cgdMainList;
|
return cgdMainList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<CgdInfoEntity> queryCgdInfoList(Integer pageNo, Integer pageSize, CgdInfoEntity cgdInfoEntityDto, HttpServletRequest req) {
|
public IPage<CgdInfoEntity> queryCgdInfoList(Integer pageNo, Integer pageSize, CgdInfoEntity cgdInfoEntityDto, HttpServletRequest req) {
|
||||||
NuInvoicingCgdInfo nuInvoicingCgdInfo = new NuInvoicingCgdInfo();
|
NuInvoicingCgdInfo nuInvoicingCgdInfo = new NuInvoicingCgdInfo();
|
||||||
|
|
@ -412,4 +408,12 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
BeanUtils.copyProperties(nuBaseInfo,nuBaseInfoEntityDto);
|
BeanUtils.copyProperties(nuBaseInfo,nuBaseInfoEntityDto);
|
||||||
return nuBaseInfoEntityDto;
|
return nuBaseInfoEntityDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MaterialInfoEntity queryWlInfoByWlId(MaterialInfoEntity materialInfoEntity) {
|
||||||
|
ConfigMaterialInfo wlInfo = configMaterialInfoMapper.queryWlInfoByWlId(materialInfoEntity.getWlId(), materialInfoEntity.getNuId());
|
||||||
|
BeanUtils.copyProperties(wlInfo,materialInfoEntity);
|
||||||
|
return materialInfoEntity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ public class QgdInfoServiceImpl extends ServiceImpl<QgdInfoMapper, QgdInfo> impl
|
||||||
cgdMain.setGysLxr(ConfigSuppliersInfo.getPersonInCharge());
|
cgdMain.setGysLxr(ConfigSuppliersInfo.getPersonInCharge());
|
||||||
cgdMain.setGysLxrdh(ConfigSuppliersInfo.getContactNumber());
|
cgdMain.setGysLxrdh(ConfigSuppliersInfo.getContactNumber());
|
||||||
cgdMain.setGysOpenId(ConfigSuppliersInfo.getWechartId());
|
cgdMain.setGysOpenId(ConfigSuppliersInfo.getWechartId());
|
||||||
cgdMain.setStatus("0");
|
cgdMain.setStatus("1");
|
||||||
cgdMain.setCgdType("0");
|
cgdMain.setCgdType("0");
|
||||||
cgdMain.setGysName(ConfigSuppliersInfo.getSuppliersName());
|
cgdMain.setGysName(ConfigSuppliersInfo.getSuppliersName());
|
||||||
// cgdMainMapper.insert(cgdMain);
|
// cgdMainMapper.insert(cgdMain);
|
||||||
|
|
@ -165,6 +165,9 @@ public class QgdInfoServiceImpl extends ServiceImpl<QgdInfoMapper, QgdInfo> impl
|
||||||
cgdInfo.setKcsl(wlInfo.getKcsl());
|
cgdInfo.setKcsl(wlInfo.getKcsl());
|
||||||
cgdInfo.setTagName(wlInfo.getTagName());
|
cgdInfo.setTagName(wlInfo.getTagName());
|
||||||
cgdInfo.setMaterialImg(wlInfo.getMaterialImg());
|
cgdInfo.setMaterialImg(wlInfo.getMaterialImg());
|
||||||
|
cgdInfo.setCategoryId(wlInfo.getCategoryId());
|
||||||
|
cgdInfo.setTypeId(wlInfo.getTypeId());
|
||||||
|
cgdInfo.setMedicationId(wlInfo.getMedicationId());
|
||||||
BigDecimal sl = new BigDecimal(params.getPurchaseQuantity());
|
BigDecimal sl = new BigDecimal(params.getPurchaseQuantity());
|
||||||
BigDecimal dj = new BigDecimal(params.getReferenceUnitPrice());
|
BigDecimal dj = new BigDecimal(params.getReferenceUnitPrice());
|
||||||
BigDecimal wlzj = sl.multiply(dj);
|
BigDecimal wlzj = sl.multiply(dj);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.nu.entity.MaterialInfoEntity;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.nu.modules.warehouseMaterialInfo.entity.BlWarehouseMaterialInfo;
|
import com.nu.modules.warehouseMaterialInfo.entity.BlWarehouseMaterialInfo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
@ -17,4 +18,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
public interface BlWarehouseMaterialInfoMapper extends BaseMapper<BlWarehouseMaterialInfo> {
|
public interface BlWarehouseMaterialInfoMapper extends BaseMapper<BlWarehouseMaterialInfo> {
|
||||||
|
|
||||||
List<BlWarehouseMaterialInfo> queryInvoicingList(Page<BlWarehouseMaterialInfo> page, QueryWrapper<BlWarehouseMaterialInfo> queryWrapper);
|
List<BlWarehouseMaterialInfo> queryInvoicingList(Page<BlWarehouseMaterialInfo> page, QueryWrapper<BlWarehouseMaterialInfo> queryWrapper);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,5 @@
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue