queryString.append("select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'");
queryString.append(" and DepotId='"+dId+"'");
queryString.append(" and MaterialId ="+MId+" and jsh_depothead.OperTime >='"+MonthTime+"-01 00:00:00' and jsh_depothead.OperTime <='"+MonthTime+"-31 59:59:59' ");
queryString.append("select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='"+type+"'");
if(ProjectId!=null){
queryString.append(" and DepotId='"+ProjectId+"'");
}
queryString.append(" and MaterialId ="+MId+" and jsh_depothead.OperTime <'"+MonthTime+"-01 00:00:00' ");
queryString.append("select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='"+type+"'");
if(ProjectId!=null){
queryString.append(" and DepotId='"+ProjectId+"'");
}
queryString.append(" and MaterialId ="+MId+" and jsh_depothead.OperTime >='"+MonthTime+"-01 00:00:00' and jsh_depothead.OperTime <='"+MonthTime+"-31 59:59:59' ");