Đề tài Xây dựng hệ thống thông tin hỗ trợ xử lý tổng hợp kết quả điều tra lao động, việc làm 01/7/2004

Từ thông tin đầu ra là “Phiếu điều tra” lập được danh sách các thuộc tính: o Tỉnh/ Thành phố o Quận/ Huyện o Xã/ Phường/ Thị trấn o Tên địa bàn điều tra o Thành thị/ Nông thôn o Hộ số o Tên chủ hộ o Địa chỉ của hộ o H1- Họ và tên từng người thực tế thường trú tại hộ o H2- Quan hệ với chủ hộ o H3- Nam hay Nữ o H4- Ngày tháng năm sinh o H5- Bao nhiêu tuổi tròn o H6- Lớp học phổ thông cao nhất đạt được o H7 - Đủ 15 tuổi trở lên o C1 – Trình độ kĩ thuật chuyên môn cao nhất được đào tạo o C2 – Ngành nghề được đào tạo o C3 – Trong 7 ngày qua có làm bất cứ việc gì để tạo thu nhập không? o C4 – Trước 7 ngày qua có làm việc gì không? o C5 – Sắp tới có tiếp tục trở lại làm việc không? o C6 – Công việc đó có phù hợp với ngành nghề được đào tạo không? o C7 – Tên công việc chiếm nhiều thời gian nhất đã làm trong (trước) 7 ngày qua là gì?

doc124 trang | Chia sẻ: aloso | Lượt xem: 1581 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Đề tài Xây dựng hệ thống thông tin hỗ trợ xử lý tổng hợp kết quả điều tra lao động, việc làm 01/7/2004, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
b0922 Store 0 to b1011,b1012,b1021,b1022,b1111,b1112,b1121,b1122 Store 0 to b1211,b1212,b1221,b1222,b1311,b1312,b1321,b1322 Store 0 to b1411,b1412,b1421,b1422,b1511,b1512,b1521,b1522 Store 0 to b1610,b1620,b1710,b1720,b1810,b1820 Store 0 to b1910,b1920,b2010,b2020,b2110,b2120 Store 0 to b2210,b2220,b2310,b2320,b2410,b2420 Store 0 to b2511,b2512,b2521,b2522,b2621,b2622 Store 0 to b2710,b2720,b2810,b2820 * Trong Do tuoi Lao dong Store 0 to b2911,b2912,b2921,b2922,b3010,b3020,b3110,b3120 Store 0 to b3311,b3312,b3321,b3322,b3411,b3412,b3421,b3422 Store 0 to b3511,b3512,b3521,b3522,b3611,b3612,b3621,b3622 Store 0 to b3711,b3712,b3721,b3722,b3811,b3812,b3821,b3822 Store 0 to b3911,b3912,b3921,b3922 Store 0 to b4010,b4020,b4110,b4120,b4210,b4220,b4310,b4320 Store 0 to b4410,b4420,b4510,b4520,b4610,b4620,b4710,b4720 Store 0 to b4810,b4820,b4911,b4912,b4921,b4922,b5021,b5022 Store 0 to b5110,b5120,b5210,b5220 Store 0 to b0800,b3200 Store 0 to tuoi,Vithe Store 0 to mht,mh,mc,tuoi,Gtinh,tdvh,cmkt,Nghe,Nghedt,Nganhkt,Tpkt,Lhkt,Lamthem,Thunhap,TinhLv go top do while .not. eof() wait wind "Tinh :"+str(tinh,3)+" - "+str(recno(),5)+"/"+str(Recc(),5) nowait Tuoi=H5 Gtinh=H3 Tdtuoi=0 if H2=1 && Chu ho soho=soho+1 endif if ttnt=1 if Gtinh=1 nam_tt=nam_tt+1 else nu_tt=nu_tt+1 endif else if Gtinh=1 nam_nt=nam_nt+1 else nu_nt=nu_nt+1 endif endif * store 1 to soc if cosr=1 && Gan so ruy rong if ttnt=1 if Gtinh=1 soc=sott_nam else soc=sott_nu endif else if Gtinh=1 soc=sont_nam else soc=sont_nu endif endif endif * TDVH if H6_lop=0 and H6_he=0 tdvh=1 else if H6_he=12 do case case H6_Lop<=4 tdvh=2 case H6_Lop>=5 and H6_lop<=8 tdvh=3 case H6_Lop>=9 and H6_lop<=11 tdvh=4 othe tdvh=5 endcase else do case case H6_Lop<=3 tdvh2=2 case H6_Lop>=4 and H6_lop<=6 tdvh=3 case H6_Lop>=7 and H6_lop<=9 tdvh=4 othe tdvh=5 endcase endif endif * if c1=0 or c1>9 cmkt=1 else cmkt=c1 endif * bi="B01"+str(ttnt,1)+"0" do xdtuoi &bi(1,gtinh+1)=&bi(1,gtinh+1)+soc &bi(mht,gtinh+1)=&bi(mht,gtinh+1)+soc if Tuoi>=15 if gtinh=1 && nam if tuoi<=59 tdtuoi=1 endif else if tuoi<=54 tdtuoi=1 endif endif do xdtuoi if cmkt>1 do xdNghedt else Nghedt=24 endif bi="B02"+str(ttnt,1)+"0" mh=mht-4 &bi(1,gtinh+1)=&bi(1,gtinh+1)+soc &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc if tdtuoi=1 bi="B03"+str(ttnt,1)+"0" &bi(1,gtinh+1)=&bi(1,gtinh+1)+soc &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc endif * HD 7 ngay qua if c19=0 && HDKT 7 ngay if c170 && That nghiep mc=3 else && Co VL mc=2 endif else && Khong HDKT 7 ngay if c19=0 or c19>6 mc=9 else mc=c19+3 endif endif bi="B04"+str(ttnt,1)+str(gtinh,1) do CongB4 with bi if tdtuoi=1 bi="B29"+str(ttnt,1)+str(gtinh,1) do CongB4 with bi endif * b5 if tuoi<=34 do case case tuoi<=19 mc=2 case tuoi>=20 and tuoi<=24 mc=3 case tuoi>=25 and tuoi<=29 mc=4 case tuoi>=30 mc=5 endcase bi="B05"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Tdvh+2 do CongBieu with bi,Cmkt+8 endif * b6 if c19=0 && HDKT 7 ngay bi="B06"+str(ttnt,1)+"0" do CongB6 with bi if tdtuoi=1 bi="B30"+str(ttnt,1)+"0" do CongB6 with bi endif if c17=0 && Co VL * B7 bi="B07"+str(ttnt,1)+"0" if c10=0 or c10>6 Vithe=5 else Vithe=c10 endif do XDNKT do xdNnghiep do xdLhkt do CongB7 with bi if tdtuoi=1 bi="B31"+str(ttnt,1)+"0" do CongB7 with bi if c6=1 && Phu hop Nghe Dao tao bi="B42"+str(ttnt,1)+"0" do CongB7 with bi endif endif * B8 if Tinhc9 && LV o Tinh khac do xdTinh bi="B0800" &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(TinhLv+1,Gtinh+1)=&bi(TinhLv+1,Gtinh+1)+soc if tdtuoi=1 bi="B3200" &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(TinhLv+1,Gtinh+1)=&bi(TinhLv+1,Gtinh+1)+soc endif endif * b9 mc=Cmkt+1 bi="B09"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nganhkt+1 if tdtuoi=1 bi="B33"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nganhkt+1 endif * b10 mc=Nghe+1 bi="B10"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nganhkt+1 if tdtuoi=1 bi="B34"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nganhkt+1 endif * b11 mc=Nghe+1 bi="B11"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nghedt+1 if tdtuoi=1 bi="B35"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nghedt+1 endif * b12 mc=Nganhkt+1 bi="B12"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nghedt+1 if tdtuoi=1 bi="B36"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nghedt+1 endif * b13 mc=Tpkt+1 bi="B13"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nganhkt+1 if tdtuoi=1 bi="B37"+str(ttnt,1)+str(gtinh,1) do CongBieu with bi,1 do CongBieu with bi,Nganhkt+1 endif * b14 mc=Vithe+2 bi="B14"+str(ttnt,1)+str(gtinh,1) do Congb14 with bi if tdtuoi=1 bi="B38"+str(ttnt,1)+str(gtinh,1) do Congb14 with bi endif * b15 do case case c12<=9 mc=2 case c12>=10 and c12<=19 mc=3 case c12>=20 and c12<=29 mc=4 case c12>=30 and c12<=34 mc=5 case c12>=35 and c12<=39 mc=6 case c12>=40 and c12<=48 mc=7 case c12>=49 and c12<=59 mc=8 othe mc=9 endcase bi="B15"+str(ttnt,1)+str(gtinh,1) do CongB15 with bi if tdtuoi=1 bi="B39"+str(ttnt,1)+str(gtinh,1) do Congb15 with bi endif * B18 if c6=1 && CV phu hop Nganh DT bi="B18"+str(ttnt,1)+"0" do congB18 with bi endif ********************************** * Cac Bieu Thieu Viec lam * ********************************** if c140 * b19 bi="B19"+str(ttnt,1)+"0" do congB19 with bi if tdtuoi=1 bi="B43"+str(ttnt,1)+"0" do congB19 with bi endif * b20 So gio LV thuc the (c12)BQ 1->3=4->6/1->3 Tu >=15 Tuoi bi="B20"+str(ttnt,1)+"0" do congB20 with bi,c12 if tdtuoi=1 bi="B44"+str(ttnt,1)+"0" do congB20 with bi,c12 endif * b21 Thu nhap BQ 1->3=4->6/1->3 Tu >=15 Tuoi bi="B21"+str(ttnt,1)+"0" do congB20 with bi,c15 if tdtuoi=1 bi="B45"+str(ttnt,1)+"0" do congB20 with bi,c15 endif endif else ******************************* * Bieu That nghiep B22,B46 * ******************************* bi="B22"+str(ttnt,1)+"0" do congB22 with bi if tdtuoi=1 bi="B46"+str(ttnt,1)+"0" do congB22 with bi endif endif && ket thuc Co VL * b16 So gio LV thuc the (c12)BQ 1->3=4->6/1->3 Tu >=15 Tuoi bi="B16"+str(ttnt,1)+"0" do congB16 with bi,c12 if tdtuoi=1 bi="B40"+str(ttnt,1)+"0" do congB16 with bi,c12 endif * b17 Thu nhap BQ 1->3=4->6/1->3 Tu >=15 Tuoi bi="B17"+str(ttnt,1)+"0" do congB16 with bi,c15 if tdtuoi=1 bi="B41"+str(ttnt,1)+"0" do congB16 with bi,c15 endif else && Khong HDKT 7 ngay bi="B23"+str(ttnt,1)+"0" do CongB23 with bi if tdtuoi=1 bi="B47"+str(ttnt,1)+"0" do CongB23 with bi endif endif && Ket thuc HDKT 7 ngay * HDKT 12 THANG QUA if c20=1 * B24 bi="B24"+str(ttnt,1)+"0" do CongB24 with bi if tdtuoi=1 bi="B48"+str(ttnt,1)+"0" do CongB24 with bi endif * B25 do case case c21<183 mc=2 case c21>=183 and c21<=199 mc=3 case c21>=200 and c21<=239 mc=4 case c21>=240 and c21<=279 mc=5 case c21>=280 and c21<=319 mc=6 othe mc=7 endcase bi="B25"+str(ttnt,1)+str(gtinh,1) do CongB25 with bi if tdtuoi=1 bi="B49"+str(ttnt,1)+str(gtinh,1) do CongB25 with bi endif * B26, B50 Khu vuc Nong thon if ttnt=2 bi="B262"+str(gtinh,1) do CongB26 with bi if tdtuoi=1 bi="B502"+str(gtinh,1) do CongB26 with bi endif endif && ket thuc Nong thon else && Khong HDKT 112 thang qua bi="B27"+str(ttnt,1)+"0" do CongB27 with bi if c25=1 bi="B28"+str(ttnt,1)+"0" do CongB27 with bi endif if tdtuoi=1 bi="B51"+str(ttnt,1)+"0" do CongB27 with bi if c25=1 bi="B52"+str(ttnt,1)+"0" do CongB27 with bi endif endif endif endif && Ket thuc >= 15 tuoi skip enddo Return * Proc CongB27 Para bi &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+soc &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+soc &bi(Cmkt+22,Gtinh+1)=&bi(Cmkt+22,Gtinh+1)+soc &bi(Nghedt+32,Gtinh+1)=&bi(Nghedt+32,Gtinh+1)+soc do case case c26=0 Ngaylt=1 case c26>=1 and c26<=30 Ngaylt=2 case c26>=31 and c26<=90 Ngaylt=3 case c26>=91 and c26<=182 Ngaylt=4 case c26>=183 and c26<=279 Ngaylt=5 othe Ngaylt=6 endcase &bi(Ngaylt+57,Gtinh+1)=&bi(Ngaylt+57,Gtinh+1)+soc Return * Proc CongB26 para bi do Cong26 with bi,1 do Cong26 with bi,mht-3 do Cong26 with bi,Tdvh+16 do Cong26 with bi,Cmkt+22 do Cong26 with bi,Nghedt+32 if Datnn=1 do Cong26 with bi,58 else do Cong26 with bi,59 endif Return * Proc Cong26 Para bi,mh &bi(mh,1)=&bi(mh,1)+soc &bi(mh,2)=&bi(mh,2)+c22_1 &bi(mh,3)=&bi(mh,3)+c22_2 &bi(mh,4)=&bi(mh,4)+c22_3 &bi(mh,5)=&bi(mh,5)+c21 Return * Proc CongB25 Para bi do CongBieu with bi,1 do CongBieu with bi,mht-3 do CongBieu with bi,Tdvh+16 do CongBieu with bi,Cmkt+22 do CongBieu with bi,Nghedt+32 do case case c24=0 Ngaylt=1 case c24>=1 and c24<=30 Ngaylt=2 case c24>=31 and c24<=90 Ngaylt=3 case c24>=91 and c24<=182 Ngaylt=4 case c24>=183 and c24<=279 Ngaylt=5 othe Ngaylt=6 endcase do CongBieu with bi,Ngaylt+57 Return * Proc CongB24 Para bi &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+soc &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+soc &bi(Cmkt+22,Gtinh+1)=&bi(Cmkt+22,Gtinh+1)+soc &bi(Nghedt+32,Gtinh+1)=&bi(Nghedt+32,Gtinh+1)+soc Return * Proc CongB23 Para bi &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+soc &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+soc if c19=0 or c19>6 Nnhan=6 else Nnhan=c19 endif &bi(Nnhan+22,Gtinh+1)=&bi(Nnhan+22,Gtinh+1)+soc Return * Proc congb22 Para bi &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+soc &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+soc &bi(Cmkt+22,Gtinh+1)=&bi(Cmkt+22,Gtinh+1)+soc &bi(Nghedt+32,Gtinh+1)=&bi(Nghedt+32,Gtinh+1)+soc if c17=0 or c17>4 Tgtn=1 else Tgtn=c17 endif &bi(Tgtn+57,Gtinh+1)=&bi(Tgtn+57,Gtinh+1)+soc do case case c18=11 Ldtn=1 case c18=12 Ldtn=2 case c18=13 Ldtn=3 case c18=20 Ldtn=4 case c18=30 Ldtn=5 case c18=41 Ldtn=6 case c18=42 Ldtn=7 case c18=43 Ldtn=8 othe Ldtn=9 endcase &bi(Ldtn+62,Gtinh+1)=&bi(Ldtn+62,Gtinh+1)+soc Return * Proc congb19 Para bi &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+soc &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+soc &bi(Cmkt+22,Gtinh+1)=&bi(Cmkt+22,Gtinh+1)+soc &bi(Nghedt+32,Gtinh+1)=&bi(Nghedt+32,Gtinh+1)+soc &bi(Nghe+57,Gtinh+1)=&bi(Nghe+57,Gtinh+1)+soc &bi(Nganhkt+68,Gtinh+1)=&bi(Nganhkt+68,Gtinh+1)+soc &bi(Lhkt+89,Gtinh+1)=&bi(Lhkt+89,Gtinh+1)+soc if ttnt=2 if Datnn=1 &bi(105,Gtinh+1)=&bi(105,Gtinh+1)+soc else &bi(106,Gtinh+1)=&bi(106,Gtinh+1)+soc endif endif Return * Proc congb20 Para bi,Bienv * Cong so nguoi khong pahi ruy rong (Cac Bieu BQ) &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+1 &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+1 &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+1 &bi(Cmkt+22,Gtinh+1)=&bi(Cmkt+22,Gtinh+1)+1 &bi(Nghedt+32,Gtinh+1)=&bi(Nghedt+32,Gtinh+1)+1 &bi(Nghe+57,Gtinh+1)=&bi(Nghe+57,Gtinh+1)+1 &bi(Nganhkt+68,Gtinh+1)=&bi(Nganhkt+68,Gtinh+1)+1 &bi(Lhkt+89,Gtinh+1)=&bi(Lhkt+89,Gtinh+1)+1 if ttnt=2 if Datnn=1 &bi(105,Gtinh+1)=&bi(105,Gtinh+1)+1 else &bi(106,Gtinh+1)=&bi(106,Gtinh+1)+1 endif endif * Cong Gia tri &bi(1,Gtinh+4)=&bi(1,Gtinh+4)+Bienv &bi(1,4)=&bi(1,4)+Bienv &bi(mht-3,Gtinh+4)=&bi(mht-3,Gtinh+4)+Bienv &bi(mht-3,4)=&bi(mht-3,4)+Bienv &bi(Tdvh+16,Gtinh+4)=&bi(Tdvh+16,Gtinh+4)+Bienv &bi(Tdvh+16,4)=&bi(Tdvh+16,4)+Bienv &bi(Cmkt+22,Gtinh+4)=&bi(Cmkt+22,Gtinh+4)+Bienv &bi(Cmkt+22,4)=&bi(Cmkt+22,4)+Bienv &bi(Nghedt+32,Gtinh+4)=&bi(Nghedt+32,Gtinh+4)+Bienv &bi(Nghedt+32,4)=&bi(Nghedt+32,4)+Bienv &bi(Nghe+57,Gtinh+4)=&bi(Nghe+57,Gtinh+4)+Bienv &bi(Nghe+57,4)=&bi(Nghe+57,4)+Bienv &bi(Nganhkt+68,Gtinh+4)=&bi(Nganhkt+68,Gtinh+4)+Bienv &bi(Nganhkt+68,4)=&bi(Nganhkt+68,4)+Bienv &bi(Lhkt+89,Gtinh+4)=&bi(Lhkt+89,Gtinh+4)+Bienv &bi(Lhkt+89,4)=&bi(Lhkt+89,4)+Bienv if ttnt=2 if Datnn=1 &bi(105,Gtinh+4)=&bi(105,Gtinh+4)+Bienv &bi(105,4)=&bi(105,4)+Bienv else &bi(106,Gtinh+4)=&bi(106,Gtinh+4)+Bienv &bi(106,4)=&bi(106,4)+Bienv endif endif Return * Proc congb18 Para bi &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+soc &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+soc &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+soc &bi(Cmkt+22,Gtinh+1)=&bi(Cmkt+22,Gtinh+1)+soc &bi(Nghe+32,Gtinh+1)=&bi(Nghe+32,Gtinh+1)+soc &bi(Nganhkt+43,Gtinh+1)=&bi(Nganhkt+43,Gtinh+1)+soc &bi(Vithe+65,Gtinh+1)=&bi(Vithe+65,Gtinh+1)+soc &bi(Lhkt+72,Gtinh+1)=&bi(Lhkt+72,Gtinh+1)+soc Return * Proc congb16 Para bi,Bienv * Cong so nguoi khong phai suy rong (Cac Bieu BQ) &bi(1,Gtinh+1)=&bi(1,Gtinh+1)+1 &bi(mht-3,Gtinh+1)=&bi(mht-3,Gtinh+1)+1 &bi(Tdvh+16,Gtinh+1)=&bi(Tdvh+16,Gtinh+1)+1 &bi(Cmkt+22,Gtinh+1)=&bi(Cmkt+22,Gtinh+1)+1 &bi(Nghe+32,Gtinh+1)=&bi(Nghe+32,Gtinh+1)+1 &bi(Nganhkt+43,Gtinh+1)=&bi(Nganhkt+43,Gtinh+1)+1 &bi(Vithe+65,Gtinh+1)=&bi(Vithe+65,Gtinh+1)+1 &bi(Lhkt+72,Gtinh+1)=&bi(Lhkt+72,Gtinh+1)+1 if ttnt=2 if Datnn=1 &bi(88,Gtinh+1)=&bi(88,Gtinh+1)+1 else &bi(89,Gtinh+1)=&bi(89,Gtinh+1)+1 endif endif * Cong Gia tri bien vao &bi(1,Gtinh+4)=&bi(1,Gtinh+4)+Bienv &bi(1,4)=&bi(1,4)+Bienv &bi(mht-3,Gtinh+4)=&bi(mht-3,Gtinh+4)+Bienv &bi(mht-3,4)=&bi(mht-3,4)+Bienv &bi(Tdvh+16,Gtinh+4)=&bi(Tdvh+16,Gtinh+4)+Bienv &bi(Tdvh+16,4)=&bi(Tdvh+16,4)+Bienv &bi(Cmkt+22,Gtinh+4)=&bi(Cmkt+22,Gtinh+4)+Bienv &bi(Cmkt+22,4)=&bi(Cmkt+22,4)+Bienv &bi(Nghe+32,Gtinh+4)=&bi(Nghe+32,Gtinh+4)+Bienv &bi(Nghe+32,4)=&bi(Nghe+32,4)+Bienv &bi(Nganhkt+43,Gtinh+4)=&bi(Nganhkt+43,Gtinh+4)+Bienv &bi(Nganhkt+43,4)=&bi(Nganhkt+43,4)+Bienv &bi(Vithe+65,Gtinh+4)=&bi(Vithe+65,Gtinh+4)+Bienv &bi(Vithe+65,4)=&bi(Vithe+65,4)+Bienv &bi(Lhkt+72,Gtinh+4)=&bi(Lhkt+72,Gtinh+4)+Bienv &bi(Lhkt+72,4)=&bi(Lhkt+72,4)+Bienv if ttnt=2 if Datnn=1 &bi(88,Gtinh+4)=&bi(88,Gtinh+4)+Bienv &bi(88,4)=&bi(88,4)+Bienv else &bi(89,Gtinh+4)=&bi(89,Gtinh+4)+Bienv &bi(89,4)=&bi(89,4)+Bienv endif endif Return * Proc Congb15 Para bi do CongBieu with bi,1 do CongBieu with bi,Nganhkt+2 do XDGio do CongBieu with bi,Lamthem+23 do XDThunhap do CongBieu with bi,Thunhap+32 if ttnt=2 if Datnn=1 do CongBieu with bi,40 else do CongBieu with bi,41 endif endif Return * Proc Congb14 Para bi do CongBieu with bi,1 do CongBieu with bi,Cmkt+2 do CongBieu with bi,Nghe+12 do CongBieu with bi,Nganhkt+23 do CongBieu with bi,Lhkt+44 Return * Proc CongB7 Para bi &bi(1,gtinh+1)=&bi(1,gtinh+1)+soc mh=mht-3 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Tdvh+16 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Cmkt+22 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Nghe+32 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Nganhkt+43 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Vithe+65 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Lhkt+72 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc Return * Proc CongB6 Para bi &bi(1,gtinh+1)=&bi(1,gtinh+1)+soc mh=mht-3 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Tdvh+16 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Cmkt+22 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc mh=Nghedt+32 &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc if c170 && That nghiep mh=60 else if c140 && Thieu VL mh=59 else mh=58 && Du VL endif endif &bi(mh,gtinh+1)=&bi(mh,gtinh+1)+soc Return * Proc CongB4 Para bi do CongBieu with bi,1 do CongBieu with bi,mht-3 do CongBieu with bi,Tdvh+16 do CongBieu with bi,Cmkt+22 do CongBieu with bi,Nghedt+32 if ttnt=2 if Datnn=1 do CongBieu with bi,58 else do CongBieu with bi,59 endif endif Return * Proc Congbieu Para bi,mh &bi(mh,mc)=&bi(mh,mc)+soc &bi(mh,1)=&bi(mh,1)+soc Return * Proc xdGio do case case c14=0 Lamthem=1 case c14>=1 and c14<=8 Lamthem=2 case c14>=9 and c14<=16 Lamthem=3 case c14>=17 and c14<=24 Lamthem=4 case c14>=25 and c14<=32 Lamthem=5 case c14>=33 and c14<=40 Lamthem=6 case c14>=41 and c14<=48 Lamthem=7 othe Lamthem=8 endcase Return * Proc XDThunhap do case case c15<290 Thunhap=1 case c15>=290 and c15<=499 Thunhap=2 case c15>=500 and c15<=999 Thunhap=3 case c15>=1000 and c15<=1999 Thunhap=4 case c15>=2000 and c15<=4999 Thunhap=5 othe Thunhap=6 endcase Return * Proc xdTuoi do case case tuoi=0 mht=2 case tuoi>=1 and tuoi<=4 mht=3 case tuoi>=5 and tuoi<=9 mht=4 case tuoi>=10 and tuoi<=14 mht=5 case tuoi>=15 and tuoi<=19 mht=6 case tuoi>=20 and tuoi<=24 mht=7 case tuoi>=25 and tuoi<=29 mht=8 case tuoi>=30 and tuoi<=34 mht=9 case tuoi>=35 and tuoi<=39 mht=10 case tuoi>=40 and tuoi<=44 mht=11 case tuoi>=45 and tuoi<=49 mht=12 case tuoi>=50 and tuoi<=54 mht=13 case tuoi>=55 and tuoi<=59 mht=14 case tuoi>=60 and tuoi<=64 mht=15 case tuoi>=65 and tuoi<=69 mht=16 case tuoi>=70 and tuoi<=74 mht=17 case tuoi>=75 mht=18 endcase return * Proc xdLhkt do case case c11>=11 and c11<=16 lhkt=c11-10 Tpkt=1 case c11>=21 and c11<=24 lhkt=c11-14 Tpkt=2 case c11=30 lhkt=11 Tpkt=3 case c11=41 lhkt=12 Tpkt=4 case c11=42 lhkt=13 Tpkt=4 case c11=50 lhkt=14 Tpkt=5 othe lhkt=13 Tpkt=4 endcase Return * Proc XDNKT do case case Val(c8)=1 or Val(c8)=2 NganhKt=1 case Val(c8)=5 NganhKt=2 case Val(c8)>=10 and Val(c8)<=14 && CN NganhKt=3 case Val(c8)>=15 and Val(c8)<=37 NganhKt=4 case Val(c8)=40 or Val(c8)=41 NganhKt=5 case Val(c8)=45 NganhKt=6 case Val(c8)>=50 and Val(c8)<=52 && TN NganhKt=7 case Val(c8)=55 NganhKt=8 case Val(c8)>=60 and Val(c8)<=64 NganhKt=9 case Val(c8)>=65 and Val(c8)<=67 NganhKt=10 case Val(c8)=70 NganhKt=11 case Val(c8)>=71 and Val(c8)<=74 NganhKt=12 case Val(c8)=75 NganhKt=13 case Val(c8)=80 NganhKt=14 case Val(c8)=85 or Val(c8)=83 NganhKt=15 case Val(c8)=90 NganhKt=16 case Val(c8)=91 NganhKt=17 case Val(c8)=92 or Val(c8)=93 NganhKt=18 case Val(c8)=95 NganhKt=19 case Val(c8)=99 NganhKt=20 othe NganhKt=19 wait wind "Sai ngành SXKD cấp 1 : "+c8 nowait endcase Return * Proc xdNghedt Cap1=int(c2/100) && 23 nghe dao dt do case case Cap1=14 Nghedt=1 case Cap1=21 Nghedt=2 case Cap1=22 Nghedt=3 case Cap1=31 Nghedt=4 case Cap1=32 Nghedt=5 case Cap1=34 Nghedt=6 case Cap1=38 Nghedt=7 case Cap1=42 Nghedt=8 case Cap1=44 Nghedt=9 case Cap1=46 Nghedt=10 case Cap1=48 Nghedt=11 case Cap1=52 Nghedt=12 case Cap1=53 Nghedt=13 case Cap1=54 Nghedt=14 case Cap1=58 Nghedt=15 case Cap1=62 Nghedt=16 case Cap1=64 Nghedt=17 case Cap1=72 Nghedt=18 case Cap1=76 Nghedt=19 case Cap1=81 Nghedt=20 case Cap1=84 Nghedt=21 case Cap1=85 Nghedt=22 case Cap1=86 Nghedt=23 othe Nghedt=16 && nlts endcase Return * Proc xdNnghiep Nghe=int(c7/10) && chi co 10 Nhom nghe nghiep if Nghe=0 or Nghe>9 Nghe=9 endif Return * Proc xdTinh sele dmTinh loca for solieu.c9=ma_tinh if found() TinhLv=Recno() else TinhLv=65 endif sele solieu Return -toexcel_th.prg ( Đưa ra excel sau khi tổng hợp) Para braExcel,cFileDB cFileDBV=SYS(5)+CURDIR()+cFileDB+".xls" do case case val(cMat)=0 IF !DIRECTORY("Kq_TQuoc") MD ("Kq_TQuoc") ENDIF cFileXLS=SYS(5)+CURDIR()+"Kq_TQuoc\"+braExcel+".xls" case val(cMat)>=1 and val(cMat)<=8 IF !DIRECTORY("Kq_Vung"+allt(cMat)) MD ("Kq_Vung"+allt(cMat)) ENDIF cFileXLS=SYS(5)+CURDIR()+"Kq_Vung"+allt(cMat)+"\"+braExcel+".xls" case val(cMat)>=9 and val(cMat)<=11 IF !DIRECTORY("Kq_VTD"+STR(Val(cMat)-8,1)) MD ("Kq_VTD"+STR(Val(cMat)-8,1)) ENDIF cFileXLS=SYS(5)+CURDIR()+"Kq_VTD"+STR(Val(cMat)-8,1)+"\"+braExcel+".xls" case val(cMat)>=101 IF !DIRECTORY("Kq_Tinh"+allt(cMat)) MD ("Kq_Tinh"+allt(cMat)) ENDIF cFileXLS=SYS(5)+CURDIR()+"Kq_Tinh"+allt(cMat)+"\"+braExcel+".xls" endcase * IF FILE(cFileDBV) tmpsheet = GETOBJECT('','excel.sheet') XLApp = tmpsheet.APPLICATION XLApp.VISIBLE = .T. XLApp.WorkBooks.OPEN(cFileDBV,,.T.) XLApp.ActiveWindow.WINDOWSTATE = 2 XLSheet = XLApp.ActiveSheet nStart=9 nDong=nStart cWnd="Bieu" SELE 0 use tgIn alias tgIn nCot=FCOUNT()-1 XLSheet.Cells(2,1).VALUE=cBieu XLSheet.Cells(4,1).VALUE=cTen tsCot=FCOUNT() if BieuIn=26 or BieuIn=50 tsCot=10 endif if BieuIn=16 or BieuIn=17 or BieuIn=40 or BieuIn=41 or BieuIn=20 or BieuIn=21 or BieuIn=44 or BieuIn=45 tsCot=15 endif if BieuIn=53 tsCot=10 endif SCAN cTr="rtrim(ten)" cCL='XLSheet.Cells('+ALLT(STR(nDong))+','+ALLT(STR(1))+').VALUE = '+cTr+'' &cCL nVitri=2 FOR i=7 TO tsCot cTr=FIELD(i) IF &cTr0 cCL='XLSheet.Cells('+ALLT(STR(nDong))+','+ALLT(STR(nVitri))+').VALUE = '+cTr+"" &cCL ELSE cCL='XLSheet.Cells('+ALLT(STR(nDong))+','+ALLT(STR(nVitri))+').VALUE = ""' &cCL ENDIF nVitri=nVitri+1 ENDFOR cFK_IN=FIELDS(1) nGt=&cFK_IN nRow=nDong FOR nCol=1 TO FCOUNT()-1 do Kieu_chu ENDFOR nDong=nDong+1 ENDSCAN SELECT tgIn USE XLSheet.RANGE(XLSheet.Cells(nStart,1),XLSheet.Cells(nDong,1)).SELECT XLApp.SELECTION.WrapText=.T. XLSheet.RANGE(XLSheet.Cells(nStart,1),XLSheet.Cells(nStart,nCot)).SELECT XLSheet.RANGE(XLSheet.Cells(nDong,1),XLSheet.Cells(nDong,nCot)).SELECT XLApp.SELECTION.Font.size=8 XLApp.DisplayAlerts =.F. XLApp.ActiveWorkbook.SAVEAS(cFileXLS) lDamo=.F. IF XLApp.WINDOWS.COUNT0 IF XLApp.WINDOWS.COUNT>2 lDamo=.T. ENDIF FOR hx=1 TO XLApp.WINDOWS.COUNT IF XLApp.WINDOWS(hx).CAPTION=cWnd XLApp.WINDOWS(hx).CLOSE EXIT ENDIF ENDFOR ENDIF IF lDamo XLApp.ActiveWorkbook.CLOSE ELSE XLApp.QUIT ENDIF ENDIF RETURN * Proc Kieu_chu DO CASE CASE nGt=0 XLSheet.Cells(nRow,nCol).FONT.Bold=.F. XLSheet.Cells(nRow,nCol).FONT.Italic=.F. CASE nGt=1 XLSheet.Cells(nRow,nCol).FONT.Bold=.T. CASE nGt=2 XLSheet.Cells(nRow,nCol).FONT.Bold=.T. XLSheet.Cells(nRow,nCol).FONT.Italic=.T. CASE nGt=3 XLSheet.Cells(nRow,nCol).FONT.Bold=.F. XLSheet.Cells(nRow,nCol).FONT.Italic=.T. ENDCASE Return dkien_in.prg( Chương trình kiểm tra điều kiện in) Para BieuIn store 0 to tg sele tgIn go botom sdong=md Dime tg(tsdong,21) go top do while .not. eof() for j=1 to 21 cot="C"+allt(str(j,2)) tg(md,j)=&cot endfor skip enddo zap Bra=BieuIn if Bra=26 OR Bra=29 or Bra=50 bdm=4 for j=1 to 21 tg(12,j)=tg(12,j)+tg(13,j)+tg(14,j)+tg(15,j) tg(13,j)=0 tg(14,j)=0 tg(15,j)=0 tg(24,j)=tg(24,j)+tg(25,j)+tg(26,j)+tg(27,j) tg(25,j)=tg(28,j) tg(26,j)=tg(29,j)+tg(30,j)+tg(31,j) tg(27,j)=0 tg(28,j)=0 tg(29,j)=0 tg(30,j)=0 tg(31,j)=0 endfor * Chia lai ty le for i=1 to sdong if tg(i,6)0 tg(i,4)=tg(i,7)*100/tg(i,6) endif if tg(i,8)0 tg(i,2)=tg(i,5)*100/tg(i,8) tg(i,3)=tg(i,6)*100/tg(i,8) endif endfor endif for i=1 to sdong sele dmucIn seek str(bdm,2)+str(i,3) if found() and co_in=1 iTten=Ten c_kin=K_in sele tgIn appe blank Repl k_in with c_Kin,Ten with iTen for j=1 to 21 cot="C"+allt(str(j,2)) Repl &cot with tg(i,j) endfor endif endfor Return - excel_tinh.prg Para braExcel,cFileDB cFileDBV=SYS(5)+CURDIR()+cFileDB+".xls" IF val(cMah)=0 IF !DIRECTORY("C:\KqE_T"+cMat+"\chung\") MD ("C:\KqE_T"+cMat+"\chung\") ENDIF cFileXLS="C:\KqE_T"+cMat+"\chung\"+braExcel+".xls" ELSE IF !DIRECTORY("C:\KqE_T"+cMat+"\Huyen"+ALLTRIM(cMah)+"\") MD ("C:\KqE_T"+cMat+"\Huyen"+ALLTRIM(cMah)+"\") ENDIF cFileXLS="C:\KqE_T"+cMat+"\Huyen"+ALLTRIM(cMah)+"\"+braExcel+".xls" ENDIF IF FILE(cFileDBV) tmpsheet = GETOBJECT('','excel.sheet') XLApp = tmpsheet.APPLICATION XLApp.VISIBLE = .T. XLApp.WorkBooks.OPEN(cFileDBV,,.T.) XLApp.ActiveWindow.WINDOWSTATE = 2 XLSheet = XLApp.ActiveSheet nStart=9 nDong=nStart cWnd="Bieu" SELE 0 use c:\tgIn alias tgIn nCot=FCOUNT()-1 XLSheet.Cells(2,1).VALUE=cBieu XLSheet.Cells(4,1).VALUE=cTen SCAN cTr="rtrim(ten)" cCL='XLSheet.Cells('+ALLT(STR(nDong))+','+ALLT(STR(1))+').VALUE = '+cTr+'' &cCL nVitri=2 tsCot=FCOUNT() if BieuIn=26 or BieuIn=50 tsCot=10 endif if BieuIn=16 or BieuIn=17 or BieuIn=40 or BieuIn=41 or BieuIn=20 or BieuIn=21 or BieuIn=44 or BieuIn=45 tsCot=15 endif if BieuIn=53 tsCot=10 endif FOR i=7 TO tsCot cTr=FIELD(i) IF &cTr0 cCL='XLSheet.Cells('+ALLT(STR(nDong))+','+ALLT(STR(nVitri))+').VALUE = '+cTr+"" &cCL ELSE cCL='XLSheet.Cells('+ALLT(STR(nDong))+','+ALLT(STR(nVitri))+').VALUE = ""' &cCL ENDIF nVitri=nVitri+1 ENDFOR cFK_IN=FIELDS(1) nGt=&cFK_IN nRow=nDong FOR nCol=1 TO FCOUNT()-1 do Kieu_chu ENDFOR nDong=nDong+1 ENDSCAN SELECT tgIn USE XLSheet.RANGE(XLSheet.Cells(nStart,1),XLSheet.Cells(nDong,1)).SELECT XLApp.SELECTION.WrapText=.T. XLSheet.RANGE(XLSheet.Cells(nStart,1),XLSheet.Cells(nStart,nCot)).SELECT XLSheet.RANGE(XLSheet.Cells(nDong,1),XLSheet.Cells(nDong,nCot)).SELECT XLApp.SELECTION.Font.size=8 XLApp.DisplayAlerts =.F. XLApp.ActiveWorkbook.SAVEAS(cFileXLS) lDamo=.F. IF XLApp.WINDOWS.COUNT0 IF XLApp.WINDOWS.COUNT>2 lDamo=.T. ENDIF FOR hx=1 TO XLApp.WINDOWS.COUNT IF XLApp.WINDOWS(hx).CAPTION=cWnd XLApp.WINDOWS(hx).CLOSE EXIT ENDIF ENDFOR ENDIF IF lDamo XLApp.ActiveWorkbook.CLOSE ELSE XLApp.QUIT ENDIF ENDIF RETURN * Proc Kieu_chu DO CASE CASE nGt=0 XLSheet.Cells(nRow,nCol).FONT.Bold=.F. XLSheet.Cells(nRow,nCol).FONT.Italic=.F. CASE nGt=1 XLSheet.Cells(nRow,nCol).FONT.Bold=.T. CASE nGt=2 XLSheet.Cells(nRow,nCol).FONT.Bold=.T. XLSheet.Cells(nRow,nCol).FONT.Italic=.T. CASE nGt=3 XLSheet.Cells(nRow,nCol).FONT.Bold=.F. XLSheet.Cells(nRow,nCol).FONT.Italic=.T. ENDCASE Return - thbcn( Tổng hợp báo cáo nhanh) Publ b01(17,6),b02(13,6),b03(14,6),b04(14,6),b05(14,8),b06(14,12),b07(14,12) Publ b08(34,12),b09(12,12),b10(9,24),b11(66,67),b12(14,8),b13(14,8),b14(14,9),b15(14,4),b16(17,24) Publ tuoi Publ mht,mh,mc,tuoi,Gtinh,tdvh,cmkt,Kv,Kvkt,Tpkt,Bra,TinhLv,mhTinh * set cons off set echo off set alte to sai set alte on sele dmhc copy to dmTinh for ma_huyen=0 sele 0 use dmTinh alias dmTinh * sele 0 use tgBCN alias tgBCN zap sele dmhc scan for ma_huyen=0 Matinh=ma_tinh do xdVungKT do thTinh with "tgtq",Matinh sele dmhc endscan * tao ra tgtq wait wind "Đang cộng dồn kết quả Toàn quốc !!! " nowait do Congdon do Chia sele tgBCN if cosr1 copy to tgBCN_Mau endif use sele dmTinh use * set alte to close all Rele b01,b02,b03,b04,b05,b06,b07,b08,b09,b10,b11,b12,b13,b14,b15 Rele mht,mh,mc,tuoi,Gtinh,tdvh,cmkt,Nganhkt,Kv,Kvkt,Tpkt,Lhkt,Lamthem,Thunhap,mhTinh,TinhLv Return * Proc thTinh Para tgGhep,Matinh Wait wind "Đang tổng hợp tỉnh :"+str(Matinh,3) nowait Fsl="Data\T"+str(Matinh,3) if File(Fsl+".dbf") if Matinh=207 or Matinh=209 or Matinh=213 or Matinh=215 or Matinh=205 or Matinh=106 or Matinh=111 Heso="Hst"+str(Matinh,3) sele 0 use &Heso alias Hstinh go top do while .not. eof() MaHuyen=Huyen sott_nam=hstt_nam sott_nu=hstt_nu sont_nam=hsnt_nam sont_nu=hsnt_nu store 0 to soho,nam_tt,nu_tt,nam_nt,nu_nt,sohoTT,sohoNT sele 0 use &Fsl copy to slHuyen for Huyen=MaHuyen use slHuyen alias solieu do chinh with Matinh do Tonghop sele solieu use do CongTong * Ghi tg cho tung Huyen for bra=1 to 16 do Ghitg with bra,MaTinh,Mahuyen endfor * sele Hstinh Repl tsho with soho,mautt_nam with nam_tt,mautt_nu with nu_tt Repl tsho_TT with sohoTT,tsho_NT with sohonT if mautt_nam0 Repl hstt_nam with dstt_nam/mautt_nam endif if mautt_nu0 Repl hstt_nu with dstt_nu/mautt_nu endif Repl maunt_nam with nam_nt,maunt_nu with nu_nt Repl hsnt_nam with dsnt_nam/maunt_nam,hsnt_nu with dsnt_nu/maunt_nu skip enddo sele hsTinh use dele file slHuyen.dbf else Mahuyen=0 sele hs2004 loca for mtinh=Matinh if found() sott_nam=hstt_nam sott_nu=hstt_nu sont_nam=hsnt_nam sont_nu=hsnt_nu endif store 0 to soho,nam_tt,nu_tt,nam_nt,nu_nt,sohoTT,sohoNT sele 0 use &Fsl copy to slTam use slTam alias solieu do chinh with Matinh do Tonghop sele solieu use dele file slTam.dbf do CongTong * * sele hs2004 * loca for mtinh=Matinh * if found() * Repl tsho with soho,mautt_nam with nam_tt,mautt_nu with nu_tt * Repl hstt_nam with dstt_nam/mautt_nam,hstt_nu with dstt_nu/mautt_nu * * Repl maunt_nam with nam_nt,maunt_nu with nu_nt * Repl hsnt_nam with dsnt_nam/maunt_nam,hsnt_nu with dsnt_nu/maunt_nu * endif * Ghi tg for bra=1 to 16 do Ghitg with bra,MaTinh,Mahuyen endfor endif endif Return * Proc Congdon sele tgBCN sort on mb,md to slft zap Dime bts(67) store 0 to bts sele 0 use slft alias slft go top imb=mb imd=md iTen=ten cKieu=K_in do while .not. eof() if mb=imb and md=imd for j=1 to 67 cot="c"+allt(str(j,2)) bts(j)=bts(j)+&cot endfor else sele tgBCN appe blank Repl tinh with 0,ten with iten,mb with imb,md with imd,K_in with cKieu for j=1 to 67 cot="c"+allt(str(j,2)) Repl &cot with bts(j) endfor sele slft store 0 to bts imb=mb imd=md iTen=ten cKieu=K_in loop endif skip enddo sele tgBCN appe blank Repl tinh with 0,ten with iten,mb with imb,md with imd,K_in with cKieu for j=1 to 67 cot="c"+allt(str(j,2)) Repl &cot with bts(j) endfor sele slft use dele file slft.dbf Rele bts Return ************************* * Chia Ty le, BQ * ************************* Proc Chia sele tgBCN scan for Subs(mb,2,2)="04" if c10 Repl c2 with c2*100/c1 Repl c3 with c3*100/c1 Repl c4 with c4*100/c1 Repl c5 with c5*100/c1 Repl c6 with c6*100/c1 Repl c1 with c1*100/c1 endif endscan scan for Subs(mb,2,2)="05" if c10 Repl c2 with c2*100/c1 Repl c3 with c3*100/c1 Repl c4 with c4*100/c1 Repl c5 with c5*100/c1 Repl c6 with c6*100/c1 Repl c7 with c7*100/c1 Repl c8 with c8*100/c1 Repl c1 with c1*100/c1 endif endscan scan for Subs(mb,2,2)="07" if c70 Repl c1 with c1*100/c7 endif if c80 Repl c2 with c2*100/c8 endif if c90 Repl c3 with c3*100/c9 endif if c100 Repl c4 with c4*100/c10 endif if c110 Repl c5 with c5*100/c11 endif if c120 Repl c6 with c6*100/c12 endif endscan dime ts(12) store 0 to ts scan for Subs(mb,2,2)="08" if md=1 for j=1 to 12 cot="c"+allt(str(j,2)) ts(j)=&Cot endfor endif * for j=1 to 12 cot="c"+allt(str(j,2)) if ts(j)0 Repl &cot with &cot*100/ts(j) endif endfor endscan store 0 to ts scan for Subs(mb,2,2)="09" if md=1 for j=1 to 12 cot="c"+allt(str(j,2)) ts(j)=&Cot endfor endif * for j=1 to 12 cot="c"+allt(str(j,2)) if ts(j)0 Repl &cot with &cot*100/ts(j) endif endfor endscan scan for Subs(mb,2,2)="10" for j=1 to 12 cot="c"+allt(str(j,2)) cotc="c"+allt(str(j+12,2)) if &cot0 Repl &cot with &cotc/&cot endif endfor Endscan scan for Subs(mb,2,2)="12" if c50 Repl c1 with c1*100/c5 endif if c60 Repl c2 with c2*100/c6 endif if c70 Repl c3 with c3*100/c7 endif if c80 Repl c4 with c4*100/c8 endif endscan scan for Subs(mb,2,2)="13" if c60 Repl c4 with c7*100/c6 endif if c80 Repl c2 with c5*100/c8 Repl c3 with c6*100/c8 endif endscan scan for Subs(mb,2,2)="16" for j=1 to 12 cot="c"+allt(str(j,2)) cotc="c"+allt(str(j+12,2)) if &cot0 Repl &cot with &cot*100/&cotc endif endfor Endscan Return ******************** * Cong Tong * ******************** Proc CongTong for bra=1 to 16 Bi="B"+padl(allt(str(Bra,2)),2,"0") sele dmBieu loca for Mab=Bra if found() sdong=tsdong scot=tscot For i=1 to sdong for j=1 to scot &Bi(i,j)=Int(&Bi(i,j)) endfor Endfor endif endfor for i=1 to 17 B01(i,3)=B01(i,3)+B01(i,4) && TS=Nam+Nu B01(i,5)=B01(i,5)+B01(i,6) B01(i,1)=B01(i,3)+B01(i,5) B01(i,2)=B01(i,4)+B01(i,6) endfor for i=1 to 12 B02(i,3)=B02(i,3)+B02(i,4) && TS=Nam+Nu B02(i,5)=B02(i,5)+B02(i,6) B02(i,1)=B02(i,3)+B02(i,5) B02(i,2)=B02(i,4)+B02(i,6) endfor * Chinh lai LD trong do tuoi B02(13,3)=B06(1,7)+B06(1,8) B02(13,5)=B06(1,11)+B06(1,12) B02(13,1)=B02(13,3)+B02(13,5) B02(13,2)=B02(13,4)+B02(13,6) * for i=1 to 14 B03(i,3)=B03(i,3)+B03(i,4) && TS=Nam+Nu B03(i,5)=B03(i,5)+B03(i,6) B03(i,1)=B03(i,3)+B03(i,5) B03(i,2)=B03(i,4)+B03(i,6) endfor * Chinh lai B06 Co VL+TN=HDKT(b03) for i=1 to 14 B06(i,5)=B03(i,3)-B06(i,6) B06(i,9)=B03(i,5)-B06(i,10) endfor for i=1 to 14 B06(i,1)=B06(i,5)+B06(i,9) B06(i,2)=B06(i,6)+B06(i,10) B06(i,3)=B06(i,7)+B06(i,11) B06(i,4)=B06(i,8)+B06(i,12) endfor for i=1 to 14 B07(i,1)=B07(i,3)+B07(i,5) B07(i,2)=B07(i,4)+B07(i,6) B07(i,7)=B07(i,9)+B07(i,11) B07(i,8)=B07(i,10)+B07(i,12) endfor for j=1 to 12 B08(1,j)=B08(3,j)+B08(4,j) endfor * Chinh lai B15 B15(1,1)=B01(3,1)-B03(1,1) B15(3,1)=B01(6,1)-B03(3,1) B15(4,1)=B01(7,1)-B03(4,1) B15(5,1)=B01(8,1)-B03(5,1) B15(6,1)=B01(9,1)-B03(6,1) B15(7,1)=B01(10,1)-B03(7,1) B15(8,1)=B01(11,1)-B03(8,1) B15(9,1)=B01(12,1)-B03(9,1) B15(10,1)=B01(13,1)-B03(10,1) B15(12,1)=B01(15,1)-B03(12,1) B15(13,1)=B01(16,1)-B03(13,1) B15(14,1)=B01(17,1)-B03(14,1) for i=1 to 14 B15(i,4)=B15(i,1)-B15(i,2)-B15(i,3) endfor for i=1 to 17 B16(i,1)=B16(i,2)+B16(i,3)+B16(i,4)+B16(i,5)+B16(i,6)+B16(i,7)+B16(i,8)+B16(i,9) B16(i,13)=B16(i,14)+B16(i,15)+B16(i,16)+B16(i,17)+B16(i,18)+B16(i,19)+B16(i,20)+B16(i,21) endfor if b07(1,4)b16(1,1) ?"Tinh "+str(MaTinh,3)+" - TN " endif if b07(1,10)b16(1,13) ?"Tinh "+str(MaTinh,3)+" - HDKT " endif Return ********************************** * Ghi cac Bieu Trung gian * ********************************** Proc Ghitg Para Bra,MaTinh,Mahuyen wait wind "Bieu "+str(bra,5) nowait bdm=Bra if Bra=4 or Bra=5 or Bra=6 or Bra=7 or Bra=12 or Bra=13 or Bra=14 or Bra=15 bdm=3 endif * Bi="B"+padl(allt(str(Bra,2)),2,"0") sele dmBieu loca for Mab=Bra if found() sdong=tsdong scot=tscot For i=1 to sdong iTen=" " cKieu=0 sele dmuc seek str(bdm,2)+str(i,2) if found() iTen=ten cKieu=Kieu_in endif sele tgBCN appe Blank Repl tinh with MaTinh,Huyen with Mahuyen,md with i,Ten with iTen,K_in with cKieu Repl mb with bi for j=1 to scot cot="c"+allt(str(j,2)) Repl &cot with &Bi(i,j) endfor endfor endif Return * ************************************** * Cong vao cac Bieu trung gian * ************************************** Proc Tonghop sele solieu Store 0 to b01,b02,b03,b04,b05,b06,b07,b08,b09,b10,b11,b12,b13,b14,b15,b16 Store 0 to mht,mh,mc,tuoi,Gtinh,tdvh,cmkt,Kvkt,Tpkt,Lamthem,Thunhap,TinhLv,mhTinh go top do while .not. eof() wait wind "Tinh :"+str(tinh,3)+" - "+str(recno(),5)+"/"+str(Recc(),5) nowait Tuoi=H5 Gtinh=H3 Tdtuoi=0 if H2=1 && Chu ho soho=soho+1 if ttnt=1 sohoTT=sohoTT+1 else sohoNT=sohoNT+1 endif endif if ttnt=1 if Gtinh=1 nam_tt=nam_tt+1 else nu_tt=nu_tt+1 endif else if Gtinh=1 nam_nt=nam_nt+1 else nu_nt=nu_nt+1 endif endif * store 1 to soc if cosr=1 && Gan so ruy rong if ttnt=1 if Gtinh=1 soc=sott_nam else soc=sott_nu endif else if Gtinh=1 soc=sont_nam else soc=sont_nu endif endif endif * TDVH if H6_lop=0 and H6_he=0 tdvh=1 else if H6_he=12 do case case H6_Lop<=4 tdvh=2 case H6_Lop>=5 and H6_lop<=8 tdvh=3 case H6_Lop>=9 and H6_lop<=11 tdvh=4 othe tdvh=5 endcase else do case case H6_Lop<=3 tdvh2=2 case H6_Lop>=4 and H6_lop<=6 tdvh=3 case H6_Lop>=7 and H6_lop<=9 tdvh=4 othe tdvh=5 endcase endif endif * if c1=0 or c1>9 cmkt=1 else cmkt=c1 if cmkt>7 cmkt=7 endif endif * if Tuoi>=15 if gtinh=1 && nam if tuoi<=59 tdtuoi=1 endif else if tuoi<=54 tdtuoi=1 endif endif do xdtuoi Vung=int(MaTinh/100) mc=ttnt*2+Gtinh B01(3,mc)=B01(3,mc)+soc if tdtuoi=1 B01(4,mc)=B01(4,mc)+soc endif B01(Vung+5,mc)=B01(Vung+5,mc)+soc if kv>0 B01(Kv+14,mc)=B01(Kv+14,mc)+soc endif * HD 7 ngay qua if c19=0 && HDKT 7 ngay B02(1,mc)=B02(1,mc)+soc B02(mht,mc)=B02(mht,mc)+soc if tdtuoi=1 B02(13,mc)=B02(13,mc)+soc endif B03(1,mc)=B03(1,mc)+soc B03(Vung+2,mc)=B03(Vung+2,mc)+soc if KV>0 B03(Kv+11,mc)=B03(Kv+11,mc)+soc endif B04(1,1)=B04(1,1)+soc B04(1,Tdvh+1)=B04(1,Tdvh+1)+soc B04(Vung+2,1)=B04(Vung+2,1)+soc B04(Vung+2,Tdvh+1)=B04(Vung+2,Tdvh+1)+soc if Kv>0 B04(Kv+11,1)=B04(Kv+11,1)+soc B04(Kv+11,Tdvh+1)=B04(Kv+11,Tdvh+1)+soc endif B05(1,1)=B05(1,1)+soc B05(1,cmkt+1)=B05(1,cmkt+1)+soc B05(Vung+2,1)=B05(Vung+2,1)+soc B05(Vung+2,cmkt+1)=B05(Vung+2,cmkt+1)+soc if Kv>0 B05(Kv+11,1)=B05(Kv+11,1)+soc B05(Kv+11,cmkt+1)=B05(Kv+11,cmkt+1)+soc endif * mctt=ttnt*4 if c170 && That nghiep mc=mctt+2 else && Co VL mc=mctt+1 endif B06(1,mc)=B06(1,mc)+soc B06(Vung+2,mc)=B06(Vung+2,mc)+soc if Kv>0 B06(Kv+11,mc)=B06(Kv+11,mc)+soc endif if tdtuoi=1 B06(1,mc+2)=B06(1,mc+2)+soc B06(Vung+2,mc+2)=B06(Vung+2,mc+2)+soc if Kv>0 B06(Kv+11,mc+2)=B06(Kv+11,mc+2)+soc endif endif * mc=ttnt*2+7 && HDKT lam mau so B07(1,mc)=B07(1,mc)+soc B07(Vung+2,mc)=B07(Vung+2,mc)+soc if Kv>0 B07(Kv+11,mc)=B07(Kv+11,mc)+soc endif if tdtuoi=1 B07(1,mc+1)=B07(1,mc+1)+soc B07(Vung+2,mc+1)=B07(Vung+2,mc+1)+soc if Kv>0 B07(Kv+11,mc+1)=B07(Kv+11,mc+1)+soc endif * TN chia theo nhóm tuoi và TD CMKT if ttnt=1 do congB16 with 1 do congB16 with mht do case case c1=1 mhc=14 case c1>=2 and c1<=5 mhc=15 case c1=6 mhc=16 othe mhc=17 endcase do congB16 with mhc endif endif * if c170 mc=ttnt*2+1 B07(1,mc)=B07(1,mc)+soc B07(Vung+2,mc)=B07(Vung+2,mc)+soc if Kv>0 B07(Kv+11,mc)=B07(Kv+11,mc)+soc endif if tdtuoi=1 B07(1,mc+1)=B07(1,mc+1)+soc B07(Vung+2,mc+1)=B07(Vung+2,mc+1)+soc if Kv>0 B07(Kv+11,mc+1)=B07(Kv+11,mc+1)+soc endif endif * if ttnt=1 && khu vuc thanh thi do CongB8 with "B08",Gtinh+2 do CongB8 with "B08",mht+3 do CongB8 with "B08",cmkt+16 do case case c18=11 or c18=12 or c18=13 Ldtn=1 case c18=20 Ldtn=2 case c18=30 Ldtn=3 case c18=41 or c18=42 or c18=43 Ldtn=4 othe Ldtn=5 endcase do CongB8 with "B08",Ldtn+24 if c17=0 or c17>4 Tgtn=1 else Tgtn=c17 endif do CongB8 with "B08",Tgtn+30 endif else && c17=0 Co VL do XDNKT do xdLHKT do CongB8 with "B09",1 do CongB8 with "B09",Kvkt+2 do CongB8 with "B09",Tpkt+6 if c10=1 or c10=2 do CongB8 with "B09",12 else do CongB8 with "B09",11 endif * Bieu Tnbq 1->12=13->24/1->12 do CongB10 with 2 if c10=1 or c10=2 do CongB10 with 3 endif if ttnt=1 do CongB10 with 5 if c10=1 or c10=2 do CongB10 with 6 endif else do CongB10 with 8 if c10=1 or c10=2 do CongB10 with 9 endif endif * if Tinhc9 && LV o Tinh khac store 0 to TinhLv,mhTinh do xdTinh with TinhLv,mhTinh B11(1,1)=B11(1,1)+soc B11(1,TinhLV+1)=B11(1,TinhLV+1)+soc B11(mhTinh+1,1)=B11(mhTinh+1,1)+soc B11(mhTinh+1,TinhLV+1)=B11(mhTinh+1,TinhLV+1)+soc else store 0 to TinhLv,mhTinh do xdTinh with TinhLv,mhTinh B11(1,67)=B11(1,67)+soc B11(mhTinh+1,67)=B11(mhTinh+1,67)+soc endif endif && KT that nghiep else && Khong HDKT 7 ngay if c19=0 or c19>2 && Tu ma 3 den ma 6 vao 1 cot mc=4 else mc=c19+1 endif B15(1,1)=B15(1,1)+soc B15(1,mc)=B15(1,mc)+soc B15(Vung+2,1)=B15(Vung+2,1)+soc B15(Vung+2,mc)=B15(Vung+2,mc)+soc if KV>0 B15(Kv+11,1)=B15(Kv+11,1)+soc B15(Kv+11,mc)=B15(Kv+11,mc)+soc endif endif && Ket Thuc HDKT 7 ngay * if ttnt=2 and datnn=1 if c19=0 && HDKT 7 ngay if c170 && That nghiep mc=3 else && Co VL mc=2 endif else && Khong HDKT 7 ngay if c19=0 or c19>6 mc=9 else mc=c19+3 endif endif B14(1,1)=B14(1,1)+soc B14(1,mc)=B14(1,mc)+soc B14(Vung+2,1)=B14(Vung+2,1)+soc B14(Vung+2,mc)=B14(Vung+2,mc)+soc if KV>0 B14(Kv+11,1)=B14(Kv+11,1)+soc B14(Kv+11,mc)=B14(Kv+11,mc)+soc endif endif * if ttnt=2 && Khu vuc Nong thon if c21(c22_1+c22_2) ?str(tinh,3)+str(huyen,3)+diaban+str(hoso,10)+str(c21,10)+str((c22_1+c22_2),10)+" Chenh "+str(c21-(c22_1+c22_2),10) endif if (c21+c24)>=183 or c26>=183 &&HDKTTX 12 thang qua do Congb12 with 1 do Congb12 with Vung+2 if Kv>0 do Congb12 with KV+11 endif * do Congb13 with 1 do Congb13 with Vung+2 if Kv>0 do Congb13 with KV+11 endif endif &&HDKTTX 12 thang qua endif endif && Ket thuc >= 15 tuoi skip enddo Return * Proc CongB16 Para mh b16(mh,Vung+13)=b16(mh,Vung+13)+soc if KV>0 b16(mh,Kv+21)=b16(mh,Kv+21)+soc endif if c170 b16(mh,Vung+1)=b16(mh,Vung+1)+soc if KV>0 b16(mh,Kv+9)=b16(mh,Kv+9)+soc endif endif Return * Proc CongB12 Para mh b12(mh,1)=b12(mh,1)+c21 b12(mh,5)=b12(mh,5)+c21+c24+c26 if gTinh=2 b12(mh,2)=b12(mh,2)+c21 b12(mh,6)=b12(mh,6)+c21+c24+c26 endif if tdtuoi=1 b12(mh,3)=b12(mh,3)+c21 b12(mh,7)=b12(mh,7)+c21+c24+c26 if gTinh=2 b12(mh,4)=b12(mh,4)+c21 b12(mh,8)=b12(mh,8)+c21+c24+c26 endif endif Return * Proc CongB13 Para mh b13(mh,1)=b13(mh,1)+soc b13(mh,5)=b13(mh,5)+c22_1 b13(mh,6)=b13(mh,6)+c22_2 b13(mh,7)=b13(mh,7)+c22_3 b13(mh,8)=b13(mh,8)+c21 Return * Proc CongB8 Para bi,mh &bi(mh,1)=&bi(mh,1)+soc &bi(mh,Vung+1)=&bi(mh,Vung+1)+soc if KV>0 &bi(mh,Kv+9)=&bi(mh,Kv+9)+soc endif Return * Proc CongB10 Para mh b10(mh,1)=b10(mh,1)+1 b10(mh,Vung+1)=b10(mh,Vung+1)+1 b10(mh,13)=b10(mh,13)+c15 b10(mh,Vung+13)=b10(mh,Vung+13)+c15 if KV>0 b10(mh,Kv+9)=b10(mh,Kv+9)+1 b10(mh,Kv+21)=b10(mh,Kv+21)+c15 endif Return * Proc xdLhkt do case case c11>=11 and c11<=16 Tpkt=1 case c11>=21 and c11<=24 Tpkt=2 case c11=30 Tpkt=2 case c11=41 or c11=42 Tpkt=2 case c11=50 Tpkt=3 othe Tpkt=2 endcase Return * Proc XDNKT do case case Val(c8)=1 or Val(c8)=2 or Val(c8)=5 Kvkt=1 case (Val(c8)>=10 and Val(c8)<=41) or Val(c8)=45 && CNXD Kvkt=2 othe Kvkt=3 endcase Return * Proc xdTinh Para TinhLv,mhTinh sele dmTinh loca for solieu.c9=ma_tinh if found() TinhLv=Recno() else TinhLv=65 endif loca for maTinh=ma_tinh if found() mhTinh=Recno() else mhTinh=65 endif sele solieu Return Proc xdTuoi do case case tuoi>=15 and tuoi<=19 mht=3 case tuoi>=20 and tuoi<=24 mht=4 case tuoi>=25 and tuoi<=29 mht=5 case tuoi>=30 and tuoi<=34 mht=6 case tuoi>=35 and tuoi<=39 mht=7 case tuoi>=40 and tuoi<=44 mht=8 case tuoi>=45 and tuoi<=49 mht=9 case tuoi>=50 and tuoi<=54 mht=10 case tuoi>=55 and tuoi<=59 mht=11 case tuoi>=60 mht=12 endcase return * Proc xdVungKT do case case Matinh=101 or Matinh=103 or Matinh=104 or Matinh=105 or Matinh=106 or Matinh=107 ; or Matinh=109 or Matinh=225 Kv=1 case Matinh=501 or Matinh=503 or Matinh=505 or Matinh=507 or Matinh=411 Kv=2 case Matinh=701 or Matinh=713 or Matinh=717 or Matinh=711 or Matinh=709 or Matinh=707 ; or Matinh=801 Kv=3 Othe Kv=0 endcase Return - cmbTinh.Click cMat=SUBS(THISFORM.cmbTinh.LISTITEM(THISFORM.cmbTinh.LISTINDEX),1,3) if Val(cMat)<=11 SELECT dmbieu ix=1 SCAN cTen=space(2)+Bieu+". "+ALLT(tenbieu) THISFORM.lstBieu.ADDLISTITEM(cTen,ix,1) THISFORM.lstBieu.ADDLISTITEM(allt(str(Mab,2)),ix,2) THISFORM.lstBieu.ADDLISTITEM(str(Ploai,1),ix,3) ix=ix+1 ENDSCAN else THISFORM.lstBieu.Clear SELECT dmbieu ix=1 SCAN for in_tinh=1 cTen=space(2)+Bieu+". "+ALLT(tenbieu) THISFORM.lstBieu.ADDLISTITEM(cTen,ix,1) THISFORM.lstBieu.ADDLISTITEM(allt(str(Mab,2)),ix,2) THISFORM.lstBieu.ADDLISTITEM(str(Ploai,1),ix,3) ix=ix+1 ENDSCAN endif THISFORM.cmdXem.ENABLED=.F. THISFORM.cmdIn.ENABLED=.F. THISFORM.cmdExcel.ENABLED=.F. THISFORM.optTH.ENABLED=.T. THISFORM.lstBieu.ENABLED=.T. THISFORM.cmdTonghop.ENABLED=.T. THISFORM.REFRESH Mục lục Lời nói đầu 1 Chương I: Tổng quan về cơ sở thực tập Trung tâm tin học thống kê - Tổng cục Thống kê 3 I. Lịch sử hình thành và phát triển của Tổng cục thống kê 3 1. Vị trí và chức năng 4 2. Nhiệm vụ và quyền hạn 4 3. Hệ thống tổ chức của Tổng cục Thống kê 8 4. Cơ cấu tổ chức của cơ quan Tổng cục Thống kê 8 II. Những thành tựu của ngành thống kê Việt Nam 8 III. Trung tâm tin học thống kê 14 1. Vị trí và chức năng của trung tâm tin học thống kê 15 2. Nhiệm vụ và quyền hạn của trung tâm tin học thống kê 16 3. Tổ chức và hoạt động 17 IV. Cơ sở dữ liệu thống kê 19 Chương II. Cơ sở phương pháp luận nghiên cứu đề tài 21 I. Khái niệm thông tin hệ thống thông tin 21 1.Thông tin 21 1.1.Khái niệm thông tin 21 1.2. Vai trò của thông tin đối với quản lý trong tổ chức 21 1.3 Tính chất của thông tin theo cấp quyết định 22 2. Hệ thống thông tin 22 2.1. Khái niệm 22 2.2.Phân loại hệ thống thông tin trong tổ chức 23 Phân theo mục đĩch phục vụ thông tin đầu ra 23 2.2.2. Phân theo cấp quản lý 23 2.3 Nộ dung và mục đích phát triển hệ thống thông tin 24 2.3.1. Nguyên nhân dẫn tới việc phát triển một hệ thống thông tin 24 2.3.2 Phương pháp phát triển hệ thống thông thin 25 II. Phân tích hệ thống 28 1. Các công cụ phân tích hệ thống 28 1.1. Sơ đồ luồng thông tin 28 1.2.Sơ đồ luồng dữ liệu (DFD) 29 2. Sơ đồ chức năng 30 III Thiết kế hệ thống 30 1.Thiết kế CSDL từ các thông tin đầu ra......................................................30 2.Thiết kế CSDL bằng phương pháp mô hình hoá 32 2. 1.Khái niệm cơ bản 32 2.2.Mức độ liên kết 32 2.3. Chuyển đổi mối quan hệ 33 IV. Giới thiệu hệ quản trị cơ sở dữ liệu Visual Foxpro 33 Chương III: Phân tích thiết kế chương trình 37 1. Mục đích của chương trình xử lý tổng hợp kết quả điều tra lao động việc làm 01/7/2004 37 2. Các bảng biểu tổng hợp 37 3. Chức năng của bài toán 45 3.1. Sơ đồ môi trường 45 3.2. Sơ đồ chức năng của bài toán 45 4. Thiết kế cơ sở dữ liệu logic 46 5. Thiết kế chương trình 49 6.Thiết kế giao diện 57 7. Cài đặt 66 Kết luận 67 Danh mục tài liệu tham khảo 68 Phụ lục 69

Các file đính kèm theo tài liệu này:

  • doc24791.doc
Tài liệu liên quan