Commit ad699d4e authored by Sandy's avatar Sandy

选择仓库查询语句修改、界面bugfix

parent 87973485
......@@ -220,7 +220,8 @@
sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE ENABLED = 1 ORDER BY %@", tableStr, @"code"];
}
}else if([tableStr isEqualToString:GXF_BASECLASS_UserWAREHOUSE]){
sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE userUuid = '%@' AND ENABLED = 1", tableStr,[ICRUserUtil sharedInstance].userId];//@"4028b88150a987080150a987dce5007a"
//进仓库选择仓库页面第一次进入时查询的语句
sql = [NSString stringWithFormat:@"select * from %@ a where enabled = '1' and exists (select 1 from UserWarehouse b where b.warehouseUuid = a.uuid and b.userUuid = '%@' and b.enabled='1')", tableStr,[ICRUserUtil sharedInstance].userId];//@"4028b88150a987080150a987dce5007a"
}else if([tableStr isEqualToString:GXF_BASECLASS_VENDOR]){
if (titleStr.length > 0) {
sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE (NAME LIKE '%%%@%%' or CODE LIKE '%%%@%%') AND ENABLED = 1 ORDER BY %@", tableStr,titleStr,titleStr, @"code"];
......@@ -229,9 +230,10 @@
}
}else {
if (titleStr.length > 0) {
sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE NAME LIKE '%%%@%%' or CODE LIKE '%%%@%%' ORDER BY %@", tableStr,titleStr,titleStr, @"uuid"];
// NSString *aaa = [NSString stringWithFormat:@"select * from %@ a where enabled = '1' and exists (select 1 from UserWarehouse b where b.warehouseUuid = a.uuid and b.userUuid = '%@' and b.enabled='1')", titleStr,[ICRUserUtil sharedInstance].userId];
sql = [NSString stringWithFormat:@"SELECT * from %@ a WHERE (NAME LIKE '%%%@%%' or CODE LIKE '%%%@%%') AND enabled = '1' AND EXISTS (SELECT 1 FROM UserWarehouse b WHERE b.warehouseUuid = a.uuid AND b.userUuid = '%@' AND b.enabled='1')", tableStr, titleStr, titleStr,[ICRUserUtil sharedInstance].userId];
}else{
sql = [NSString stringWithFormat:@"SELECT * FROM %@ ORDER BY %@", tableStr, @"uuid"];
sql = [NSString stringWithFormat:@"select * from %@ a where enabled = '1' and exists (select 1 from UserWarehouse b where b.warehouseUuid = a.uuid and b.userUuid = '%@' and b.enabled='1')", tableStr,[ICRUserUtil sharedInstance].userId];
}
}
return [db executeQuery:sql];
......
......@@ -22,7 +22,7 @@
//记录更新时间
self.tableView.header.lastUpdatedTimeKey = ChooseWarehouseUpdateDate;
self.title = @"选择仓库";
[self fetchDataList:@"" tableStr:GXF_BASECLASS_UserWAREHOUSE];
[self fetchDataList:@"" tableStr:GXF_BASECLASS_WAREHOUSE];
}
-(void)getBaseDataFromServerWithStartDate:(NSString *)startDate{
......
......@@ -133,7 +133,8 @@ typedef enum : NSUInteger {
}
self.receiverNameLabel.text = self.transfer.lastModify_operName;
self.receiveTimeLabel.text = self.transfer.lastModify_time;
//备注
self.receiveTimeLabel.text = [NSString stringWithFormat:@"%@",self.transfer.note?self.transfer.note:@"无"];
self.purchaseLabel.text = [NSString stringWithFormat:@"转运单%@",self.transfer.billnumber];
self.warehouseLabel.text = [IBTCommon checkString:self.transfer.warehouseName];
self.rwarehouseLabel.text = [IBTCommon checkString:self.transfer.rwarehouseName];
......@@ -277,9 +278,10 @@ typedef enum : NSUInteger {
}
else if(i == 8){
self.receiverNameLabel = rightLabel;
}else if (i == 9){
self.receiveTimeLabel = rightLabel;
}
// else if (i == 9){
// self.receiveTimeLabel = rightLabel;
// }
else if(i == leftArr.count - 1){
rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment