Разработка автоматизированной системы контроля процессов обслуживания кредитовых ведомств ОАО "РЖД"
Система контроля процессов обслуживания кредитовых ведомств (воинских министерств) в среде ОАО "РЖД". Требования к функциям, выполняемым системой. Идентификация ключевых абстракций. Обоснование компоновки Web-страницы. Формирование запроса к системе.
Рубрика | Программирование, компьютеры и кибернетика |
Вид | дипломная работа |
Язык | русский |
Дата добавления | 15.10.2013 |
Размер файла | 3,4 M |
Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже
Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.
ItogKolprAll = rsAll.getLong(8)+ItogKolprAll;
vcAll.setMkolpr(integerFormat(rsAll.getLong(9)));
ItogMkolprAll = rsAll.getLong(9)+ItogMkolprAll;
vcAll.setSumbag(MainFormat(rsAll.getLong(10),mkoef));
ItogSumbagAll = rsAll.getLong(10)+ItogSumbagAll;
vcAll.setMsumbag(MainFormat(rsAll.getLong(11),mkoef));
ItogMsumbagAll =rsAll.getLong(11)+ItogMsumbagAll;
vcAll.setKolbag(integerFormat(rsAll.getLong(12)));
ItogKolbagAll =rsAll.getLong(12)+ItogKolbagAll;
vcAll.setMkolbag(integerFormat(rsAll.getLong(13)));
ItogMkolbagAll =rsAll.getLong(13)+ItogMkolbagAll;
vcAll.setKomsbv(MainFormat(rsAll.getLong(14),mkoef));
ItogKomsbvAll =rsAll.getLong(14)+ItogKomsbvAll;
vcAll.setMkomsbv(MainFormat(rsAll.getLong(15),mkoef));
ItogMkomsbvAll = rsAll.getLong(15)+ItogMkomsbvAll;
vcAll.setKolv(integerFormat(rsAll.getLong(16)));
ItogKolvAll = rsAll.getLong(16)+ItogKolvAll;
vcAll.setMkolv(integerFormat(rsAll.getLong(17)));
ItogMkolvAll = rsAll.getLong(17)+ItogMkolvAll;
tableRowsAll.add(vcAll);
}
}
//========================
if(min_query.equals("ЛЮБОЙ") && (!ItogSumpdAllS.equals("x"))) {
vcAll = new VoinClass();
vcAll.setMin_name("");
vcAll.setMin("ИТОГО");
vcAll.setOplata (MainFormat(ItogOplataAll, mkoef));
vcAll.setMoplata(MainFormat (ItogMoplataAll, mkoef));
vcAll.setSumpd(MainFormat(ItogSumpdAll, mkoef));
vcAll.setMsumpd(MainFormat(ItogMsumpdAll,mkoef));
vcAll.setKolpas(integerFormat(ItogKolpasAll));
vcAll.setMkolpas(integerFormat(ItogMkolpasAll));
vcAll.setSumpr(MainFormat(ItogSumprAll,mkoef));
vcAll.setMsumpr(MainFormat(ItogMsumprAll,mkoef));
vcAll.setKolpr(integerFormat(ItogKolprAll));
vcAll.setMkolpr(integerFormat(ItogMkolprAll));
vcAll.setSumbag(MainFormat(ItogSumbagAll,mkoef));
vcAll.setMsumbag(MainFormat(ItogMsumbagAll,mkoef));
vcAll.setKolbag(integerFormat(ItogKolbagAll));
vcAll.setMkolbag(integerFormat(ItogMkolbagAll));
vcAll.setKomsbv(MainFormat(ItogKomsbvAll,mkoef));
vcAll.setMkomsbv(MainFormat(ItogMkomsbvAll,mkoef));
vcAll.setKolv(integerFormat(ItogKolvAll));
vcAll.setMkolv(integerFormat(ItogMkolvAll));
tableRowsAll.add(vcAll);
}
//=================
}
else
if ((!agent.equals("**")) && (!per.equals("**")))
{
request.setAttribute("breakpoints", "1");
String query = "";
//=====================
if (data == null) {
errors
.add("errorNoSession", new ActionError(
"error.NoSession"));
throw new Exception();
}
if (data.equals("odat")) {
year = systemdata.substring(systemdata.length() - 4, systemdata.length());
month = systemdata.substring(systemdata.indexOf(".") + 1, systemdata.indexOf(".") + 3);
day = systemdata.substring(0, 2);
}
if(!data.equals("fdat") && (!data.equals("f_month"))){
dohod_data = year+"-" + month +"-" + day;
schet_data = day+"-" + month +"-" +year;
}
if (min.equals("*"))
{
//=============================
query = "SELECT B.DOR, B.MIN, A.NAZVD, SUM(B.SUMPD), SUM(B.MSUMPD), SUM(B.KOLPAS), SUM(B.MKOLPAS), " +
" SUM(B.SUMPR), SUM(B.MSUMPR), SUM(B.KOLPR), SUM(B.MKOLPR), SUM(B.SUMBAG), SUM(B.MSUMBAG), SUM(B.KOLBAG), SUM(B.MKOLBAG), " +
" SUM(B.KOMSBV), SUM(B.MKOMSBV), SUM(B.KOLV), SUM(B.MKOLV), D.NAME " +
" FROM EXPBD.DOR A, ";
query +=" (SELECT DISTINCT E.NOMMV, E.NAME ,T.GOS_ABD FROM EXPBD.LGOT E ,EXPBD.SERV T ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " WHERE E.DATAN<='" +dohod_data+ "' AND E.DATAOT>='" +dohod_data+ "' AND E.NOMMV<>0 " +
" AND E.GOS=T.GOS_ABD) D, " +abds+ ".DOHODV B ";
query += " WHERE B.DATA = ? AND B.MES = '" +month+ "' ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " WHERE E.DATAN<='" +data_end+ "' AND E.DATAOT>='" +data_end+ "' AND E.NOMMV<>0 " +
" AND E.GOS=T.GOS_ABD) D, " +abds+ ".DOHODV B ";
query += " WHERE B.DATA <='" +data_end+ "' AND B.DATA >='" +data_begin+ "' AND B.MES = '" +fmonth+ "' ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " WHERE E.DATAN<'" +data_end+ "' AND E.DATAOT>='" +data_end+ "' AND E.NOMMV<>0 " +
" AND E.GOS=T.GOS_ABD) D, " +abds+ ".DOHODV B ";
query += " WHERE B.DATA <'" +data_end+ "' AND B.DATA >='" +data_begin+ "' AND B.MES = '" +fmonth+ "' ";
}
if(data.equals("f_month")){
query += " WHERE E.DATAN<'" +data_end+ "' AND E.DATAOT>='" +data_end+ "' AND E.NOMMV<>0 " +
" AND E.GOS=T.GOS_ABD) D, " +abds+ ".DOHODV B ";
query += " WHERE B.DATA <'" +data_end+ "' AND B.DATA >='" +data_begin+ "' AND B.MES = '" +f_fmonth+ "' ";
}
query +=" AND (B.SUMPD<>0 OR B.MSUMPD<>0 OR B.KOLPAS<>0 OR B.MKOLPAS<>0 OR B.SUMPR<>0 OR " +
" B.MSUMPR<>0 OR B.KOLPR<>0 OR B.MKOLPR<>0 OR B.SUMBAG<>0 OR B.MSUMBAG<>0 OR " +
" B.KOLBAG<>0 OR B.MKOLBAG<>0 OR B.KOMSBV<>0 OR B.MKOMSBV<>0 OR B.KOLV<>0 OR " +
" B.MKOLV<>0) ";
query +=" AND B.MIN = D.NOMMV AND A.KODD = B.DOR AND ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " A.DATAN<='" +dohod_data+ "' AND A.DATAK>='" +dohod_data+ "' ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " A.DATAN<='" +data_end+ "' AND A.DATAK>='" +data_end+ "' ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " A.DATAN<'" +data_end+ "' AND A.DATAK>='" +data_end+ "' ";
}
if(data.equals("f_month")){
query += " A.DATAN<'" +data_end+ "' AND A.DATAK>='" +data_end+ "' ";
}
if (vis1!=null && vis1.equals("1")){
query += " AND A.KODG = '20' ";
}
if (dor!= null && !ust.equals("all_set"))
{
query += " AND B.DOR = ? ";
}
if (!min.equals("*"))
query += "AND B.MIN = ? ";
if (!agent.equals("*"))
{
query+= " AND B.AGENT = ? ";
}
if (!per.equals("*"))
{
query += " AND B.SKP = ? ";
}
query += " GROUP BY B.DOR, B.MIN, A.NAZVD, D.NAME ";
query += " ORDER BY B.DOR, A.NAZVD, B.MIN, D.NAME ";
int schet = 1;
pstmt = connec.prepareStatement(query);
if(!data.equals("fdat")&& (!data.equals("f_month"))){
pstmt.setString(schet++,dohod_data.toString());
}
if (dor!= null && !ust.equals("all_set"))
{
pstmt.setString(schet++,dor.toString());
dor_query = dor.toString();
}
if (min!= null && !min.equals("*")){
pstmt.setString(schet++,min.toString())
}
if (agent!= null && !agent.equals("*")){
pstmt.setString(schet++,agent.toString());
}
if (per!= null && !per.equals("*")){
pstmt.setString(schet++,per.toString());
}
}
else if (!min.equals("*")){
query = "SELECT B.DOR, B.MIN, A.NAZVD, SUM(B.SUMPD), SUM(B.MSUMPD), SUM(B.KOLPAS), SUM(B.MKOLPAS), " +
" SUM(B.SUMPR), SUM(B.MSUMPR), SUM(B.KOLPR), SUM(B.MKOLPR), SUM(B.SUMBAG), SUM(B.MSUMBAG), SUM(B.KOLBAG), SUM(B.MKOLBAG), " +
" SUM(B.KOMSBV), SUM(B.MKOMSBV), SUM(B.KOLV), SUM(B.MKOLV) " +
" FROM " +abds+ ".DOHODV B, " +
" EXPBD.DOR A ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " WHERE B.DATA = ? AND B.MES = '" +month+ "' AND ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " WHERE B.DATA <='" +data_end+ "' AND B.DATA >='" +data_begin+ "' AND B.MES = '" +fmonth+ "' AND ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " WHERE B.DATA <'" +data_end+ "' AND B.DATA >='" +data_begin+ "' AND B.MES = '" +fmonth+ "' AND ";
}
if(data.equals("f_month")){
query += " WHERE B.DATA <'" +data_end+ "' AND B.DATA >='" +data_begin+ "' AND B.MES = '" +f_fmonth+ "' AND ";
}
query += " (B.SUMPD<>0 OR B.MSUMPD<>0 OR B.KOLPAS<>0 OR B.MKOLPAS<>0 OR B.SUMPR<>0 OR " +
" B.MSUMPR<>0 OR B.KOLPR<>0 OR B.MKOLPR<>0 OR B.SUMBAG<>0 OR B.MSUMBAG<>0 OR " +
" B.KOLBAG<>0 OR B.MKOLBAG<>0 OR B.KOMSBV<>0 OR B.MKOMSBV<>0 OR B.KOLV<>0 OR " +
" B.MKOLV<>0) " +
" AND A.KODD = B.DOR AND ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += "A.DATAN<='" +dohod_data+ "' AND A.DATAK>='" +dohod_data+ "' ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += "A.DATAN<='" +data_end+ "' AND A.DATAK>='" +data_end+ "' ";
}
if(data.equals("fdat") && fday.equals("06")){
query += "A.DATAN<'" +data_end+ "' AND A.DATAK>='" +data_end+ "' ";
}
(data.equals("f_month")){
query += "A.DATAN<'" +data_end+ "' AND A.DATAK>='" +data_end+ "' ";
}
if (vis1!=null && vis1.equals("1")){
query += " AND A.KODG = '20' ";
}
if (dor!= null && !ust.equals("all_set"))
{
query += " AND B.DOR = ? ";
}
if (!min.equals("*"))
query += "AND B.MIN = ? ";
if (!agent.equals("*"))
{
query+= " AND B.AGENT = ? ";
}
if (!per.equals("*"))
{
query += " AND B.SKP = ? ";
}
query += "GROUP BY B.DOR, A.NAZVD, B.MIN ";
query += " ORDER BY B.DOR, A.NAZVD, B.MIN ";
int schet = 1;
pstmt = connec.prepareStatement(query);
if(!data.equals("fdat") && (!data.equals("f_month"))){
pstmt.setString(schet++,dohod_data.toString());
}
if (dor!= null && !ust.equals("all_set"))
{
pstmt.setString(schet++,dor.toString());
dor_query = dor.toString();
}
if (min!= null && !min.equals("*")){
pstmt.setString(schet++,min.toString());
}
if (agent!= null && !agent.equals("*")){
pstmt.setString(schet++,agent.toString());
}
if (per!= null && !per.equals("*")){
pstmt.setString(schet++,per.toString());
}
}
request.setAttribute("breakpoints", "2");
rs = pstmt.executeQuery();
request.setAttribute("breakpoints", "3");
ItogSumpdS = "x";
int kol = 0;
int schet_row_dor = 0;
long proverka = 0;
j=0;
//===============
while (rs.next()) {
if (FirstDor.equals("")){
FirstDor = rs.getString(1);
DorFirst = FirstDor;
}
if (NazvFirstDor.equals("")){
NazvFirstDor = rs.getString(3);
}
if (!DorFirst.equals(rs.getString(1)))
{
//===
if ((ob_minNo[j]!= null) && (min.equals("*"))&& (!obName.equals("")) && (chek_str) && (Long.parseLong(obName)<Long.parseLong(ob_minNo[j]))){
while(ob_minNo[j]!=null){
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
vc.setMin(ob_minNo[j]);
vc.setDor(obDor);
vc.setNazvd(obNazvd);
vc.setOplata("0");
vc.setMoplata("0");
vc.setSumpd("0");
ItogSumpdS=Long.toString(ItogSumpd);
vc.setMsumpd("0");
vc.setKolpas("0");
vc.setMkolpas("0");
vc.setSumpr("0");
vc.setMsumpr("0");
vc.setKolpr("0");
vc.setMkolpr("0");
vc.setSumbag("0");
vc.setMsumbag("0");
vc.setKolbag("0");
vc.setMkolbag("0");
vc.setKomsbv("0");
vc.setMkomsbv("0");
vc.setKolv("0");
vc.setMkolv("0");
tableRows.add(vc);
j++;
schet_row_dor++;
schet_row_dors = Long.toString(schet_row_dor);
}
}
//===
if(!min_query.equals("Любой")) {
schet_row = schet_row+1;
schet_rows= Long.toString(schet_row);
}
if(min_query.equals("ЛЮБОЙ")) {
vc = new VoinClass();
vc.setDor(DorFirst);
vc.setMin_name("");
vc.setMin("ИТОГО");
vc.setOplata(MainFormat(ItogOplata, mkoef));
SetItogOplata = SetItogOplata + ItogOplata;
vc.setMoplata(MainFormat(ItogMoplata, mkoef));
SetItogMoplata = SetItogMoplata + ItogMoplata;
vc.setSumpd(MainFormat(ItogSumpd,mkoef));
SetItogSumpd = SetItogSumpd + ItogSumpd;
vc.setMsumpd(MainFormat(ItogMsumpd,mkoef));
SetItogMsumpd = SetItogMsumpd + ItogMsumpd;
vc.setKolpas(integerFormat(ItogKolpas));
SetItogKolpas = SetItogKolpas + ItogKolpas;
vc.setMkolpas(integerFormat(ItogMkolpas));
SetItogMkolpas = SetItogMkolpas + ItogMkolpas;
vc.setSumpr(MainFormat(ItogSumpr,mkoef));
SetItogSumpr = SetItogSumpr + ItogSumpr;
vc.setMsumpr(MainFormat(ItogMsumpr, mkoef));
SetItogMsumpr = SetItogMsumpr + ItogMsumpr;
vc.setKolpr(integerFormat(ItogKolpr));
SetItogKolpr = SetItogKolpr + ItogKolpr;
vc.setMkolpr(integerFormat(ItogMkolpr));
SetItogMkolpr = SetItogMkolpr + ItogMkolpr;
vc.setSumbag(MainFormat(ItogSumbag, mkoef));
SetItogSumbag = SetItogSumbag + ItogSumbag;
vc.setMsumbag(MainFormat(ItogMsumbag, mkoef));
SetItogMsumbag = SetItogMsumbag + ItogMsumbag;
vc.setKolbag(integerFormat(ItogKolbag));
SetItogKolbag = SetItogKolbag + ItogKolbag;
vc.setMkolbag(integerFormat(ItogMkolbag));
SetItogMkolbag = SetItogMkolbag + ItogMkolbag;
vc.setKomsbv(MainFormat(ItogKomsbv, mkoef));
SetItogKomsbv = SetItogKomsbv + ItogKomsbv;
vc.setMkomsbv(MainFormat(ItogMkomsbv, mkoef));
SetItogMkomsbv = SetItogMkomsbv + ItogMkomsbv;
vc.setKolv(integerFormat(ItogKolv));
SetItogKolv = SetItogKolv + ItogKolv;
vc.setMkolv(integerFormat(ItogMkolv));
SetItogMkolv = SetItogMkolv + ItogMkolv;
tableRows.add(vc);
schet_row = schet_row+1;
schet_rows = Long.toString(schet_row);
ItogOplata = 0;
ItogMoplata = 0;
ItogSumpd = 0;
ItogMsumpd = 0;
ItogKolpas = 0;
ItogMkolpas = 0;
ItogSumpr = 0;
ItogMsumpr = 0;
ItogKolpr = 0;
ItogMkolpr = 0;
ItogSumbag = 0;
ItogMsumbag = 0;
ItogKolbag = 0;
ItogMkolbag = 0;
ItogKomsbv = 0;
ItogMkomsbv = 0;
ItogKolv = 0;
ItogMkolv = 0;
kol=0;
j=0;
}
}
kol=kol+1;
//===
if((chek_str)&& (min.equals("*"))){
proverka = rs.getLong(2);
while((rs.getLong(2)>Long.parseLong(ob_minNo[j])) && (ob_minNo[j+1]!=null)){
if (rs.getLong(2)>Long.parseLong(ob_minNo[j])){
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
vc.setDor(rs.getString(1));
vc.setMin(ob_minNo[j]);
vc.setNazvd(rs.getString(3));
vc.setOplata("0");
vc.setMoplata("0");
vc.setSumpd("0");
ItogSumpdS=Long.toString(ItogSumpd);
vc.setMsumpd("0");
vc.setKolpas("0");
vc.setMkolpas("0");
vc.setSumpr("0");
vc.setMsumpr("0");
vc.setKolpr("0");
vc.setMkolpr("0");
vc.setSumbag("0");
vc.setMsumbag("0");
vc.setKolbag("0");
vc.setMkolbag("0");
vc.setKomsbv("0");
vc.setMkomsbv("0");
vc.setKolv("0");
vc.setMkolv("0");
tableRows.add(vc);
j++;
schet_row_dor++;
schet_row_dors = Long.toString(schet_row_dor);
}
}
if (rs.getLong(2)<Long.parseLong(ob_minNo[j])){
proverka = rs.getLong(2);
vc = new VoinClass();
if(min.equals("*"))
vc.setMin_name(rs.getString(20));
else
vc.setMin_name("");
vc.setDor(rs.getString(1));
obDor = rs.getString(1);
vc.setMin(rs.getString(2));
obName = rs.getString(2);
vc.setNazvd(rs.getString(3));
obNazvd = rs.getString(3);
vc.setOplata(MainFormat(rs.getLong(4)+ rs.getLong(12), mkoef));
ItogOplata = rs.getLong(4)+ rs.getLong(12) + ItogOplata;
ItogOplataMin = rs.getLong(4)+ rs.getLong(12) + ItogOplataMin;
vc.setMoplata (MainFormat(rs.getLong(5) + rs.getLong(13), mkoef));
ItogMoplata = rs.getLong(5) + rs.getLong(13) + ItogMoplata;
ItogMoplataMin = rs.getLong(5) + rs.getLong(13) + ItogMoplataMin;
vc.setSumpd(MainFormat(rs.getLong(4)-rs.getLong(8), mkoef));
ItogSumpd = rs.getLong(4)-rs.getLong(8)+ ItogSumpd;
ItogSumpdS=Long.toString(ItogSumpd);
ItogSumpdMin =rs.getLong(4)-rs.getLong(8)+ ItogSumpdMin;
vc.setMsumpd(MainFormat(rs.getLong(5)-rs.getLong(9), mkoef));
ItogMsumpd = rs.getLong(5)-rs.getLong(9)+ ItogMsumpd;
ItogMsumpdMin = rs.getLong(5)-rs.getLong(9)+ ItogMsumpdMin;
vc.setKolpas(integerFormat(rs.getLong(6)-rs.getLong(10)));
ItogKolpas = rs.getLong(6)-rs.getLong(10) + ItogKolpas;
ItogKolpasMin =rs.getLong(6)-rs.getLong(10) + ItogKolpasMin;
vc.setMkolpas(integerFormat(rs.getLong(7)-rs.getLong(11)));
ItogMkolpas = rs.getLong(7)-rs.getLong(11) + ItogMkolpas;
ItogMkolpasMin =rs.getLong(7)-rs.getLong(11)+ ItogMkolpasMin;
vc.setSumpr(MainFormat(rs.getLong(8), mkoef));
ItogSumpr = rs.getLong(8) + ItogSumpr;
ItogSumprMin = rs.getLong(8) + ItogSumprMin;
vc.setMsumpr(MainFormat(rs.getLong(9), mkoef));
ItogMsumpr = rs.getLong(9) + ItogMsumpr;
ItogMsumprMin = rs.getLong(9) + ItogMsumprMin;
vc.setKolpr(integerFormat(rs.getLong(10)));
ItogKolpr = rs.getLong(10) + ItogKolpr;
ItogKolprMin = rs.getLong(10) + ItogKolprMin;
vc.setMkolpr(integerFormat(rs.getLong(11)));
ItogMkolpr = rs.getLong(11) + ItogMkolpr;
ItogMkolprMin = rs.getLong(11) + ItogMkolprMin;
vc.setSumbag(MainFormat(rs.getLong(12), mkoef));
ItogSumbag = rs.getLong(12) + ItogSumbag;
ItogSumbagMin = rs.getLong(12) + ItogSumbagMin;
vc.setMsumbag(MainFormat(rs.getLong(13), mkoef));
ItogMsumbag = rs.getLong(13) + ItogMsumbag;
ItogMsumbagMin = rs.getLong(13) + ItogMsumbagMin;
vc.setKolbag(integerFormat(rs.getLong(14)));
ItogKolbag = rs.getLong(14) + ItogKolbag;
ItogKolbagMin = rs.getLong(14) + ItogKolbagMin;
vc.setMkolbag(integerFormat(rs.getLong(15)));
ItogMkolbag = rs.getLong(15) + ItogMkolbag;
ItogMkolbagMin = rs.getLong(15) + ItogMkolbagMin;
vc.setKomsbv(MainFormat(rs.getLong(16), mkoef));
ItogKomsbv = rs.getLong(16) + ItogKomsbv;
ItogKomsbvMin = rs.getLong(16) + ItogKomsbvMin;
vc.setMkomsbv(MainFormat(rs.getLong(17), mkoef));
ItogMkomsbv = rs.getLong(17) + ItogMkomsbv;
ItogMkomsbvMin = rs.getLong(17) + ItogMkomsbvMin;
vc.setKolv(integerFormat(rs.getLong(18)));
ItogKolv = rs.getLong(18) + ItogKolv;
ItogKolvMin = rs.getLong(18) + ItogKolvMin;
vc.setMkolv(integerFormat(rs.getLong(19)));
ItogMkolv = rs.getLong(19) + ItogMkolv;
ItogMkolvMin = rs.getLong(19) + ItogMkolvMin;
tableRows.add(vc);
schet_row_dor++;
schet_row_dors = Long.toString(schet_row_dor);
}
if (rs.getLong(2)==Long.parseLong(ob_minNo[j])){
proverka = rs.getLong(2);
vc = new VoinClass();
if(min.equals("*"))
vc.setMin_name(rs.getString(20));
else
vc.setMin_name("");
vc.setDor(rs.getString(1));
obDor = rs.getString(1);
vc.setMin(rs.getString(2));
obName = rs.getString(2);
vc.setNazvd(rs.getString(3));
obNazvd = rs.getString(3);
vc.setOplata(MainFormat(rs.getLong(4)+ rs.getLong(12), mkoef));
ItogOplata = rs.getLong(4)+ rs.getLong(12) + ItogOplata;
ItogOplataMin = rs.getLong(4)+ rs.getLong(12) + ItogOplataMin;
vc.setMoplata (MainFormat(rs.getLong(5) + rs.getLong(13), mkoef));
ItogMoplata = rs.getLong(5) + rs.getLong(13) + ItogMoplata;
ItogMoplataMin = rs.getLong(5) + rs.getLong(13) + ItogMoplataMin;
vc.setSumpd(MainFormat(rs.getLong(4)-rs.getLong(8), mkoef));
ItogSumpd = rs.getLong(4)-rs.getLong(8)+ ItogSumpd;
ItogSumpdS=Long.toString(ItogSumpd);
ItogSumpdMin =rs.getLong(4)-rs.getLong(8)+ ItogSumpdMin;
vc.setMsumpd(MainFormat(rs.getLong(5)-rs.getLong(9), mkoef));
ItogMsumpd = rs.getLong(5)-rs.getLong(9)+ ItogMsumpd;
ItogMsumpdMin = rs.getLong(5)-rs.getLong(9)+ ItogMsumpdMin;
vc.setKolpas(integerFormat(rs.getLong(6)-rs.getLong(10)));
ItogKolpas = rs.getLong(6)-rs.getLong(10) + ItogKolpas;
ItogKolpasMin =rs.getLong(6)-rs.getLong(10) + ItogKolpasMin;
vc.setMkolpas(integerFormat(rs.getLong(7)-rs.getLong(11)));
ItogMkolpas = rs.getLong(7)-rs.getLong(11) + ItogMkolpas;
ItogMkolpasMin =rs.getLong(7)-rs.getLong(11)+ ItogMkolpasMin;
vc.setSumpr(MainFormat(rs.getLong(8), mkoef));
ItogSumpr = rs.getLong(8) + ItogSumpr;
ItogSumprMin = rs.getLong(8) + ItogSumprMin;
vc.setMsumpr(MainFormat(rs.getLong(9), mkoef));
ItogMsumpr = rs.getLong(9) + ItogMsumpr;
ItogMsumprMin = rs.getLong(9) + ItogMsumprMin;
vc.setKolpr(integerFormat(rs.getLong(10)));
ItogKolpr = rs.getLong(10) + ItogKolpr;
ItogKolprMin = rs.getLong(10) + ItogKolprMin;
vc.setMkolpr(integerFormat(rs.getLong(11)));
ItogMkolpr = rs.getLong(11) + ItogMkolpr;
ItogMkolprMin = rs.getLong(11) + ItogMkolprMin;
vc.setSumbag(MainFormat(rs.getLong(12), mkoef));
ItogSumbag = rs.getLong(12) + ItogSumbag;
ItogSumbagMin = rs.getLong(12) + ItogSumbagMin;
vc.setMsumbag(MainFormat(rs.getLong(13), mkoef));
ItogMsumbag = rs.getLong(13) + ItogMsumbag;
ItogMsumbagMin = rs.getLong(13) + ItogMsumbagMin;
vc.setKolbag(integerFormat(rs.getLong(14)));
ItogKolbag = rs.getLong(14) + ItogKolbag;
ItogKolbagMin = rs.getLong(14) + ItogKolbagMin;
vc.setMkolbag(integerFormat(rs.getLong(15)));
ItogMkolbag = rs.getLong(15) + ItogMkolbag;
ItogMkolbagMin = rs.getLong(15) + ItogMkolbagMin;
vc.setKomsbv(MainFormat(rs.getLong(16), mkoef));
ItogKomsbv = rs.getLong(16) + ItogKomsbv;
ItogKomsbvMin = rs.getLong(16) + ItogKomsbvMin;
vc.setMkomsbv(MainFormat(rs.getLong(17), mkoef));
ItogMkomsbv = rs.getLong(17) + ItogMkomsbv;
ItogMkomsbvMin = rs.getLong(17) + ItogMkomsbvMin;
vc.setKolv(integerFormat(rs.getLong(18)));
ItogKolv = rs.getLong(18) + ItogKolv;
ItogKolvMin = rs.getLong(18) + ItogKolvMin;
vc.setMkolv(integerFormat(rs.getLong(19)));
ItogMkolv = rs.getLong(19) + ItogMkolv;
ItogMkolvMin = rs.getLong(19) + ItogMkolvMin;
tableRows.add(vc);
j++;
}
}
//====!chek_str====
if (!chek_str){
vc = new VoinClass();
if(min.equals("*"))
vc.setMin_name(rs.getString(20));
else
vc.setMin_name("");
vc.setDor(rs.getString(1));
vc.setMin(rs.getString(2));
vc.setNazvd(rs.getString(3));
vc.setOplata(MainFormat(rs.getLong(4)+ rs.getLong(12), mkoef));
ItogOplata = rs.getLong(4)+ rs.getLong(12) + ItogOplata;
ItogOplataMin = rs.getLong(4)+ rs.getLong(12) + ItogOplataMin;
vc.setMoplata (MainFormat(rs.getLong(5) + rs.getLong(13), mkoef));
ItogMoplata = rs.getLong(5) + rs.getLong(13) + ItogMoplata;
ItogMoplataMin = rs.getLong(5) + rs.getLong(13) + ItogMoplataMin;
vc.setSumpd(MainFormat(rs.getLong(4)-rs.getLong(8), mkoef));
ItogSumpd = rs.getLong(4)-rs.getLong(8)+ ItogSumpd;
ItogSumpdS=Long.toString(ItogSumpd);
ItogSumpdMin =rs.getLong(4)-rs.getLong(8)+ ItogSumpdMin;
vc.setMsumpd(MainFormat(rs.getLong(5)-rs.getLong(9), mkoef));
ItogMsumpd = rs.getLong(5)-rs.getLong(9)+ ItogMsumpd;
ItogMsumpdMin = rs.getLong(5)-rs.getLong(9)+ ItogMsumpdMin;
vc.setKolpas(integerFormat(rs.getLong(6)-rs.getLong(10)));
ItogKolpas = rs.getLong(6)-rs.getLong(10) + ItogKolpas;
ItogKolpasMin =rs.getLong(6)-rs.getLong(10) + ItogKolpasMin;
vc.setMkolpas(integerFormat(rs.getLong(7)-rs.getLong(11)));
ItogMkolpas = rs.getLong(7)-rs.getLong(11) + ItogMkolpas;
ItogMkolpasMin =rs.getLong(7)-rs.getLong(11)+ ItogMkolpasMin;
vc.setSumpr(MainFormat(rs.getLong(8), mkoef));
ItogSumpr = rs.getLong(8) + ItogSumpr;
ItogSumprMin = rs.getLong(8) + ItogSumprMin;
vc.setMsumpr(MainFormat(rs.getLong(9), mkoef));
ItogMsumpr = rs.getLong(9) + ItogMsumpr;
ItogMsumprMin = rs.getLong(9) + ItogMsumprMin;
vc.setKolpr(integerFormat(rs.getLong(10)));
ItogKolpr = rs.getLong(10) + ItogKolpr;
ItogKolprMin = rs.getLong(10) + ItogKolprMin;
vc.setMkolpr(integerFormat(rs.getLong(11)));
ItogMkolpr = rs.getLong(11) + ItogMkolpr;
ItogMkolprMin = rs.getLong(11) + ItogMkolprMin;
vc.setSumbag(MainFormat(rs.getLong(12), mkoef));
ItogSumbag = rs.getLong(12) + ItogSumbag;
ItogSumbagMin = rs.getLong(12) + ItogSumbagMin;
vc.setMsumbag(MainFormat(rs.getLong(13), mkoef));
ItogMsumbag = rs.getLong(13) + ItogMsumbag;
ItogMsumbagMin = rs.getLong(13) + ItogMsumbagMin;
vc.setKolbag(integerFormat(rs.getLong(14)));
ItogKolbag = rs.getLong(14) + ItogKolbag;
ItogKolbagMin = rs.getLong(14) + ItogKolbagMin;
vc.setMkolbag(integerFormat(rs.getLong(15)));
ItogMkolbag = rs.getLong(15) + ItogMkolbag;
ItogMkolbagMin = rs.getLong(15) + ItogMkolbagMin;
vc.setKomsbv(MainFormat(rs.getLong(16), mkoef));
ItogKomsbv = rs.getLong(16) + ItogKomsbv;
ItogKomsbvMin = rs.getLong(16) + ItogKomsbvMin;
vc.setMkomsbv(MainFormat(rs.getLong(17), mkoef));
ItogMkomsbv = rs.getLong(17) + ItogMkomsbv;
ItogMkomsbvMin = rs.getLong(17) + ItogMkomsbvMin;
vc.setKolv(integerFormat(rs.getLong(18)));
ItogKolv = rs.getLong(18) + ItogKolv;
ItogKolvMin = rs.getLong(18) + ItogKolvMin;
vc.setMkolv(integerFormat(rs.getLong(19)));
ItogMkolv = rs.getLong(19) + ItogMkolv;
ItogMkolvMin = rs.getLong(19) + ItogMkolvMin;
tableRows.add(vc);
}
schet_row_dor++;
schet_row_dors = Long.toString(schet_row_dor);
DorFirst = rs.getString(1);
NazvDor = rs.getString(3);
}
//===
if ( !dor.equals("all_set")&&(ob_minNo[j]!= null) && (!obName.equals("")) && (chek_str) && (Long.parseLong(obName)<Long.parseLong(ob_minNo[j]))){
while(ob_minNo[j]!=null){
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
vc.setMin(ob_minNo[j]);
vc.setDor(obDor);
vc.setNazvd(obNazvd);
vc.setOplata("0");
vc.setMoplata("0");
vc.setSumpd("0");
ItogSumpdS=Long.toString(ItogSumpd);
vc.setMsumpd("0");
vc.setKolpas("0");
vc.setMkolpas("0");
vc.setSumpr("0");
vc.setMsumpr("0");
vc.setKolpr("0");
vc.setMkolpr("0");
vc.setSumbag("0");
vc.setMsumbag("0");
vc.setKolbag("0");
vc.setMkolbag("0");
vc.setKomsbv("0");
vc.setMkomsbv("0");
vc.setKolv("0");
vc.setMkolv("0");
tableRows.add(vc);
j++;
schet_row_dor++;
schet_row_dors = Long.toString(schet_row_dor);
}
}
//===
if (min_query.equals("ЛЮБОЙ") && (!ItogSumpdS.equals("x") && (!schet_row_dors.equals("1")))) {
vc = new VoinClass();
vc.setMin_name("");
vc.setMin("ИТОГО");
vc.setDor(DorFirst);
vc.setOplata(MainFormat(ItogOplata, mkoef));
SetItogOplata = SetItogOplata + ItogOplata;
vc.setMoplata(MainFormat(ItogMoplata, mkoef));
SetItogMoplata = SetItogMoplata + ItogMoplata;
vc.setSumpd(MainFormat(ItogSumpd, mkoef));
SetItogSumpd = SetItogSumpd + ItogSumpd;
vc.setMsumpd(MainFormat(ItogMsumpd, mkoef));
SetItogMsumpd = SetItogMsumpd + ItogMsumpd;
vc.setKolpas(integerFormat(ItogKolpas));
SetItogKolpas = SetItogKolpas + ItogKolpas;
vc.setMkolpas(integerFormat(ItogMkolpas));
SetItogMkolpas = SetItogMkolpas + ItogMkolpas;
vc.setSumpr(MainFormat(ItogSumpr, mkoef));
SetItogSumpr = SetItogSumpr + ItogSumpr;
vc.setMsumpr(MainFormat(ItogMsumpr, mkoef));
SetItogMsumpr = SetItogMsumpr + ItogMsumpr;
vc.setKolpr(integerFormat(ItogKolpr));
SetItogKolpr = SetItogKolpr + ItogKolpr;
vc.setMkolpr(integerFormat(ItogMkolpr));
SetItogMkolpr = SetItogMkolpr + ItogMkolpr;
vc.setSumbag(MainFormat(ItogSumbag, mkoef));
SetItogSumbag = SetItogSumbag + ItogSumbag;
vc.setMsumbag(MainFormat(ItogMsumbag, mkoef));
SetItogMsumbag = SetItogMsumbag + ItogMsumbag;
vc.setKolbag(integerFormat(ItogKolbag));
SetItogKolbag = SetItogKolbag + ItogKolbag;
vc.setMkolbag(integerFormat(ItogMkolbag));
SetItogMkolbag = SetItogMkolbag + ItogMkolbag;
vc.setKomsbv(MainFormat(ItogKomsbv, mkoef));
SetItogKomsbv = SetItogKomsbv + ItogKomsbv;
vc.setMkomsbv(MainFormat(ItogMkomsbv, mkoef));
SetItogMkomsbv = SetItogMkomsbv + ItogMkomsbv;
vc.setKolv(integerFormat(ItogKolv));
SetItogKolv = SetItogKolv + ItogKolv;
vc.setMkolv(integerFormat(ItogMkolv));
SetItogMkolv = SetItogMkolv + ItogMkolv;
tableRows.add(vc);
schet_row = schet_row+1;
schet_rows = Long.toString(schet_row);
kol=0;
}
//===
if(!min_query.equals("ЛЮБОЙ")&&(!schet_rows.equals("0"))&&(!ItogSumpdS.equals("x"))&& (!schet_row_dors.equals("1")))
{
vc = new VoinClass();
vc.setMin_name("");
vc.setMin("");
vc.setDor("");
vc.setNazvd("ИТОГО");
vc.setOplata(MainFormat(ItogOplataMin, mkoef));
vc.setMoplata(MainFormat(ItogMoplataMin, mkoef));
vc.setSumpd(MainFormat(ItogSumpdMin, mkoef));
vc.setMsumpd(MainFormat(ItogMsumpdMin, mkoef));
vc.setKolpas(integerFormat(ItogKolpasMin));
vc.setMkolpas(integerFormat(ItogMkolpasMin));
vc.setSumpr(MainFormat(ItogSumprMin, mkoef));
vc.setMsumpr(MainFormat(ItogMsumprMin, mkoef));
vc.setKolpr(integerFormat(ItogKolprMin));
vc.setMkolpr(integerFormat(ItogMkolprMin));
vc.setSumbag(MainFormat(ItogSumbagMin, mkoef));
vc.setMsumbag(MainFormat(ItogMsumbagMin, mkoef));
vc.setKolbag(integerFormat(ItogKolbagMin));
vc.setMkolbag(integerFormat(ItogMkolbagMin));
vc.setKomsbv(MainFormat(ItogKomsbvMin, mkoef));
vc.setMkomsbv(MainFormat(ItogMkomsbvMin, mkoef));
vc.setKolv(integerFormat(ItogKolvMin));
vc.setMkolv(integerFormat(ItogMkolvMin));
tableRows.add(vc);
kol=0;
}
//==ИТОГОВАЯ СУММА ПО СЕТИ ПО ВСЕМ ДОРОГАМ==============
if ((min_query.equals("ЛЮБОЙ")) && (!DorFirst.equals(FirstDor))) {
set_vc = new VoinClass();
set_vc.setMin_name("");
set_vc.setMin("ВСЕГО");
set_vc.setOplata(MainFormat(SetItogOplata, mkoef));
set_vc.setMoplata(MainFormat(SetItogMoplata, mkoef));
set_vc.setSumpd(MainFormat(SetItogSumpd, mkoef));
set_vc.setMsumpd(MainFormat(SetItogMsumpd, mkoef));
set_vc.setKolpas(integerFormat(SetItogKolpas));
set_vc.setMkolpas(integerFormat(SetItogMkolpas));
set_vc.setSumpr(MainFormat(SetItogSumpr, mkoef));
set_vc.setMsumpr(MainFormat(SetItogMsumpr, mkoef));
set_vc.setKolpr(integerFormat(SetItogKolpr));
set_vc.setMkolpr(integerFormat(SetItogMkolpr));
set_vc.setSumbag(MainFormat(SetItogSumbag, mkoef));
set_vc.setMsumbag(MainFormat(SetItogMsumbag, mkoef));
set_vc.setKolbag(integerFormat(SetItogKolbag));
set_vc.setMkolbag(integerFormat(SetItogMkolbag));
set_vc.setKomsbv(MainFormat(SetItogKomsbv, mkoef));
set_vc.setMkomsbv(MainFormat(SetItogMkomsbv, mkoef));
set_vc.setKolv(integerFormat(SetItogKolv));
set_vc.setMkolv(integerFormat(SetItogMkolv));
tableRowsSet.add(set_vc);
}
}
//================AGENT_DETALIZACIYA========
if (!ust.equals("all_set") && ((agent.equals("**")) || (per.equals("**")))) {
if (agent.equals("**") && per.equals("**")){
} else{
String query = "";
//=====================
if (data == null) {
errors.add("errorNoSession", new ActionError("error.NoSession"));
throw new Exception();
}
if (data.equals("odat")) {
year = systemdata.substring(systemdata.length() - 4, systemdata.length());
month = systemdata.substring(systemdata.indexOf(".") + 1,
systemdata.indexOf(".") + 3);
day = systemdata.substring(0, 2);
}
if(!data.equals("fdat") && (!data.equals("f_month"))){
dohod_data = year+"-" + month +"-" + day;
schet_data = day+"-" + month +"-" +year;
}
//===========agent **============
if (agent.equals("**")){
query = " SELECT B.MIN, B.AGENT, D.NAME, SUM(B.SUMPD), SUM(B.MSUMPD), SUM(B.KOLPAS), SUM(B.MKOLPAS), " +
" SUM(B.SUMPR), SUM(B.MSUMPR), SUM(B.KOLPR), SUM(B.MKOLPR), SUM(B.SUMBAG), SUM(B.MSUMBAG), SUM(B.KOLBAG), SUM(B.MKOLBAG), " +
" SUM(B.KOMSBV), SUM(B.MKOMSBV), SUM(B.KOLV), SUM(B.MKOLV), C.MNKODP " +
" FROM DBKLAS.SOBPER C, " +abds+ ".DOHODV B, ";
query += " (SELECT DISTINCT E.NOMMV, E.NAME ,T.GOS_ABD FROM EXPBD.LGOT E ,EXPBD.SERV T ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " WHERE E.DATAN<='" +dohod_data+ "' AND E.DATAOT>='" +dohod_data+ "' ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " WHERE E.DATAN<='" +data_end+ "' AND E.DATAOT>='" +data_end+ "' ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " WHERE E.DATAN<'" +data_end+ "' AND E.DATAOT>='" +data_end+ "' ";
}
if(data.equals("f_month")){
query += " WHERE E.DATAN<'" +data_end+ "' AND E.DATAOT>='" +data_end+ "' ";
}
query += " AND E.NOMMV<>0 AND E.GOS=T.GOS_ABD) D ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " WHERE B.DATA = ? AND B.MES = '" +month+ "' AND ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " WHERE B.DATA<='" +data_end+ "' AND B.DATA >= '" +data_begin+ "' AND B.MES = '" +fmonth+ "' AND ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " WHERE B.DATA<'" +data_end+ "' AND B.DATA >= '" +data_begin+ "' AND B.MES = '" +fmonth+ "' AND ";
}
if(data.equals("f_month")){
query += " WHERE B.DATA<'" +data_end+ "' AND B.DATA >= '" +data_begin+ "' AND B.MES = '" +f_fmonth+ "' AND ";
}
if (!chek_str){
query += " (B.SUMPD<>0 OR B.MSUMPD<>0 OR B.KOLPAS<>0 OR B.MKOLPAS<>0 OR B.SUMPR<>0 OR " + B.MSUMPR<>0 OR B.KOLPR<>0 OR B.MKOLPR<>0 OR B.SUMBAG<>0 OR B.MSUMBAG<>0 OR " +
" B.KOLBAG<>0 OR B.MKOLBAG<>0 OR B.KOMSBV<>0 OR B.MKOMSBV<>0 OR B.KOLV<>0 OR " +
" B.MKOLV<>0) AND ";
}
query += " B.MIN = D.NOMMV " +
" AND C.SKP = B.AGENT AND ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " C.DATANO<='" +dohod_data+ "' AND C.DATAKO >='" +dohod_data+ "' AND " +
" C.DATANP<='" +dohod_data+ "' AND C.DATAKP >='" +dohod_data+ "' ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " C.DATANO<='" +data_end+ "' AND C.DATAKO >='" +data_end+ "' AND " +
" C.DATANP<='" +data_end+ "' AND C.DATAKP >='" +data_end+ "' ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " C.DATANO<'" +data_end+ "' AND C.DATAKO >='" +data_end+ "' AND " +
" C.DATANP<'" +data_end+ "' AND C.DATAKP >='" +data_end+ "' ";
}
if(data.equals("f_month")){
query += " C.DATANO<'" +data_end+ "' AND C.DATAKO >='" +data_end+ "' AND " +
" C.DATANP<'" +data_end+ "' AND C.DATAKP >='" +data_end+ "' ";
}
query += " AND C.GOS = D.GOS_ABD ";
}
//========per **=============
if (per.equals("**")){
query = " SELECT B.MIN, B.SKP, D.NAME, SUM(B.SUMPD), SUM(B.MSUMPD), SUM(B.KOLPAS), SUM(B.MKOLPAS), " +
" SUM(B.SUMPR), SUM(B.MSUMPR), SUM(B.KOLPR), SUM(B.MKOLPR), SUM(B.SUMBAG), SUM(B.MSUMBAG), SUM(B.KOLBAG), SUM(B.MKOLBAG), " +
" SUM(B.KOMSBV), SUM(B.MKOMSBV), SUM(B.KOLV), SUM(B.MKOLV), C.MNKODP " +
" FROM DBKLAS.SOBPER C, " +abds+ ".DOHODV B, ";
query +=" (SELECT DISTINCT E.NOMMV, E.NAME ,T.GOS_ABD FROM EXPBD.LGOT E ,EXPBD.SERV T ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " WHERE E.DATAN<='" +dohod_data+ "' AND E.DATAOT>='" +dohod_data+ "' ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " WHERE E.DATAN<='" +data_end+ "' AND E.DATAOT>='" +data_end+ "' ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " WHERE E.DATAN<'" +data_end+ "' AND E.DATAOT>='" +data_end+ "' ";
}
if(data.equals("f_month")){
query += " WHERE E.DATAN<'" +data_end+ "' AND E.DATAOT>='" +data_end+ "' ";
}
query += " AND E.NOMMV<>0 AND E.GOS=T.GOS_ABD) D ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " WHERE B.DATA = ? AND B.MES = '" +month+ "' AND ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " WHERE B.DATA<='" +data_end+ "' AND B.DATA >= '" +data_begin+ "' AND B.MES = '" +fmonth+ "' AND ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " WHERE B.DATA<'" +data_end+ "' AND B.DATA >= '" +data_begin+ "' AND B.MES = '" +fmonth+ "' AND ";
}
if(data.equals("f_month")){
query += " WHERE B.DATA<'" +data_end+ "' AND B.DATA >= '" +data_begin+ "' AND B.MES = '" +f_fmonth+ "' AND ";
}
if (!chek_str){
query += " (B.SUMPD<>0 OR B.MSUMPD<>0 OR B.KOLPAS<>0 OR B.MKOLPAS<>0 OR B.SUMPR<>0 OR " +
" B.MSUMPR<>0 OR B.KOLPR<>0 OR B.MKOLPR<>0 OR B.SUMBAG<>0 OR B.MSUMBAG<>0 OR " +
" B.KOLBAG<>0 OR B.MKOLBAG<>0 OR B.KOMSBV<>0 OR B.MKOMSBV<>0 OR B.KOLV<>0 OR " +
" B.MKOLV<>0) AND ";
}
query +=" B.MIN = D.NOMMV " +
" AND C.SKP = B.SKP AND ";
if(!data.equals("fdat") && (!data.equals("f_month"))){
query += " C.DATANO<='" +dohod_data+ "' AND C.DATAKO >='" +dohod_data+ "' AND " +
" C.DATANP<='" +dohod_data+ "' AND C.DATAKP >='" +dohod_data+ "' ";
}
if(data.equals("fdat") && !fday.equals("06")){
query += " C.DATANO<='" +data_end+ "' AND C.DATAKO >='" +data_end+ "' AND " +
" C.DATANP<='" +data_end+ "' AND C.DATAKP >='" +data_end+ "' ";
}
if(data.equals("fdat") && fday.equals("06")){
query += " C.DATANO<'" +data_end+ "' AND C.DATAKO >='" +data_end+ "' AND " +
" C.DATANP<'" +data_end+ "' AND C.DATAKP >='" +data_end+ "' ";
}
if(data.equals("f_month")){
query += " C.DATANO<'" +data_end+ "' AND C.DATAKO >='" +data_end+ "' AND " +
" C.DATANP<'" +data_end+ "' AND C.DATAKP >='" +data_end+ "' ";
}
query += " AND C.GOS = D.GOS_ABD ";
}
if (dor!= null && !ust.equals("all_set") && !dor.equals("*"))
{
query += " AND B.DOR = ? ";
}
if (!min.equals("*"))
query += " AND B.MIN = ? ";
if (!agent.equals("*") && (!agent.equals("**")))
{
query += " AND B.AGENT = ? ";
}
if (!per.equals("*") && (!per.equals("**")))
{
query += " AND B.SKP = ? ";
}
if (agent.equals("**"))
query += " GROUP BY B.AGENT, C.MNKODP, B.MIN, D.NAME ";
if (per.equals("**"))
query += " GROUP BY B.SKP, C.MNKODP, B.MIN, D.NAME ";
int schet = 1;
pstmt = connec.prepareStatement(query);
if(!data.equals("fdat") && (!data.equals("f_month"))){
pstmt.setString(schet++,dohod_data.toString());
}
if (dor!= null && !ust.equals("all_set")&& !dor.equals("*"))
{
pstmt.setString(schet++,dor.toString());
dor_query = dor.toString();
}
if (min!= null && !min.equals("*")){
pstmt.setString(schet++,min.toString());
}
if (agent!= null && (!agent.equals("*") && (!agent.equals("**")))){
pstmt.setString(schet++,agent.toString());
}
if (per!= null && (!per.equals("*") && (!per.equals("**")))){
pstmt.setString(schet++,per.toString());
}
rs = pstmt.executeQuery();
ItogSumpdS = "x";
int kol = 0;
String kols = "0";
schet_row = 0;
schet_rows = "0";
int row_min = 0;
String ob_name_agent = "";
String ob_agent="";
String ob_name_per = "";
String ob_per="";
j=0;
//===============
while (rs.next()){
if (FirstAgent.equals("") && agent.equals("**")){
FirstAgent = rs.getString(2);
AgentFirst = FirstAgent;
FirstAgent_name = rs.getString(20);
}
if (FirstPer.equals("") && per.equals("**")){
FirstPer = rs.getString(2);
PerFirst = FirstPer;
FirstPer_name = rs.getString(20);
}
if (!AgentFirst.equals(rs.getString(2)) && agent.equals("**"))
{
if ((ob_minNo[j]!= null) && (min.equals("*"))&& (!obName.equals("")) && (chek_str) && (Long.parseLong(obName)<Long.parseLong(ob_minNo[j]))){
while(ob_minNo[j]!=null){
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
vc.setMin(ob_minNo[j]);
vc.setAgent(ob_agent);
vc.setAgent_name(ob_name_agent);
vc.setPer("");
vc.setPer_name("");
vc.setOplata("0");
vc.setMoplata("0");
vc.setSumpd("0");
ItogSumpdS=Long.toString(ItogSumpd);
vc.setMsumpd("0");
vc.setKolpas("0");
vc.setMkolpas("0");
vc.setSumpr("0");
vc.setMsumpr("0");
vc.setKolpr("0");
vc.setMkolpr("0");
vc.setSumbag("0");
vc.setMsumbag("0");
vc.setKolbag("0");
vc.setMkolbag("0");
vc.setKomsbv("0");
vc.setMkomsbv("0");
vc.setKolv("0");
vc.setMkolv("0");
tableRows.add(vc);
j++;
kol++;
schet_rows = Long.toString(kol);
}
}
if(min_query.equals("ЛЮБОЙ")) {
vc = new VoinClass();
vc.setMin_name("");
vc.setAgent("");
vc.setAgent_name("");
vc.setPer("");
vc.setPer_name("");
vc.setMin("ИТОГО");
vc.setOplata(MainFormat(ItogOplata, mkoef));
SetItogOplata = SetItogOplata + ItogOplata;
vc.setMoplata(MainFormat(ItogMoplata, mkoef));
SetItogMoplata = SetItogMoplata + ItogMoplata;
vc.setSumpd(MainFormat(ItogSumpd,mkoef));
SetItogSumpd = SetItogSumpd + ItogSumpd;
vc.setMsumpd(MainFormat(ItogMsumpd,mkoef));
SetItogMsumpd = SetItogMsumpd + ItogMsumpd;
// ItogKolpasS = Long.toString(ItogKolpas);
vc.setKolpas(integerFormat(ItogKolpas));
SetItogKolpas = SetItogKolpas + ItogKolpas;
vc.setMkolpas(integerFormat(ItogMkolpas));
SetItogMkolpas = SetItogMkolpas + ItogMkolpas;
vc.setSumpr(MainFormat(ItogSumpr,mkoef));
SetItogSumpr = SetItogSumpr + ItogSumpr;
vc.setMsumpr(MainFormat(ItogMsumpr, mkoef));
SetItogMsumpr = SetItogMsumpr + ItogMsumpr;
vc.setKolpr(integerFormat(ItogKolpr));
SetItogKolpr = SetItogKolpr + ItogKolpr;
vc.setMkolpr(integerFormat(ItogMkolpr));
SetItogMkolpr = SetItogMkolpr + ItogMkolpr;
vc.setSumbag(MainFormat(ItogSumbag, mkoef));
SetItogSumbag = SetItogSumbag + ItogSumbag;
vc.setMsumbag(MainFormat(ItogMsumbag, mkoef));
SetItogMsumbag = SetItogMsumbag + ItogMsumbag;
vc.setKolbag(integerFormat(ItogKolbag));
SetItogKolbag = SetItogKolbag + ItogKolbag;
vc.setMkolbag(integerFormat(ItogMkolbag));
SetItogMkolbag = SetItogMkolbag + ItogMkolbag;
vc.setKomsbv(MainFormat(ItogKomsbv, mkoef));
SetItogKomsbv = SetItogKomsbv + ItogKomsbv;
vc.setMkomsbv(MainFormat(ItogMkomsbv, mkoef));
SetItogMkomsbv = SetItogMkomsbv + ItogMkomsbv;
vc.setKolv(integerFormat(ItogKolv));
SetItogKolv = SetItogKolv + ItogKolv;
vc.setMkolv(integerFormat(ItogMkolv));
SetItogMkolv = SetItogMkolv + ItogMkolv;
tableRows.add(vc);
ItogOplata = 0;
ItogMoplata = 0;
ItogSumpd = 0;
ItogMsumpd = 0;
ItogKolpas = 0;
ItogMkolpas = 0;
ItogSumpr = 0;
ItogMsumpr = 0;
ItogKolpr = 0;
ItogMkolpr = 0;
ItogSumbag = 0;
ItogMsumbag = 0;
ItogKolbag = 0;
ItogMkolbag = 0;
ItogKomsbv = 0;
ItogMkomsbv = 0;
ItogKolv = 0;
ItogMkolv = 0;
kol++;
schet_rows = Long.toString(kol);
j=0;
}
}
//======per **===
if (!PerFirst.equals(rs.getString(2)) && per.equals("**"))
{
if ((ob_minNo[j]!= null) && (min.equals("*"))&& (!obName.equals("")) && (chek_str) && (Long.parseLong(obName)<Long.parseLong(ob_minNo[j]))){
while(ob_minNo[j]!=null){
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
vc.setMin(ob_minNo[j]);
vc.setAgent("");
vc.setAgent_name("");
vc.setPer(ob_per);
vc.setPer_name(ob_name_per);
vc.setOplata("0");
vc.setMoplata("0");
vc.setSumpd("0");
ItogSumpdS=Long.toString(ItogSumpd);
vc.setMsumpd("0");
vc.setKolpas("0");
vc.setMkolpas("0");
vc.setSumpr("0");
vc.setMsumpr("0");
vc.setKolpr("0");
vc.setMkolpr("0");
vc.setSumbag("0");
vc.setMsumbag("0");
vc.setKolbag("0");
vc.setMkolbag("0");
vc.setKomsbv("0");
vc.setMkomsbv("0");
vc.setKolv("0");
vc.setMkolv("0");
tableRows.add(vc);
j++;
kol++;
schet_rows = Long.toString(kol);
}
}
if(min_query.equals("ЛЮБОЙ")) {
vc = new VoinClass();
vc.setMin_name("");
vc.setAgent("");
vc.setAgent_name("");
vc.setPer("");
vc.setPer_name("");
vc.setMin("ИТОГО");
vc.setOplata(MainFormat(ItogOplata, mkoef));
SetItogOplata = SetItogOplata + ItogOplata;
vc.setMoplata(MainFormat(ItogMoplata, mkoef));
SetItogMoplata = SetItogMoplata + ItogMoplata;
vc.setSumpd(MainFormat(ItogSumpd,mkoef));
SetItogSumpd = SetItogSumpd + ItogSumpd;
vc.setMsumpd(MainFormat(ItogMsumpd,mkoef));
SetItogMsumpd = SetItogMsumpd + ItogMsumpd;
// ItogKolpasS = Long.toString(ItogKolpas);
vc.setKolpas(integerFormat(ItogKolpas));
SetItogKolpas = SetItogKolpas + ItogKolpas;
vc.setMkolpas(integerFormat(ItogMkolpas));
SetItogMkolpas = SetItogMkolpas + ItogMkolpas;
vc.setSumpr(MainFormat(ItogSumpr,mkoef));
SetItogSumpr = SetItogSumpr + ItogSumpr;
vc.setMsumpr(MainFormat(ItogMsumpr, mkoef));
SetItogMsumpr = SetItogMsumpr + ItogMsumpr;
vc.setKolpr(integerFormat(ItogKolpr));
SetItogKolpr = SetItogKolpr + ItogKolpr;
vc.setMkolpr(integerFormat(ItogMkolpr));
SetItogMkolpr = SetItogMkolpr + ItogMkolpr;
vc.setSumbag(MainFormat(ItogSumbag, mkoef));
SetItogSumbag = SetItogSumbag + ItogSumbag;
vc.setMsumbag(MainFormat(ItogMsumbag, mkoef));
SetItogMsumbag = SetItogMsumbag + ItogMsumbag;
vc.setKolbag(integerFormat(ItogKolbag));
SetItogKolbag = SetItogKolbag + ItogKolbag;
vc.setMkolbag(integerFormat(ItogMkolbag));
SetItogMkolbag = SetItogMkolbag + ItogMkolbag;
vc.setKomsbv(MainFormat(ItogKomsbv, mkoef));
SetItogKomsbv = SetItogKomsbv + ItogKomsbv;
vc.setMkomsbv(MainFormat(ItogMkomsbv, mkoef));
SetItogMkomsbv = SetItogMkomsbv + ItogMkomsbv;
vc.setKolv(integerFormat(ItogKolv));
SetItogKolv = SetItogKolv + ItogKolv;
vc.setMkolv(integerFormat(ItogMkolv));
SetItogMkolv = SetItogMkolv + ItogMkolv;
tableRows.add(vc);
ItogOplata = 0;
ItogMoplata = 0;
ItogSumpd = 0;
ItogMsumpd = 0;
ItogKolpas = 0;
ItogMkolpas = 0;
ItogSumpr = 0;
ItogMsumpr = 0;
ItogKolpr = 0;
ItogMkolpr = 0;
ItogSumbag = 0;
ItogMsumbag = 0;
ItogKolbag = 0;
ItogMkolbag = 0;
ItogKomsbv = 0;
ItogMkomsbv = 0;
ItogKolv = 0;
ItogMkolv = 0;
kol++;
schet_rows = Long.toString(kol);
j=0;
}
}
//===
if((chek_str)&& (min.equals("*"))){
while((rs.getLong(1)>Long.parseLong(ob_minNo[j])) && (ob_minNo[j+1]!=null)){
if (rs.getLong(1)>Long.parseLong(ob_minNo[j])){
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
if (agent.equals("**")){
vc.setAgent_name(rs.getString(20));
vc.setAgent(rs.getString(2));
vc.setPer("");
vc.setPer_name("");
}
if (per.equals("**")){
vc.setPer_name(rs.getString(20));
vc.setPer(rs.getString(2));
vc.setAgent("");
vc.setAgent_name("");
}
vc.setMin(ob_minNo[j]);
vc.setOplata("0");
vc.setMoplata("0");
vc.setSumpd("0");
ItogSumpdS=Long.toString(ItogSumpd);
vc.setMsumpd("0");
vc.setKolpas("0");
vc.setMkolpas("0");
vc.setSumpr("0");
vc.setMsumpr("0");
vc.setKolpr("0");
vc.setMkolpr("0");
vc.setSumbag("0");
vc.setMsumbag("0");
vc.setKolbag("0");
vc.setMkolbag("0");
vc.setKomsbv("0");
vc.setMkomsbv("0");
vc.setKolv("0");
vc.setMkolv("0");
tableRows.add(vc);
j++;
kol++;
schet_rows = Long.toString(kol);
}
}
if (rs.getLong(1)<Long.parseLong(ob_minNo[j])){
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
if (agent.equals("**")){
vc.setAgent_name(rs.getString(20));
vc.setAgent(rs.getString(2));
ob_name_agent=rs.getString(20);
ob_agent=rs.getString(2);
vc.setPer("");
vc.setPer_name("");
}
if (per.equals("**")){
vc.setPer_name(rs.getString(20));
vc.setPer(rs.getString(2));
ob_name_per=rs.getString(20);
ob_per=rs.getString(2);
vc.setAgent("");
vc.setAgent_name("");
}
vc.setMin(rs.getString(1));
obName = rs.getString(1);
vc.setOplata(MainFormat(rs.getLong(4)+ rs.getLong(12), mkoef));
ItogOplata = rs.getLong(4)+ rs.getLong(12) + ItogOplata;
ItogOplataMin = rs.getLong(4)+ rs.getLong(12) + ItogOplataMin;
vc.setMoplata (MainFormat(rs.getLong(5) + rs.getLong(13), mkoef));
ItogMoplata = rs.getLong(5) + rs.getLong(13) + ItogMoplata;
ItogMoplataMin = rs.getLong(5) + rs.getLong(13) + ItogMoplataMin;
vc.setSumpd(MainFormat(rs.getLong(4)-rs.getLong(8), mkoef));
ItogSumpd = rs.getLong(4)-rs.getLong(8)+ ItogSumpd;
ItogSumpdS=Long.toString(ItogSumpd);
ItogSumpdMin =rs.getLong(4)-rs.getLong(8)+ ItogSumpdMin;
vc.setMsumpd(MainFormat(rs.getLong(5)-rs.getLong(9), mkoef));
ItogMsumpd = rs.getLong(5)-rs.getLong(9)+ ItogMsumpd;
ItogMsumpdMin = rs.getLong(5)-rs.getLong(9)+ ItogMsumpdMin;
vc.setKolpas(integerFormat(rs.getLong(6)-rs.getLong(10)));
ItogKolpas = rs.getLong(6)-rs.getLong(10) + ItogKolpas;
ItogKolpasMin =rs.getLong(6)-rs.getLong(10) + ItogKolpasMin;
vc.setMkolpas(integerFormat(rs.getLong(7)-rs.getLong(11)));
ItogMkolpas = rs.getLong(7)-rs.getLong(11) + ItogMkolpas;
ItogMkolpasMin =rs.getLong(7)-rs.getLong(11)+ ItogMkolpasMin;
vc.setSumpr(MainFormat(rs.getLong(8), mkoef));
ItogSumpr = rs.getLong(8) + ItogSumpr;
ItogSumprMin = rs.getLong(8) + ItogSumprMin;
vc.setMsumpr(MainFormat(rs.getLong(9), mkoef));
ItogMsumpr = rs.getLong(9) + ItogMsumpr;
ItogMsumprMin = rs.getLong(9) + ItogMsumprMin;
vc.setKolpr(integerFormat(rs.getLong(10)));
ItogKolpr = rs.getLong(10) + ItogKolpr;
ItogKolprMin = rs.getLong(10) + ItogKolprMin;
vc.setMkolpr(integerFormat(rs.getLong(11)));
ItogMkolpr = rs.getLong(11) + ItogMkolpr;
ItogMkolprMin = rs.getLong(11) + ItogMkolprMin;
vc.setSumbag(MainFormat(rs.getLong(12), mkoef));
ItogSumbag = rs.getLong(12) + ItogSumbag;
ItogSumbagMin = rs.getLong(12) + ItogSumbagMin;
vc.setMsumbag(MainFormat(rs.getLong(13), mkoef));
ItogMsumbag = rs.getLong(13) + ItogMsumbag;
ItogMsumbagMin = rs.getLong(13) + ItogMsumbagMin;
vc.setKolbag(integerFormat(rs.getLong(14)));
ItogKolbag = rs.getLong(14) + ItogKolbag;
ItogKolbagMin = rs.getLong(14) + ItogKolbagMin;
vc.setMkolbag(integerFormat(rs.getLong(15)));
ItogMkolbag = rs.getLong(15) + ItogMkolbag;
ItogMkolbagMin = rs.getLong(15) + ItogMkolbagMin;
vc.setKomsbv(MainFormat(rs.getLong(16), mkoef));
ItogKomsbv = rs.getLong(16) + ItogKomsbv;
ItogKomsbvMin = rs.getLong(16) + ItogKomsbvMin;
vc.setMkomsbv(MainFormat(rs.getLong(17), mkoef));
ItogMkomsbv = rs.getLong(17) + ItogMkomsbv;
ItogMkomsbvMin = rs.getLong(17) + ItogMkomsbvMin;
vc.setKolv(integerFormat(rs.getLong(18)));
ItogKolv = rs.getLong(18) + ItogKolv;
ItogKolvMin = rs.getLong(18) + ItogKolvMin;
vc.setMkolv(integerFormat(rs.getLong(19)));
ItogMkolv = rs.getLong(19) + ItogMkolv;
ItogMkolvMin = rs.getLong(19) + ItogMkolvMin;
tableRows.add(vc);
kol++;
schet_rows = Long.toString(kol);
}
if (rs.getLong(1)==Long.parseLong(ob_minNo[j])){
// proverka = rs.getLong(2);
vc = new VoinClass();
if(min.equals("*")){
vc.setMin_name(ob_minName[j]);
}
else
vc.setMin_name("");
if (agent.equals("**")){
vc.setAgent_name(rs.getString(20));
vc.setAgent(rs.getString(2));
ob_name_agent=rs.getString(20);
ob_agent=rs.getString(2);
vc.setPer("");
vc.setPer_name("");
}
if (per.equals("**")){
vc.setPer_name(rs.getString(20));
vc.setPer(rs.getString(2));
ob_name_per=rs.getString(20);
ob_per=rs.getString(2);
vc.setAgent("");
vc.setAgent_name("");
}
vc.setMin(rs.getString(1));
obName = rs.getString(1);
vc.setOplata(MainFormat(rs.getLong(4)+ rs.getLong(12), mkoef));
ItogOplata = rs.getLong(4)+ rs.getLong(12) + ItogOplata;
ItogOplataMin = rs.getLong(4)+ rs.getLong(12) + ItogOplataMin;
vc.setMoplata (MainFormat(rs.getLong(5) + rs.getLong(13), mkoef));
ItogMoplata = rs.getLong(5) + rs.getLong(13) + ItogMoplata;
ItogMoplataMin = rs.getLong(5) + rs.getLong(13) + ItogMoplataMin;
vc.setSumpd(MainFormat(rs.getLong(4)-rs.getLong(8), mkoef));
ItogSumpd = rs.getLong(4)-rs.getLong(8)+ ItogSumpd;
ItogSumpdS=Long.toString(ItogSumpd);
ItogSumpdMin =rs.getLong(4)-rs.getLong(8)+ ItogSumpdMin;
vc.setMsumpd(MainFormat(rs.getLong(5)-rs.getLong(9), mkoef));
ItogMsumpd = rs.getLong(5)-rs.getLong(9)+ ItogMsumpd;
ItogMsumpdMin = rs.getLong(5)-rs.getLong(9)+ ItogMsumpdMin;
vc.setKolpas(integerFormat(rs.getLong(6)-rs.getLong(10)));
ItogKolpas = rs.getLong(6)-rs.getLong(10) + ItogKolpas;
ItogKolpasMin =rs.getLong(6)-rs.getLong(10) + ItogKolpasMin;
vc.setMkolpas(integerFormat(rs.getLong(7)-rs.getLong(11)));
ItogMkolpas = rs.getLong(7)-rs.getLong(11) + ItogMkolpas;
ItogMkolpasMin =rs.getLong(7)-rs.getLong(11)+ ItogMkolpasMin;
vc.setSumpr(MainFormat(rs.getLong(8), mkoef));
ItogSumpr = rs.getLong(8) + ItogSumpr;
ItogSumprMin = rs.getLong(8) + ItogSumprMin;
vc.setMsumpr(MainFormat(rs.getLong(9), mkoef));
ItogMsumpr = rs.getLong(9) + ItogMsumpr;
ItogMsumprMin = rs.getLong(9) + ItogMsumprMin;
vc.setKolpr(integerFormat(rs.getLong(10)));
ItogKolpr = rs.getLong(10) + ItogKolpr;
ItogKolprMin = rs.getLong(10) + ItogKolprMin;
vc.setMkolpr(integerFormat(rs.getLong(11)));
ItogMkolpr = rs.getLong(11) + ItogMkolpr;
ItogMkolprMin = rs.getLong(11) + ItogMkolprMin;
vc.setSumbag(MainFormat(rs.getLong(12), mkoef));
ItogSumbag = rs.getLong(12) + ItogSumbag;
ItogSumbagMin = rs.getLong(12) + ItogSumbagMin;
vc.setMsumbag(MainFormat(rs.getLong(13), mkoef));
ItogMsumbag = rs.getLong(13) + ItogMsumbag;
ItogMsumbagMin = rs.getLong(13) + ItogMsumbagMin;
vc.setKolbag(integerFormat(rs.getLong(14)));
ItogKolbag = rs.getLong(14) + ItogKolbag;
ItogKolbagMin = rs.getLong(14) + ItogKolbagMin;
vc.setMkolbag(integerFormat(rs.getLong(15)));
ItogMkolbag = rs.getLong(15) + ItogMkolbag;
ItogMkolbagMin = rs.getLong(15) + ItogMkolbagMin;
vc.setKomsbv(MainFormat(rs.getLong(16), mkoef));
ItogKomsbv = rs.getLong(16) + ItogKomsbv;
ItogKomsbvMin = rs.getLong(16) + ItogKomsbvMin;
vc.setMkomsbv(MainFormat(rs.getLong(17), mkoef));
ItogMkomsbv = rs.getLong(17) + ItogMkomsbv;
ItogMkomsbvMin = rs.getLong(17) + ItogMkomsbvMin;
vc.setKolv(integerFormat(rs.getLong(18)));
ItogKolv = rs.getLong(18) + ItogKolv;
ItogKolvMin = rs.getLong(18) + ItogKolvMin;
vc.setMkolv(integerFormat(rs.getLong(19)));
ItogMkolv = rs.getLong(19) + ItogMkolv;
ItogMkolvMin = rs.getLong(19) + ItogMkolvMin;
tableRows.add(vc);
j++;
}
}
// ====!chek_str====
if (!chek_str){
vc = new VoinClass();
if(min.equals("*"))
vc.setMin_name(rs.getString(3));
else
vc.setMin_name("");
vc.setMin(rs.getString(1));
if (agent.equals("**")){
vc.setAgent_name(rs.getString(20));
vc.setAgent(rs.getString(2));
vc.setPer("");
vc.setPer_name("");
}
if (per.equals("**")){
vc.setPer_name(rs.getString(20));
vc.setPer(rs.getString(2));
vc.setAgent("");
vc.setAgent_name("");
}
vc.setOplata(MainFormat(rs.getLong(4)+rs.getLong(12),mkoef));
ItogOplata = ItogOplata + rs.getLong(4) + rs.getLong(12);
ItogOplataMin = rs.getLong(4)+ rs.getLong(12) + ItogOplataMin;
vc.setMoplata(MainFormat(rs.getLong(5)+ rs.getLong(13), mkoef));
ItogMoplata = ItogMoplata + rs.getLong(5) + rs.getLong(13);
ItogMoplataMin = rs.getLong(5)+ rs.getLong(13) + ItogMoplataMin;
vc.setSumpd(MainFormat(rs.getLong(4)-rs.getLong(8), mkoef));
ItogSumpd = ItogSumpd + rs.getLong(4)-rs.getLong(8);
ItogSumpdS=Long.toString(ItogSumpd);
ItogSumpdMin = rs.getLong(4)- rs.getLong(8) + ItogSumpdMin;
vc.setMsumpd(MainFormat(rs.getLong(5)-rs.getLong(9), mkoef));
ItogMsumpd = ItogMsumpd + rs.getLong(5)-rs.getLong(9);
ItogMsumpdMin = rs.getLong(5) - rs.getLong(9) + ItogMsumpdMin;
vc.setKolpas(integerFormat(rs.getLong(6)-rs.getLong(10)));
Подобные документы
Требования к системе проектирования информационной системы финансового контроля. Информационное, программное и техническое обеспечение автоматизированной системы. Алгоритмы и модели работы базы данных, созданной в среде разработки Borland Delphi 7.0.
дипломная работа [1,2 M], добавлен 25.10.2013Проектирование программы для предприятия ООО "Чудо свечи" в среде программирования Borland Delphi. Произведение расчета системы методом аддитивной оптимизации. Требования к функциям, выполняемым системой, к программному и аппаратному обеспечению.
курсовая работа [2,8 M], добавлен 27.02.2015Структурно–функциональная модель системы проведения соревнований школьников. Формирование требований к проектируемой автоматизированной системе обработки информации и управления. Разработка концепции и документации, анализ и выявление ключевых процессов.
дипломная работа [3,4 M], добавлен 04.03.2014Создание автоматизированной системы c помощью MS SqlServer 2005. Результат работы запроса выборки с вычисляемым значением и сортировкой. Разработка технологий доступа к базе данных, клиентского приложения. Требования к программному обеспечению.
курсовая работа [3,9 M], добавлен 28.06.2011Определение назначения и описание функций имитационных моделей стохастических процессов систем массового обслуживания. Разработка модели описанной системы в виде Q-схемы и программы на языке GPSS и C#. Основные показатели работы имитационной модели.
курсовая работа [487,4 K], добавлен 18.12.2014Управление процессами операционных систем. Разработка программы, моделирующей обслуживание множества вычислительных процессов в системе с 4 очередями, определяемыми значениями приоритетов. Выполнение инструкций компьютерной программы на процессоре.
контрольная работа [302,7 K], добавлен 06.08.2013Построение имитационной модели системы массового обслуживания, список и содержание ее активностей. Блок-схема алгоритма моделирования и текст процедуры. Моделирование случайных независимых величин и процессов. Оптимизация системы массового обслуживания.
курсовая работа [4,0 M], добавлен 28.05.2013Система GPSS World как мощная универсальная среда моделирования как дискретных, так и непрерывных процессов, предназначенная для профессионального моделирования самых разнообразных процессов и систем. Системы массового обслуживания. Листинг программы.
курсовая работа [499,6 K], добавлен 25.12.2013Требования к функциям и задачам, выполняемым системой "Подбор кредита ОАО "Россельхозбанк". Проектирование архитектуры программного продукта. Структурная схема программного продукта. Описание компонент программного обеспечения. План менеджмента проекта.
курсовая работа [684,0 K], добавлен 03.05.2015События для создания процесса при запуске операционной системы. Распределении времени процессоров между выполняющимися процессами. Программа, реализующая модель обслуживания процессов с абсолютными приоритетами обслуживания и заданным квантом времени.
контрольная работа [142,4 K], добавлен 09.12.2013