_strSql=" insert into [t_wmsGoods] (goodsid,ownercode,length,width,height,weight,bigCount,goodsType)"
+" select goodsid,entid,chang,kuan,gao,weight,bigCount,locType from v_erpGoodLocType v where not exists(select 1 from t_wmsGoods where goodsId = v.goodsId ) ;";
sqlCmd.CommandText=_strSql;
break;
case400:
_strSql=" SELECT * FROM [t_SkuValue] where skuid = @skuId "
+" and exists(select 1 from t_LotAtt where lotid =@lotId and attname =@attName "
_strSql="select * from v_wmsgoods g where ( barcode = @barcode or goodsid =@barcode) or exists ( SELECT 1 FROM v_erpGoodsBarcods WHERE goodsId =g.goodsId and barcode = @barcode)";
_strSql="SELECT isnull(sum(count),0) as repCnt FROM [t_wmsOutPickDetail] a where createtime +1>GETDATE() and skuid =@skuId and exists (select 1 from t_wmsoutpickrequest where pickorderno =a.pickorderno and ordertype=3) and state<5 "
+";"
+"SELECT isnull(sum(bulkCount),0) as bulkCnt FROM [t_wmsOutPickDetail] a where createtime +1>GETDATE() and skuid =@skuId and customerId >0 and not exists(select 1 from t_wmsOutPickPort where pickDetailId =a.id)";
// _strSql = "SELECT * FROM [t_wmsOutPickDetail] a where state =2 and not exists(select 1 from [t_wmsOutPickDetail] where skuid =a.skuid and customerid is null and state <3 and createtime +1 >getdate());";
_strSql=" SELECT goodsId,skuId,batch,sum(bulkCount) as count"+
" FROM [t_wmsOutPickDetail] a where state =2 and createtime +1 >getdate()"+
" and not exists(select 1 from [t_wmsOutPickDetail] where skuid =a.skuid and customerid is null and state <3 and createtime +1 >getdate())"+