根据勾选的单据显示每个库房商品库存是否配齐

select a.whid,a.WHCode,a.WHName,a.Logogram
#if (dbtype == "Microsoft SQL Server"){
,case when 
case when a.iscontrol = 'Y'
then isnull(c.placenum,0) else isnull(d.basenum,0) 
end - isnull(b.num,0) >= 0
then case when  a.iscontrol = 'Y' and isnull(c.placenum,0) > 0 then '是'
when a.iscontrol = 'N' and isnull(d.basenum,0) > 0 then '是'
else '否' end
else '否' end as 是否配齐
#}else if (dbtype == "Oracle" ){
,case when 
case when a.iscontrol = 'Y' 
then nvl(c.placenum,0) else nvl(d.basenum,0)
end - nvl(b.num,0) >= 0
then case when  a.iscontrol = 'Y' and nvl(c.placenum,0) > 0 then '是'
when a.iscontrol = 'N' and nvl(d.basenum,0) > 0 then '是'
else '否' end
else '否' end as 是否配齐
#}
from storehouse a
left join (
select sum(a.num) as num,a.whid,a.entid from ecorderdt a
where a.entid = :_entid
#__sql += " and a.billno in (" + billnoList + ")"
group  by a.whid,a.entid
) b on a.whid = b.whid and a.entid=b.entid
left join(
select sum(a.placenum) as placenum,a.whid,a.entid from storbalance a
where a.entid = :_entid
and exists(select 1 from ecorderdt x
join ecordermt x3 on x.billno = x3.billno and x.entid = x3.entid
join ECGoodsDoc x1 on x.ecgoodsid = x1.ecgoodsid and x3.ecshopid = x1.ecshopid and x.entid = x1.entid
join ECGoodsRf x2 on x3.ecshopid = x2.ecshopid and x.skuid = x2.skuid
and x.ecgoodsid = x2.ecgoodsid and x.entid = x2.entid
where a.goodsid = x2.goodsid
#__sql += " and x.billno in (" + billnoList + ")"
)
group by a.whid,a.entid
) c on a.whid = c.whid and a.entid = c.entid
left join(
select a.whid,sum(a.basenum) as basenum from KK_ECWHBal a
where 1=1
and exists(select 1 from ecorderdt x
join ecordermt x3 on x.billno = x3.billno and x.entid = x3.entid
join ECGoodsDoc x1 on x.ecgoodsid = x1.ecgoodsid and x3.ecshopid = x1.ecshopid and x.entid = x1.entid
join ECGoodsRf x2 on x3.ecshopid = x2.ecshopid and x.skuid = x2.skuid
and x.ecgoodsid = x2.ecgoodsid and x.entid = x2.entid
join goodsdoc x4 on x2.goodsid = x4.goodsid and x2.entid = x4.entid
where a.goodscode = x4.goodscode
#__sql += " and x.billno in (" + billnoList + ")"
)
group by a.whid
) d on a.whid = d.whid
where a.entid= :_entid and a.beactive='Y'
order by a.WHCode
Selenium是一个自动化测试工具,主要用于网页自动化操作。在使用Selenium进行自动化测试或操作时,根据商品ID来选择是否点击勾选框,通常需要以下步骤: 1. 首先,需要确保页面已经加载完成,可以使用显式等待(Explicit Wait)或隐式等待(Implicit Wait)来等待页面元素加载。 2. 使用Selenium提供的定位器(如id, class, name, xpath, css_selector等)来定位到具体商品ID对应的勾选框元素。 3. 检查该勾选框元素的状态,可以通过元素的`is_selected()`方法来判断勾选是否已经被选中。 4. 如果需要点击勾选框,可以调用`click()`方法。如果已经选中则不点击,如果未选中则执行点击操作。 下面是一个简单的Python示例代码: ```python from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver = webdriver.Chrome() # 或者使用其他浏览器驱动 driver.get("http://example.com") # 替换成目标网页地址 try: # 等待商品元素加载 WebDriverWait(driver, 10).until( EC.presence_of_element_located((By.ID, "product_id")) # 替换成商品ID对应的元素定位器 ) # 定位到勾选框元素 checkbox = driver.find_element(By.ID, "checkbox_id") # 替换成勾选框的ID # 检查是否选中 if not checkbox.is_selected(): # 如果未选中,则执行点击操作 checkbox.click() finally: driver.quit() ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值