修改查询条件不好使的问题

This commit is contained in:
yangjun 2025-11-20 17:24:11 +08:00
parent 181b747ba9
commit c45e82aaca
1 changed files with 21 additions and 6 deletions

View File

@ -409,9 +409,9 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
@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();
// String categoryId = cgdInfoEntityDto.getCategoryId(); String categoryId = cgdInfoEntityDto.getCategoryId();
// String typeId = cgdInfoEntityDto.getTypeId(); String typeId = cgdInfoEntityDto.getTypeId();
// String medicationId = cgdInfoEntityDto.getMedicationId(); String medicationId = cgdInfoEntityDto.getMedicationId();
BeanUtils.copyProperties(cgdInfoEntityDto,nuInvoicingCgdInfo); BeanUtils.copyProperties(cgdInfoEntityDto,nuInvoicingCgdInfo);
// nuInvoicingCgdInfo.setCategoryId(null); // nuInvoicingCgdInfo.setCategoryId(null);
// nuInvoicingCgdInfo.setTypeId(null); // nuInvoicingCgdInfo.setTypeId(null);
@ -425,9 +425,9 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
" b.pinyin like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') or\n" + " b.pinyin like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') or\n" +
" b.material_no like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') or\n" + " b.material_no like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') or\n" +
" b.specification_model like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') )"); " b.specification_model like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') )");
// queryWrapper.eq(StringUtils.isNotBlank(categoryId),"b.category_id",categoryId); queryWrapper.eq(StringUtils.isNotBlank(categoryId),"b.category_id",categoryId);
// queryWrapper.eq(StringUtils.isNotBlank(typeId),"b.type_id",typeId); queryWrapper.eq(StringUtils.isNotBlank(typeId),"b.type_id",typeId);
// queryWrapper.eq(StringUtils.isNotBlank(medicationId),"b.medication_id",medicationId); queryWrapper.eq(StringUtils.isNotBlank(medicationId),"b.medication_id",medicationId);
List<NuInvoicingCgdInfo> list = cgdInfoMapper.queryCgdInfoList(page,queryWrapper); List<NuInvoicingCgdInfo> list = cgdInfoMapper.queryCgdInfoList(page,queryWrapper);
// getOpeMediaAddress(); // getOpeMediaAddress();
for (NuInvoicingCgdInfo cgdInfo : list){ for (NuInvoicingCgdInfo cgdInfo : list){
@ -873,6 +873,21 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
if(qgsl == 0){ if(qgsl == 0){
continue; continue;
} }
//查询采购单未完结的单据是否有此请购数量
NuInvoicingCgdInfo cgdInfoParam = new NuInvoicingCgdInfo();
cgdInfoParam.setNuId(info.getNuId());
cgdInfoParam.setWlId(info.getWlId());
List<NuInvoicingCgdInfo> listcg = cgdInfoMapper.selectWlNumList(cgdInfoParam);
int cgdNum = 0;
for(NuInvoicingCgdInfo cgdInfo : listcg){
//cgdNum = 采购数量*兑换比例
cgdNum += cgdInfo.getPurchaseQuantity() * Integer.parseInt(cgdInfo.getDhbl());
}
if(Integer.parseInt(info.getUpperLimit())<(Integer.parseInt(kcsl) + cgdNum)){
continue;
}
qgdInfoIns.setPurchaseQuantity(qgsl); qgdInfoIns.setPurchaseQuantity(qgsl);
qgdInfoMapper.insert(qgdInfoIns); qgdInfoMapper.insert(qgdInfoIns);
count++; count++;