物料添加医保报销机构优惠字段
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 arrivalPrice;
|
||||
/**物料类别*/
|
||||
private String categoryId;
|
||||
/**物料类型*/
|
||||
private String typeId;
|
||||
/**用药类型*/
|
||||
private String medicationId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,8 +104,18 @@ public class MaterialInfoEntity implements Serializable {
|
|||
private String kcsl;//库存数量
|
||||
@Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_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 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);
|
||||
|
||||
List<CgdMainEntity> generatedPurchaserder(List<CgdMainEntity> cgdMainList);
|
||||
|
||||
MaterialInfoEntity queryWlInfoByWlId(MaterialInfoEntity materialInfoEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,6 +155,19 @@ public class ConfigMaterialInfo implements Serializable {
|
|||
@Dict(dicCode = "wl_tag_type")
|
||||
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)
|
||||
private String treeId;//树id,用于查询
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.MaterialInfoEntity;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
||||
|
|
@ -20,4 +21,6 @@ public interface ConfigMaterialInfoMapper extends BaseMapper<ConfigMaterialInfo>
|
|||
void editQyty(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 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>
|
||||
|
|
@ -123,6 +123,13 @@ public class NuInvoicingCgdInfo implements Serializable {
|
|||
@Excel(name = "到货单间", width = 15)
|
||||
@ApiModelProperty(value = "到货单间")
|
||||
private String arrivalPrice;
|
||||
/**物料类别*/
|
||||
private String categoryId;
|
||||
/**物料类型*/
|
||||
private String typeId;
|
||||
/**用药类型*/
|
||||
private String medicationId;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kcsl;
|
||||
|
|
|
|||
|
|
@ -58,9 +58,6 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
@Autowired
|
||||
private NuInvoicingCgdMainMapper cgdMainMapper;
|
||||
|
||||
@Autowired
|
||||
private BlWarehouseMaterialInfoMapper warehouseMaterialInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private ConfigMaterialInfoMapper configMaterialInfoMapper;
|
||||
|
||||
|
|
@ -98,13 +95,13 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
String wlId = nuInvoicingCgdInfo.getWlId();
|
||||
QueryWrapper<BlWarehouseMaterialInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("nu_id",nuId).eq("wl_id",wlId);
|
||||
BlWarehouseMaterialInfo warehouseMaterialInfo = warehouseMaterialInfoMapper.selectOne(queryWrapper);
|
||||
BlWarehouseMaterialInfo warehouseMaterialInfo = mterialInfoMapper.selectOne(queryWrapper);
|
||||
String czqkcl = warehouseMaterialInfo.getKcsl();//操作前库存量
|
||||
if(warehouseMaterialInfo != null){
|
||||
String kcsl = warehouseMaterialInfo.getKcsl();
|
||||
if(StringUtils.isNotBlank(kcsl)){
|
||||
warehouseMaterialInfo.setKcsl(String.valueOf(Integer.parseInt(kcsl) + Integer.parseInt(nuInvoicingCgdInfo.getRksl())));
|
||||
warehouseMaterialInfoMapper.updateById(warehouseMaterialInfo);
|
||||
mterialInfoMapper.updateById(warehouseMaterialInfo);
|
||||
|
||||
|
||||
NuWarehouseMaterialCrkInfo crkInfo = new NuWarehouseMaterialCrkInfo();
|
||||
|
|
@ -177,7 +174,7 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
queryWrapper.apply("kcsl <= lower_limit");
|
||||
}
|
||||
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());
|
||||
entityPage.setRecords(BeanUtil.copyToList(list, MaterialInfoEntity.class));
|
||||
return entityPage;
|
||||
|
|
@ -205,8 +202,6 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
if(info.getPurchaseQuantity()!=null && info.getPurchaseQuantity()>0){
|
||||
//获取物料基础信息
|
||||
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.setWlMaterialNo(ConfigMaterialInfo.getMaterialNo());
|
||||
info.setWlSpecificationModel(ConfigMaterialInfo.getSpecificationModel());
|
||||
|
|
@ -363,6 +358,7 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
return cgdMainList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<CgdInfoEntity> queryCgdInfoList(Integer pageNo, Integer pageSize, CgdInfoEntity cgdInfoEntityDto, HttpServletRequest req) {
|
||||
NuInvoicingCgdInfo nuInvoicingCgdInfo = new NuInvoicingCgdInfo();
|
||||
|
|
@ -412,4 +408,12 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
BeanUtils.copyProperties(nuBaseInfo,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.setGysLxrdh(ConfigSuppliersInfo.getContactNumber());
|
||||
cgdMain.setGysOpenId(ConfigSuppliersInfo.getWechartId());
|
||||
cgdMain.setStatus("0");
|
||||
cgdMain.setStatus("1");
|
||||
cgdMain.setCgdType("0");
|
||||
cgdMain.setGysName(ConfigSuppliersInfo.getSuppliersName());
|
||||
// cgdMainMapper.insert(cgdMain);
|
||||
|
|
@ -165,6 +165,9 @@ public class QgdInfoServiceImpl extends ServiceImpl<QgdInfoMapper, QgdInfo> impl
|
|||
cgdInfo.setKcsl(wlInfo.getKcsl());
|
||||
cgdInfo.setTagName(wlInfo.getTagName());
|
||||
cgdInfo.setMaterialImg(wlInfo.getMaterialImg());
|
||||
cgdInfo.setCategoryId(wlInfo.getCategoryId());
|
||||
cgdInfo.setTypeId(wlInfo.getTypeId());
|
||||
cgdInfo.setMedicationId(wlInfo.getMedicationId());
|
||||
BigDecimal sl = new BigDecimal(params.getPurchaseQuantity());
|
||||
BigDecimal dj = new BigDecimal(params.getReferenceUnitPrice());
|
||||
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.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.MaterialInfoEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.warehouseMaterialInfo.entity.BlWarehouseMaterialInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -17,4 +18,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
public interface BlWarehouseMaterialInfoMapper extends BaseMapper<BlWarehouseMaterialInfo> {
|
||||
|
||||
List<BlWarehouseMaterialInfo> queryInvoicingList(Page<BlWarehouseMaterialInfo> page, QueryWrapper<BlWarehouseMaterialInfo> queryWrapper);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,5 @@
|
|||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue