Browse Source

no message

master
lh 8 years ago
parent
commit
2c78c2f6a2
2 changed files with 56 additions and 0 deletions
  1. +1
    -0
      app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java
  2. +55
    -0
      app/src/main/java/com/qhclh/ytzh/work/productiondaily/ProductiondailyActivity.java

+ 1
- 0
app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java View File

@ -12,6 +12,7 @@ public class RpcUrl {
public static String DayProductRpc_Query = "/MainSystem/B3_ZhongHui/Rpcs/DayProductRpc/Query";
public static String DayProductRpc_Query_canshu = "/MainSystem/B3UnitedInfos/Rpcs/RpcQueryObj";
public static String DayProductRpc_Query_fanhui = "/MainSystem/B3PoultryBreed/BO/DayProduct";
public static String DayProductRpc_Query_order = "/MainSystem/B3UnitedInfos/Rpcs/SortExpression";
public static String DayProductRpc_New = "/MainSystem/B3_ZhongHui/Rpcs/DayProductRpc/New";
public static String DayProductRpc_Insert = "/MainSystem/B3_ZhongHui/Rpcs/DayProductRpc/Insert";


+ 55
- 0
app/src/main/java/com/qhclh/ytzh/work/productiondaily/ProductiondailyActivity.java View File

@ -161,6 +161,61 @@ public class ProductiondailyActivity extends BaseActivity implements CalendarDia
@Override
public void onStartCalendarClick(Date date) {
showToast(DateTimeUtil.FormatDate(date));
// DayProductRpcQueryByt(date);
}
private void DayProductRpcQueryByt(Date time) {
ViewOnClickTask DayProductRpcQuerytTask = new ViewOnClickTask(this,"加载中...") {
List<RpcObject> rpcobj;
@Override
protected void successUI() {
int size = rpcobj.size();
productionDailyBeanList.clear();
if (size<=0){
return;
}
for (int i=0;i<size;i++){
productionDailyBeanList.add(new ProductionDailyBean(rpcobj.get(i).getLong("ID")
,rpcobj.get(i).getString("Batch_Name"),rpcobj.get(i).getString("BreedFactory_Name")
,DateTimeUtil.getYMD2(rpcobj.get(i).getDate("Date"))));
}
productiondailyAdapter = new ProductiondailyAdapter(ProductiondailyActivity.this,productionDailyBeanList);
lv_productiondaily.setAdapter(productiondailyAdapter);
}
@Override
public Object call() throws Exception {
RpcObject queryObj = RpcObject.create(RpcUrl.DayProductRpc_Query_canshu);
// queryObj.setInt("PageSize",10);
// queryObj.setInt("CurrentPageIndex",0);
List<Object> select = queryObj.getList("Select");
select.add("ID");
// select.add("CreateTime");
// select.add("CreateUser_Name");
select.add("Batch_ID");
select.add("Batch_Name");
select.add("BreedFactory_ID");
select.add("BreedFactory_Name");
select.add("Date");
// select.add("Remark");
// select.add("AccountingUnit_ID");
// select.add("AccountingUnit_Name");
// Map<Object, Object> where = queryObj.getMap("Where");
// where.put("",time);
// List<Object> orderList = queryObj.getList("OrderBy");
// RpcObject orderBy1 = RpcObject.create(RpcUrl.DayProductRpc_Query_order);
// orderBy1.setString("Name", "CreateTime");
// orderBy1.setBoolean("Desc", true);
// orderList.add(orderBy1);
JsonRpcResult result = RpcFacade.rpcCall(RpcUrl.DayProductRpc_Query,queryObj);
rpcobj = result.getRpcObjectList(RpcUrl.DayProductRpc_Query_fanhui);
return null;
}
};
DayProductRpcQuerytTask.execute();
}
@Override


Loading…
Cancel
Save