From 7aa8baadbb304c7cdfa842b6628c10cab75b899d Mon Sep 17 00:00:00 2001 From: geh <1923421292@qq.com> Date: Thu, 19 Jun 2025 19:23:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_2025-06-04-geh.sql | Bin 0 -> 45536 bytes DataBase/版本日志/SGGLDB_2025-06-18-geh.sql | Bin 0 -> 57522 bytes SUBQHSE/BLL/BLL.csproj | 3 + .../BLL/BaseInfo/SuperviseCheckTypeService.cs | 107 + SUBQHSE/BLL/CQMS/Check/CheckControlService.cs | 1 + .../QCManage_QCGroupRegistrationService.cs | 85 + SUBQHSE/BLL/Common/AttachFileService.cs | 59 + SUBQHSE/BLL/Common/Const.cs | 9 +- .../Hazard_HazardSelectedItemService.cs | 67 +- .../HSSE_Hazard_HazardRegisterService.cs | 2 +- .../BLL/HSSE/License/LicenseManagerService.cs | 1 + .../BLL/HSSE/Solution/LargerHazardService.cs | 2 +- SUBQHSE/BLL/HSSE/Technique/RectifyService.cs | 9 +- SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs | 180 + SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs | 407 ++- .../BLL/ZHGL/DataSync/HJGLData_HJGLService.cs | 6 +- .../BLL/ZHGL/DataSync/HSSEData_HSSEService.cs | 1441 +++++--- SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs | 32 + SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs | 179 +- .../Project_CQMSDataService.cs | 457 ++- .../Project_HJGLData_DefectService.cs | 40 +- .../Project_HJGLData_HJGLService.cs | 35 +- .../Project_HSSEData_HSSEService.cs | 803 +++- ...ject_HSSEData_HiddenDangerDetailService.cs | 1 - .../Supervise/SuperviseCheckReportService.cs | 5 + .../CQMS/Check/CheckList.aspx.cs | 32 +- .../QCManage/QCGroupRegistration.aspx | 163 + .../QCManage/QCGroupRegistration.aspx.cs | 272 ++ .../QCGroupRegistration.aspx.designer.cs | 197 + .../QCManage/QCGroupRegistrationEdit.aspx | 130 + .../QCManage/QCGroupRegistrationEdit.aspx.cs | 188 + .../QCGroupRegistrationEdit.aspx.designer.cs | 251 ++ .../QCManage/QCGroupRegistrationView.aspx | 128 + .../QCManage/QCGroupRegistrationView.aspx.cs | 130 + .../QCGroupRegistrationView.aspx.designer.cs | 242 ++ .../QualityActivity/QCManage/QCStatics.aspx | 160 + .../QCManage/QCStatics.aspx.cs | 191 + .../QCManage/QCStatics.aspx.designer.cs | 143 + .../Solution/EditConstructSolution.aspx.cs | 2 +- .../FineUIPro.Web/CQMS/Technique/Rectify.aspx | 150 + .../CQMS/Technique/Rectify.aspx.cs | 561 +++ .../CQMS/Technique/Rectify.aspx.designer.cs | 296 ++ .../CQMS/Technique/RectifyEdit.aspx | 51 + .../CQMS/Technique/RectifyEdit.aspx.cs | 148 + .../Technique/RectifyEdit.aspx.designer.cs | 98 + .../CQMS/Technique/RectifyItemEdit.aspx | 61 + .../CQMS/Technique/RectifyItemEdit.aspx.cs | 164 + .../RectifyItemEdit.aspx.designer.cs | 116 + .../CQMS/Technique/RectifySelectCloumn.aspx | 38 + .../Technique/RectifySelectCloumn.aspx.cs | 62 + .../RectifySelectCloumn.aspx.designer.cs | 80 + .../CQMS/WBS/ControlPoint.aspx.cs | 8 +- .../FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx | 11 +- .../CQMS/WBS/EditBreakdown.aspx.designer.cs | 220 +- .../CQMS/WBS/EditBreakdownProject.aspx | 11 +- .../WBS/EditBreakdownProject.aspx.designer.cs | 220 +- .../CQMS/WBS/ProjectControlPoint.aspx | 92 +- .../CQMS/WBS/ProjectControlPoint.aspx.cs | 35 +- .../WBS/ProjectControlPoint.aspx.designer.cs | 4 +- .../Excel/DataIn/施工技术交底管理导入模板.xls | Bin 0 -> 14848 bytes SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj | 50 + .../HiddenRectificationList.aspx.cs | 20 +- .../HSSE/License/LicenseManager.aspx.cs | 21 +- .../HSSE/Solution/LargerHazardList.aspx.cs | 21 +- .../HSSE/Technique/Rectify.aspx.cs | 6 +- .../HSSE/Technique/Rectify.aspx.designer.cs | 268 +- .../HSSE/Technique/RectifyEdit.aspx.cs | 1 + .../ZHGL/DataSync/PersonnelChangeRecord.aspx | 108 + .../DataSync/PersonnelChangeRecord.aspx.cs | 192 + .../PersonnelChangeRecord.aspx.designer.cs | 152 + .../ZHGL/Emergency/DrillRecordList.aspx | 4 +- .../ZHGL/Emergency/DrillRecordList.aspx.cs | 28 +- .../DrillRecordList.aspx.designer.cs | 9 + .../ZHGL/Emergency/DrillRecordListEdit.aspx | 6 +- .../Emergency/DrillRecordListEdit.aspx.cs | 51 +- .../DrillRecordListEdit.aspx.designer.cs | 4 +- .../ZHGL/Emergency/EmergencyList.aspx | 4 +- .../ZHGL/Emergency/EmergencyList.aspx.cs | 35 +- .../Emergency/EmergencyList.aspx.designer.cs | 9 + .../ZHGL/Emergency/EmergencyListEdit.aspx | 139 +- .../ZHGL/Emergency/EmergencyListEdit.aspx.cs | 92 +- .../EmergencyListEdit.aspx.designer.cs | 4 +- .../ZHGL/Supervise/ShowRectifyItem.aspx | 6 +- .../ZHGL/Supervise/ShowRectifyItem.aspx.cs | 23 +- .../Supervise/SuperviseCheckRectify.aspx.cs | 7 + .../ZHGL/Supervise/SuperviseCheckReport.aspx | 44 +- .../Supervise/SuperviseCheckReport.aspx.cs | 86 +- .../SuperviseCheckReport.aspx.designer.cs | 77 +- .../Supervise/SuperviseCheckReportEdit.aspx | 46 +- .../SuperviseCheckReportEdit.aspx.cs | 89 +- .../SuperviseCheckReportEdit.aspx.designer.cs | 36 +- .../SuperviseCheckReportFinalizeEdit.aspx | 122 + .../SuperviseCheckReportFinalizeEdit.aspx.cs | 659 ++++ ...seCheckReportFinalizeEdit.aspx.designer.cs | 197 + .../APIItem/HSSE/Hazard_HazardRegisterItem.cs | 245 ++ .../APIItem/HSSE/LargeEngineeringItem.cs | 159 + .../Model/APIItem/HSSE/ProjectLicenseItem.cs | 147 + .../APIItem/HSSE/ProjectSecurityRiskItem.cs | 188 + .../Model/APIItem/HSSE/QCRegistrationItem.cs | 163 + .../Model/APIItem/HSSE/QualityProblemItem.cs | 132 + .../APIItem/SuperviseCheckReportDetailItem.cs | 82 + .../Model/APIItem/SuperviseCheckReportItem.cs | 87 + SUBQHSE/Model/Model.cs | 3221 +++++++++++++++++ SUBQHSE/Model/Model.csproj | 9 + SUBQHSE/Model/ZHGL/DataSync/BaseEntities.cs | 4 + SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs | 13 +- SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs | 16 +- .../ZHGL/DataSync/LargeEngineeringOutput.cs | 10 +- .../DataSync/LicenseHSETechnicalOutput.cs | 14 + .../DataSync/OfSafetySupervisorsOutput.cs | 5 + .../DataSync/CNCECServerController.cs | 248 +- 111 files changed, 14465 insertions(+), 1480 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_2025-06-04-geh.sql create mode 100644 DataBase/版本日志/SGGLDB_2025-06-18-geh.sql create mode 100644 SUBQHSE/BLL/BaseInfo/SuperviseCheckTypeService.cs create mode 100644 SUBQHSE/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs create mode 100644 SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs create mode 100644 SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/File/Excel/DataIn/施工技术交底管理导入模板.xls create mode 100644 SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx create mode 100644 SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.designer.cs create mode 100644 SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx create mode 100644 SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.designer.cs create mode 100644 SUBQHSE/Model/APIItem/HSSE/Hazard_HazardRegisterItem.cs create mode 100644 SUBQHSE/Model/APIItem/HSSE/LargeEngineeringItem.cs create mode 100644 SUBQHSE/Model/APIItem/HSSE/ProjectLicenseItem.cs create mode 100644 SUBQHSE/Model/APIItem/HSSE/ProjectSecurityRiskItem.cs create mode 100644 SUBQHSE/Model/APIItem/HSSE/QCRegistrationItem.cs create mode 100644 SUBQHSE/Model/APIItem/HSSE/QualityProblemItem.cs create mode 100644 SUBQHSE/Model/APIItem/SuperviseCheckReportDetailItem.cs create mode 100644 SUBQHSE/Model/APIItem/SuperviseCheckReportItem.cs create mode 100644 SUBQHSE/Model/ZHGL/DataSync/LicenseHSETechnicalOutput.cs diff --git a/DataBase/版本日志/SGGLDB_2025-06-04-geh.sql b/DataBase/版本日志/SGGLDB_2025-06-04-geh.sql new file mode 100644 index 0000000000000000000000000000000000000000..a165989bb0c615279a18a45a9aa9e23e36a90466 GIT binary patch literal 45536 zcmeHQO>A7n9e*6kR|~yVJ>HvuYkw7gp2V=*H8)w%a>wL&EPHb;%7soccPQVle zL{$l7Q0W0kky;5glv{hN+DJvThukW9>Wv;MMdF02URt#(^!Iz?@w|C&=Dm5l@5^)* zZFc>3=0E@W&42#$|CpKm;`95wdp*7`dTZX6*Yet44euAd1^nH@=LtO7@V<}Fi+DaC z`g_J(_g3+|h8j!wSM!FwN$<2bjgk%2T*h;jcmeNQc;CQZ6L?=l$#w54p0@FM#eYBO zJ?cGze-HZnoIw37`I_{mz}p6RYq{I-+Q7kJLz@6Rny0K#m8$ACD*(<+Pw_kR`G1hZ+#gw<4{S{>X1J^ zY@y}T&$qQ{^kow*wShk6qNsLt`5i&qtNvI{_`Gy{iOjd>l)B64J7>Z+ zE^3gGO-PTJXMD=py6(&K629Rq75HwUm6|uOI}1lpssl-9tDC4J=HP&L2xaOh_1f&p zl|H;yv$iCxlJf>JvGstwec z0bRB&=*CO`fF}2(k~bpHP7j>FJ@?fYZtnbH=b?Hzn3(5C@mT!mjVhp#q&teoW&8SP zS3kJ+$LViu+$>2#-1VA{PTsR;ZSr5!A6zRJ8+VPXV`H;{Fzb_U zEQ@YhPny3)@uBmcb|ub3I@~4Igi+peIXl}xM?P-m{QuetSz%$;{Z!j8(;cE}2y zBwbWIPTAQKSz)BpiPMuhT6ycEENu(DkKJn|cMYy%#TjUNC9N_tzM^an`GnMJ{y!Ou zIqp3RKbwA^^zp~wG189|(H!9mO7Bs+xd;B9E>HT=Qxh%B+Bs|$5AHEBHp*^k5O8_<8e-+9LKkv zGUpoQcMH*sE0B^c#3?o)Usv|x8dAP=X$}9?OAET*7{XlI^kXkqA+4(QURsbbRU2*5 z8+!}WyYpL&Yjmb6>=`K<0-hZp*oG9W1Jf2T-S#nVL2IZUg)t2NZRbTqpH>m?TSw%p zg>kxw8M+4gigK{_J-ZrAVh~1q(dUqHELp$1+70hiECpH#3!zx|5ZWd_Nv$W`Jk^7B6EuN>z}tB&4b%VH3+gZB<9Y-2IE^ot z+h-Rs827k`$==N$uTS43URAI^++$X{Tor{;bz~~MPKING#o{wFeY#N<8ImiX9U&E6 zEC;13NKrCM<>(@zyQ`y%+;z82s${g<^q!Pu)n#}-#_CqqQ9tWy$`p4WqZ4uYV17qM z>iH=tG9xoYdM))=_mpj(xTI~T?BeIg@!cEcIKJ(alYPfHjwL2>x#;8;^!aG=t=LX4 zeUN(DMqBj5-a_{NjY7`+$<9lXZxF_+pLMMv>&=X>`>G>lJ~#>z$F#K63MOTktIB@P zy6W>aZvE_MVFz&XD}0uwEc|RMgl?}>I`j7Yvdqe6k7lw}BlJVrxb<$&mw{b%q)^XC z_7>I39!WO~xOf@VQLCa1CLvcH3Dk3yRg*w>f2MdT)RC*A6uO}2CW(2k#xkSXOD2=K z$?SDtvhP^dN-QzUBMY1k$9`7Wc5Yoo@8}b!mCx>Rjf*zunlkU1omZAP8wt%ms!}Yv z`DKl>!8a*Vq@z`Y-V3;1?v<38FGI$%%Q|O|mt0wO%2kjuiCPtywRrKA`t_3#T#&sw7 z8p8cZO`NZtf<1Z$=UEpO)5#?TVa4Gt!j7(h1Eg}*ykrH*4H#LCnO$VLz= zN~}Jk%xJ0k5Z1&&YGS>X_n68#r`I^_9mZPJL@$M$J+`+(3_=FOawNHlt7RMSxH|UH z=UN$8GY;FhdUmAaYT0m)tK%{XhcM&S{j8&q5^9n`<5OK{n(H+&a;HFH8>1Pt70jiB zPdVni8G-UEN85!vai?s2jiWI=l5-`Y3sd~6!oVrbb>qt@sJd4->0Q5 z@8K2NK1fx3Bj}C7x@}+us{sXZzplvwwp+u};*;Df8P=_4S&m~!t9R75dcTLZ$Dm!i zZ9S>g8t9XH5?6L>Wfiy_v(~rQlQV;JH?F^mvmnM?TQ6a*%o}wl?>Xi=ZqlnY)LM7y zv8gt>K4zp#+hxR`C8pja$&9H#rZrWLr};bAu{6~dJu`h1-!nNYg7Zge4%!aU*`>Y} zBVno;)h2cslQU<~XoW~QGmT33ydOo+?A)8Qp$q>?*3G&>_Juk^-d4`fw%0Ip*Kv#h zy?f3Ex#uhF-E)oH#ER42z5k_!c@=%8bGM29)5>MZ72MW7hZYX{oN&}&Q?jQ3&8!1-Ny<4w~I^qB86er>f=+?_Y+iRHte z3t!S|H*>)I;vYmGyG1C}0=_&Xcat>lBKoCcK{l;8@Z*B!$e zB}+1HJcE++dwtT&G6p>kYG+Y`_BP-7_b|#c79&d6eV&44*@F{k+gzFwQ1jO$VHt6} zf(VP4v|Fj*dK-+G=fA2l4o+!1xQEC*p6~_?@*ze?^p7Yhe)L~8p^d;1=BTCnWe3)D z{cVRQ>w|B}{q?5bbl`6=2&+q#QXGr(?JN_uKGItxss*8EgTDb`ZbPkp)Th$I;p`FF z;h+rUkL5RC`scLjL-fXz{fMQssLH_eqm|psw_6V^?-xv!G)h~n4Ai)n@S6)?d6~K7 zRevVPUskEMMA~i9GEk)K-K_6F$&*%eS(yFc#htVJ5jBxZDg(9OwC}j^i1$h3+-wcM zZuaNJ8}%BZxBr;?>zVt`?-wMMbuSPMpG$O&YcQ|NY!H8`YTfr-`KxBk`0}^nw)`Ch zZCHeAt)KJlELuDwieWBQM$AHb()qO=^`_7JK6KmnC`Crl=J|^=1B?eTiX=SW_!=S# z$eY@kcNAGMqMv;nDB3T*ZMnL#b=OG82qI=%$nOMq9u&p>3@lSML)hvfB$>WHf6uTu zueZC|rF&q>K5pC$?0dAudbHh*_xFl56!D-@dtmu_%gzrk{`Ll*qvp`b_C7s>e_Hn9E<^;Lavt zBjsyzLd&uV23>Vf_W9bKVSCek*VqkdMQ`_W{4xEs%B6kZYI`XX|#Y%}H> z;&d!+PSzX6i|=*Bm>HoC=b5|X%B6J?|7H$@d47?NVD5qY54eAP44=8rMf}f9#E2g` zXVxNGj{aX>S%LHz1n20N(U!XZ(yeP{*;5i*bDV*4;A&sVHG!F^4R~Z+k;L!lgzcyB z_hnd2VIJ~XIqf?zlJnKsXUT2aR^)Kw$1m;L7{*tOaep<8u7-K)+W0ZuPr5X#ys8}$ z<u!%h3&7G4o3D(-kAExiZ^i5^- zc)h8FDVxCFM$aCkms``gkhW<*w97-<12k9g&M7zVHTj*booQrFI*?E$ zQOqj|`3a9OC0Mp?`fe~F6M~R=VGjn5MEoZt}h!yF+I z-<9PV>lwv&q|e=vkKiR&Fri~b24C+hN0|G<&3)w#>gO}fpw5Qmzvz9^dhbUuFL{4J zQN54%xYKEkv>v$Lb1}2~{&z3_H>0ZO{8%b?sEb|K!X_|N4epk8+cBL^BKDL2{&@R? zYpc*bS@>)2D5=)WK7DxYE5nQZ`P7|T+3bwW4i{Z_h_$&aY_i(1oEJLMdMFDY?srsj z-hC`6JA9OVQwAnSE`6){wdU6^a`z|BzSPBMo>%3kY9XatcV(bO?bCYZ#=F(RMb|&l zW-J3A{s!v!m4$bzjE}Tx1wKLlmGKApa`k27A}nL@5|-Z6=ZA+Yw)^%{dlv}O* zd{288E*PsZ`vlpa+*FYi`O7o?J;lOPHAMl78WlZ8$yTekr`T;Ck@vK|q8sJD4;km} zm9byOZQLjk`^i_V$_`{Vbfc?oaVxFdy~7diX2lKeRLtY#iGAgD!!|#gz!a4Y-!?~7 z^WV`ri}-DS2XlW1v)F~zyY(H^33=H8LA}wBDMzEfD*s~303`2lcGZw#EaG=OyV0V) zi`xP1MnzhQz3+&2Yfr3wv&db#_@;_GVax6J9n-G87E(g2zI>KoG5e>}Asw{}<933% zTD-;X19R(fntfqz6gfvtyM%(#8q@dvePaE6V)91I-t8#4A1k;M%C?`Yzi*7^E&Kb% HC?Ed=MK!i{ literal 0 HcmV?d00001 diff --git a/DataBase/版本日志/SGGLDB_2025-06-18-geh.sql b/DataBase/版本日志/SGGLDB_2025-06-18-geh.sql new file mode 100644 index 0000000000000000000000000000000000000000..8a088cb29f56453329d62f5fb5204f0c8cd2a974 GIT binary patch literal 57522 zcmeHQU2GiJbshnYZM85Oz(o+K580q_Nynnhe~J=RbonETiL^Aiq<%n4G)1mRRum>zPtLl!Edl_8`>V52pXx8$WiHc+GJ?^6);rG2TTcSMBiqdac3Im zkE0jk&IugNRk1h?H0E%A6|`IpP(xgzsXL8&iomjf&p7TJcSg}tp=OzVHLp&9s=cUz zbnmWt=RW5t@av-U2cUZqT&Sm{w@)+97Pwkzq6RO|MnTmQ>Py-WFE#GEN|1vKb<{Kq z$)Q9xj)l8*_G8^hI{$Ab?hngd0HUjA%t?(&vGA51L;pF7la?;yZYe=(MTWdm;+GoB zt0Z?@euT-V%8_5f^}N5da%&&7itsJ!4z0o7sb_@KLXFm<*MfHk>!$|V0B?D(9Q*Hy zmd*{7Issm9IOm}SHc-<-Rq})$Y9jyjV2S$L6Ao{H&sH|Vc;S{~(m4);Z&pWKbp%*riy%LU8| zD=52;(j86@KAchQnV09C`43KaR7YC@R~!Fxx6~VG>FLQmrLK~;v>Wq-{gXD`<@*BV zKRLZQ_0gTA<-0=q`pM~kE5CA~Rt*)%iy+-$+9z&eLu>+Nt@DwpzMA*hcv`o2 zPA{N5OMB1yXL^wbj-pzWg_TN9t+!^Khn4E6t3rMF)hJscX>Y=7W$EO-QeC3`u)l?J z{cXo|QtGs15_-z8(l?E^5C+`Te|fO={~eQuY_MGef+pr&ioy>dLA{l z$0Dq$d8{^RhwzwuqlLy5;TmYKcg?QU#I^4B49vs6vwngyD4~ymYtah&KViNvG(k%( zG`zZwNK8S`m#Y@;g26`4xUrzefh%3oD1Hx0_##kT1$q@|(JNTF70fU3YeeCZP5V=5 zpDnIB=kOtlUW&vo5JgiK7__3rWW9EelV}8FFs?dbD|8zR%|B|dK&GruOf_huG*EY6h74L74#6@xuzYn&>~1#>q{Q30&JxE^ z%Q~*H9;r{ys3okmzIXG%Q*WPr?fbNx-BzyNFS@J)a=G9P;O`v1mw-i=GYD)3%u&D7 zhw}qCw;$(*@z;eji@1ZO7C^xe&h_ALKl0q37rDp}tXxQY&)=Ej?-MKH{+(HCivFrHU;a zG1^Quy;4CM#taQ%t*8zwKngAzd7?C|nYn?!IdYM|DQSbwLBo@A(5)@|v|Lo1J>HqJ_v(`mH4j1jqsb~iwQYGL|OJ56g`Z_OnvMag8z zb&PP1Q0j3RsRPxKD%?4`O*!XF(exY@w63Q?A9*~1|KiEDl30Sw9L1k_5ri_Y-p`JL zV9V;M3-2*?lW3<#`y6ahHAQ%fy&1Hqy3_4B4R5_!4hMVdZCkx-Y+ZFbrIp@jNpbvm~_) zZ8O=O2yZ)!5oy~#TJ8T@M9x8%tmN*Jp~-zOd+;RM4!@gTL0M+w7g z`tsR7TW)8B!aWChAobVZIex0$Z2`O9&(kU(QWMvIc;lga+;RB7<9{``tGgFRyRLqC zdslZKj}R5L`(As?oqCL{*Cr3C`}W=Ar)JB?CU*u_UN2J~cyXos*7XN2cNt&NZ$ABx zH$Gf@ZEEF}eDTvg8UH?@o~M_HehEgQF=oGn?@1hay&nF3Li*C^sdDf7oi@G$drtL$ zo}YlXfl&wgdltS2`XlLam;()rjAbk~BLL~iuvfSjL?4E>rdRa0?v?3zdj2M{XT@D{ zdYs+o$4&k2GZM+my&?LHjvHUhtntgRkMxD?$FDx)r71eSPCvBBDE21@@xKed#_-`@ z<}j{t*OEv5IHng)N)F){uTc`jyP~q9XLNr-uFBaSlj8!}gVaJ3gD z4?{wf*BwSb9K7(OX+7iRzQ$!df%`PRgWfyZBivJZ4j=yJb?^SEoQd~}?SsFNe#2{3 znz;9%l9|4&Cy`dlC@GML=`d-nPf|yK+-3Yx-^}2@(x7@P>bmU3iAK^g?sM*Pe*G4v z!NN5PpD3DucId>oRNT{-vLBp$vnpXd+vEQ}iqzTlj8#4vCbHRkAH{|>USWFa4MDN* zK8g*a`2OU{IYF_18%6hw&L@a|dEw1z&I?=#U4P-`i4${wd7idjR1BQPto!GZq_H?Q z3eK(o)gB9rwc#kzIH>v~ZDgiof3)AU6d5s9-%c23nq>Q6ilfd?!5xYY*sFX>R`2ld zg2{Z}NSqUEWM8@8DSwPIv(ahVVi0**|0qUk>vOMm%Ow|GW2!E<-Cda$QiYf{DH zQq`UcizFoE@z4yhXwF_xJc0<-))9?h7UXgI{41ON%|%%E zth?QK_DE^#ZhP>o7EZ0;(KOaU=7AHxc53}a@=V7= zBVNliMp+WXf}9gQS34u2e|Ctb_P*8>t2;SjDmCGrl-6j`I@$q)U|rtO1GOI!B0F8;#}Js-#Y z`n58>)_k6Ot!->p?Q{M%s~?*n&$8r4aQ&12s8im&Tl)HW9S?cgI+i;@q=K9hZI`u; zV`*xa6`*pgxzUt`mh@v4u$}2pZGejw&aVkQyE%f^w}N;<-JV##$zF_53>=NJlN5k`ZJNo@@c?k5rR z?6*W$QTP7MW?nWH&hDk)MoSVb(Fm zQU%9=YT=!k0g90)7a%Ll2=CS&wfZcPTv1tS6p!FeKqIq~H?K;3-Ws-^eBKjjzn{M* zn7_tGeMWKnu*pf39=GT5oQmYUr<_F3u^f?-L2(@OEi(aGso?WqwaO~L3y3>pE^Eno zR6-f%!12eUCZ{KPyOLXn8O)i%QL-B`ml1O#@=YugIA)LJzc*SocwfF;^4ef=eDU7h zC?~wNuuWp`J!|X!JfW?2P8`m9pGBcQS=aK4t^T(4?R-=9aqQPkS65jZ&`-YN_%2f8@!E;LMW;c8`?yly)9= zah6&hNb;G9?^Ql6rIiz|b)!6NJ@~2!2rcS}Iwx^2JcSqj{jnk^8~vbh5Fv4n-Zk zZr^Yo=>2{9P2|};Ib&_HoiK|O;WPI7w)4P__KZfs@9Y^k=$p?2&-8M>wr(72OK$H) zUfAutxx|ZJp0mhn61!<18%A?J<*3 zGxOtq>R->L5e-5fL_L!)eqOdFu^-}%%wq38|7ebA3K+YyU_52n#ZN@H9_I-mk6IDW z;gu7KAYj|+M-#}~R??0qApOj?C~weH`!(uaKg_X`HU;_~?kk833g=oH*@x`D-yC)z z><)fZn~cLsyQiZVF?@eKZQNS18_mXmg+*N0mUTX^M@rp@aURqWpH0jITdSpe>y2>G z-6Cr2`|sSb?=;HxojbMcr8o{Zx4RW(7w|meN4uP@jh}8kjhxb4BVVfg>~+nz#yjHT zg=;?@L5qNYn)Sz<4K%nS(^x4#%~|L5@gqR{j``Js)}4F*h#;8-iKbcP#EyK3lz`Aw8dEWe9a(NXdtMAsKFHt#*O?&+Z=^`#EgvYd6m#xL(a%H&k(VZV}Zke}@llDed0@1ocb!hlbVi1v_>;^Sw>m=nH z%f#okxi6n>7kr|$n-`_55z>8*W=E5Zi`vo?HlBDcT=(gIT&qWv8H7%#(H5 z|_3(supvp4@Zc`{id4DO<$;Y6(Zw z3Qxu6FN%``B2aJiW?Y^3qdO(LOg0&*;?Q^Jpz``b$m?2Jr@VJ77n9|Ov3aJvwXn^d zmE9;F->_UbwQvpBJfEM;JInxf5*kV3n4iS2`D*U3;0T~aD+11To@64?n zADk}Sw!h@sm+riJNsg}G`swQjmVdG$zXq=S*c|P?x6`?ytFk<}@x998%F9#l%(Xj) zQ7g$jFuPoN;Bxl4dE#`SvRdUx+( z@ps%FuiZK46QtZTo`*etr5Z1%=j@IupG4&Q05{+tve63@C^?JsOK6W?q=IwS?6ZYY zlr-CbU9;ArM|HBSWZ9m0WG%&dhpd>hc*?!jQ}_Cml2V}-5$SD>XU|W8+7zv)fX{IA z324P4oC5k=x%w7uc@!Qs$ze^7vNYd_K`EtQY!u(4SlQ0wE@syb&!6vp8aupA$rX@h ztF?WC^~-j>Uce~%zn_Ud-0P857UTLk{YCVK)Q6ItX`?JEzs}2R4bR>A>n}V$oz_}D zYn*g;%EOvctSomMx1+MgN$1eKaOya9{e^bM$v@NQfzyMhK3r=*jNG<}pi-~J9{ogt zTEDb|G$PgO%cLcJ7Q0MW5SzIMyJ{6r&R2XfqJEn_>$ntpg&&yyQu&e6(U&v_XQNSY z(b!ND!s3|RnDKgYyu93tTW5LetvA1hxAfwSevx_SAAiv(Wywo&KtFL~Fz6vl?!^k@v|T;> zEtzPq4eQalJU@Cho|`M4WV9;A{ANsL58i-&`;9+;hWkI2SH`Efe%W)c+j(_vWolP< zkJEYUXRq_#cFiL(1B+%6z9L5YKMPBTz9L#(i||aY;*F|XnB|k^kMNdLzg1MOp{Qty zc#25R82%W|0CyH~+>QVHLHh{qA43l;^={6vb$;kqCEnuImn@YRfu)}>ogQ@eZvRr= z?8Pp?238h(QBw8@CQvhDeXp5wy04%-vNfor?}c93M10aY{H>Z;YdJG+>XBo4tJxB~ z#H9T>W1(@JZz7hh1HByrZ%6RghwmO>(t|&uLC)_7Ld0nVXGU>n7w#G~=nfefDdLz& z7E#k)e5ma>YUG#Bgim1YXWEw5`_P)mBKgE~ zBZh`C91Y;g0O%XQl|IvlF_i2vH8Rpiahyl3tC)RcH*CRN=W0go3?2z`DhV8)?C09l zvr}WYZm<9G8TrkA6XAL^{Wl;rhk?W-XtVM&f-%i^706q{E^gCZKz`997+ZYDopWQFM2LN8vr9*0EA8zufoQkrEss;qp8VX&AzI=13lf3{YZ+@fpBT zzmaI_FJ9>fzePU`7|9toazmXrfcr&))5DXa;|C|-oMyc})v>q}@a%(pa<=8T;}P+s zo+pabwndyLioN*o+#s&^VAN5cbOXyFpgCaX10s+vo}3+tCo?!F(aUbhn!)H&eb7qz z90Mvtz-A1nPNIFa8rxULQ19`7T`M*c!zD{onyL+HfZFS(sjWgLwAs zAUqF)+Hqh)jepqS$+>LAjBU#25UvtqBF^#7IfJ@^A6hCL@7*}cV!XdUdD286_3t1& zi5)FEzKxk + @@ -381,6 +382,7 @@ + @@ -894,6 +896,7 @@ + diff --git a/SUBQHSE/BLL/BaseInfo/SuperviseCheckTypeService.cs b/SUBQHSE/BLL/BaseInfo/SuperviseCheckTypeService.cs new file mode 100644 index 0000000..2fd0e9f --- /dev/null +++ b/SUBQHSE/BLL/BaseInfo/SuperviseCheckTypeService.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 企业大检查类别 + /// + public class SuperviseCheckTypeService + { + /// + /// 根据主键获取检查类别 + /// + /// + /// + public static Model.Base_SuperviseCheckType GetCheckTypeById(string checkTypeId) + { + return Funs.DB.Base_SuperviseCheckType.FirstOrDefault(e => e.CheckTypeId == checkTypeId); + } + + /// + /// 添加检查类别 + /// + /// + public static void AddCheckType(Model.Base_SuperviseCheckType checkType) + { + Model.Base_SuperviseCheckType newCheckType = new Model.Base_SuperviseCheckType + { + CheckTypeId = checkType.CheckTypeId, + CheckTypeCode = checkType.CheckTypeCode, + CheckTypeName = checkType.CheckTypeName, + CheckMainType = checkType.CheckMainType, + Remark = checkType.Remark + }; + Funs.DB.Base_SuperviseCheckType.InsertOnSubmit(newCheckType); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改检查类别 + /// + /// + public static void UpdateCheckType(Model.Base_SuperviseCheckType checkType) + { + Model.Base_SuperviseCheckType newCheckType = Funs.DB.Base_SuperviseCheckType.FirstOrDefault(e => e.CheckTypeId == checkType.CheckTypeId); + if (newCheckType != null) + { + newCheckType.CheckTypeCode = checkType.CheckTypeCode; + newCheckType.CheckTypeName = checkType.CheckTypeName; + newCheckType.CheckMainType = checkType.CheckMainType; + newCheckType.Remark = checkType.Remark; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除检查类别 + /// + /// + public static void DeleteCheckTypeById(string checkTypeId) + { + Model.Base_SuperviseCheckType newCheckType = Funs.DB.Base_SuperviseCheckType.FirstOrDefault(e => e.CheckTypeId == checkTypeId); + if (newCheckType != null) + { + Funs.DB.Base_SuperviseCheckType.DeleteOnSubmit(newCheckType); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 获取检查类别下拉列表项 + /// + /// + public static List GetCheckTypeListByMainType(string mainType) + { + if (!string.IsNullOrWhiteSpace(mainType)) + { + return (from x in Funs.DB.Base_SuperviseCheckType where x.CheckMainType == mainType orderby x.CheckTypeCode select x).ToList(); + } + else + { + return (from x in Funs.DB.Base_SuperviseCheckType orderby x.CheckTypeCode select x).ToList(); + } + } + + /// + /// 检查类别下拉框 + /// + /// 下拉框名字 + /// 检查大类 + /// 是否显示请选择 + public static void InitCheckTypeDropDownListByMainType(FineUIPro.DropDownList dropName, string mainType, bool isShowPlease) + { + dropName.DataValueField = "CheckTypeCode"; + dropName.DataTextField = "CheckTypeName"; + dropName.DataSource = GetCheckTypeListByMainType(mainType); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + } +} \ No newline at end of file diff --git a/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs b/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs index 7e978ee..45d317d 100644 --- a/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs +++ b/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs @@ -242,6 +242,7 @@ namespace BLL newCheckControl.ReAttachUrl = CheckControl.ReAttachUrl; newCheckControl.State = CheckControl.State; newCheckControl.SaveHandleMan = CheckControl.SaveHandleMan; + newCheckControl.IsUpdate = null; db.SubmitChanges(); } diff --git a/SUBQHSE/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs b/SUBQHSE/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs new file mode 100644 index 0000000..84ac4cc --- /dev/null +++ b/SUBQHSE/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs @@ -0,0 +1,85 @@ +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace BLL +{ + public class QCManage_QCGroupRegistrationService + { + /// + /// 获取QC管理-QC小组注册信息 + /// + /// + /// + public static Model.QCManage_QCGroupRegistration GetQCGroupRegistrationByQCGroupRegistrationId(string QCGroupRegistrationId) + { + return Funs.DB.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistrationId); + } + /// + /// 添加QC管理-QC小组注册信息 + /// + /// + public static void AddQCGroupRegistration(Model.QCManage_QCGroupRegistration QCGroupRegistration) + { + Model.SUBQHSEDB db = Funs.DB; + Model.QCManage_QCGroupRegistration newQCGroupRegistration = new Model.QCManage_QCGroupRegistration(); + newQCGroupRegistration.QCGroupRegistrationId = QCGroupRegistration.QCGroupRegistrationId; + newQCGroupRegistration.ProjectId = QCGroupRegistration.ProjectId; + newQCGroupRegistration.Code = QCGroupRegistration.Code; + newQCGroupRegistration.Name = QCGroupRegistration.Name; + newQCGroupRegistration.CompileMan = QCGroupRegistration.CompileMan; + newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate; + newQCGroupRegistration.UnitId = QCGroupRegistration.UnitId; + newQCGroupRegistration.Subjects = QCGroupRegistration.Subjects; + newQCGroupRegistration.Process = QCGroupRegistration.Process; + newQCGroupRegistration.Achievement = QCGroupRegistration.Achievement; + newQCGroupRegistration.AwardName = QCGroupRegistration.AwardName; + newQCGroupRegistration.AwardType = QCGroupRegistration.AwardType; + newQCGroupRegistration.AwardLevel = QCGroupRegistration.AwardLevel; + newQCGroupRegistration.AwardingUnit = QCGroupRegistration.AwardingUnit; + db.QCManage_QCGroupRegistration.InsertOnSubmit(newQCGroupRegistration); + db.SubmitChanges(); + } + + /// + /// 修改QC管理-QC小组注册信息 + /// + /// + public static void UpdateQCGroupRegistration(Model.QCManage_QCGroupRegistration QCGroupRegistration) + { + Model.SUBQHSEDB db = Funs.DB; + Model.QCManage_QCGroupRegistration newQCGroupRegistration = db.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistration.QCGroupRegistrationId); + if (newQCGroupRegistration != null) + { + newQCGroupRegistration.Code = QCGroupRegistration.Code; + newQCGroupRegistration.Name = QCGroupRegistration.Name; + newQCGroupRegistration.CompileMan = QCGroupRegistration.CompileMan; + newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate; + newQCGroupRegistration.UnitId = QCGroupRegistration.UnitId; + newQCGroupRegistration.Subjects = QCGroupRegistration.Subjects; + newQCGroupRegistration.Process = QCGroupRegistration.Process; + newQCGroupRegistration.Achievement = QCGroupRegistration.Achievement; + newQCGroupRegistration.AwardName = QCGroupRegistration.AwardName; + newQCGroupRegistration.AwardLevel = QCGroupRegistration.AwardLevel; + newQCGroupRegistration.AwardingUnit = QCGroupRegistration.AwardingUnit; + newQCGroupRegistration.IsUpdate = null; + newQCGroupRegistration.AwardType = QCGroupRegistration.AwardType; + db.SubmitChanges(); + } + } + /// + /// 根据主键删除QC管理-QC小组注册信息 + /// + /// + public static void DeleteQCGroupRegistrationById(string QCGroupRegistrationId) + { + Model.SUBQHSEDB db = Funs.DB; + Model.QCManage_QCGroupRegistration QCGroupRegistration = db.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistrationId); + if (QCGroupRegistration != null) + { + db.QCManage_QCGroupRegistration.DeleteOnSubmit(QCGroupRegistration); + db.SubmitChanges(); + } + } + } +} diff --git a/SUBQHSE/BLL/Common/AttachFileService.cs b/SUBQHSE/BLL/Common/AttachFileService.cs index cfe675a..fe9da4e 100644 --- a/SUBQHSE/BLL/Common/AttachFileService.cs +++ b/SUBQHSE/BLL/Common/AttachFileService.cs @@ -462,5 +462,64 @@ namespace BLL return result; } + + /// + /// 获取附件数据流类 多附件的情况 + /// + /// 附件路径 + /// + public static List GetMoreFileStructByAttachUrl(string attachUrl) + { + List fileContext = new List(); + try + { + if (!String.IsNullOrEmpty(attachUrl)) + { + string physicalpath = ConfigurationManager.AppSettings["localRoot"]; + string filePath = string.Empty; + string[] strs = attachUrl.Trim().Split(','); + foreach (var item in strs) + { + //HttpContext.Current.Request.PhysicalApplicationPath; + filePath = physicalpath + item; + if (File.Exists(filePath)) + { + fileContext.Add(fileConvertByte(item)); + } + } + } + } + catch (Exception ex) + { + string a = ex.Message; + } + return fileContext; + } + + #region 附件转换二进制数据(用于保存数据库) + /// + /// 附件转换二进制数据(用于保存数据库) + /// + /// 附件路径 + /// 二进制 + public static byte[] fileConvertByte(string filePath) + { + string physicalpath = (ConfigurationManager.AppSettings["localRoot"] + "\\" + filePath).Replace("\\\\", "\\"); + byte[] bytContent = null; + System.IO.FileStream fs = null; + System.IO.BinaryReader br = null; + try + { + fs = new FileStream(physicalpath, System.IO.FileMode.Open); + } + catch + { + } + br = new BinaryReader((Stream)fs); + bytContent = br.ReadBytes((Int32)fs.Length); + fs.Dispose(); + return bytContent; + } + #endregion } } diff --git a/SUBQHSE/BLL/Common/Const.cs b/SUBQHSE/BLL/Common/Const.cs index 699b2c1..339e882 100644 --- a/SUBQHSE/BLL/Common/Const.cs +++ b/SUBQHSE/BLL/Common/Const.cs @@ -6724,6 +6724,13 @@ namespace BLL /// 施工作业风险 /// public const string ConstructionRiskMenuId = "F531D523-35BC-4D13-88D3-CB2554C4185C"; - + /// + /// QC活动 + /// + public const string ProjectQCGroupRegistrationListMenuId = "C8031876-4F44-4CBC-8370-0EC7CB1B21F5"; + /// 质量隐患 + /// + public const string CQMSRectifyMenuId = "D72BB321-11A8-485B-BAC7-367C7FCA7FBA"; + /// } } \ No newline at end of file diff --git a/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs b/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs index e3a8d93..a9ffe8a 100644 --- a/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs +++ b/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; +using FineUIPro; namespace BLL { @@ -227,11 +228,16 @@ namespace BLL newHazardSelectedItem.State = hazardSelectedItem.State; newHazardSelectedItem.PlanExistDate = hazardSelectedItem.PlanExistDate; newHazardSelectedItem.QRCodeAttachUrl = hazardSelectedItem.QRCodeAttachUrl; + newHazardSelectedItem.IsUpdate = null; db.SubmitChanges(); } } + /// + /// 根据危险源类别主键删除对应的所有危险源信息 + /// + /// 危险源类别主键 /// /// 根据危险源类别主键删除对应的所有危险源信息 /// @@ -244,23 +250,56 @@ namespace BLL { foreach (var item in q) { - var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId); - if (h.Count() > 0) + if (item.IsUpdate == true) { - db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h); - db.SubmitChanges(); + var returndata = Project_HSSEData_HSSEService.DeleteProjectSecurityRiskData(item.HazardSelectedItemId); + if (returndata.code == 1) + { + var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId); + if (h.Count() > 0) + { + db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h); + db.SubmitChanges(); + } + var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId); + if (p.Count() > 0) + { + db.Hazard_PatrolPlan.DeleteAllOnSubmit(p); + db.SubmitChanges(); + } + var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId); + if (r.Count() > 0) + { + db.Hazard_RoutingInspection.DeleteAllOnSubmit(r); + db.SubmitChanges(); + } + } + else + { + Alert.ShowInTop("记录已上报集团,集团删除失败,无法删除本地数据!", MessageBoxIcon.Warning); + return; + } } - var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId); - if (p.Count() > 0) + else { - db.Hazard_PatrolPlan.DeleteAllOnSubmit(p); - db.SubmitChanges(); - } - var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId); - if (r.Count() > 0) - { - db.Hazard_RoutingInspection.DeleteAllOnSubmit(r); - db.SubmitChanges(); + var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId); + if (h.Count() > 0) + { + db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h); + db.SubmitChanges(); + } + var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId); + if (p.Count() > 0) + { + db.Hazard_PatrolPlan.DeleteAllOnSubmit(p); + db.SubmitChanges(); + } + var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId); + if (r.Count() > 0) + { + db.Hazard_RoutingInspection.DeleteAllOnSubmit(r); + db.SubmitChanges(); + } } } db.Hazard_HazardSelectedItem.DeleteAllOnSubmit(q); diff --git a/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index d7525e5..63acdcf 100644 --- a/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -118,7 +118,7 @@ namespace BLL newHazardRegister.RegisterTypesId = hazardRegister.RegisterTypesId; newHazardRegister.Risk_Level = hazardRegister.Risk_Level; newHazardRegister.Requirements = hazardRegister.Requirements; - + newHazardRegister.IsUpdate = null; //把附件表的路径复制过来 Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId); if (file != null) diff --git a/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs b/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs index ce0f637..13a86ad 100644 --- a/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs +++ b/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs @@ -97,6 +97,7 @@ namespace BLL newLicenseManager.IsHighRisk = licenseManager.IsHighRisk; newLicenseManager.LicenseCodes = licenseManager.LicenseCodes; + newLicenseManager.IsUpdate = null; db.SubmitChanges(); } } diff --git a/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs b/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs index eae4784..8568270 100644 --- a/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs +++ b/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs @@ -75,7 +75,7 @@ namespace BLL newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum; newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard; newLargerHazard.Descriptions = largerHazard.Descriptions; - newLargerHazard.RecordTime = largerHazard.RecordTime; + newLargerHazard.IsUpdate = null; db.SubmitChanges(); } } diff --git a/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs b/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs index 2d0288e..e3b27e2 100644 --- a/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs +++ b/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs @@ -26,10 +26,11 @@ namespace BLL /// 根据上一节点id获取安全隐患 /// /// + /// /// - public static List GetRectifyBySupRectifyId(string supRectifyId) + public static List GetRectifyBySupRectifyId(string supRectifyId, string type) { - return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId select x).ToList(); + return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId && x.RectifyType == type select x).ToList(); } /// @@ -42,6 +43,7 @@ namespace BLL Model.Technique_Rectify newRectify = new Model.Technique_Rectify { RectifyId = rectify.RectifyId, + RectifyType = rectify.RectifyType, RectifyCode = rectify.RectifyCode, RectifyName = rectify.RectifyName, SupRectifyId = rectify.SupRectifyId, @@ -62,6 +64,7 @@ namespace BLL Model.Technique_Rectify newRectify = db.Technique_Rectify.FirstOrDefault(e => e.RectifyId == rectify.RectifyId); if (newRectify != null) { + newRectify.RectifyType = rectify.RectifyType; newRectify.RectifyCode = rectify.RectifyCode; newRectify.RectifyName = rectify.RectifyName; newRectify.SupRectifyId = rectify.SupRectifyId; @@ -111,7 +114,7 @@ namespace BLL } else { - var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId); + var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId, rectify.RectifyType); if (supItemSetCount.Count() > 0) { isDelete = false; diff --git a/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs new file mode 100644 index 0000000..a6e6652 --- /dev/null +++ b/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs @@ -0,0 +1,180 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public static class BaseDataService + { + public static List BeUnderConstructionList = GetBeUnderConstruction().Select(p => p.ProjectId).ToList(); + + /// + /// 获取在建项目数 + /// + /// + public static List GetBeUnderConstruction() + { + var projectInfos = from project in Funs.DB.Base_Project + join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin + from unit in unitJoin.DefaultIfEmpty() + join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin + from projectType in projectTypeJoin.DefaultIfEmpty() + join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin + from sysConst in sysConstJoin.DefaultIfEmpty() + where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "1" + select new ProjectOutput + { + ProjectId = project.ProjectId, + ProjectCode = project.ProjectCode, + ProjectName = project.ProjectName, + UnitId = project.UnitId, + UnitName = unit.UnitName, + StartDate = project.StartDate, + EndDate = project.EndDate, + ProjectAddress = project.ProjectAddress, + ShortName = project.ShortName, + ConstructionMoney = project.ConstructionMoney, + ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), + ProjectState = project.ProjectState, + ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), + ProjectMoney = project.ProjectMoney, + DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, + ProjectTypeName = projectType.ProjectTypeName, + ProjectStateName2 = sysConst.ConstText + }; + var result = projectInfos.ToList(); + return result; + } + /// + /// 获取在建项目数(异步) + /// + /// + public static async Task> GetBeUnderConstructionAsync() + { + return await Task.Run(GetBeUnderConstruction); + } + + /// + /// 获取停工项目数 + /// + /// + public static List GetShutdown() + { + var projectInfos = from project in Funs.DB.Base_Project + join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin + from unit in unitJoin.DefaultIfEmpty() + join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin + from projectType in projectTypeJoin.DefaultIfEmpty() + join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin + from sysConst in sysConstJoin.DefaultIfEmpty() + where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "2" + select new ProjectOutput + { + ProjectId = project.ProjectId, + ProjectCode = project.ProjectCode, + ProjectName = project.ProjectName, + UnitId = project.UnitId, + UnitName = unit.UnitName, + StartDate = project.StartDate, + EndDate = project.EndDate, + ProjectAddress = project.ProjectAddress, + ShortName = project.ShortName, + ConstructionMoney = project.ConstructionMoney, + ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), + ProjectState = project.ProjectState, + ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), + ProjectMoney = project.ProjectMoney, + DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, + ProjectTypeName = projectType.ProjectTypeName, + ProjectStateName2 = sysConst.ConstText + }; + var result = projectInfos.ToList(); + return result; + } + /// + /// 获取停工项目数(异步) + /// + /// + public static async Task> GetShutdownAsync() + { + return await Task.Run(GetShutdown); + } + /// + /// 获取完工项目数 + /// + /// + public static List GetCompletedProject() + { + var projectInfos = from project in Funs.DB.Base_Project + join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin + from unit in unitJoin.DefaultIfEmpty() + join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin + from projectType in projectTypeJoin.DefaultIfEmpty() + join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin + from sysConst in sysConstJoin.DefaultIfEmpty() + where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "3" + select new ProjectOutput + { + ProjectId = project.ProjectId, + ProjectCode = project.ProjectCode, + ProjectName = project.ProjectName, + UnitId = project.UnitId, + UnitName = unit.UnitName, + StartDate = project.StartDate, + EndDate = project.EndDate, + ProjectAddress = project.ProjectAddress, + ShortName = project.ShortName, + ConstructionMoney = project.ConstructionMoney, + ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), + ProjectState = project.ProjectState, + ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), + ProjectMoney = project.ProjectMoney, + DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, + ProjectTypeName = projectType.ProjectTypeName, + ProjectStateName2 = sysConst.ConstText + }; + var result = projectInfos.ToList(); + return result; + } + /// + /// 获取所有项目数 + /// + /// + public static List GetALLProject() + { + var projectInfos = from project in Funs.DB.Base_Project + join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin + from unit in unitJoin.DefaultIfEmpty() + join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin + from projectType in projectTypeJoin.DefaultIfEmpty() + join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin + from sysConst in sysConstJoin.DefaultIfEmpty() + where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) + select new ProjectOutput + { + ProjectId = project.ProjectId, + ProjectCode = project.ProjectCode, + ProjectName = project.ProjectName, + UnitId = project.UnitId, + UnitName = unit.UnitName, + StartDate = project.StartDate, + EndDate = project.EndDate, + ProjectAddress = project.ProjectAddress, + ShortName = project.ShortName, + ConstructionMoney = project.ConstructionMoney, + ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), + ProjectState = project.ProjectState, + ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), + ProjectMoney = project.ProjectMoney, + DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, + ProjectTypeName = projectType.ProjectTypeName, + ProjectStateName2 = sysConst.ConstText + }; + var result = projectInfos.ToList(); + return result; + } + } +} diff --git a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs index b16de0d..f959f90 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs @@ -15,8 +15,7 @@ namespace BLL { public static class CQMSDataService { - public static SUBQHSEDB db = Funs.DB; - public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList(); + public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList; #region 获取列表 @@ -63,6 +62,9 @@ namespace BLL x.ReportDate, x.TrainPersonNum, x.TechnicalDisclosePersonNum, + x.ComprehensiveConTechnologyDisclosureNum, + x.ComprehensiveConTechnologyDisclosurePersonNum, + x.ComprehensiveReviewDrawingsNum, x.UseNum, x.OKNum, x.CompanyPersonNum, @@ -90,6 +92,8 @@ namespace BLL x.SubProjectNum, x.SubdivisionalWorksNum, x.InspectionLotNum, + x.InspectionMachineNum, + x.InspectionMachineQualifiedNum, x.State, x.CreateDate, x.CreateMan @@ -113,11 +117,15 @@ namespace BLL ReportDate = newtable.ReportDate, TrainPersonNum = newtable.TrainPersonNum, TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum, + ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum, + ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum, + ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum, UseNum = newtable.UseNum, OKNum = newtable.OKNum, CompanyPersonNum = newtable.CompanyPersonNum, BranchPersonNum = newtable.BranchPersonNum, ProjectPersonNum = newtable.ProjectPersonNum, + ProjectSubPersonNum = newtable.ProjectSubPersonNum, ProblemNum = newtable.ProblemNum, ProblemCompletedNum = newtable.ProblemCompletedNum, ProblemNotCompletedNum = newtable.ProblemNotCompletedNum, @@ -159,6 +167,8 @@ namespace BLL SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum, SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum, SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum, + InspectionMachineNum = newtable.InspectionMachineNum, + InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum, State = newtable.State, CreateDate = newtable.CreateDate, CreateMan = newtable.CreateMan @@ -182,14 +192,24 @@ namespace BLL table.ReportDate = newtable.ReportDate; table.TrainPersonNum = newtable.TrainPersonNum; table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum; + table.ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum; + table.ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum; + table.ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum; table.UseNum = newtable.UseNum; table.OKNum = newtable.OKNum; table.CompanyPersonNum = newtable.CompanyPersonNum; table.BranchPersonNum = newtable.BranchPersonNum; table.ProjectPersonNum = newtable.ProjectPersonNum; + table.ProjectSubPersonNum = newtable.ProjectSubPersonNum; table.ProblemNum = newtable.ProblemNum; table.ProblemCompletedNum = newtable.ProblemCompletedNum; table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum; + table.UnitCheckNum = newtable.UnitCheckNum; + table.UnitCheckClosedNum = newtable.UnitCheckClosedNum; + table.UnitCheckNotClosedNum = newtable.UnitCheckNotClosedNum; + table.BranchCheckNum = newtable.BranchCheckNum; + table.BranchCheckClosedNum = newtable.BranchCheckClosedNum; + table.BranchCheckNotClosedNum = newtable.BranchCheckNotClosedNum; table.SNum = newtable.SNum; table.ANum = newtable.ANum; table.BNum = newtable.BNum; @@ -228,6 +248,8 @@ namespace BLL table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum; table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum; table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum; + table.InspectionMachineNum = newtable.InspectionMachineNum; + table.InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum; table.State = newtable.State; table.CreateMan = newtable.CreateMan; table.CreateDate = newtable.CreateDate; @@ -270,6 +292,9 @@ namespace BLL item.CollCropCode = model.CollCropCode; item.TrainPersonNum = model.TrainPersonNum; item.TechnicalDisclosePersonNum = model.TechnicalDisclosePersonNum; + item.ComprehensiveConTechnologyDisclosureNum = model.ComprehensiveConTechnologyDisclosureNum; + item.ComprehensiveConTechnologyDisclosurePersonNum = model.ComprehensiveConTechnologyDisclosurePersonNum; + item.ComprehensiveReviewDrawingsNum = model.ComprehensiveReviewDrawingsNum; item.UseNum = model.UseNum; item.OKNum = model.OKNum; item.CompanyPersonNum = model.CompanyPersonNum; @@ -279,6 +304,12 @@ namespace BLL item.ProblemCompletedNum = model.ProblemCompletedNum; item.ProblemNotCompletedNum = model.ProblemNotCompletedNum; item.ProblemRate = ""; + item.UnitCheckNum = model.UnitCheckNum; + item.UnitCheckClosedNum = model.UnitCheckClosedNum; + item.UnitCheckNotClosedNum = model.UnitCheckNotClosedNum; + item.BranchCheckNum = model.BranchCheckNum; + item.BranchCheckClosedNum = model.BranchCheckClosedNum; + item.BranchCheckNotClosedNum = model.BranchCheckNotClosedNum; item.SNum = model.SNum; item.ANum = model.ANum; item.BNum = model.BNum; @@ -322,6 +353,11 @@ namespace BLL item.SubProjectAcceptOKNum = model.SubProjectAcceptOKNum; item.SubdivisionalWorksAcceptNum = model.SubdivisionalWorksAcceptNum; item.SubdivisionalWorksAcceptOKNum = model.SubdivisionalWorksAcceptOKNum; + item.MachineInspectionNum = model.MachineInspectionQualifiedNum; + item.MachineInspectionQualifiedNum = model.MachineInspectionQualifiedNum; + item.InspectionLotNum = model.InspectionLotNum; + item.InspectionMachineNum = model.InspectionMachineNum; + item.InspectionMachineQualifiedNum = model.InspectionMachineQualifiedNum; } var cqmsDataItems = new List(); @@ -371,6 +407,9 @@ namespace BLL ReportDate = DateTime.Now.Date, TrainPersonNum = ProjectData.Sum(x => x.TrainPersonNum), TechnicalDisclosePersonNum = ProjectData.Sum(x => x.TechnicalDisclosePersonNum), + ComprehensiveConTechnologyDisclosureNum = ProjectData.Sum(x => x.ComprehensiveConTechnologyDisclosureNum), + ComprehensiveConTechnologyDisclosurePersonNum = ProjectData.Sum(x => x.ComprehensiveConTechnologyDisclosurePersonNum), + ComprehensiveReviewDrawingsNum = ProjectData.Sum(x => x.ComprehensiveReviewDrawingsNum), UseNum = ProjectData.Sum(x => x.UseNum), OKNum = ProjectData.Sum(x => x.OKNum), CompanyPersonNum = GetCompanyPersonNum(), @@ -398,6 +437,9 @@ namespace BLL SubProjectNum = ProjectData.Sum(x => x.SubProjectNum), SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum), InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum), + InspectionMachineNum = ProjectData.Sum(x=>x.InspectionMachineNum), + InspectionMachineQualifiedNum = ProjectData.Sum(x => x.InspectionMachineQualifiedNum), + SpecialEquipmentQualityAssuranceSystemNum = ProjectData.Sum(x => x.SpecialEquipmentQualityAssuranceSystemNum), CreateMan = Const.sysglyId, CreateDate = DateTime.Now }; @@ -446,92 +488,6 @@ namespace BLL return responeData; } - public static CQMSData StatisticalData() - { - var thisUnitId = string.Empty; - var thisUnit = CommonService.GetIsThisUnit(); - if (thisUnit != null) thisUnitId = thisUnit.UnitId; - var base_Unit = UnitService.GetUnitByUnitId(thisUnitId); - Project_CQMSDataService.StatisticalAllProjectData(); - - var ProjectData = (from x in Funs.DB.Project_CQMSData_CQMS - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - select x).ToList(); - var table = new CQMSData_CQMS - { - UnitId = thisUnitId, - CollCropCode = base_Unit.CollCropCode, - UnitName = base_Unit.UnitName, - ReportDate = DateTime.Now.Date, - TrainPersonNum = ProjectData.Sum(x => x.TrainPersonNum), - TechnicalDisclosePersonNum = ProjectData.Sum(x => x.TechnicalDisclosePersonNum), - UseNum = ProjectData.Sum(x => x.UseNum), - OKNum = ProjectData.Sum(x => x.OKNum), - CompanyPersonNum = GetCompanyPersonNum(), - BranchPersonNum = GetBranchPersonNum(), - ProjectPersonNum = ProjectData.Sum(x => x.ProjectPersonNum), - ProblemNum = ProjectData.Sum(x => x.ProblemNum), - ProblemCompletedNum = ProjectData.Sum(x => x.ProblemCompletedNum), - ProblemNotCompletedNum = ProjectData.Sum(x => x.ProblemNotCompletedNum), - SNum = ProjectData.Sum(x => x.SNum), - ANum = ProjectData.Sum(x => x.ANum), - BNum = ProjectData.Sum(x => x.BNum), - CNum = ProjectData.Sum(x => x.CNum), - KeyProcessNum = ProjectData.Sum(x => x.KeyProcessNum), - KeyProcessOKNum = ProjectData.Sum(x => x.KeyProcessOKNum), - SpecialProcessNum = ProjectData.Sum(x => x.SpecialProcessNum), - SpecialProcessOKNum = ProjectData.Sum(x => x.SpecialProcessOKNum), - ConcealedWorksNum = ProjectData.Sum(x => x.ConcealedWorksNum), - ConcealedWorksOKNum = ProjectData.Sum(x => x.ConcealedWorksOKNum), - UnitProjectOnesNum = ProjectData.Sum(x => x.UnitProjectOnesNum), - UnitProjectOnesOKNum = ProjectData.Sum(x => x.UnitProjectOnesOKNum), - MaterialInRecheckNum = ProjectData.Sum(x => x.MaterialInRecheckNum), - MaterialInRecheckOKNum = ProjectData.Sum(x => x.MaterialInRecheckOKNum), - SingleProjectNum = ProjectData.Sum(x => x.SingleProjectNum), - UnitProjectNum = ProjectData.Sum(x => x.UnitProjectNum), - SubProjectNum = ProjectData.Sum(x => x.SubProjectNum), - SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum), - InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum), - EquipmentInspectionNum = ProjectData.Sum(x => x.EquipmentInspectionNum), - EquipmentInspectionQualifiedNum = ProjectData.Sum(x => x.EquipmentInspectionQualifiedNum), - MachineInspectionNum = ProjectData.Sum(x => x.MachineInspectionNum), - MachineInspectionQualifiedNum = ProjectData.Sum(x => x.MachineInspectionQualifiedNum), - PersonInspectionNum = ProjectData.Sum(x => x.PersonInspectionNum), - PersonInspectionQualifiedNum = ProjectData.Sum(x => x.PersonInspectionQualifiedNum), - MaterialInspectionNum = ProjectData.Sum(x => x.MaterialInspectionNum), - MaterialInspectionQualifiedNum = ProjectData.Sum(x => x.MaterialInspectionQualifiedNum), - ConstructSolutionNum = ProjectData.Sum(x => x.ConstructSolutionNum), - ConstructSolutionProjectApproveNum = ProjectData.Sum(x => x.ConstructSolutionProjectApproveNum), - ConstructSolutionUnitApproveNum = ProjectData.Sum(x => x.ConstructSolutionUnitApproveNum), - SpecialEquipmentQualityAssuranceSystemNum = ProjectData.Sum(x => x.SpecialEquipmentQualityAssuranceSystemNum), - DesignDetailsNum = ProjectData.Sum(x => x.DesignDetailsNum), - UnitProjectAcceptNum = ProjectData.Sum(x => x.UnitProjectAcceptNum), - UnitProjectAcceptOKNum = ProjectData.Sum(x => x.UnitProjectAcceptOKNum), - SubProjectAcceptNum = ProjectData.Sum(x => x.SubProjectAcceptNum), - SubProjectAcceptOKNum = ProjectData.Sum(x => x.SubProjectAcceptOKNum), - SubdivisionalWorksAcceptNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptNum), - SubdivisionalWorksAcceptOKNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptOKNum), - CreateMan = Const.sysglyId, - CreateDate = DateTime.Now - }; - if (IsReportByToday()) - { - table.Id = GetTodayData().Id; - table.State = Const.CNCEC_State_1; - UpdateCQMSData_CQMS(table); - } - else - { - table.Id = SQLHelper.GetNewID(); - table.State = Const.CNCEC_State_0; - AddCQMSData_CQMS(table); - } - - var data = new CQMSData(); - data = GetDataByCQMSData_CQMS(table); - return data; - } - /// /// 获取质量统计数据 /// @@ -547,11 +503,15 @@ namespace BLL var branchPersonNumTask = CQMSDataService.GetBranchPersonNumAsync(); //获取分支机构人数 var projectPersonNumTask = CQMSDataService.GetProjectPersonNumAsync(); //获取项目专职人数 var trainPersonNumTask = CQMSDataService.GetTrainPersonNumAsync(); //获取质量培训人次数 - var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取技术交底人次数 + var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取设计交底人次数 + var qualityAssuranceNumTask = CQMSDataService.GetQualityAssuranceNumAsync(); //获取特设质保体系数量 + var comprehensiveConTechnologyDisclosureTask = CQMSDataService.GetComprehensiveConTechnologyDisclosureAsync(); //获取施工技术交底 + var comprehensiveReviewDrawingsTask = CQMSDataService.GetComprehensiveReviewDrawingsAsync(); //获取图纸会审 var inspectionEquipmentTask = CQMSDataService.GetComprehensive_InspectionEquipmentAsync(); //获取设备报验 var inspectionPersonTask = CQMSDataService.GetComprehensive_InspectionPersonAsync(); //获取人员报验 var inspectionMachineTask = CQMSDataService.GetComprehensive_InspectionMachineAsync(); //获取机具报验 + var inspectionMachineEquipmentTask = CQMSDataService.GetComprehensive_InspectionMachineEquipmentAsync(); //获取设备报验报检 var useNumTask = CQMSDataService.GetUseNumAsync(); //获取在用计量器具数 var okNumTask = CQMSDataService.GetOkNumAsync(); //获取校准合格数 @@ -562,6 +522,8 @@ namespace BLL var inspectionLotNumTask = CQMSDataService.GetInspectionLotNumAsync(); //获取检验批个数 var constructSolutionTask = CQMSDataService.GetConstructSolutionAsync(); //施工方案数量 var cqmsProblemTask = CQMSDataService.GetCQMSProblemAsync(); //获取企业级、项目级质量问题 + var cqmsBranchMajorCheckTask = CQMSDataService.GetBranchMajorCheckAsync(); //获取分支机构质量大检查次数 + var cqmsCompanyMajorCheckTask = CQMSDataService.GetCompanyMajorCheckAsync(); //获取企业质量大检查次数 //质量验收数据 var keyProcessNumTask = CQMSDataService.GetKeyProcessNumAsync(); //获取关键工序验收数 @@ -584,14 +546,16 @@ namespace BLL await Task.WhenAll( companyPersonNumTask, branchPersonNumTask, projectPersonNumTask, trainPersonNumTask, technicalDisclosePersonTask, + comprehensiveConTechnologyDisclosureTask, comprehensiveReviewDrawingsTask, inspectionEquipmentTask, inspectionPersonTask, inspectionMachineTask, useNumTask, okNumTask, singleProjectNumTask, unitProjectNumTask, subProjectNuTask, subdivisionalWorksNuTask, inspectionLotNumTask, constructSolutionTask, - cqmsProblemTask, + cqmsProblemTask, cqmsBranchMajorCheckTask, cqmsCompanyMajorCheckTask, keyProcessNumTask, keyProcessOKNumTask, specialProcessNumTask, specialProcessOKNumTask, concealedWorksNumTask, concealedWorksOKNumTask, unitProjectAcceptNumTask, unitProjectAcceptOKNumTask, subProjectAcceptNumTask, subProjectAcceptOKNumTask, subdivisionalWorksAcceptNumTask, subdivisionalWorksAcceptOKNumTask, - materialInRecheckNumTask, materialInRecheckOKNumTask + materialInRecheckNumTask, materialInRecheckOKNumTask, inspectionMachineEquipmentTask, + qualityAssuranceNumTask ); // 统一获取异步方法的返回值 @@ -600,10 +564,13 @@ namespace BLL var projectPersonNumList = await projectPersonNumTask; var trainPersonNumList = await trainPersonNumTask; var technicalDisclosePersonList = await technicalDisclosePersonTask; + var comprehensiveConTechnologyDisclosureList = await comprehensiveConTechnologyDisclosureTask; + var comprehensiveReviewDrawingsList = await comprehensiveReviewDrawingsTask; var inspectionEquipmentList = await inspectionEquipmentTask; var inspectionPersonList = await inspectionPersonTask; var inspectionMachineList = await inspectionMachineTask; + var inspectionMachineEquipmentList =await inspectionMachineEquipmentTask; var useNum = await useNumTask; var okNum = await okNumTask; var singleProjectNum = await singleProjectNumTask; @@ -614,6 +581,8 @@ namespace BLL var constructSolutionList = await constructSolutionTask; var cqmsProblemList = await cqmsProblemTask; + var cqmsBranchMajorCheckList = await cqmsBranchMajorCheckTask; + var cqmsCompanyMajorCheckList = await cqmsCompanyMajorCheckTask; var keyProcessNum = await keyProcessNumTask; var keyProcessOKNum = await keyProcessOKNumTask; @@ -630,7 +599,8 @@ namespace BLL var subdivisionalWorksAcceptOKNum = await subdivisionalWorksAcceptOKNumTask; var materialInRecheckNum = await materialInRecheckNumTask; var materialInRecheckOKNum = await materialInRecheckOKNumTask; - + var qualityAssuranceNum = await qualityAssuranceNumTask; + // 构造结果对象 var table = new CQMSData_CQMS { @@ -640,17 +610,23 @@ namespace BLL ReportDate = DateTime.Now.Date, CompanyPersonNum = companyPersonNum,// BranchPersonNum = branchPersonNum,// - ProjectPersonNum = projectPersonNumList.Count(), + ProjectPersonNum = projectPersonNumList.Count(x => x.IsOffice == true), + ProjectSubPersonNum = projectPersonNumList.Count(x => x.IsOffice == false), TrainPersonNum = trainPersonNumList.Count(), TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum), + ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(), + ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Sum(x => x.TrainPersonNum), + ComprehensiveReviewDrawingsNum = comprehensiveReviewDrawingsList.Count(), + EquipmentInspectionNum = inspectionEquipmentList.Count(), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(), PersonInspectionNum = inspectionPersonList.Count(), PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(), MachineInspectionNum = inspectionMachineList.Count(), MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(), - MaterialInspectionNum = 0, - MaterialInspectionQualifiedNum = 0, + + MaterialInspectionNum = inspectionEquipmentList.Count(), + MaterialInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(), UseNum = useNum.Count(), OKNum = okNum.Count(), SingleProjectNum = singleProjectNum.Count(), @@ -662,12 +638,18 @@ namespace BLL ConstructSolutionNum = constructSolutionList.Count(), ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1").Count(), ConstructSolutionUnitApproveNum = 0,// - SpecialEquipmentQualityAssuranceSystemNum = 0,// + SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(), DesignDetailsNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum), ProblemNum = cqmsProblemList.Count(), ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7").Count(), ProblemNotCompletedNum = cqmsProblemList.Where(x => x.State != "7").Count(), + BranchCheckNum = cqmsBranchMajorCheckList.Count(), + BranchCheckClosedNum = cqmsBranchMajorCheckList.Count(), + BranchCheckNotClosedNum = 0, + UnitCheckNum = cqmsCompanyMajorCheckList.Count(), + UnitCheckClosedNum = cqmsCompanyMajorCheckList.Count(), + UnitCheckNotClosedNum = 0, KeyProcessNum = keyProcessNum.Count(), KeyProcessOKNum = keyProcessOKNum.Count(), @@ -682,7 +664,10 @@ namespace BLL SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(), SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(), MaterialInRecheckNum = materialInRecheckNum.Count(), - MaterialInRecheckOKNum = materialInRecheckOKNum.Count() + MaterialInRecheckOKNum = materialInRecheckOKNum.Count(), + InspectionMachineNum = inspectionMachineEquipmentList.Count(), + InspectionMachineQualifiedNum = inspectionMachineEquipmentList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(), + }; #region 添加项目统计数据 @@ -699,9 +684,13 @@ namespace BLL ReportDate = DateTime.Now.Date, CompanyPersonNum = companyPersonNum,// BranchPersonNum = branchPersonNum,// - ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid), + ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == true), + ProjectSubPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == false), TrainPersonNum = trainPersonNumList.Count(x => x.ProjectId == projectid), TechnicalDisclosePersonNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), + ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(x => x.ProjectId == projectid), + ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), + ComprehensiveReviewDrawingsNum = comprehensiveReviewDrawingsList.Count(x => x.ProjectId == projectid), EquipmentInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1" && x.ProjectId == projectid).Count(), PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid), @@ -721,7 +710,7 @@ namespace BLL ConstructSolutionNum = constructSolutionList.Count(x => x.ProjectId == projectid), ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1" && x.ProjectId == projectid).Count(), ConstructSolutionUnitApproveNum = 0,// - SpecialEquipmentQualityAssuranceSystemNum = 0,// + SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(x => x.ProjectId == projectid), DesignDetailsNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), ProblemNum = cqmsProblemList.Count(x => x.ProjectId == projectid), @@ -741,7 +730,10 @@ namespace BLL SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(x => x.ProjectId == projectid), SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(x => x.ProjectId == projectid), MaterialInRecheckNum = materialInRecheckNum.Count(x => x.ProjectId == projectid), - MaterialInRecheckOKNum = materialInRecheckOKNum.Count(x => x.ProjectId == projectid) + MaterialInRecheckOKNum = materialInRecheckOKNum.Count(x => x.ProjectId == projectid), + InspectionMachineNum = inspectionMachineEquipmentList.Count(x => x.ProjectId == projectid), + InspectionMachineQualifiedNum = inspectionMachineEquipmentList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(), + }; Project_CQMSDataService.AddProject_CQMSData_CQMS(projectCqmsData); } @@ -766,7 +758,6 @@ namespace BLL return data; } - public static CQMSData GetDataByCQMSData_CQMS(CQMSData_CQMS table) { var data = new CQMSData(); @@ -777,15 +768,25 @@ namespace BLL item.CollCropCode = table.CollCropCode; item.TrainPersonNum = table.TrainPersonNum; item.TechnicalDisclosePersonNum = table.TechnicalDisclosePersonNum; + item.ComprehensiveConTechnologyDisclosureNum = table.ComprehensiveConTechnologyDisclosureNum; + item.ComprehensiveConTechnologyDisclosurePersonNum = table.ComprehensiveConTechnologyDisclosurePersonNum; + item.ComprehensiveReviewDrawingsNum = table.ComprehensiveReviewDrawingsNum; item.UseNum = table.UseNum; item.OKNum = table.OKNum; item.CompanyPersonNum = table.CompanyPersonNum; item.BranchPersonNum = table.BranchPersonNum; item.ProjectPersonNum = table.ProjectPersonNum; + item.ProjectSubPersonNum = table.ProjectSubPersonNum; item.ProblemNum = table.ProblemNum; item.ProblemCompletedNum = table.ProblemCompletedNum; item.ProblemNotCompletedNum = table.ProblemNotCompletedNum; item.ProblemRate = ""; + item.UnitCheckNum = table.UnitCheckNum; + item.UnitCheckClosedNum = table.UnitCheckClosedNum; + item.UnitCheckNotClosedNum = table.UnitCheckNotClosedNum; + item.BranchCheckNum = table.BranchCheckNum; + item.BranchCheckClosedNum = table.BranchCheckClosedNum; + item.BranchCheckNotClosedNum = table.BranchCheckNotClosedNum; item.SNum = table.SNum; item.ANum = table.ANum; item.BNum = table.BNum; @@ -829,6 +830,8 @@ namespace BLL item.SubProjectAcceptOKNum = table.SubProjectAcceptOKNum; item.SubdivisionalWorksAcceptNum = table.SubdivisionalWorksAcceptNum; item.SubdivisionalWorksAcceptOKNum = table.SubdivisionalWorksAcceptOKNum; + item.InspectionMachineNum = table.InspectionMachineNum; + item.InspectionMachineQualifiedNum = table.InspectionMachineQualifiedNum; var cqmsDataItems = new List(); cqmsDataItems.Add(item); data.CQMSDataItems = cqmsDataItems; @@ -891,6 +894,7 @@ namespace BLL /// public static IEnumerable GetProjectPersonNum() { + var mianAndSubUnitList = (from x in Funs.DB.Base_Unit where x.IsThisUnit == true || x.IsBranch == true select x.UnitId).ToList(); var result = (from x in Funs.DB.SitePerson_Person join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup @@ -902,13 +906,15 @@ namespace BLL { ProjectId = x.ProjectId, ProjectName = p.ProjectName, + ProjectFromUnitId=p.UnitId, UnitId = u.UnitId, UnitName = u.UnitName, Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, WorkPostName = y.WorkPostName == null ? "" : y.WorkPostName, - Phone = x.Telephone + Phone = x.Telephone, + IsOffice = x.UnitId == null ? false : mianAndSubUnitList.Contains(x.UnitId) }).ToList(); result = result .GroupBy(x => x.IdentityCard) @@ -965,7 +971,7 @@ namespace BLL } /// - /// 获取技术交底人次数 + /// 获取设计交底人次数 /// /// public static int GetTechnicalDisclosePersonNum() @@ -977,7 +983,7 @@ namespace BLL } /// - /// 获取技术交底人次数 + /// 获取设计交底人次数 /// /// public static List GetTechnicalDisclosePerson() @@ -1001,7 +1007,7 @@ namespace BLL } /// - /// 获取技术交底人次数(异步) + /// 获取设计交底人次数(异步) /// /// public static async Task> GetTechnicalDisclosePersonNumAsync() @@ -1009,6 +1015,69 @@ namespace BLL return await Task.Run(GetTechnicalDisclosePerson); } + + /// + /// 获取施工技术交底 + /// + /// + public static List GetComprehensiveConTechnologyDisclosure() + { + var result = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(p.ProjectId) && x.CompileDate > Const.DtmarkTime + select new Model.EduTrainOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitName = "", + Id = x.ConTechnologyDisclosureId, + TrainTitle = "", + TrainStartDate = null, + TrainEndDate = null, + TrainPersonNum = x.DisclosurePersonNum ?? 0, + }).ToList(); + return result; + } + + /// + /// 获取施工技术交底(异步) + /// + /// + public static async Task> GetComprehensiveConTechnologyDisclosureAsync() + { + return await Task.Run(GetComprehensiveConTechnologyDisclosure); + } + + /// + /// 获取图纸会审 + /// + /// + public static List GetComprehensiveReviewDrawings() + { + var result = (from x in Funs.DB.Comprehensive_ReviewDrawings + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(p.ProjectId) && x.CreateDate > Const.DtmarkTime + select new Model.EduTrainOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitName = "", + Id = x.Id + }).ToList(); + return result; + } + + /// + /// 获取图纸会审(异步) + /// + /// + public static async Task> GetComprehensiveReviewDrawingsAsync() + { + return await Task.Run(GetComprehensiveReviewDrawings); + } + /// /// 获取设备报验 /// @@ -1058,7 +1127,19 @@ namespace BLL public static List GetComprehensive_InspectionMachine() { var result = (from x in Funs.DB.Comprehensive_InspectionMachine - where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime + where BeUnderConstructionList.Contains(x.ProjectId) && x.SType == "机具" && x.CompileDate > Const.DtmarkTime + select x).ToList(); + return result; + } + + /// + /// 获取设备报验 + /// + /// + public static List GetComprehensive_InspectionMachineEquipment() + { + var result = (from x in Funs.DB.Comprehensive_InspectionMachine + where BeUnderConstructionList.Contains(x.ProjectId) && x.SType == "设备" && x.CompileDate > Const.DtmarkTime select x).ToList(); return result; } @@ -1072,6 +1153,15 @@ namespace BLL return await Task.Run(GetComprehensive_InspectionMachine); } + /// + /// 获取设备报验(异步) + /// + /// + public static async Task> GetComprehensive_InspectionMachineEquipmentAsync() + { + return await Task.Run(GetComprehensive_InspectionMachineEquipment); + } + /// /// 获取在用计量器具数 /// @@ -1730,5 +1820,110 @@ namespace BLL } #endregion + + + /// + /// 特设质保体系数量 + /// + /// + public static List GetQualityAssuranceNum() + { + var result = (from x in Funs.DB.Comprehensive_QualityAssurance + where BeUnderConstructionList.Contains(x.ProjectId) + select x).ToList(); + return result; + } + /// + /// 特设质保体系数量(异步) + /// + /// + public static async Task> GetQualityAssuranceNumAsync() + { + return await Task.Run(GetQualityAssuranceNum); + } + + #region 质量监督大检查数据 + + #region 企业级-本单位 + + /// + /// 获取企业质量大检查次数 + /// + /// + public static List GetCompanyMajorCheck() + { + var result = (from x in Funs.DB.Supervise_SuperviseCheckReport + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsThisUnit == true && x.CheckMainType == "1" && x.CheckDate > Const.DtmarkTime //&& x.CheckType == "1" + select new Model.CheckOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitId = x.UnitId, + UnitName = u.UnitName, + Id = x.SuperviseCheckReportId, + CheckTeam = x.CheckTeam, + CheckDate = x.CheckDate, + }); + return result.ToList(); + } + /// + /// 获取企业质量大检查次数(异步) + /// + /// + public static async Task> GetCompanyMajorCheckAsync() + { + return await Task.Run(GetCompanyMajorCheck); + } + + #endregion + + #region 分支机构 + + /// + /// 获取分支机构质量大检查次数 + /// + /// + public static List GetBranchMajorCheck() + { + var result = (from x in Funs.DB.Supervise_SuperviseCheckReport + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsBranch == true && x.CheckMainType == "1" && x.CheckDate > Const.DtmarkTime//&& x.CheckType == "1" + select new Model.CheckOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitId = x.UnitId, + UnitName = u.UnitName, + Id = x.SuperviseCheckReportId, + CheckTeam = x.CheckTeam, + CheckDate = x.CheckDate, + }); + return result.ToList(); + } + /// + /// 获取分支机构质量大检查次数(异步) + /// + /// + public static async Task> GetBranchMajorCheckAsync() + { + return await Task.Run(GetBranchMajorCheck); + } + + + #endregion + + #endregion + } } \ No newline at end of file diff --git a/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs b/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs index 2a03e36..28a3600 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs @@ -1,4 +1,4 @@ -using FineUIPro; +using FineUIPro; using Model; using Newtonsoft.Json; using System; @@ -14,9 +14,7 @@ namespace BLL { public static class HJGLData_HJGLService { - public static SUBQHSEDB db = Funs.DB; - public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList(); - + public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList; #region 获取列表 /// diff --git a/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index 359c130..56741e1 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices.ComTypes; using System.Runtime.Remoting.Contexts; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Web.UI.WebControls; using Aspose.Words.Lists; @@ -16,10 +17,8 @@ namespace BLL { public static class HSSEData_HSSEService { - public static SUBQHSEDB Db = Funs.DB; - - public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList(); + public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList; public static void AddHSSEData_HSSE(HSSEData_HSSE newtable) { using (var db = new SUBQHSEDB(Funs.ConnString)) @@ -52,11 +51,13 @@ namespace BLL BranchFullTimeNum = newtable.BranchFullTimeNum, ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum, ProjectFullTimeNum = newtable.ProjectFullTimeNum, + ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum, ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum, SafetyInjectionEngineer = newtable.SafetyInjectionEngineer, CertificateANum = newtable.CertificateANum, CertificateBNum = newtable.CertificateBNum, CertificateCNum = newtable.CertificateCNum, + QualityPersonNum = newtable.QualityPersonNum, SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum, EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum, ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum, @@ -64,6 +65,9 @@ namespace BLL CompanyLeadShiftCheckNum = newtable.CompanyLeadShiftCheckNum, CompanyComprehensiveCheckNum = newtable.CompanyComprehensiveCheckNum, CompanySpecialCheckNum = newtable.CompanySpecialCheckNum, + BranchLeadShiftCheckNum = newtable.BranchLeadShiftCheckNum, + BranchComprehensiveCheckNum = newtable.BranchComprehensiveCheckNum, + BranchSpecialCheckNum = newtable.BranchSpecialCheckNum, ProjectLeadShiftCheckNum = newtable.ProjectLeadShiftCheckNum, ProjectSpecialCheckNum = newtable.ProjectSpecialCheckNum, ProjectMajorCheckNum = newtable.ProjectMajorCheckNum, @@ -76,8 +80,13 @@ namespace BLL CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum, CompanySpecialPlanNum = newtable.CompanySpecialPlanNum, CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan, + BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum, + BranchSpecialPlanNum = newtable.BranchSpecialPlanNum, + BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan, CompanyDrillNum = newtable.CompanyDrillNum, CompanyDrillPersonNum = newtable.CompanyDrillPersonNum, + BranchDrillNum = newtable.BranchDrillNum, + BranchDrillPersonNum = newtable.BranchDrillPersonNum, ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum, ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum, ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan, @@ -99,6 +108,7 @@ namespace BLL HighRiskNum = newtable.HighRiskNum, CompletedNum = newtable.CompletedNum, TrainPersonNum = newtable.TrainPersonNum, + OperativesNum = newtable.OperativesNum, ConstructionNum = newtable.ConstructionNum, FinishedNum = newtable.FinishedNum, ArgumentNum = newtable.ArgumentNum, @@ -144,17 +154,26 @@ namespace BLL var dataHsse = GetHSSEData_HSSEById(id); if (dataHsse != null) { + item.BranchLeadShiftCheckNum = dataHsse.BranchLeadShiftCheckNum; + item.BranchComprehensiveCheckNum = dataHsse.BranchComprehensiveCheckNum; + item.BranchSpecialCheckNum = dataHsse.BranchSpecialCheckNum; item.BeUnderConstructionNum = dataHsse.BeUnderConstructionNum; item.BranchFullTimeNum = dataHsse.BranchFullTimeNum; item.BranchInspectorGeneralNum = dataHsse.BranchInspectorGeneralNum; + item.BranchComprehensivePlanNum = dataHsse.BranchComprehensivePlanNum; + item.BranchSpecialPlanNum = dataHsse.BranchSpecialPlanNum; + item.BranchOnSiteDisposalPlan = dataHsse.BranchOnSiteDisposalPlan; item.CertificateANum = dataHsse.CertificateANum; item.CertificateBNum = dataHsse.CertificateBNum; item.CertificateCNum = dataHsse.CertificateCNum; + item.QualityPersonNum = dataHsse.QualityPersonNum; item.CollCropCode = dataHsse.CollCropCode; item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum; item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum; item.CompanyDrillNum = dataHsse.CompanyDrillNum; item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum; + item.BranchDrillNum = dataHsse.BranchDrillNum; + item.BranchDrillPersonNum = dataHsse.BranchDrillPersonNum; item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum; item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan; item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum; @@ -220,10 +239,12 @@ namespace BLL item.SuperConstructionNum = dataHsse.SuperConstructionNum; item.SuperFinishedNum = dataHsse.SuperFinishedNum; item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum; + item.SuperOperativesNum = dataHsse.SuperOperativesNum; item.SuperArgumentNum = dataHsse.SuperArgumentNum; item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption; item.TotalWorkingHour = dataHsse.TotalWorkingHour; item.TrainPersonNum = dataHsse.TrainPersonNum; + item.OperativesNum = dataHsse.OperativesNum; item.UnitId = dataHsse.UnitId; item.UseEquipmentNum = dataHsse.UseEquipmentNum; var hSseDataHiddens = @@ -254,17 +275,26 @@ namespace BLL var data = new HSSEData(); if (dataHsse != null) { + item.BranchLeadShiftCheckNum = dataHsse.BranchLeadShiftCheckNum; + item.BranchComprehensiveCheckNum = dataHsse.BranchComprehensiveCheckNum; + item.BranchSpecialCheckNum = dataHsse.BranchSpecialCheckNum; item.BeUnderConstructionNum = dataHsse.BeUnderConstructionNum; item.BranchFullTimeNum = dataHsse.BranchFullTimeNum; item.BranchInspectorGeneralNum = dataHsse.BranchInspectorGeneralNum; + item.BranchComprehensivePlanNum = dataHsse.BranchComprehensivePlanNum; + item.BranchSpecialPlanNum = dataHsse.BranchSpecialPlanNum; + item.BranchOnSiteDisposalPlan = dataHsse.BranchOnSiteDisposalPlan; item.CertificateANum = dataHsse.CertificateANum; item.CertificateBNum = dataHsse.CertificateBNum; item.CertificateCNum = dataHsse.CertificateCNum; + item.QualityPersonNum = dataHsse.QualityPersonNum; item.CollCropCode = dataHsse.CollCropCode; item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum; item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum; item.CompanyDrillNum = dataHsse.CompanyDrillNum; item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum; + item.BranchDrillNum = dataHsse.BranchDrillNum; + item.BranchDrillPersonNum = dataHsse.BranchDrillPersonNum; item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum; item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan; item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum; @@ -303,6 +333,7 @@ namespace BLL item.ProjectDrillNum = dataHsse.ProjectDrillNum; item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum; item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum; + item.ProjectSubFullTimeNum = dataHsse.ProjectSubFullTimeNum; item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum; item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum; item.ProjectMajorCheckNum = dataHsse.ProjectMajorCheckNum; @@ -331,9 +362,11 @@ namespace BLL item.SuperFinishedNum = dataHsse.SuperFinishedNum; item.SuperArgumentNum = dataHsse.SuperArgumentNum; item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum; + item.SuperOperativesNum = dataHsse.SuperOperativesNum; item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption; item.TotalWorkingHour = dataHsse.TotalWorkingHour; item.TrainPersonNum = dataHsse.TrainPersonNum; + item.OperativesNum = dataHsse.OperativesNum; item.UnitId = dataHsse.UnitId; item.UseEquipmentNum = dataHsse.UseEquipmentNum; if (hSseDataHiddens != null) @@ -523,116 +556,10 @@ namespace BLL return result; } - public static HSSEData StatisticalData() - { - var thisUnitId = string.Empty; - var thisUnit = CommonService.GetIsThisUnit(); - if (thisUnit != null) thisUnitId = thisUnit.UnitId; - var baseUnit = UnitService.GetUnitByUnitId(thisUnitId); - Project_HSSEData_HiddenDangerDetailService.StatisticalAllProjectData(); - - var totalEnergyConsumption = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption(); - var incomeComprehensiveEnergyConsumption = - ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption(); - var newWaterConsumption = ChemicalReportItemService.GetLatstTimeNewWaterConsumption(); - - var table = new HSSEData_HSSE - { - UnitId = thisUnitId, - CollCropCode = baseUnit.CollCropCode, - UnitName = baseUnit.UnitName, - ReportDate = DateTime.Now.Date, - BeUnderConstructionNum = GetBeUnderConstruction().Count, - ShutdownNum = GetShutdown().Count, - JoinConstructionPersonNum = GetJoinConstructionPerson().Count, - MajorProjectsUnderConstructionNum = GetMajorProjectsUnderConstruction().Count, - TotalWorkingHour = GetTotalWorkingHour(), - LostWorkingHour = GetLostWorkingHour(), - SafeWorkingHour = GetSafeWorkingHour(), - SafeTrainNum = GetSafeTrain().Sum(x => x.TrainPersonNum), - SpecialTrainNum = GetSpecialTrain().Sum(x => x.TrainPersonNum), - SpecialOperationTrainNum = GetSpecialOperationTrain().Sum(x => x.TrainPersonNum), - EnvironmentalTrainNum = 0, - TotalEnergyConsumption = totalEnergyConsumption, - IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, - NewWaterConsumption = newWaterConsumption, - HeadOfficeInspectorGeneralNum = GetHeadOfficeInspectorGeneral().Count, - HeadOfficeFullTimeNum = GetHeadOfficeFullTime().Count, - BranchInspectorGeneralNum = GetBranchInspectorGeneral().Count, - BranchFullTimeNum = GetBranchFullTime().Count, - ProjectInspectorGeneralNum = GetProjectInspectorGeneral().Count, - ProjectFullTimeNum = GetProjectFullTime().Count, - ProjectSafetyMonitorNum = GetProjectSafetyMonitor().Count, - SafetyInjectionEngineer = GetSafetyInjectionEngineer().Count, - CertificateANum = GetCertificateA().Count, - CertificateBNum = GetCertificateB().Count, - CertificateCNum = GetCertificateC().Count, - SafetyCommitteeMeetingNum = GetSafetyCommitteeMeeting().Count, - EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeeting().Count, - ProjectSafetyLeadingGroupMeetingNum = GetProjectSafetyLeadingGroupMeeting().Count, - ProjectSafetyMeetingNum = GetProjectSafetyMeeting().Count, - CompanyLeadShiftCheckNum = GetCompanyLeadShiftCheck().Count, - CompanyComprehensiveCheckNum = GetCompanyComprehensiveCheck().Count, - CompanySpecialCheckNum = GetCompanySpecialCheck().Count, - ProjectLeadShiftCheckNum = GetProjectLeadShiftCheck().Count, - ProjectSpecialCheckNum = GetProjectSpecialCheck().Count, - ProjectMajorCheckNum = GetProjectMajorCheck().Count, - NearMissNum = GetNearMiss().Count, - RecordableEventNum = GetRecordableEvent().Count, - GeneralAccidentNum = GetGeneralAccident().Count, - MajorAccidentNum = GetMajorAccident().Count, - SeriousAccidentNum = GetSeriousAccident().Count, - SpecialSeriousAccidentNum = GetSpecialSeriousAccident().Count, - CompanyComprehensivePlanNum = GetCompanyComprehensivePlan().Count, - CompanySpecialPlanNum = GetCompanySpecialPlan().Count, - CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan().Count, - CompanyDrillNum = GetCompanyDrill().Count, - ProjectComprehensivePlanNum = GetProjectComprehensivePlan().Count, - ProjectSpecialPlanNum = GetProjectSpecialPlan().Count, - ProjectOnSiteDisposalPlan = GetProjectOnSiteDisposalPlan().Count, - ProjectDrillNum = GetProjectDrill().Count, - CostExtract = Convert.ToInt32(GetCostExtract().Sum(x => x.SUMCost)), - CostUse = Convert.ToInt32(GetCostUse().Sum(x => x.SUMCost)), - UseEquipmentNum = GetUseEquipment().Count, - SpecialEquipmentNum = GetSpecialEquipment().Count, - LicensesNum = GetLicenses().Count, - LicensesCloseNum = GetLicensesClose().Count, - GeneralClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.RecNum), - GeneralNotClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.NoRecNum), - MajorClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.RecNum), - MajorNotClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.NoRecNum), - GeneralRiskNum = GetSecurityRiskOutputs().Sum(x => x.GeneralRiskNum), - LowRiskNum = GetSecurityRiskOutputs().Sum(x => x.LowRiskNum), - MediumRiskNum = GetSecurityRiskOutputs().Sum(x => x.MediumRiskNum), - HighRiskNum = GetSecurityRiskOutputs().Sum(x => x.HighRiskNum), - CompletedNum = GetLargeEngineeringOutputs().Sum(x => x.CompletedNum), - TrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.TrainPersonNum), - ConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.ConstructionNum), - FinishedNum = GetLargeEngineeringOutputs().Sum(x => x.FinishedNum), - SuperCompletedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperCompletedNum), - SuperTrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.SuperTrainPersonNum), - SuperConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.SuperConstructionNum), - SuperFinishedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperFinishedNum), - CreateMan = Const.sysglyId, - CreateDate = DateTime.Now - }; - if (IsReportByToday()) - { - table.Id = GetTodayData().Id; - table.State = Const.CNCEC_State_1; - UpdateHSSEData_HSSE(table); - } - else - { - table.Id = SQLHelper.GetNewID(); - table.State = Const.CNCEC_State_0; - AddHSSEData_HSSE(table); - } - - var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel()); - return data; - } - + /// + /// 统计数据(异步) + /// + /// public static async Task StatisticalDataAsync() { var thisUnitId = string.Empty; @@ -652,6 +579,8 @@ namespace BLL var certificateATask = HSSEData_HSSEService.GetCertificateAAsync(); var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync(); var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync(); + var qualityPersonNumTask = HSSEData_HSSEService.GetQualityPersonNumAsync(); + var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync(); var shutdownTask = HSSEData_HSSEService.GetShutdownAsync(); var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync(); @@ -662,7 +591,7 @@ namespace BLL var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync(); var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync(); var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync(); - var hseTechnicalNumTask = HSSEData_HSSEService.GetHseTechnicalNumAsync(); + var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync(); var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync(); var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync(); var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync(); @@ -677,6 +606,9 @@ namespace BLL var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync(); var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync(); var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync(); + var branchLeadShiftCheckTask = HSSEData_HSSEService.GetBranchLeadShiftCheckAsync(); + var branchComprehensiveCheckTask = HSSEData_HSSEService.GetBranchComprehensiveCheckAsync(); + var branchSpecialCheckTask = HSSEData_HSSEService.GetBranchSpecialCheckAsync(); var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync(); var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync(); var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync(); @@ -689,7 +621,11 @@ namespace BLL var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync(); var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync(); var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync(); + var branchComprehensivePlanTask = HSSEData_HSSEService.GetBranchComprehensivePlanAsync(); + var branchSpecialPlanTask = HSSEData_HSSEService.GetBranchSpecialPlanAsync(); + var branchOnSiteDisposalPlanTask = HSSEData_HSSEService.GetBranchOnSiteDisposalPlanAsync(); var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync(); + var branchDrillTask = HSSEData_HSSEService.GetBranchDrillAsync(); var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync(); var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync(); var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync(); @@ -711,6 +647,7 @@ namespace BLL certificateATask, certificateBTask, certificateCTask, + qualityPersonNumTask, beUnderConstructionTask, shutdownTask, joinConstructionPersonTask, @@ -720,7 +657,7 @@ namespace BLL safeWorkingHourTask, safeTrainTask, specialTrainTask, - specialOperationTrainTask, hseTechnicalNumTask, + specialOperationTrainTask, hseTechnicalTask, headOfficeInspectorGeneralTask, headOfficeFullTimeTask, branchInspectorGeneralTask, @@ -735,6 +672,9 @@ namespace BLL companyLeadShiftCheckTask, companyComprehensiveCheckTask, companySpecialCheckTask, + branchLeadShiftCheckTask, + branchComprehensiveCheckTask, + branchSpecialCheckTask, projectLeadShiftCheckTask, projectSpecialCheckTask, projectMajorCheckTask, @@ -747,7 +687,10 @@ namespace BLL companyComprehensivePlanTask, companySpecialPlanTask, companyOnSiteDisposalPlanTask, - companyDrillTask, + branchComprehensivePlanTask, + branchSpecialPlanTask, + branchOnSiteDisposalPlanTask, + companyDrillTask, branchDrillTask, projectComprehensivePlanTask, projectSpecialPlanTask, projectOnSiteDisposalPlanTask, @@ -771,6 +714,7 @@ namespace BLL var certificateAList = await certificateATask; var certificateBList = await certificateBTask; var certificateCList = await certificateCTask; + var qualityPersonList = await qualityPersonNumTask; var beUnderConstructionList = await beUnderConstructionTask; var shutdownList = await shutdownTask; var joinConstructionPersonList = await joinConstructionPersonTask; @@ -781,7 +725,7 @@ namespace BLL var safeTrainList = await safeTrainTask; var specialTrainList = await specialTrainTask; var specialOperationTrainList = await specialOperationTrainTask; - var hseTechnicalNum = await hseTechnicalNumTask; + var hseTechnicalList = await hseTechnicalTask; var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask; var headOfficeFullTimeList = await headOfficeFullTimeTask; var branchInspectorGeneralList = await branchInspectorGeneralTask; @@ -796,6 +740,9 @@ namespace BLL var companyLeadShiftCheckList = await companyLeadShiftCheckTask; var companyComprehensiveCheckList = await companyComprehensiveCheckTask; var companySpecialCheckList = await companySpecialCheckTask; + var branchLeadShiftCheckList = await branchLeadShiftCheckTask; + var branchComprehensiveCheckList = await branchComprehensiveCheckTask; + var branchSpecialCheckList = await branchSpecialCheckTask; var projectLeadShiftCheckList = await projectLeadShiftCheckTask; var projectSpecialCheckList = await projectSpecialCheckTask; var projectMajorCheckList = await projectMajorCheckTask; @@ -808,7 +755,11 @@ namespace BLL var companyComprehensivePlanList = await companyComprehensivePlanTask; var companySpecialPlanList = await companySpecialPlanTask; var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask; + var branchComprehensivePlanList = await branchComprehensivePlanTask; + var branchSpecialPlanList = await branchSpecialPlanTask; + var branchOnSiteDisposalPlanList = await branchOnSiteDisposalPlanTask; var companyDrillList = await companyDrillTask; + var branchDrillList = await branchDrillTask; var projectComprehensivePlanList = await projectComprehensivePlanTask; var projectSpecialPlanList = await projectSpecialPlanTask; var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask; @@ -835,6 +786,7 @@ namespace BLL CertificateANum = certificateAList.Count(), CertificateBNum = certificateBList.Count(), CertificateCNum = certificateCList.Count(), + QualityPersonNum = qualityPersonList.Count(), JoinConstructionPersonNum = joinConstructionPersonList.Count(), MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(), TotalWorkingHour = totalWorkingHour, @@ -843,7 +795,7 @@ namespace BLL SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum), SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum), SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum), - HseTechnicalNum = hseTechnicalNum, + HseTechnicalNum = hseTechnicalList.Count(), EnvironmentalTrainNum = 0, TotalEnergyConsumption = totalEnergyConsumption, IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, @@ -853,7 +805,8 @@ namespace BLL BranchInspectorGeneralNum = branchInspectorGeneralList.Count, BranchFullTimeNum = branchFullTimeList.Count, ProjectInspectorGeneralNum = projectInspectorGeneralList.Count, - ProjectFullTimeNum = projectFullTimeList.Count, + ProjectFullTimeNum = projectFullTimeList.Count(x=>x.IsOffice==true), + ProjectSubFullTimeNum = projectFullTimeList.Count(x=>x.IsOffice==false), ProjectSafetyMonitorNum = projectSafetyMonitorList.Count, SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(), EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count(), @@ -862,6 +815,9 @@ namespace BLL CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(), CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(), CompanySpecialCheckNum = companySpecialCheckList.Count(), + BranchLeadShiftCheckNum = branchLeadShiftCheckList.Count(), + BranchComprehensiveCheckNum = branchComprehensiveCheckList.Count(), + BranchSpecialCheckNum = branchSpecialCheckList.Count(), ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(), ProjectSpecialCheckNum = projectSpecialCheckList.Count(), ProjectMajorCheckNum = projectMajorCheckList.Count(), @@ -874,8 +830,13 @@ namespace BLL CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(), CompanySpecialPlanNum = companySpecialPlanList.Count(), CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(), + BranchComprehensivePlanNum = branchComprehensivePlanList.Count(), + BranchSpecialPlanNum = branchSpecialPlanList.Count(), + BranchOnSiteDisposalPlan = branchOnSiteDisposalPlanList.Count(), CompanyDrillNum = companyDrillList.Count(), CompanyDrillPersonNum = companyDrillList.Sum(x => x.JointPersonNum), + BranchDrillNum = branchDrillList.Count(), + BranchDrillPersonNum = branchDrillList.Sum(x => x.JointPersonNum), ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(), ProjectSpecialPlanNum = projectSpecialPlanList.Count(), ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(), @@ -897,11 +858,13 @@ namespace BLL HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum), CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum), TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum), + OperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.OperativesNum), ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum), FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum), ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum), SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum), SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum), + SuperOperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperOperativesNum), SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum), SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum), SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum) @@ -945,12 +908,15 @@ namespace BLL { CompletedNum = g.Sum(x => x.CompletedNum), TrainPersonNum = g.Sum(x => x.TrainPersonNum), + OperativesNum = g.Sum(x => x.OperativesNum), ConstructionNum = g.Sum(x => x.ConstructionNum), FinishedNum = g.Sum(x => x.FinishedNum), ArgumentNum = g.Sum(x => x.ArgumentNum), SuperCompletedNum = g.Sum(x => x.SuperCompletedNum), SuperTrainPersonNum = g.Sum(x => x.SuperTrainPersonNum), + SuperOperativesNum = g.Sum(x => x.SuperOperativesNum), SuperConstructionNum = g.Sum(x => x.SuperConstructionNum), + SuperFinishedNum = g.Sum(x => x.SuperFinishedNum), SuperArgumentNum = g.Sum(x => x.SuperArgumentNum) } ); @@ -976,7 +942,7 @@ namespace BLL SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), - HseTechnicalNum = hseTechnicalNum, + HseTechnicalNum = hseTechnicalList.Count(x => x.ProjectId == projectid), EnvironmentalTrainNum = 0, TotalEnergyConsumption = 0, IncomeComprehensiveEnergyConsumption = 0, @@ -990,14 +956,19 @@ namespace BLL CertificateANum = certificateAList.Count(x => x.ProjectId == projectid), CertificateBNum = certificateBList.Count(x => x.ProjectId == projectid), CertificateCNum = certificateCList.Count(x => x.ProjectId == projectid), + QualityPersonNum = qualityPersonList.Count(x => x.ProjectId == projectid), ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => x.ProjectId == projectid), - ProjectFullTimeNum = projectFullTimeList.Count(x => x.ProjectId == projectid), + ProjectFullTimeNum = projectFullTimeList.Count(x => x.ProjectId == projectid && x.IsOffice==true), + ProjectSubFullTimeNum = projectFullTimeList.Count(x => x.ProjectId == projectid && x.IsOffice== false), ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => x.ProjectId == projectid), ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => x.ProjectId == projectid), ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => x.ProjectId == projectid), CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => x.ProjectId == projectid), CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => x.ProjectId == projectid), CompanySpecialCheckNum = companySpecialCheckList.Count(x => x.ProjectId == projectid), + BranchLeadShiftCheckNum = branchLeadShiftCheckList.Count(x => x.ProjectId == projectid), + BranchComprehensiveCheckNum = branchComprehensiveCheckList.Count(x => x.ProjectId == projectid), + BranchSpecialCheckNum = branchSpecialCheckList.Count(x => x.ProjectId == projectid), ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => x.ProjectId == projectid), ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => x.ProjectId == projectid), ProjectMajorCheckNum = projectMajorCheckList.Count(x => x.ProjectId == projectid), @@ -1010,8 +981,13 @@ namespace BLL CompanyComprehensivePlanNum = 0, CompanySpecialPlanNum = 0, CompanyOnSiteDisposalPlan = 0, + BranchComprehensivePlanNum = 0, + BranchSpecialPlanNum = 0, + BranchOnSiteDisposalPlan = 0, CompanyDrillNum = 0, CompanyDrillPersonNum = 0, + BranchDrillNum = 0, + BranchDrillPersonNum = 0, ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => x.ProjectId == projectid), ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => x.ProjectId == projectid), ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => x.ProjectId == projectid), @@ -1033,12 +1009,15 @@ namespace BLL HighRiskNum = securityRiskOutputs?.HighRiskNum ?? 0, CompletedNum = largeEngineeringOutputs?.CompletedNum ?? 0, TrainPersonNum = largeEngineeringOutputs?.TrainPersonNum ?? 0, + OperativesNum = largeEngineeringOutputs?.OperativesNum ?? 0, ConstructionNum = largeEngineeringOutputs?.ConstructionNum ?? 0, FinishedNum = largeEngineeringOutputs?.FinishedNum ?? 0, ArgumentNum = largeEngineeringOutputs?.ArgumentNum ?? 0, SuperCompletedNum = largeEngineeringOutputs?.SuperCompletedNum ?? 0, SuperTrainPersonNum = largeEngineeringOutputs?.SuperTrainPersonNum ?? 0, + SuperOperativesNum = largeEngineeringOutputs?.SuperOperativesNum ?? 0, SuperConstructionNum = largeEngineeringOutputs?.SuperConstructionNum ?? 0, + SuperFinishedNum=largeEngineeringOutputs?.SuperFinishedNum ?? 0, SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0 }; Project_HSSEData_HSSEService.AddProject_HSSEData_HSSE(projectHsseData); @@ -1063,120 +1042,6 @@ namespace BLL return data; } - //public static HSSEData StatisticalDataOld() - //{ - // var thisUnitId = string.Empty; - // var thisUnit = CommonService.GetIsThisUnit(); - // if (thisUnit != null) thisUnitId = thisUnit.UnitId; - // var baseUnit = UnitService.GetUnitByUnitId(thisUnitId); - // Project_HSSEData_HSSEService.StatisticalAllProjectData(); - // Project_HSSEData_HiddenDangerDetailService.StatisticalAllProjectData(); - - // var projectData = (from x in Funs.DB.Project_HSSEData_HSSE - // where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - // select x).ToList(); - // var totalEnergyConsumption = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption(); - // var incomeComprehensiveEnergyConsumption = - // ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption(); - // var newWaterConsumption = ChemicalReportItemService.GetLatstTimeNewWaterConsumption(); - - // var table = new HSSEData_HSSE - // { - // UnitId = thisUnitId, - // CollCropCode = baseUnit.CollCropCode, - // UnitName = baseUnit.UnitName, - // ReportDate = DateTime.Now.Date, - // BeUnderConstructionNum = projectData.Sum(x => x.BeUnderConstructionNum), - // ShutdownNum = projectData.Sum(x => x.ShutdownNum), - // JoinConstructionPersonNum = projectData.Sum(x => x.JoinConstructionPersonNum), - // MajorProjectsUnderConstructionNum = projectData.Sum(x => x.MajorProjectsUnderConstructionNum), - // TotalWorkingHour = projectData.Sum(x => x.TotalWorkingHour), - // LostWorkingHour = projectData.Sum(x => x.LostWorkingHour), - // SafeWorkingHour = projectData.Sum(x => x.SafeWorkingHour), - // SafeTrainNum = projectData.Sum(x => x.SafeTrainNum), - // SpecialTrainNum = projectData.Sum(x => x.SpecialTrainNum), - // SpecialOperationTrainNum = projectData.Sum(x => x.SpecialOperationTrainNum), - // EnvironmentalTrainNum = projectData.Sum(x => x.EnvironmentalTrainNum), - // TotalEnergyConsumption = totalEnergyConsumption, - // IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, - // NewWaterConsumption = newWaterConsumption, - // HeadOfficeInspectorGeneralNum = GetHeadOfficeInspectorGeneralNum(), - // HeadOfficeFullTimeNum = GetHeadOfficeFullTimeNum(), - // BranchInspectorGeneralNum = GetBranchInspectorGeneralNum(), - // BranchFullTimeNum = GetBranchFullTimeNum(), - // ProjectInspectorGeneralNum = projectData.Sum(x => x.ProjectInspectorGeneralNum), - // ProjectFullTimeNum = projectData.Sum(x => x.ProjectFullTimeNum), - // ProjectSafetyMonitorNum = projectData.Sum(x => x.ProjectSafetyMonitorNum), - // SafetyInjectionEngineer = projectData.Sum(x => x.SafetyInjectionEngineer), - // CertificateANum = projectData.Sum(x => x.CertificateANum), - // CertificateBNum = projectData.Sum(x => x.CertificateBNum), - // CertificateCNum = projectData.Sum(x => x.CertificateCNum), - // SafetyCommitteeMeetingNum = GetSafetyCommitteeMeetingNum(), - // EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeetingNum(), - // ProjectSafetyLeadingGroupMeetingNum = projectData.Sum(x => x.ProjectSafetyLeadingGroupMeetingNum), - // ProjectSafetyMeetingNum = projectData.Sum(x => x.ProjectSafetyMeetingNum), - // // CompanyLeadShiftCheckNum = GetCompanyLeadShiftCheckNum(), - // // CompanyComprehensiveCheckNum = GetCompanyComprehensiveCheckNum(), - // // CompanySpecialCheckNum = GetCompanySpecialCheckNum(), - // ProjectLeadShiftCheckNum = projectData.Sum(x => x.ProjectLeadShiftCheckNum), - // ProjectSpecialCheckNum = projectData.Sum(x => x.ProjectSpecialCheckNum), - // ProjectMajorCheckNum = projectData.Sum(x => x.ProjectMajorCheckNum), - // NearMissNum = projectData.Sum(x => x.NearMissNum), - // RecordableEventNum = projectData.Sum(x => x.RecordableEventNum), - // GeneralAccidentNum = projectData.Sum(x => x.GeneralAccidentNum), - // MajorAccidentNum = projectData.Sum(x => x.MajorAccidentNum), - // SeriousAccidentNum = projectData.Sum(x => x.SeriousAccidentNum), - // SpecialSeriousAccidentNum = projectData.Sum(x => x.SpecialSeriousAccidentNum), - // //CompanyComprehensivePlanNum = GetCompanyComprehensivePlan(), - // // CompanySpecialPlanNum = GetCompanySpecialPlan(), - // // CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan(), - // // CompanyDrillNum = GetCompanyDrill(), - // ProjectComprehensivePlanNum = projectData.Sum(x => x.ProjectComprehensivePlanNum), - // ProjectSpecialPlanNum = projectData.Sum(x => x.ProjectSpecialPlanNum), - // ProjectOnSiteDisposalPlan = projectData.Sum(x => x.ProjectOnSiteDisposalPlan), - // ProjectDrillNum = projectData.Sum(x => x.ProjectDrillNum), - // CostExtract = projectData.Sum(x => x.CostExtract), - // CostUse = projectData.Sum(x => x.CostUse), - // UseEquipmentNum = projectData.Sum(x => x.UseEquipmentNum), - // SpecialEquipmentNum = projectData.Sum(x => x.SpecialEquipmentNum), - // LicensesNum = projectData.Sum(x => x.LicensesNum), - // LicensesCloseNum = projectData.Sum(x => x.LicensesCloseNum), - // GeneralClosedNum = projectData.Sum(x => x.GeneralClosedNum), - // GeneralNotClosedNum = projectData.Sum(x => x.GeneralNotClosedNum), - // MajorClosedNum = projectData.Sum(x => x.MajorClosedNum), - // MajorNotClosedNum = projectData.Sum(x => x.MajorNotClosedNum), - // GeneralRiskNum = projectData.Sum(x => x.GeneralRiskNum), - // LowRiskNum = projectData.Sum(x => x.LowRiskNum), - // MediumRiskNum = projectData.Sum(x => x.MediumRiskNum), - // HighRiskNum = projectData.Sum(x => x.HighRiskNum), - // CompletedNum = projectData.Sum(x => x.CompletedNum), - // TrainPersonNum = projectData.Sum(x => x.TrainPersonNum), - // ConstructionNum = projectData.Sum(x => x.ConstructionNum), - // FinishedNum = projectData.Sum(x => x.FinishedNum), - // SuperCompletedNum = projectData.Sum(x => x.SuperCompletedNum), - // SuperTrainPersonNum = projectData.Sum(x => x.SuperTrainPersonNum), - // SuperConstructionNum = projectData.Sum(x => x.SuperConstructionNum), - // SuperFinishedNum = projectData.Sum(x => x.SuperFinishedNum), - // CreateMan = Const.sysglyId, - // CreateDate = DateTime.Now - // }; - // if (IsReportByToday()) - // { - // table.Id = GetTodayData().Id; - // table.State = Const.CNCEC_State_1; - // UpdateHSSEData_HSSE(table); - // } - // else - // { - // table.Id = SQLHelper.GetNewID(); - // table.State = Const.CNCEC_State_0; - // AddHSSEData_HSSE(table); - // } - - // var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel()); - // return data; - //} - public static void UpdateHSSEData_HSSE(HSSEData_HSSE newtable) { using (var db = new SUBQHSEDB(Funs.ConnString)) @@ -1210,11 +1075,13 @@ namespace BLL table.BranchFullTimeNum = newtable.BranchFullTimeNum; table.ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum; table.ProjectFullTimeNum = newtable.ProjectFullTimeNum; + table.ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum; table.ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum; table.SafetyInjectionEngineer = newtable.SafetyInjectionEngineer; table.CertificateANum = newtable.CertificateANum; table.CertificateBNum = newtable.CertificateBNum; table.CertificateCNum = newtable.CertificateCNum; + table.QualityPersonNum = newtable.QualityPersonNum; table.SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum; table.EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum; table.ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum; @@ -1222,6 +1089,9 @@ namespace BLL table.CompanyLeadShiftCheckNum = newtable.CompanyLeadShiftCheckNum; table.CompanyComprehensiveCheckNum = newtable.CompanyComprehensiveCheckNum; table.CompanySpecialCheckNum = newtable.CompanySpecialCheckNum; + table.BranchLeadShiftCheckNum = newtable.BranchLeadShiftCheckNum; + table.BranchComprehensiveCheckNum = newtable.BranchComprehensiveCheckNum; + table.BranchSpecialCheckNum = newtable.BranchSpecialCheckNum; table.ProjectLeadShiftCheckNum = newtable.ProjectLeadShiftCheckNum; table.ProjectSpecialCheckNum = newtable.ProjectSpecialCheckNum; table.ProjectMajorCheckNum = newtable.ProjectMajorCheckNum; @@ -1234,8 +1104,13 @@ namespace BLL table.CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum; table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum; table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan; + table.BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum; + table.BranchSpecialPlanNum = newtable.BranchSpecialPlanNum; + table.BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan; table.CompanyDrillNum = newtable.CompanyDrillNum; table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum; + table.BranchDrillNum = newtable.BranchDrillNum; + table.BranchDrillPersonNum = newtable.BranchDrillPersonNum; table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum; table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum; table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan; @@ -1257,11 +1132,13 @@ namespace BLL table.HighRiskNum = newtable.HighRiskNum; table.CompletedNum = newtable.CompletedNum; table.TrainPersonNum = newtable.TrainPersonNum; + table.OperativesNum = newtable.OperativesNum; table.ConstructionNum = newtable.ConstructionNum; table.FinishedNum = newtable.FinishedNum; table.ArgumentNum = newtable.ArgumentNum; table.SuperCompletedNum = newtable.SuperCompletedNum; table.SuperTrainPersonNum = newtable.SuperTrainPersonNum; + table.SuperOperativesNum = newtable.SuperOperativesNum; table.SuperConstructionNum = newtable.SuperConstructionNum; table.SuperFinishedNum = newtable.SuperFinishedNum; table.SuperArgumentNum = newtable.SuperArgumentNum; @@ -1273,31 +1150,6 @@ namespace BLL } } - /// - /// 获取安全技术交底数 - /// - /// - public static int GetHseTechnicalNum() - { - var list = (from x in Funs.DB.License_HSETechnical - where BeUnderConstructionList.Contains(x.ProjectId) - select x).Distinct().ToList(); - var result = list.ToList().Count(); - return result; - - } - /// - /// 获取安全技术交底数(异步) - /// - /// - public static async Task GetHseTechnicalNumAsync() - { - return await Task.Run(GetHseTechnicalNum); - - } - - - #region 安监人员数据 /// /// 获取企业总部总监人数 @@ -1311,6 +1163,8 @@ namespace BLL var result = (from x in Funs.DB.Person_CompanyBranchPerson join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId == unitId && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1320,7 +1174,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); result = result @@ -1352,6 +1206,8 @@ namespace BLL join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where x.IsOnJob == true && y.IsHsse == true && x.UnitId == unitId && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1360,7 +1216,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); result = result @@ -1391,6 +1247,8 @@ namespace BLL join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where x.IsOnJob == true && y.IsHsse == true && x.UnitId != unitId && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1399,7 +1257,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); result = result @@ -1430,6 +1288,9 @@ namespace BLL var result = (from x in Funs.DB.Person_CompanyBranchPerson join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() + where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId != unitId && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1438,7 +1299,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); result = result @@ -1468,6 +1329,8 @@ namespace BLL join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + join z in Funs.DB.Base_Post on x.WorkPostId equals z.PostId into zGroup + from z in zGroup.DefaultIfEmpty() where BeUnderConstructionList.Contains(p.ProjectId) && x.WorkPostId == Const.WorkPost_ProjectHSSEDirector && x.IsUsed == true && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput @@ -1479,7 +1342,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = z.PostName == null ? "" : z.PostName, Phone = x.Telephone }).ToList(); result = result @@ -1503,24 +1366,30 @@ namespace BLL /// public static List GetProjectFullTime() { + var mianAndSubUnitList = (from x in Funs.DB.Base_Unit where x.IsThisUnit == true || x.IsBranch == true select x.UnitId).ToList(); var result = (from x in Funs.DB.SitePerson_Person join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup from p in pGroup.DefaultIfEmpty() join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() - join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId - where BeUnderConstructionList.Contains(p.ProjectId) && y.IsHsse == true && x.IsUsed == true && x.IdentityCard != null + join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId into yGroup + from y in yGroup.DefaultIfEmpty() + join z in Funs.DB.Base_Post on x.WorkPostId equals z.PostId into zGroup + from z in zGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(p.ProjectId) && y.IsHsse == true && x.IsUsed == true && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { ProjectId = x.ProjectId, ProjectName = p.ProjectName, + ProjectFromUnitId = p.UnitId, UnitId = u.UnitId, UnitName = u.UnitName, Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), - Phone = x.Telephone + WorkPostName = y.WorkPostName == null ? "" : y.WorkPostName, + Phone = x.Telephone, + IsOffice = x.UnitId==null?false: mianAndSubUnitList.Contains(x.UnitId) }).ToList(); result = result .GroupBy(x => x.IdentityCard) @@ -1594,6 +1463,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where BeUnderConstructionList.Contains(p.ProjectId) && z.IsRegisterHSSE == true && x.IsUsed == true && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1604,7 +1475,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); @@ -1615,6 +1486,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where z.IsRegisterHSSE == true && x.IdentityCard != null && x.IsPost == true select new Model.OfSafetySupervisorsOutput { @@ -1624,7 +1497,7 @@ namespace BLL Name = x.UserName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); @@ -1659,6 +1532,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where BeUnderConstructionList.Contains(p.ProjectId) && z.CertificateType == "A" && x.IsUsed == true && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1669,7 +1544,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); var query2 = (from x in Funs.DB.Sys_User @@ -1679,6 +1554,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where z.CertificateType == "A" && x.IdentityCard != null && x.IsPost == true select new Model.OfSafetySupervisorsOutput { @@ -1688,7 +1565,7 @@ namespace BLL Name = x.UserName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); query1.AddRange(query2); @@ -1721,6 +1598,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where BeUnderConstructionList.Contains(p.ProjectId) && z.CertificateType == "B" && x.IsUsed == true && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1731,7 +1610,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); var query2 = (from x in Funs.DB.Sys_User @@ -1741,6 +1620,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where z.CertificateType == "B" && x.IdentityCard != null && x.IsPost == true select new Model.OfSafetySupervisorsOutput { @@ -1750,7 +1631,7 @@ namespace BLL Name = x.UserName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); query1.AddRange(query2); @@ -1784,6 +1665,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where BeUnderConstructionList.Contains(p.ProjectId) && z.CertificateType == "C" && x.IsUsed == true && x.IdentityCard != null select new Model.OfSafetySupervisorsOutput { @@ -1794,7 +1677,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); var query2 = (from x in Funs.DB.Sys_User @@ -1804,6 +1687,8 @@ namespace BLL from u in uGroup.DefaultIfEmpty() join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId + join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup + from m in mGroup.DefaultIfEmpty() where z.CertificateType == "C" && x.IdentityCard != null && x.IsPost == true select new Model.OfSafetySupervisorsOutput { @@ -1813,7 +1698,7 @@ namespace BLL Name = x.UserName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = m.PostName == null ? "" : m.PostName, Phone = x.Telephone }).ToList(); query1.AddRange(query2); @@ -1832,6 +1717,48 @@ namespace BLL { return await Task.Run(GetCertificateC); } + + /// + /// 获取在岗特种作业人员数量 + /// + /// + public static List GetQualityPersonNum() + { + var result = (from x in Funs.DB.QualityAudit_PersonQuality + join p in Funs.DB.SitePerson_Person on x.PersonId equals p.PersonId into pGroup + from p in pGroup.DefaultIfEmpty() + join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup + from bp in bpGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId + join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup + from m in mGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(p.ProjectId) && p.IsUsed == true && m.PostType == Const.PostType_2 && (x.LimitDate == null || x.LimitDate < DateTime.Now) + select new Model.OfSafetySupervisorsOutput + { + ProjectId = p.ProjectId, + ProjectName = bp.ProjectName, + UnitId = u.UnitId, + UnitName = u.UnitName, + Name = p.PersonName, + Sex = p.Sex == null ? "" : (p.Sex == "1" ? "男" : "女"), + IdentityCard = p.IdentityCard, + WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName, + Phone = p.Telephone + }).ToList(); + return result; + } + /// + /// 获取在岗特种作业人员数量(异步) + /// + /// + public static async Task> GetQualityPersonNumAsync() + { + return await Task.Run(GetQualityPersonNum); + + } + #endregion #region 安全会议数据 @@ -1921,33 +1848,30 @@ namespace BLL } /// - /// 获取项目班前会 + /// 获取项目班前会 /// /// public static List GetProjectClassMeeting(string projectId) { - var list = (from x in Funs.DB.Meeting_ClassMeeting - join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup - from p in pGroup.DefaultIfEmpty() - where x.CompileDate > Const.DtmarkTime && BeUnderConstructionList.Contains(p.ProjectId) - select new MeetingOutput() - { - ProjectId = x.ProjectId, - ProjectName = p.ProjectName, - Id = x.ClassMeetingId, - MeetingName = x.ClassMeetingName, - MeetingDate = x.ClassMeetingDate, - MeetingHours = x.MeetingHours, - HostMan = x.MeetingHostMan, - AttentPerson = x.AttentPerson, - AttentPersonNum = x.AttentPersonNum, - }).ToList(); - - if (!string.IsNullOrWhiteSpace(projectId)) - { - list = list.Where(x => x.ProjectId == projectId).ToList(); - } - return list.ToList(); + var result = + ( + from x in Funs.DB.Meeting_ClassMeeting + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + where x.ProjectId == projectId && x.CompileDate > Const.DtmarkTime && BeUnderConstructionList.Contains(p.ProjectId) + select new MeetingOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + Id = x.ClassMeetingId, + MeetingName = x.ClassMeetingName, + MeetingDate = x.ClassMeetingDate, + MeetingHours = x.MeetingHours, + HostMan = x.MeetingHostMan, + AttentPerson = x.AttentPerson, + AttentPersonNum = x.AttentPersonNum, + }).ToList(); + return result.ToList(); } ///// ///// 获取项目班前会议(异步) @@ -2181,6 +2105,8 @@ namespace BLL #region 安全监督检查数据 + #region 企业级-本单位 + /// /// 获取企业负责人带班检查次数 /// @@ -2192,7 +2118,9 @@ namespace BLL from p in pGroup.DefaultIfEmpty() join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() - where x.CheckType == "1" && x.CheckDate > Const.DtmarkTime + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsThisUnit == true && x.CheckMainType == "0" && x.CheckType == "1" && x.CheckDate > Const.DtmarkTime select new Model.CheckOutput() { ProjectId = x.ProjectId, @@ -2214,20 +2142,21 @@ namespace BLL return await Task.Run(GetCompanyLeadShiftCheck); } - - /// /// 获取企业综合检查次数 /// /// public static List GetCompanyComprehensiveCheck() { + var result = (from x in Funs.DB.Supervise_SuperviseCheckReport join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup from p in pGroup.DefaultIfEmpty() join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() - where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsThisUnit == true && x.CheckMainType == "0" && x.CheckType == "2" && x.CheckDate > Const.DtmarkTime select new Model.CheckOutput() { ProjectId = x.ProjectId, @@ -2238,6 +2167,51 @@ namespace BLL CheckTeam = x.CheckTeam, CheckDate = x.CheckDate, }); + + #region 交建统计 + var IsCnccg = CommonService.GetIsThisUnit().CollCropCode == "913700001630777743"; + if (IsCnccg) + { + result = (from x in Funs.DB.Problem_Notice + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.Unitid equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + select new Model.CheckOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitId = x.Unitid, + UnitName = u.UnitName, + Id = x.ProNoticeId, + CheckTeam = "", + CheckDate = x.CheckStartTime, + } + ); + } + #endregion + #region 四化建 + var IsCncec4 = CommonService.GetIsThisUnit().CollCropCode == "914306001837642996"; + if (IsCncec4) + { + result = (from x in Funs.DB.Supervise_SuperviseCheckReport_Shj + join p in Funs.DB.Base_Project on x.ProjectOrUnit equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.ProjectOrUnit equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + select new Model.CheckOutput() + { + ProjectId = x.ProjectOrUnit, + ProjectName = p.ProjectName, + UnitId = x.ProjectOrUnit, + UnitName = u.UnitName, + Id = x.SuperviseCheckReportId, + CheckTeam = "", + CheckDate = x.CheckDate, + } + ); + } + #endregion return result.ToList(); } /// @@ -2260,7 +2234,9 @@ namespace BLL from p in pGroup.DefaultIfEmpty() join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() - where x.CheckType == "3" && x.CheckDate > Const.DtmarkTime + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsThisUnit == true && x.CheckMainType == "0" && x.CheckType == "3" && x.CheckDate > Const.DtmarkTime select new Model.CheckOutput() { ProjectId = x.ProjectId, @@ -2281,12 +2257,192 @@ namespace BLL { return await Task.Run(GetCompanySpecialCheck); } + + #endregion + + #region 分支机构 + + /// + /// 获取分支机构企业负责人带班检查次数 + /// + /// + public static List GetBranchLeadShiftCheck() + { + var result = (from x in Funs.DB.Supervise_SuperviseCheckReport + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsBranch == true && x.CheckMainType == "0" && x.CheckType == "1" && x.CheckDate > Const.DtmarkTime + select new Model.CheckOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitId = x.UnitId, + UnitName = u.UnitName, + Id = x.SuperviseCheckReportId, + CheckTeam = x.CheckTeam, + CheckDate = x.CheckDate, + }); + return result.ToList(); + } + /// + /// 获取分支机构企业负责人带班检查次数(异步) + /// + /// + public static async Task> GetBranchLeadShiftCheckAsync() + { + return await Task.Run(GetBranchLeadShiftCheck); + } + + /// + /// 获取分支机构企业综合检查次数 + /// + /// + public static List GetBranchComprehensiveCheck() + { + var result = (from x in Funs.DB.Supervise_SuperviseCheckReport + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsBranch == true && x.CheckMainType == "0" && x.CheckType == "2" && x.CheckDate > Const.DtmarkTime + select new Model.CheckOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitId = x.UnitId, + UnitName = u.UnitName, + Id = x.SuperviseCheckReportId, + CheckTeam = x.CheckTeam, + CheckDate = x.CheckDate, + }); + + #region 交建统计 + var IsCnccg = CommonService.GetIsThisUnit().CollCropCode == "913700001630777743"; + if (IsCnccg) + { + result = (from x in Funs.DB.Problem_Notice + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.Unitid equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + select new Model.CheckOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitId = x.Unitid, + UnitName = u.UnitName, + Id = x.ProNoticeId, + CheckTeam = "", + CheckDate = x.CheckStartTime, + } + ); + } + #endregion + #region 四化建 + var IsCncec4 = CommonService.GetIsThisUnit().CollCropCode == "914306001837642996"; + if (IsCncec4) + { + result = (from x in Funs.DB.Supervise_SuperviseCheckReport_Shj + join p in Funs.DB.Base_Project on x.ProjectOrUnit equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.ProjectOrUnit equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + select new Model.CheckOutput() + { + ProjectId = x.ProjectOrUnit, + ProjectName = p.ProjectName, + UnitId = x.ProjectOrUnit, + UnitName = u.UnitName, + Id = x.SuperviseCheckReportId, + CheckTeam = "", + CheckDate = x.CheckDate, + } + ); + } + #endregion + return result.ToList(); + } + /// + /// 获取分支机构企业综合检查次数(异步) + /// + /// + public static async Task> GetBranchComprehensiveCheckAsync() + { + return await Task.Run(GetBranchComprehensiveCheck); + } + + /// + /// 获取分支机构企业专项检查次数 + /// + /// + public static List GetBranchSpecialCheck() + { + var result = (from x in Funs.DB.Supervise_SuperviseCheckReport + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup + from cu in cuGroup.DefaultIfEmpty() + where cu.IsBranch == true && x.CheckMainType == "0" && x.CheckType == "3" && x.CheckDate > Const.DtmarkTime + select new Model.CheckOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitId = x.UnitId, + UnitName = u.UnitName, + Id = x.SuperviseCheckReportId, + CheckTeam = x.CheckTeam, + CheckDate = x.CheckDate, + }); + return result.ToList(); + } + /// + /// 获取分支机构企业专项检查次数(异步) + /// + /// + public static async Task> GetBranchSpecialCheckAsync() + { + return await Task.Run(GetBranchSpecialCheck); + } + + #endregion + + #region 项目级 + /// /// 获取项目负责人带班检查次数 /// /// public static List GetProjectLeadShiftCheck() { + // 先批量获取所有需要的UnitIds和LeaderIds + var unitIds = Funs.DB.Check_ProjectLeaderCheck + .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CheckDate > Const.DtmarkTime) + .Select(x => x.UnitIds).Distinct().ToList(); + Dictionary unitNames = new Dictionary(); + foreach (var item in unitIds) + { + unitNames.Add(item ?? "null", UnitService.getUnitNamesUnitIds(item)); + + } + + var leaderIds = Funs.DB.Check_ProjectLeaderCheck + .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CheckDate > Const.DtmarkTime) + .Select(x => x.LeaderIds).Distinct().ToList(); + Dictionary leaderNames = new Dictionary(); + foreach (var item in leaderIds) + { + leaderNames.Add(item ?? "null", UserService.getUserNamesUserIds(item)); + + } + var result = (from x in Funs.DB.Check_ProjectLeaderCheck join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup from p in pGroup.DefaultIfEmpty() @@ -2295,9 +2451,9 @@ namespace BLL { ProjectId = x.ProjectId, ProjectName = p.ProjectName, - UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), + UnitName = unitNames[x.UnitIds ?? "null"], // 从预加载的字典中获取 Id = x.ProjectLeaderCheckId, - CheckTeam = UserService.getUserNamesUserIds(x.LeaderIds), + CheckTeam = leaderNames[x.LeaderIds ?? "null"], // 从预加载的字典中获取 CheckDate = x.CheckDate, }); return result.ToList(); @@ -2317,6 +2473,15 @@ namespace BLL /// public static List GetProjectSpecialCheck() { + var unitIds = Funs.DB.Check_CheckSpecial + .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CheckTime > Const.DtmarkTime) + .Select(x => x.PartInUnits).Distinct().ToList(); + Dictionary unitNames = new Dictionary(); + foreach (var item in unitIds) + { + unitNames.Add(item ?? "null", UnitService.getUnitNamesUnitIds(item)); + + } var result = (from x in Funs.DB.Check_CheckSpecial join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup from p in pGroup.DefaultIfEmpty() @@ -2325,7 +2490,7 @@ namespace BLL { ProjectId = x.ProjectId, ProjectName = p.ProjectName, - UnitName = UnitService.getUnitNamesUnitIds(x.PartInUnits), + UnitName = unitNames[x.PartInUnits ?? "null"], Id = x.CheckSpecialId, CheckTeam = x.PartInPersonNames, CheckDate = x.CheckTime, @@ -2375,6 +2540,9 @@ namespace BLL { return await Task.Run(GetProjectMajorCheck); } + + #endregion + #endregion #region 应急管理数据 @@ -2386,7 +2554,9 @@ namespace BLL { var result = (from x in Funs.DB.Emergency_EmergencyList_Unit join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId - where y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsThisUnit == true && y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime select new Model.EmergencyOutput { ProjectId = x.ProjectId, @@ -2418,7 +2588,9 @@ namespace BLL { var result = (from x in Funs.DB.Emergency_EmergencyList_Unit join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId - where y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsThisUnit == true && y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime select new Model.EmergencyOutput { ProjectId = x.ProjectId, @@ -2450,7 +2622,9 @@ namespace BLL { var result = (from x in Funs.DB.Emergency_EmergencyList_Unit join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId - where y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsThisUnit == true && y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime select new Model.EmergencyOutput { ProjectId = x.ProjectId, @@ -2474,6 +2648,109 @@ namespace BLL return await Task.Run(GetCompanyOnSiteDisposalPlan); } + + /// + /// 获取分支机构综合预案数 + /// + /// + public static List GetBranchComprehensivePlan() + { + var result = (from x in Funs.DB.Emergency_EmergencyList_Unit + join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsBranch == true && y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime + select new Model.EmergencyOutput + { + ProjectId = x.ProjectId, + ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId), + UnitId = x.UnitId, + UnitName = UnitService.GetUnitNameByUnitId(x.UnitId), + Id = x.EmergencyListId, + EmergencyName = x.EmergencyName, + EmergencyTypeName = y.EmergencyTypeName, + VersionCode = x.VersionCode, + Date = x.CompileDate, + }).ToList(); + return result; + } + /// + /// 获取分支机构综合预案数(异步) + /// + /// + public static async Task> GetBranchComprehensivePlanAsync() + { + return await Task.Run(GetBranchComprehensivePlan); + } + + /// + /// 获取分支机构专项预案数 + /// + /// + public static List GetBranchSpecialPlan() + { + var result = (from x in Funs.DB.Emergency_EmergencyList_Unit + join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsBranch == true && y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime + select new Model.EmergencyOutput + { + ProjectId = x.ProjectId, + ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId), + UnitId = x.UnitId, + UnitName = UnitService.GetUnitNameByUnitId(x.UnitId), + Id = x.EmergencyListId, + EmergencyName = x.EmergencyName, + EmergencyTypeName = y.EmergencyTypeName, + VersionCode = x.VersionCode, + Date = x.CompileDate, + }).ToList(); + return result; + } + /// + /// 获取分支机构专项预案数(异步) + /// + /// + public static async Task> GetBranchSpecialPlanAsync() + { + return await Task.Run(GetBranchSpecialPlan); + } + + /// + /// 获取分支机构现场处置预案 + /// + /// + public static List GetBranchOnSiteDisposalPlan() + { + var result = (from x in Funs.DB.Emergency_EmergencyList_Unit + join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId + join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsBranch == true && y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime + select new Model.EmergencyOutput + { + ProjectId = x.ProjectId, + ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId), + UnitId = x.UnitId, + UnitName = UnitService.GetUnitNameByUnitId(x.UnitId), + Id = x.EmergencyListId, + EmergencyName = x.EmergencyName, + EmergencyTypeName = y.EmergencyTypeName, + VersionCode = x.VersionCode, + Date = x.CompileDate, + }).ToList(); + return result; + } + /// + /// 获取分支机构现场处置预案(异步) + /// + /// + public static async Task> GetBranchOnSiteDisposalPlanAsync() + { + return await Task.Run(GetBranchOnSiteDisposalPlan); + } + /// /// 获取企业级演练次数 /// @@ -2482,8 +2759,9 @@ namespace BLL { var result = (from x in Funs.DB.Emergency_DrillRecordList_Unit join y in Funs.DB.Sys_Const on x.DrillRecordType equals y.ConstValue - where y.GroupId == "DrillRecordType" - where x.CompileDate > Const.DtmarkTime + join u in Funs.DB.Base_Unit on x.UnitIds equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsThisUnit == true && y.GroupId == "DrillRecordType" && x.CompileDate > Const.DtmarkTime select new Model.EmergencyOutput { ProjectId = x.ProjectId, @@ -2507,6 +2785,40 @@ namespace BLL { return await Task.Run(GetCompanyDrill); } + /// + /// 获取分支机构演练次数 + /// + /// + public static List GetBranchDrill() + { + var result = (from x in Funs.DB.Emergency_DrillRecordList_Unit + join y in Funs.DB.Sys_Const on x.DrillRecordType equals y.ConstValue + join u in Funs.DB.Base_Unit on x.UnitIds equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + where u.IsBranch == true && y.GroupId == "DrillRecordType" && x.CompileDate > Const.DtmarkTime + select new Model.EmergencyOutput + { + ProjectId = x.ProjectId, + ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId), + UnitId = x.UnitIds, + UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), + Id = x.DrillRecordListId, + EmergencyName = x.DrillRecordName, + EmergencyTypeName = y.ConstText, + Date = x.DrillRecordDate, + DrillCost = x.DrillCost, + JointPersonNum = x.JointPersonNum ?? 0, + }).ToList(); + return result; + } + /// + /// 获取分支机构演练次数(异步) + /// + /// + public static async Task> GetBranchDrillAsync() + { + return await Task.Run(GetBranchDrill); + } /// /// 获取项目级综合预案 @@ -2628,7 +2940,7 @@ namespace BLL EmergencyTypeName = y.ConstText, Date = x.DrillRecordDate, DrillCost = x.DrillCost, - JointPersonNum = x.JointPersonNum, + JointPersonNum = x.JointPersonNum ?? 0, }).ToList(); return result; } @@ -2649,36 +2961,7 @@ namespace BLL /// public static List GetBeUnderConstruction() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "1" - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetBeUnderConstruction(); } /// /// 获取在建项目数(异步) @@ -2689,43 +2972,13 @@ namespace BLL return await Task.Run(GetBeUnderConstruction); } - /// /// 获取停工项目数 /// /// public static List GetShutdown() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "2" - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetShutdown(); } /// /// 获取停工项目数(异步) @@ -2741,36 +2994,8 @@ namespace BLL /// public static List GetCompletedProject() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "3" - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetCompletedProject(); + } /// /// 获取所有项目数 @@ -2778,36 +3003,8 @@ namespace BLL /// public static List GetALLProject() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""), - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetALLProject(); + } /// @@ -2835,7 +3032,6 @@ namespace BLL return await Task.Run(GetJoinConstructionPerson); } - /// /// 获取在施危大工程数 /// @@ -3074,41 +3270,61 @@ namespace BLL return await Task.Run(GetSpecialOperationTrain); } + /// + /// 获取安全技术交底数 + /// + /// + public static int GetHseTechnicalNum() + { + var list = (from x in Funs.DB.License_HSETechnical + where BeUnderConstructionList.Contains(x.ProjectId) + select x).Distinct().ToList(); + var result = list.ToList().Count(); + return result; + + } + /// + /// 获取安全技术交底数(异步) + /// + /// + public static async Task GetHseTechnicalNumAsync() + { + return await Task.Run(GetHseTechnicalNum); + + } + + /// + /// 获取安全技术交底 + /// + /// + public static List GetHseTechnical() + { + var result = (from x in Funs.DB.License_HSETechnical + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(x.ProjectId) + select new Model.LicenseHSETechnicalOutput() + { + ProjectId = x.ProjectId, + ProjectName = p.ProjectName, + UnitName = UnitService.getUnitNamesUnitIds(x.UnitId), + Id = x.HSETechnicalId, + HSETechnicalCode = x.HSETechnicalCode, + WorkContents = x.WorkContents + }).ToList(); + return result; + } + + /// + /// 获取安全技术交底(异步) + /// + /// + public static async Task> GetHseTechnicalAsync() + { + return await Task.Run(GetHseTechnical); + } #endregion - - - /// - /// 获取能耗总量 - /// - /// - public static int GetTotalEnergyConsumption() - { - var result = 0; - return result; - } - - /// - /// 获取万元营业收入综合能耗 - /// - /// - public static int GetIncomeComprehensiveEnergyConsumption() - { - var result = 0; - return result; - } - - /// - /// 获取二氧化碳 - /// - /// - public static int GetNewWaterConsumption() - { - var result = 0; - return result; - } - - #region 事故事件数据 /// @@ -3360,7 +3576,7 @@ namespace BLL UnitId = cost.UnitId, UnitName = unit.UnitName, Months = cost.Months, - SUMCost = cost.Extract//Math.Round(sumCost, 2) + SUMCost = cost.Extract ?? 0//Math.Round(sumCost, 2) }; return query.ToList(); } @@ -3382,7 +3598,7 @@ namespace BLL from unit in unitGroup.DefaultIfEmpty() let sumCost = (from item in Funs.DB.CostGoods_CostSmallDetailItem where item.CostSmallDetailId == cost.CostSmallDetailId - select item.CostMoney).Sum() * 1.0m // 10000 + select item.CostMoney ?? 0).Sum() * 1.0m // 10000 where BeUnderConstructionList.Contains(p.ProjectId) select new CostSmallDetailOutput { @@ -3538,20 +3754,33 @@ namespace BLL /// public static List GetLicenses() { + var WorkAreaIds = Funs.DB.View_License_LicenseManager + .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime) + .Select(x => x.WorkAreaId).Distinct().ToList(); + Dictionary WorkAreaNames = new Dictionary(); + foreach (var item in WorkAreaIds) + { + WorkAreaNames.Add(item ?? "null", UnitWorkService.GetUnitWorkName(item)); + + } + var result = (from x in Funs.DB.View_License_LicenseManager - where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true && - x.CompileDate > Const.DtmarkTime + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId into yGroup + from y in yGroup.DefaultIfEmpty() + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime select new Model.LicenseOutput { Id = x.LicenseManagerId, ProjectId = x.ProjectId, - ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId), + ProjectName = p.ProjectName, UnitId = x.UnitId, - UnitName = UnitService.GetUnitNameByUnitId(x.UnitId), + UnitName = y.UnitName, LicenseTypeName = x.LicenseTypeName, UnitTypeName = x.UnitTypeName, IsHighRisk = x.IsHighRisk, - WorkAreaName = x.WorkStates, + WorkAreaName = WorkAreaNames[x.WorkAreaId ?? "null"], CompileDate = x.CompileDate, StartDate = x.StartDate, EndDate = x.EndDate, @@ -3571,20 +3800,32 @@ namespace BLL /// public static List GetLicensesClose() { + var WorkAreaIds = Funs.DB.View_License_LicenseManager + .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime) + .Select(x => x.WorkAreaId).Distinct().ToList(); + Dictionary WorkAreaNames = new Dictionary(); + foreach (var item in WorkAreaIds) + { + WorkAreaNames.Add(item ?? "null", UnitWorkService.GetUnitWorkName(item)); + + } var result = (from x in Funs.DB.View_License_LicenseManager - where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true && x.WorkStates == "3" && - x.CompileDate > Const.DtmarkTime + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId into yGroup + from y in yGroup.DefaultIfEmpty() + join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(x.ProjectId) & x.CompileDate > Const.DtmarkTime && x.WorkStates == "3" select new Model.LicenseOutput { Id = x.LicenseManagerId, ProjectId = x.ProjectId, - ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId), + ProjectName = p.ProjectName, UnitId = x.UnitId, - UnitName = UnitService.GetUnitNameByUnitId(x.UnitId), + UnitName = y.UnitName, LicenseTypeName = x.LicenseTypeName, UnitTypeName = x.UnitTypeName, IsHighRisk = x.IsHighRisk, - WorkAreaName = x.WorkStates, + WorkAreaName = WorkAreaNames[x.WorkAreaId ?? "null"], CompileDate = x.CompileDate, StartDate = x.StartDate, EndDate = x.EndDate, @@ -3637,6 +3878,42 @@ namespace BLL return await Task.Run(GetGeneralHiddenRectificationOutputs); } + /// + /// 获取较大隐患数据 + /// + /// + public static List GetLargerHiddenRectificationOutputs() + { + + var query = (from x in Funs.DB.Base_Project + join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup + from y in yGroup.DefaultIfEmpty() + where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "2" && y.Risk_Level == "较大" && y.CheckTime > Const.DtmarkTime + group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg + select new HiddenRectificationOutput + { + ProjectId = gg.Key.ProjectId, + ProjectName = gg.Key.ProjectName, + ProjectCode = gg.Key.ProjectCode, + ProNum = gg.Count(y => y.States != "4" && y.States != "-1"), + RecNum = gg.Count(y => y.States == "3"), + NoRecNum = gg.Count(y => y.States != "3" && y.States != "-1"), + RecRate = gg.Count(y => y.States != "4" && y.States != "-1") == 0 ? "0" : + Math.Round(Convert.ToDecimal(gg.Count(y => y.States == "3") / + gg.Count(y => y.States != "4" && y.States != "-1") * 100), 2, MidpointRounding.AwayFromZero).ToString() + }).ToList(); + + foreach (var item in query) + { + item.RecRate = Math.Round(Convert.ToDecimal(item.RecRate), 2).ToString(); // 转换为字符串并格式化为两位小数 + } + return query; + } + public static async Task> GetLargerHiddenRectificationOutputsAsync() + { + return await Task.Run(GetLargerHiddenRectificationOutputs); + } + /// /// 获取重大隐患数据 /// @@ -3732,9 +4009,15 @@ namespace BLL SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true), SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true), SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true), + OperativesNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.OperativesNum) ?? 0, + SuperOperativesNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.OperativesNum) ?? 0, }).ToList(); return query; } + /// + /// 获取危大工程数据(异步) + /// + /// public static async Task> GetLargeEngineeringOutputsAsync() { return await Task.Run(GetLargeEngineeringOutputs); @@ -3853,7 +4136,6 @@ namespace BLL #endregion - #region 获取列表 /// @@ -3920,6 +4202,7 @@ namespace BLL x.CertificateANum, x.CertificateBNum, x.CertificateCNum, + x.QualityPersonNum, x.SafetyCommitteeMeetingNum, x.EnterpriseTopicsMeetingNum, x.ProjectSafetyLeadingGroupMeetingNum, @@ -3939,8 +4222,13 @@ namespace BLL x.CompanyComprehensivePlanNum, x.CompanySpecialPlanNum, x.CompanyOnSiteDisposalPlan, + x.BranchComprehensivePlanNum, + x.BranchSpecialPlanNum, + x.BranchOnSiteDisposalPlan, x.CompanyDrillNum, x.CompanyDrillPersonNum, + x.BranchDrillNum, + x.BranchDrillPersonNum, x.ProjectComprehensivePlanNum, x.ProjectSpecialPlanNum, x.ProjectOnSiteDisposalPlan, @@ -3962,11 +4250,13 @@ namespace BLL x.HighRiskNum, x.CompletedNum, x.TrainPersonNum, + x.OperativesNum, x.ConstructionNum, x.FinishedNum, x.ArgumentNum, x.SuperCompletedNum, x.SuperTrainPersonNum, + x.SuperOperativesNum, x.SuperConstructionNum, x.SuperFinishedNum, x.SuperArgumentNum, @@ -3977,5 +4267,192 @@ namespace BLL } #endregion 获取列表 + + + #region 推送企业级检查明细数据检查 + + /// + /// 推送企业级检查明细数据检查 + /// + /// + public static ReturnData PushSuperviseCheckReportData(int pushNum) + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + + var items = (from x in db.Supervise_SuperviseCheckReport + join P in db.Base_Project on x.ProjectId equals P.ProjectId into PJ + from P in PJ.DefaultIfEmpty() + join U in db.Base_Unit on x.UnitId equals U.UnitId into UJ + from U in UJ.DefaultIfEmpty() + join CU in db.Base_Unit on x.CheckUnitId equals CU.UnitId into CUJ + from CU in CUJ.DefaultIfEmpty() + where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckDate > BLL.Const.DtmarkTime + select new Model.SuperviseCheckReportItem + { + Id = x.SuperviseCheckReportId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CheckDate, + AttachFile = AttachFileService.getFileUrl(x.SuperviseCheckReportId.ToString()), + SuperviseCheckReportCode = x.SuperviseCheckReportCode, + CheckDate = x.CheckDate, + UnitId = x.UnitId, + UnitName = U.UnitName, + CheckTeam = x.CheckTeam, + CheckType = x.CheckType, + CheckTypeName = x.CheckType == "1" ? "企业负责人带班检查" : + x.CheckType == "2" ? "企业综合检查" : + x.CheckType == "3" ? "企业专项检查" : "", + CheckMainType = x.CheckMainType, + CheckMainTypeName = x.CheckMainType == "0" ? "安全" : + x.CheckMainType == "1" ? "质量" : "", + CheckUnitId = x.CheckUnitId, + CheckUnitName = CU.UnitName, + }).Take(pushNum).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + foreach (var superviseCheckReportItem in items) + { + List detailItems = getDetail(superviseCheckReportItem.Id, thisUnit); + superviseCheckReportItem.SuperviseCheckReportDetail = detailItems; + } + + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/SaveSuperviseCheckReportData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + foreach (var item in items) + { + var data = db.Supervise_SuperviseCheckReport.FirstOrDefault(x => + x.SuperviseCheckReportId == item.Id && (x.IsUpdate == null || x.IsUpdate == false)); + data.IsUpdate = true; + db.SubmitChanges(); + } + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有企业级检查明细数据检查数据"; + } + + return responeData; + } + + #region 转换字符串 + + /// + /// 获取明细 + /// + /// + /// + public static List getDetail(string SuperviseCheckReportId, + Model.Base_Unit thisUnit) + { + List detailItems = null; + if (!string.IsNullOrEmpty(SuperviseCheckReportId)) + { + detailItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem + where x.SuperviseCheckReportId == SuperviseCheckReportId + select new Model.SuperviseCheckReportDetailItem + { + Id = x.SuperviseCheckReportItemId, + SourceUnitId = thisUnit.UnitId, + // ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + // DataDate = x.CheckDate, + AttachFile = AttachFileService.getFileUrl(x.SuperviseCheckReportItemId.ToString()), + SuperviseCheckReportId = x.SuperviseCheckReportId, + RectifyItemId = x.RectifyItemId, + IsSelected = x.IsSelected, + HazardSourcePoint = x.HazardSourcePoint, + RiskAnalysis = x.RiskAnalysis, + RiskPrevention = x.RiskPrevention, + SimilarRisk = x.SimilarRisk, + RectifyName = x.RectifyName, + RectifyCode = x.RectifyCode, + }).ToList(); + } + + return detailItems; + } + + #endregion + + #endregion + + #region 删除企业级检查明细数据检查 + + /// + /// 删除企业级检查明细数据检查 + /// + /// + public static ReturnData DeleteSuperviseCheckReportData(string Id) + { + Model.ReturnData responeData = new Model.ReturnData(); + try + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.Supervise_SuperviseCheckReport + join P in db.Base_Project on x.ProjectId equals P.ProjectId into PJ + from P in PJ.DefaultIfEmpty() + join U in db.Base_Unit on x.UnitId equals U.UnitId into UJ + from U in UJ.DefaultIfEmpty() + join CU in db.Base_Unit on x.CheckUnitId equals CU.UnitId into CUJ + from CU in CUJ.DefaultIfEmpty() + where x.SuperviseCheckReportId == Id + select new Model.SuperviseCheckReportItem + { + Id = x.SuperviseCheckReportId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CheckDate, + AttachFile = AttachFileService.getFileUrl(x.SuperviseCheckReportId.ToString()), + SuperviseCheckReportCode = x.SuperviseCheckReportCode, + CheckDate = x.CheckDate, + UnitId = x.UnitId, + UnitName = U.UnitName, + CheckTeam = x.CheckTeam, + CheckType = x.CheckType, + CheckTypeName = x.CheckType == "1" ? "企业负责人带班检查" : + x.CheckType == "2" ? "企业综合检查" : + x.CheckType == "3" ? "企业专项检查" : "", + CheckMainType = x.CheckMainType, + CheckMainTypeName = x.CheckMainType == "0" ? "安全" : + x.CheckMainType == "1" ? "质量" : "", + CheckUnitId = x.CheckUnitId, + CheckUnitName = CU.UnitName, + }).ToList(); + + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/DeleteSuperviseCheckReportData"; + responeData = ServerService.PushCNCEC(str, baseurl); + } + else + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + } + catch (Exception) + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + return responeData; + } + + #endregion + } } \ No newline at end of file diff --git a/SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs b/SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs new file mode 100644 index 0000000..aa00b0a --- /dev/null +++ b/SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public class LotAPIService + { + /// + /// 保存环境监测 + /// + /// + /// + public static string saveEnvironmentCheck(Model.EnvironmentalCheckInput input) + { + using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) + { + //使用Emitmapper 将input 映射到实体类db.ZJ_EnvironmentCheck + var entity = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper().Map(input); + entity.Id = Guid.NewGuid().ToString(); + entity.CreateTime = DateTime.Now; + db.EnvironmentalCheck.InsertOnSubmit(entity); + db.SubmitChanges(); + return entity.Id; + + } + } + + } +} diff --git a/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs b/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs index 7f36518..1b90176 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs @@ -10,7 +10,6 @@ namespace BLL public class MainSevice { - /// /// 在建项目集合 /// @@ -41,13 +40,13 @@ namespace BLL { _beUnderConstructionList = new List() { "0" }; } - } + } public MainSevice(string userid, string projectId) { var userModel = UserService.GetUserByUserId(userid); int unitType = 3; - _unitId = userModel.UnitId; + _unitId = userModel.UnitId?? ""; _unitType = unitType; _beUnderConstructionList = new List() { projectId }; } @@ -60,8 +59,6 @@ namespace BLL { try { - - // 并行执行异步方法 var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption(); var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption(); @@ -84,6 +81,7 @@ namespace BLL var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync(); var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync(); var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync(); + var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync(); var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync(); var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync(); var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync(); @@ -141,7 +139,7 @@ namespace BLL safeWorkingHourTask, safeTrainTask, specialTrainTask, - specialOperationTrainTask, + specialOperationTrainTask, hseTechnicalTask, headOfficeInspectorGeneralTask, headOfficeFullTimeTask, branchInspectorGeneralTask, @@ -202,6 +200,7 @@ namespace BLL var safeTrainList = await safeTrainTask; var specialTrainList = await specialTrainTask; var specialOperationTrainList = await specialOperationTrainTask; + var hseTechnicalList = await hseTechnicalTask; var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask; var headOfficeFullTimeList = await headOfficeFullTimeTask; var branchInspectorGeneralList = await branchInspectorGeneralTask; @@ -243,76 +242,79 @@ namespace BLL var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask; // 构造结果对象 - var table = new HSSEData_HSSE - { - JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - TotalWorkingHour = totalWorkingHour, - LostWorkingHour = lostWorkingHour, - SafeWorkingHour = safeWorkingHour, - SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), - SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), - SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), - EnvironmentalTrainNum = 0, - TotalEnergyConsumption = totalEnergyConsumption, - IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, - NewWaterConsumption = newWaterConsumption, - HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(), - HeadOfficeFullTimeNum = headOfficeFullTimeList.Count, - BranchInspectorGeneralNum = branchInspectorGeneralList.Count, - BranchFullTimeNum = branchFullTimeList.Count, - ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId), - CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId), - CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId), - ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)), - CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)), - UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum), - GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum), - MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum), - MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum), - LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum), - GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum), - MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum), - HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum), - CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum), - TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum), - ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum), - FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum), - SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum), - SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum), - SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum) - }; + var table = new HSSEData_HSSE(); + table.JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.TotalWorkingHour = totalWorkingHour; + table.LostWorkingHour = lostWorkingHour; + table.SafeWorkingHour = safeWorkingHour; + table.SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum); + table.SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum); + table.SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum); + table.HseTechnicalNum = hseTechnicalList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.EnvironmentalTrainNum = 0; + table.TotalEnergyConsumption = totalEnergyConsumption; + table.IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption; + table.NewWaterConsumption = newWaterConsumption; + table.HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(); + table.HeadOfficeFullTimeNum = headOfficeFullTimeList.Count; + table.BranchInspectorGeneralNum = branchInspectorGeneralList.Count; + table.BranchFullTimeNum = branchFullTimeList.Count; + table.ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId); + table.CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId); + table.CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId); + table.CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)); + table.CompanyDrillPersonNum = companyDrillList.Where(x => x.UnitId.Contains(_unitId)).Sum(x => x.JointPersonNum); + table.ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.ProjectDrillPersonNum = projectDrillList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.JointPersonNum); + table.CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)); + table.CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)); + table.UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); + table.GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum); + table.GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum); + table.MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum); + table.MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum); + table.LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum); + table.GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum); + table.MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum); + table.HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum); + table.CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum); + table.TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum); + table.OperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.OperativesNum); + table.ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum); + table.FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum); + table.ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum); + table.SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum); + table.SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum); + table.SuperOperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperOperativesNum); + table.SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum); + table.SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum); + table.SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum); + - if (!string.IsNullOrEmpty(_unitId)) - { - table.CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)); - } - if (_unitType == 0) { table.BeUnderConstructionNum = beUnderConstructionList.Count(); @@ -323,7 +325,6 @@ namespace BLL table.CertificateBNum = certificateBList.Count(); table.CertificateCNum = certificateCList.Count(); table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(); - } else if (_unitType == 1) { @@ -336,16 +337,16 @@ namespace BLL table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); } - else if (_unitType ==3) + else if (_unitType == 3) { table.BeUnderConstructionNum = beUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); table.ShutdownNum = shutdownList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); - table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) ); + table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); - table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) ); + table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)); } _hsseData = table; @@ -390,7 +391,6 @@ namespace BLL return result; } - /// /// 质量数据 /// @@ -405,6 +405,9 @@ namespace BLL var projectPersonNumTask = CQMSDataService.GetProjectPersonNumAsync(); //获取项目专职人数 var trainPersonNumTask = CQMSDataService.GetTrainPersonNumAsync(); //获取质量培训人次数 var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取技术交底人次数 + var qualityAssuranceNumTask = CQMSDataService.GetQualityAssuranceNumAsync(); //获取特设质保体系数量 + var comprehensiveConTechnologyDisclosureTask = CQMSDataService.GetComprehensiveConTechnologyDisclosureAsync(); //获取施工技术交底 + var comprehensiveReviewDrawingsTask = CQMSDataService.GetComprehensiveReviewDrawingsAsync(); //获取图纸会审 var inspectionEquipmentTask = CQMSDataService.GetComprehensive_InspectionEquipmentAsync(); //获取设备报验 var inspectionPersonTask = CQMSDataService.GetComprehensive_InspectionPersonAsync(); //获取人员报验 @@ -438,7 +441,8 @@ namespace BLL // 等待所有异步方法执行完成 await Task.WhenAll( companyPersonNumTask, branchPersonNumTask, projectPersonNumTask, - trainPersonNumTask, technicalDisclosePersonTask, + trainPersonNumTask, technicalDisclosePersonTask, qualityAssuranceNumTask, + comprehensiveConTechnologyDisclosureTask, comprehensiveReviewDrawingsTask, inspectionEquipmentTask, inspectionPersonTask, inspectionMachineTask, useNumTask, okNumTask, singleProjectNumTask, unitProjectNumTask, subProjectNuTask, subdivisionalWorksNuTask, inspectionLotNumTask, @@ -454,6 +458,9 @@ namespace BLL var projectPersonNumList = await projectPersonNumTask; var trainPersonNumList = await trainPersonNumTask; var technicalDisclosePersonList = await technicalDisclosePersonTask; + var qualityAssuranceNum = await qualityAssuranceNumTask; + var comprehensiveConTechnologyDisclosureList = await comprehensiveConTechnologyDisclosureTask; + var comprehensiveReviewDrawingsList = await comprehensiveReviewDrawingsTask; var inspectionEquipmentList = await inspectionEquipmentTask; var inspectionPersonList = await inspectionPersonTask; @@ -488,6 +495,9 @@ namespace BLL projectPersonNumList = projectPersonNumList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); trainPersonNumList = trainPersonNumList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); technicalDisclosePersonList = technicalDisclosePersonList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); + comprehensiveConTechnologyDisclosureList = comprehensiveConTechnologyDisclosureList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); + comprehensiveReviewDrawingsList = comprehensiveReviewDrawingsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); + qualityAssuranceNum = qualityAssuranceNum.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); inspectionEquipmentList = inspectionEquipmentList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); inspectionPersonList = inspectionPersonList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); inspectionMachineList = inspectionMachineList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList(); @@ -521,6 +531,9 @@ namespace BLL ProjectPersonNum = projectPersonNumList.Count(), TrainPersonNum = trainPersonNumList.Count(), TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum), + ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(), + ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Sum(x => x.TrainPersonNum), + ComprehensiveReviewDrawingsNum = comprehensiveReviewDrawingsList.Count(), EquipmentInspectionNum = inspectionEquipmentList.Count(), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(), PersonInspectionNum = inspectionPersonList.Count(), @@ -535,12 +548,12 @@ namespace BLL UnitProjectNum = unitProjectNum.Count(), SubProjectNum = subProjectNum.Count(), SubdivisionalWorksNum = subdivisionalWorksNum.Count(), - InspectionLotNum = inspectionLotNum.Count(), + InspectionLotNum = inspectionLotNum.Sum(x=>x.Sum), ConstructSolutionNum = constructSolutionList.Count(), ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1").Count(), ConstructSolutionUnitApproveNum = 0,// - SpecialEquipmentQualityAssuranceSystemNum = 0,// + SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(), DesignDetailsNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum), ProblemNum = cqmsProblemList.Count(), diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs index 5daa6f2..4be31fc 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs @@ -60,6 +60,10 @@ namespace BLL /// SpecialEquipmentAndDesignDetails, /// + /// 设备报验报检 + /// + InspectionMachineEquipment, + /// /// 全部数据 /// All @@ -115,6 +119,9 @@ namespace BLL x.ReportDate, x.TrainPersonNum, x.TechnicalDisclosePersonNum, + x.ComprehensiveConTechnologyDisclosureNum, + x.ComprehensiveConTechnologyDisclosurePersonNum, + x.ComprehensiveReviewDrawingsNum, x.UseNum, x.OKNum, x.CompanyPersonNum, @@ -142,7 +149,9 @@ namespace BLL x.SubProjectNum, x.SubdivisionalWorksNum, x.InspectionLotNum, - + x.InspectionMachineNum, + x.InspectionMachineQualifiedNum, + x.SpecialEquipmentQualityAssuranceSystemNum }; } #endregion @@ -180,11 +189,15 @@ namespace BLL ReportDate = newtable.ReportDate, TrainPersonNum = newtable.TrainPersonNum, TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum, + ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum, + ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum, + ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum, UseNum = newtable.UseNum, OKNum = newtable.OKNum, CompanyPersonNum = newtable.CompanyPersonNum, BranchPersonNum = newtable.BranchPersonNum, ProjectPersonNum = newtable.ProjectPersonNum, + ProjectSubPersonNum = newtable.ProjectSubPersonNum, ProblemNum = newtable.ProblemNum, ProblemCompletedNum = newtable.ProblemCompletedNum, ProblemNotCompletedNum = newtable.ProblemNotCompletedNum, @@ -225,7 +238,9 @@ namespace BLL SubProjectAcceptNum = newtable.SubProjectAcceptNum, SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum, SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum, - SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum + SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum, + InspectionMachineNum = newtable.InspectionMachineNum, + InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum, }; db.Project_CQMSData_CQMS.InsertOnSubmit(table); db.SubmitChanges(); @@ -251,11 +266,15 @@ namespace BLL table.ReportDate = newtable.ReportDate; table.TrainPersonNum = newtable.TrainPersonNum; table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum; + table.ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum; + table.ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum; + table.ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum; table.UseNum = newtable.UseNum; table.OKNum = newtable.OKNum; table.CompanyPersonNum = newtable.CompanyPersonNum; table.BranchPersonNum = newtable.BranchPersonNum; table.ProjectPersonNum = newtable.ProjectPersonNum; + table.ProjectSubPersonNum = newtable.ProjectSubPersonNum; table.ProblemNum = newtable.ProblemNum; table.ProblemCompletedNum = newtable.ProblemCompletedNum; table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum; @@ -297,6 +316,8 @@ namespace BLL table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum; table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum; table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum; + table.InspectionMachineNum = newtable.InspectionMachineNum; + table.InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum; db.SubmitChanges(); } } @@ -494,6 +515,14 @@ namespace BLL { table.SpecialEquipmentQualityAssuranceSystemNum = GetSpecialEquipmentQualityAssuranceSystemNum(projectid); table.DesignDetailsNum = GetTechnicalDisclosePersonNum(projectid); + table.ComprehensiveConTechnologyDisclosureNum = GetComprehensiveConTechnologyDisclosureNum(projectid); + table.ComprehensiveConTechnologyDisclosurePersonNum = GetComprehensiveConTechnologyDisclosurePersonNum(projectid); + table.ComprehensiveReviewDrawingsNum = GetComprehensiveReviewDrawings(projectid); + } + if (cQMSDateType == CQMSDateType.InspectionMachineEquipment || cQMSDateType == CQMSDateType.All) + { + table.InspectionMachineNum = GetInspectionMachineEquipmentNum(projectid); + table.InspectionMachineQualifiedNum = GetInspectionMachineEquipmentQualifiedNum(projectid); } if (IsReportByToday(projectid)) @@ -518,7 +547,7 @@ namespace BLL return result; } /// - /// 获取技术交底人次数 + /// 获取设计交底人次数 /// /// public static int GetTechnicalDisclosePersonNum(string projectid) @@ -529,6 +558,41 @@ namespace BLL var q = Funs.GetNewIntOrZero(result.ToString()); return q; } + /// + /// 获取施工技术交底数 + /// + /// + public static int GetComprehensiveConTechnologyDisclosureNum(string projectid) + { + var result = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + select x).ToList().Count(); + return result; + } + /// + /// 获取施工技术交底人数 + /// + /// + public static int GetComprehensiveConTechnologyDisclosurePersonNum(string projectid) + { + var result = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + select x.DisclosurePersonNum).ToList().Sum(x => x.Value); + var q = Funs.GetNewIntOrZero(result.ToString()); + return q; + } + /// + /// 获取图纸会审 + /// + /// + public static int GetComprehensiveReviewDrawings(string projectid) + { + var result = (from x in Funs.DB.Comprehensive_ReviewDrawings + where x.ProjectId == projectid && x.CreateDate > Const.DtmarkTime + select x).ToList().Count(); + return result; + } + /// /// 获取在用计量器具数 /// @@ -901,6 +965,7 @@ namespace BLL { int result = (from x in Funs.DB.Comprehensive_InspectionMachine where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + && x.SType == "机具" select x).Count(); return result; } @@ -913,7 +978,34 @@ namespace BLL public static int GetComprehensiveInspectionMachineOKNum(string projectid) { int result = (from x in Funs.DB.Comprehensive_InspectionMachine - where x.ProjectId == projectid && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime + where x.ProjectId == projectid && x.SType=="机具" && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取机具设备报验-设备报验数 + /// + /// + /// + public static int GetInspectionMachineEquipmentNum(string projectid) + { + int result = (from x in Funs.DB.Comprehensive_InspectionMachine + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + && x.SType == "设备" + select x).Count(); + return result; + } + + /// + /// 获取机具设备报验-设备报验合格数 + /// + /// + /// + public static int GetInspectionMachineEquipmentQualifiedNum(string projectid) + { + int result = (from x in Funs.DB.Comprehensive_InspectionMachine + where x.ProjectId == projectid && x.SType == "设备" && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime select x).Count(); return result; } @@ -948,7 +1040,9 @@ namespace BLL /// public static int GetComprehensiveInspectionMaterialNum(string projectid) { - var result = 0; + int result = (from x in Funs.DB.Comprehensive_InspectionEquipment + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + select x).Count(); return result; } @@ -958,7 +1052,9 @@ namespace BLL /// public static int GetComprehensiveInspectionMaterialOKNum(string projectid) { - var result = 0; + int result = (from x in Funs.DB.Comprehensive_InspectionEquipment + where x.ProjectId == projectid && x.SamplingResult == "1" && x.CompileDate > Const.DtmarkTime + select x).Count(); return result; } @@ -1004,11 +1100,13 @@ namespace BLL /// public static int GetSpecialEquipmentQualityAssuranceSystemNum(string projectid) { - var result = 0; + var result = (from x in Funs.DB.Solution_CQMSConstructSolution + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + select x).ToList().Count(); return result; } - + #region 推送项目质量数据 @@ -1039,5 +1137,348 @@ namespace BLL } #endregion + + #region 推送项目质量巡检数据 + + /// + /// 推送项目质量巡检数据 + /// + /// + public static ReturnData PushProjectHazardRegisterData() + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.View_Hazard_HazardRegister + where x.IsUpdate == null || x.IsUpdate == false + select new Model.Hazard_HazardRegisterItem + { + HazardRegisterId = x.HazardRegisterId, + SourceUnitId = thisUnit.UnitId, + RegisterDate = x.RegisterDate, + RegisterDef = x.RegisterDef, + Rectification = x.Rectification, + WorkAreaName = x.WorkAreaName, + ResponsibilityUnitName = x.ResponsibilityUnitName, + ResponsibilityUnitCollCropCode = x.ResponsibilityUnitCollCropCode, + Risk_Level = x.Risk_Level, + ProjectId = x.ProjectId, + ProjectName = x.ProjectName, + States = x.States, + StatesStr = x.StatesStr, + ResponsibilityManName = x.ResponsibilityManName, + CheckManName = x.CheckManName, + CheckTime = x.CheckTime, + RectificationPeriod = x.RectificationPeriod, + ImageUrl = x.ImageUrl, + ImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.ImageUrl), + RectificationImageUrl = x.RectificationImageUrl, + RectificationImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.RectificationImageUrl), + RectificationTime = x.RectificationTime, + ConfirmManName = x.ConfirmManName, + ConfirmDate = x.ConfirmDate, + HandleIdea = x.HandleIdea, + CutPayment = x.CutPayment, + CheckCycle = x.CheckCycle, + RegisterTypesName = x.RegisterTypesName, + Requirements = x.Requirements + }).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/SaveProjectHazardRegisterData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + var list = from x in db.HSSE_Hazard_HazardRegister + where x.IsUpdate == null || x.IsUpdate == false + select x; + foreach (var item in list) + { + item.IsUpdate = true; + } + db.SubmitChanges(); + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有项目质量巡检数据"; + } + return responeData; + } + + #endregion + + + #region 推送项目质量隐患数据 + + /// + /// 推送项目质量隐患数据 + /// + /// + public static ReturnData PushProjectQualityProblemData(int pushNum) + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.Check_CheckControl + join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ + from unit in unitJ.DefaultIfEmpty() + join cNProfessional in db.Base_CNProfessional on x.CNProfessionalCode equals cNProfessional.CNProfessionalId into cNProfessionalJ + from cNProfessional in cNProfessionalJ.DefaultIfEmpty() + join unitWork in db.WBS_UnitWork on x.UnitWorkId equals unitWork.UnitWorkId into unitWorkJ + from unitWork in unitWorkJ.DefaultIfEmpty() + join QualityQuestionType in db.Base_QualityQuestionType on x.QuestionType equals QualityQuestionType.QualityQuestionTypeId + where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckDate > BLL.Const.DtmarkTime + select new Model.QualityProblemItem + { + Id = x.CheckControlCode, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CheckDate, + CheckDate = x.CheckDate, + UnitWorkName = unitWork.UnitWorkName + (unitWork.ProjectType == "1" ? "(建筑)" : "(安装)"), + UnitName = unit.UnitName, + ProfessionalName = cNProfessional.ProfessionalName, + QuestionType = QualityQuestionType.QualityQuestionType, + ImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString()), + RectificationImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString() + "r"), + CheckSite = x.CheckSite, + States = x.State, + StatesStr = x.State == "5" || x.State == "6" ? "未确认" : + x.State == "7" ? "已闭环" : + Convert.ToDateTime(x.LimitDate).AddDays(1) < DateTime.Now ? "超期未整改" : "未整改", + }).Take(pushNum).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/CQMSData/SaveProjectQualityProblemData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + foreach (var item in items) + { + var data = db.Check_CheckControl.FirstOrDefault(x => + x.CheckControlCode == item.Id && (x.IsUpdate == null || x.IsUpdate == false)); + data.IsUpdate = true; + db.SubmitChanges(); + } + + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有项目质量隐患数据"; + } + return responeData; + } + + #endregion + + #region 删除项目质量隐患数据 + + /// + /// 删除项目质量隐患数据 + /// + /// + public static ReturnData DeleteProjectQualityProblemData(string Id) + { + Model.ReturnData responeData = new Model.ReturnData(); + try + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.Check_CheckControl + join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ + from unit in unitJ.DefaultIfEmpty() + join cNProfessional in db.Base_CNProfessional on x.CNProfessionalCode equals cNProfessional.CNProfessionalId into cNProfessionalJ + from cNProfessional in cNProfessionalJ.DefaultIfEmpty() + join unitWork in db.WBS_UnitWork on x.UnitWorkId equals unitWork.UnitWorkId into unitWorkJ + from unitWork in unitWorkJ.DefaultIfEmpty() + join QualityQuestionType in db.Base_QualityQuestionType on x.QuestionType equals QualityQuestionType.QualityQuestionTypeId + where x.CheckControlCode == Id + select new Model.QualityProblemItem + { + Id = x.CheckControlCode, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CheckDate, + CheckDate = x.CheckDate, + UnitWorkName = unitWork.UnitWorkName + (unitWork.ProjectType == "1" ? "(建筑)" : "(安装)"), + UnitName = unit.UnitName, + ProfessionalName = cNProfessional.ProfessionalName, + QuestionType = QualityQuestionType.QualityQuestionType, + ImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString()), + RectificationImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString() + "r"), + CheckSite = x.CheckSite, + States = x.State, + StatesStr = x.State == "5" || x.State == "6" ? "未确认" : + x.State == "7" ? "已闭环" : + Convert.ToDateTime(x.LimitDate).AddDays(1) < DateTime.Now ? "超期未整改" : "未整改", + }).ToList(); + + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/CQMSData/DeleteProjectQualityProblemData"; + responeData = ServerService.PushCNCEC(str, baseurl); + } + else + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + } + catch (Exception) + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + return responeData; + } + + #endregion + + + #region 推送质量QC活动注册数据 + + /// + /// 推送质量QC活动注册数据 + /// + /// + public static ReturnData PushQCRegistrationData(int pushNum) + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.QCManage_QCGroupRegistration + join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ + from u in unitJ.DefaultIfEmpty() + join s in db.Sys_User on x.CompileMan equals s.UserId into userJ + from s in userJ.DefaultIfEmpty() + where (x.IsUpdate == null || x.IsUpdate == false) && x.CompileDate > BLL.Const.DtmarkTime + select new Model.QCRegistrationItem + { + Id = x.QCGroupRegistrationId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CompileDate, + AttachFile = AttachFileService.getFileUrl(x.QCGroupRegistrationId.ToString()), + Code = x.Code, + Name = x.Name, + CompileManName = s.UserName, + CompileDate = x.CompileDate, + UnitName = u.UnitName, + UnitCollCropCode = Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitId == x.UnitId).CollCropCode, + Subjects = x.Subjects, + Process = x.Process, + Achievement = x.Achievement, + AwardName = x.AwardName, + AwardType = x.AwardType, + AwardLevel = x.AwardLevel, + AwardingUnit = x.AwardingUnit, + }).Take(pushNum).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/CQMSData/SaveQCRegistrationData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + foreach (var item in items) + { + var data = db.QCManage_QCGroupRegistration.FirstOrDefault(x => + x.QCGroupRegistrationId == item.Id && (x.IsUpdate == null || x.IsUpdate == false)); + data.IsUpdate = true; + db.SubmitChanges(); + } + + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有质量QC活动注册数据"; + } + return responeData; + } + + #endregion + + #region 删除质量QC活动注册数据 + + /// + /// 删除质量QC活动注册数据 + /// + /// + public static ReturnData DeleteQCRegistrationData(string Id) + { + Model.ReturnData responeData = new Model.ReturnData(); + try + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.QCManage_QCGroupRegistration + join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ + from u in unitJ.DefaultIfEmpty() + join s in db.Sys_User on x.CompileMan equals s.UserId into userJ + from s in userJ.DefaultIfEmpty() + where x.QCGroupRegistrationId == Id + select new Model.QCRegistrationItem + { + Id = x.QCGroupRegistrationId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CompileDate, + AttachFile = AttachFileService.getFileUrl(x.QCGroupRegistrationId.ToString()), + Code = x.Code, + Name = x.Name, + CompileManName = s.UserName, + CompileDate = x.CompileDate, + UnitName = u.UnitName, + UnitCollCropCode = Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitId == x.UnitId).CollCropCode, + Subjects = x.Subjects, + Process = x.Process, + Achievement = x.Achievement, + AwardName = x.AwardName, + AwardLevel = x.AwardLevel, + AwardingUnit = x.AwardingUnit, + }).ToList(); + + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/CQMSData/DeleteQCRegistrationData"; + responeData = ServerService.PushCNCEC(str, baseurl); + } + else + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + } + catch (Exception) + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + return responeData; + } + + #endregion + } } \ No newline at end of file diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs index 4c0ba04..5ab264a 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs @@ -1,5 +1,4 @@ using FineUIPro; -using Microsoft.SqlServer.Dts.Runtime; using NPOI.SS.Formula.Functions; using System; using System.Collections; @@ -89,30 +88,30 @@ namespace BLL { using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) { - } - - var table = new Project_HJGLData_Defect - { - Id = newtable.Id, - ProjectId = newtable.ProjectId, - UnitId = newtable.UnitId, - CollCropCode = newtable.CollCropCode, - UnitName = newtable.UnitName, - ReportDate = newtable.ReportDate, - DefectName = newtable.DefectName, - DefectNum = newtable.DefectNum - }; - db.Project_HJGLData_Defect.InsertOnSubmit(table); - db.SubmitChanges(); + var table = new Project_HJGLData_Defect + { + Id = newtable.Id, + ProjectId = newtable.ProjectId, + UnitId = newtable.UnitId, + CollCropCode = newtable.CollCropCode, + UnitName = newtable.UnitName, + ReportDate = newtable.ReportDate, + DefectName = newtable.DefectName, + DefectNum = newtable.DefectNum + }; + db.Project_HJGLData_Defect.InsertOnSubmit(table); + db.SubmitChanges(); + } } public static void AddBulkProject_HJGLData_Defect(List newtables) { using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) { + db.Project_HJGLData_Defect.InsertAllOnSubmit(newtables); + db.SubmitChanges(); + } - db.Project_HJGLData_Defect.InsertAllOnSubmit(newtables); - db.SubmitChanges(); } public static void UpdateProject_HJGLData_Defect(Project_HJGLData_Defect newtable) @@ -263,7 +262,7 @@ namespace BLL { var db = Funs.DB; - var projectids = ProjectService.GetProjectWorkList().Select(x => x.ProjectId).ToList(); + var projectids = HJGLData_HJGLService.BeUnderConstructionList; var thisUnitId = string.Empty; var thisUnit = CommonService.GetIsThisUnit(); if (thisUnit != null) thisUnitId = thisUnit.UnitId; @@ -285,8 +284,7 @@ namespace BLL }).ToList(); DeleteProject_HJGLData_DefectByDate(DateTime.Now.Date); //删除当前所有 var projectHjglDataDefect = new List(); - foreach (var item in data - ) + foreach (var item in data) { var table = new Project_HJGLData_Defect { diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs index c30691e..2db56c7 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs @@ -168,6 +168,18 @@ namespace BLL } } } + public static void DeleteProject_HJGLData_HJGLByDate(DateTime? reportDate) + { + using (var db = new SUBQHSEDB(Funs.ConnString)) + { + var table = db.Project_HJGLData_HJGL.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); + if (table != null) + { + db.Project_HJGLData_HJGL.DeleteAllOnSubmit(table); + db.SubmitChanges(); + } + } + } /// /// 判断该项目的该日期是否统计数据 /// @@ -356,11 +368,11 @@ namespace BLL public static ReturnData PushProjectHJGLData() { var items = (from x in Funs.DB.Project_HJGLData_HJGL - where x.ReportDate == DateTime.Now.Date - select x).ToList(); + where x.ReportDate == DateTime.Now.Date + select x).ToList(); var defectItems = (from x in Funs.DB.Project_HJGLData_Defect - where x.ReportDate == DateTime.Now.Date - select x).ToList(); + where x.ReportDate == DateTime.Now.Date + select x).ToList(); Model.ReturnData responeData = new Model.ReturnData(); if (items.Count() > 0 || defectItems.Count() > 0) { @@ -379,20 +391,5 @@ namespace BLL } #endregion - - - public static void DeleteProject_HJGLData_HJGLByDate(DateTime? reportDate) - { - using (var db = new SUBQHSEDB(Funs.ConnString)) - { - var table = db.Project_HJGLData_HJGL.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); - if (table != null) - { - db.Project_HJGLData_HJGL.DeleteAllOnSubmit(table); - db.SubmitChanges(); - } - } - } - } } \ No newline at end of file diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs index 67de1e3..e8786fd 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs @@ -101,8 +101,6 @@ namespace BLL DangerousProject } - public static SUBQHSEDB db = Funs.DB; - /// /// 新增实体 /// @@ -139,11 +137,13 @@ namespace BLL BranchFullTimeNum = newtable.BranchFullTimeNum, ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum, ProjectFullTimeNum = newtable.ProjectFullTimeNum, + ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum, ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum, SafetyInjectionEngineer = newtable.SafetyInjectionEngineer, CertificateANum = newtable.CertificateANum, CertificateBNum = newtable.CertificateBNum, CertificateCNum = newtable.CertificateCNum, + QualityPersonNum = newtable.QualityPersonNum, SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum, EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum, ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum, @@ -151,6 +151,9 @@ namespace BLL CompanyLeadShiftCheckNum = newtable.CompanyLeadShiftCheckNum, CompanyComprehensiveCheckNum = newtable.CompanyComprehensiveCheckNum, CompanySpecialCheckNum = newtable.CompanySpecialCheckNum, + BranchLeadShiftCheckNum = newtable.BranchLeadShiftCheckNum, + BranchComprehensiveCheckNum = newtable.BranchComprehensiveCheckNum, + BranchSpecialCheckNum = newtable.BranchSpecialCheckNum, ProjectLeadShiftCheckNum = newtable.ProjectLeadShiftCheckNum, ProjectSpecialCheckNum = newtable.ProjectSpecialCheckNum, ProjectMajorCheckNum = newtable.ProjectMajorCheckNum, @@ -163,8 +166,13 @@ namespace BLL CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum, CompanySpecialPlanNum = newtable.CompanySpecialPlanNum, CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan, + BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum, + BranchSpecialPlanNum = newtable.BranchSpecialPlanNum, + BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan, CompanyDrillNum = newtable.CompanyDrillNum, CompanyDrillPersonNum = newtable.CompanyDrillPersonNum, + BranchDrillNum = newtable.BranchDrillNum, + BranchDrillPersonNum = newtable.BranchDrillPersonNum, ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum, ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum, ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan, @@ -186,11 +194,13 @@ namespace BLL HighRiskNum = newtable.HighRiskNum, CompletedNum = newtable.CompletedNum, TrainPersonNum = newtable.TrainPersonNum, + OperativesNum = newtable.OperativesNum, ConstructionNum = newtable.ConstructionNum, FinishedNum = newtable.FinishedNum, ArgumentNum = newtable.ArgumentNum, SuperCompletedNum = newtable.SuperCompletedNum, SuperTrainPersonNum = newtable.SuperTrainPersonNum, + SuperOperativesNum = newtable.SuperOperativesNum, SuperConstructionNum = newtable.SuperConstructionNum, SuperFinishedNum = newtable.SuperFinishedNum, SuperArgumentNum = newtable.SuperArgumentNum @@ -200,7 +210,6 @@ namespace BLL } } - /// /// 删除实体 /// @@ -225,7 +234,7 @@ namespace BLL /// public static Project_HSSEData_HSSE GetProject_HSSEData_HSSEById(string Id) { - return db.Project_HSSEData_HSSE.FirstOrDefault(x => x.Id == Id); + return Funs.DB.Project_HSSEData_HSSE.FirstOrDefault(x => x.Id == Id); } public static List GetProject_HSSEData_HSSEByProjectid(string Projectid) @@ -271,11 +280,13 @@ namespace BLL table.BranchFullTimeNum = newtable.BranchFullTimeNum; table.ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum; table.ProjectFullTimeNum = newtable.ProjectFullTimeNum; + table.ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum; table.ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum; table.SafetyInjectionEngineer = newtable.SafetyInjectionEngineer; table.CertificateANum = newtable.CertificateANum; table.CertificateBNum = newtable.CertificateBNum; table.CertificateCNum = newtable.CertificateCNum; + table.QualityPersonNum = newtable.QualityPersonNum; table.SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum; table.EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum; table.ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum; @@ -295,7 +306,13 @@ namespace BLL table.CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum; table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum; table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan; + table.BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum; + table.BranchSpecialPlanNum = newtable.BranchSpecialPlanNum; + table.BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan; table.CompanyDrillNum = newtable.CompanyDrillNum; + table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum; + table.BranchDrillNum = newtable.BranchDrillNum; + table.BranchDrillPersonNum = newtable.BranchDrillPersonNum; table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum; table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum; table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan; @@ -316,10 +333,12 @@ namespace BLL table.HighRiskNum = newtable.HighRiskNum; table.CompletedNum = newtable.CompletedNum; table.TrainPersonNum = newtable.TrainPersonNum; + table.OperativesNum = newtable.OperativesNum; table.ConstructionNum = newtable.ConstructionNum; table.FinishedNum = newtable.FinishedNum; table.SuperCompletedNum = newtable.SuperCompletedNum; table.SuperTrainPersonNum = newtable.SuperTrainPersonNum; + table.SuperOperativesNum = newtable.SuperOperativesNum; table.SuperConstructionNum = newtable.SuperConstructionNum; table.SuperFinishedNum = newtable.SuperFinishedNum; db.SubmitChanges(); @@ -458,6 +477,7 @@ namespace BLL table.CertificateANum = GetCertificateANum(projectid); table.CertificateBNum = GetCertificateBNum(projectid); table.CertificateCNum = GetCertificateCNum(projectid); + table.QualityPersonNum = GetQualityPersonNum(projectid); } if (hSseDateType == HSSEDateType.SafetyMeeting || hSseDateType == HSSEDateType.All) @@ -493,11 +513,18 @@ namespace BLL table.CompanyComprehensivePlanNum = GetCompanyComprehensivePlanNum(projectid); table.CompanySpecialPlanNum = GetCompanySpecialPlanNum(projectid); table.CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan(projectid); + table.BranchComprehensivePlanNum = GetBranchComprehensivePlanNum(projectid); + table.BranchSpecialPlanNum = GetBranchSpecialPlanNum(projectid); + table.BranchOnSiteDisposalPlan = GetBranchOnSiteDisposalPlan(projectid); table.CompanyDrillNum = GetCompanyDrillNum(projectid); + table.CompanyDrillPersonNum = GetCompanyDrillPersonNum(projectid); + table.BranchDrillNum = GetBranchDrillNum(projectid); + table.BranchDrillPersonNum = GetBranchDrillPersonNum(projectid); table.ProjectComprehensivePlanNum = GetProjectComprehensivePlanNum(projectid); table.ProjectSpecialPlanNum = GetProjectSpecialPlanNum(projectid); table.ProjectOnSiteDisposalPlan = GetProjectOnSiteDisposalPlan(projectid); table.ProjectDrillNum = GetProjectDrillNum(projectid); + table.ProjectDrillNum = GetProjectDrillNum(projectid); } if (hSseDateType == HSSEDateType.SecurityCost || hSseDateType == HSSEDateType.All) @@ -580,10 +607,12 @@ namespace BLL { table.CompletedNum = GetCompletedNum(projectid); table.TrainPersonNum = GetTrainPersonNum(projectid); + table.OperativesNum = GetOperativesNum(projectid); table.ConstructionNum = GetConstructionNum(projectid); table.FinishedNum = GetFinishedNum(projectid); table.SuperCompletedNum = GetSuperCompletedNum(projectid); table.SuperTrainPersonNum = GetSuperTrainPersonNum(projectid); + table.SuperOperativesNum = GetSuperOperativesNum(projectid); table.SuperConstructionNum = GetSuperConstructionNum(projectid); table.SuperFinishedNum = GetSuperFinishedNum(projectid); } @@ -904,6 +933,19 @@ namespace BLL return result; } + /// + /// 获取在岗特种作业人员数量 + /// + /// + public static int GetQualityPersonNum(string projectid) + { + var result = (from x in Funs.DB.SitePerson_Person + join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId + join m in Funs.DB.Base_WorkPost on x.WorkPostId equals m.WorkPostId + where x.ProjectId == projectid && m.PostType == Const.PostType_2 && x.IsUsed == true && (y.LimitDate == null || y.LimitDate < DateTime.Now) + select x).Count(); + return result; + } /// /// 获取企业安委会会议数 /// @@ -1122,6 +1164,36 @@ namespace BLL return result; } + /// + /// 获取分支机构综合预案数 + /// + /// + public static int GetBranchComprehensivePlanNum(string projectid) + { + var result = 0; + return result; + } + + /// + /// 获取分支机构专项预案数 + /// + /// + public static int GetBranchSpecialPlanNum(string projectid) + { + var result = 0; + return result; + } + + /// + /// 获取分支机构现场处置预案 + /// + /// + public static int GetBranchOnSiteDisposalPlan(string projectid) + { + var result = 0; + return result; + } + /// /// 获取企业级演练次数 /// @@ -1131,6 +1203,33 @@ namespace BLL var result = 0; return result; } + /// + /// 获取企业级演练人次数 + /// + /// + public static int GetCompanyDrillPersonNum(string projectid) + { + var result = 0; + return result; + } + /// + /// 获取分支机构演练次数 + /// + /// + public static int GetBranchDrillNum(string projectid) + { + var result = 0; + return result; + } + /// + /// 获取分支机构演练人次数 + /// + /// + public static int GetBranchDrillPersonNum(string projectid) + { + var result = 0; + return result; + } /// /// 获取项目级综合预案 @@ -1183,6 +1282,17 @@ namespace BLL select x).Count(); return result; } + /// + /// 获取项目级参演人数 + /// + /// + public static int GetProjectDrillPersonNum(string projectid) + { + var result = (from x in Funs.DB.Emergency_DrillRecordList + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + select x.JointPersonNum ?? 0).ToList().Sum(); + return result; + } /// /// 获取费用提取(万元) @@ -1394,6 +1504,17 @@ namespace BLL select x.TrainPersonNum).ToList().Sum(x => x.Value); return result; } + /// + /// 获取危大工程作业人次数 + /// + /// + public static int GetOperativesNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime + select x.OperativesNum).ToList().Sum(x => x.Value); + return result; + } /// /// 获取危大工程施工个数 @@ -1445,6 +1566,18 @@ namespace BLL where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime select x.TrainPersonNum).ToList().Sum(x => x.Value); return result; + } + /// + /// 获取超危大工程作业人员数 + /// + /// + public static int GetSuperOperativesNum(string projectid) + { + var result = + (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime + select x.OperativesNum).ToList().Sum(x => x.Value); + return result; } /// @@ -1482,7 +1615,7 @@ namespace BLL public static List GetProject_HSSEData_HSSEByModle(Project_HSSEData_HSSE table) { - var q = from x in db.Project_HSSEData_HSSE + var q = from x in Funs.DB.Project_HSSEData_HSSE where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) && @@ -1538,6 +1671,7 @@ namespace BLL x.CertificateANum, x.CertificateBNum, x.CertificateCNum, + x.QualityPersonNum, x.SafetyCommitteeMeetingNum, x.EnterpriseTopicsMeetingNum, x.ProjectSafetyLeadingGroupMeetingNum, @@ -1557,7 +1691,13 @@ namespace BLL x.CompanyComprehensivePlanNum, x.CompanySpecialPlanNum, x.CompanyOnSiteDisposalPlan, + x.BranchComprehensivePlanNum, + x.BranchSpecialPlanNum, + x.BranchOnSiteDisposalPlan, x.CompanyDrillNum, + x.CompanyDrillPersonNum, + x.BranchDrillNum, + x.BranchDrillPersonNum, x.ProjectComprehensivePlanNum, x.ProjectSpecialPlanNum, x.ProjectOnSiteDisposalPlan, @@ -1578,10 +1718,12 @@ namespace BLL x.HighRiskNum, x.CompletedNum, x.TrainPersonNum, + x.OperativesNum, x.ConstructionNum, x.FinishedNum, x.SuperCompletedNum, x.SuperTrainPersonNum, + x.SuperOperativesNum, x.SuperConstructionNum, x.SuperFinishedNum }; @@ -1589,7 +1731,7 @@ namespace BLL #endregion - #region 推送项目安全隐患风险数据 + #region 推送项目安全统计数据 /// /// 推送项目安全隐患风险数据 @@ -1597,10 +1739,10 @@ namespace BLL /// public static ReturnData PushProjectHSSEData() { - var items = (from x in db.Project_HSSEData_HSSE + var items = (from x in Funs.DB.Project_HSSEData_HSSE where x.ReportDate == DateTime.Now.Date select x).ToList(); - var detailItems = (from x in db.Project_HSSEData_HiddenDangerDetail + var detailItems = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail where x.ReportDate == DateTime.Now.Date select x).ToList(); Model.ReturnData responeData = new Model.ReturnData(); @@ -1621,5 +1763,650 @@ namespace BLL } #endregion + + #region 推送项目安全隐患数据 + + /// + /// 推送项目安全隐患数据 + /// + /// + public static ReturnData PushProjectHazardRegisterData(int pushNum) + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.View_Hazard_HazardRegister + where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckTime > BLL.Const.DtmarkTime + && x.ProblemTypes == "1" + && x.ProjectState == "1" + // && x.IsBranch.Value == true + && (x.IsDelete == null || x.IsDelete == false) + select new Model.Hazard_HazardRegisterItem + { + HazardRegisterId = x.HazardRegisterId, + SourceUnitId = thisUnit.UnitId, + RegisterDate = x.RegisterDate, + RegisterDef = x.RegisterDef, + Rectification = x.Rectification, + WorkAreaName = x.WorkAreaName, + ResponsibilityUnitName = x.ResponsibilityUnitName, + ResponsibilityUnitCollCropCode = x.ResponsibilityUnitCollCropCode, + Risk_Level = x.Risk_Level, + ProjectId = x.ProjectId, + ProjectName = x.ProjectName, + States = x.States, + StatesStr = x.StatesStr, + ResponsibilityManName = x.ResponsibilityManName, + CheckManName = x.CheckManName, + CheckTime = x.CheckTime, + RectificationPeriod = x.RectificationPeriod, + ImageUrl = x.ImageUrl, + // ImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.ImageUrl), + RectificationImageUrl = x.RectificationImageUrl, + // RectificationImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.RectificationImageUrl), + RectificationTime = x.RectificationTime, + ConfirmManName = x.ConfirmManName, + ConfirmDate = x.ConfirmDate, + HandleIdea = x.HandleIdea, + CutPayment = x.CutPayment, + CheckCycle = x.CheckCycle, + RegisterTypesName = x.RegisterTypesName, + Requirements = x.Requirements + }).Take(pushNum).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/SaveProjectHazardRegisterData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + foreach (var item in items) + { + var data = db.HSSE_Hazard_HazardRegister.FirstOrDefault(x => + x.HazardRegisterId == item.HazardRegisterId && (x.IsUpdate == null || x.IsUpdate == false)); + data.IsUpdate = true; + db.SubmitChanges(); + } + // var list = from x in db.HSSE_Hazard_HazardRegister + // where x.IsUpdate == null || x.IsUpdate == false + // select x; + // foreach (var item in list) + // { + // item.IsUpdate = true; + // } + // db.SubmitChanges(); + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有项目安全隐患数据"; + } + return responeData; + } + + #endregion + + #region 删除项目安全隐患数据 + + /// + /// 删除项目安全隐患数据 + /// + /// + public static ReturnData DeleteProjectHazardRegisterData(string hazardRegisterId) + { + Model.ReturnData responeData = new Model.ReturnData(); + try + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.View_Hazard_HazardRegister + where x.HazardRegisterId == hazardRegisterId + select new Model.Hazard_HazardRegisterItem + { + HazardRegisterId = x.HazardRegisterId, + SourceUnitId = thisUnit.UnitId, + RegisterDate = x.RegisterDate, + RegisterDef = x.RegisterDef, + Rectification = x.Rectification, + WorkAreaName = x.WorkAreaName, + ResponsibilityUnitName = x.ResponsibilityUnitName, + ResponsibilityUnitCollCropCode = x.ResponsibilityUnitCollCropCode, + Risk_Level = x.Risk_Level, + ProjectId = x.ProjectId, + ProjectName = x.ProjectName, + States = x.States, + StatesStr = x.StatesStr, + ResponsibilityManName = x.ResponsibilityManName, + CheckManName = x.CheckManName, + CheckTime = x.CheckTime, + RectificationPeriod = x.RectificationPeriod, + ImageUrl = x.ImageUrl, + ImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.ImageUrl), + RectificationImageUrl = x.RectificationImageUrl, + RectificationImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.RectificationImageUrl), + RectificationTime = x.RectificationTime, + ConfirmManName = x.ConfirmManName, + ConfirmDate = x.ConfirmDate, + HandleIdea = x.HandleIdea, + CutPayment = x.CutPayment, + CheckCycle = x.CheckCycle, + RegisterTypesName = x.RegisterTypesName, + Requirements = x.Requirements + }).ToList(); + + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/DeleteProjectHazardRegisterData"; + responeData = ServerService.PushCNCEC(str, baseurl); + } + else + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + } + catch (Exception) + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + return responeData; + } + + #endregion + + #region 推送危大工程业务明细数据 + + /// + /// 推送危大工程业务明细数据 + /// + /// + public static ReturnData PushProjectLargeEngineeringData(int pushNum) + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.Solution_LargerHazard + where (x.IsUpdate == null || x.IsUpdate == false) && x.RecordTime > BLL.Const.DtmarkTime + select new Model.LargeEngineeringItem + { + Id = x.HazardId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.RecordTime, + AttachFile = AttachFileService.getFileUrl(x.HazardId.ToString()), + HazardName = x.HazardName, + TypeName = db.Sys_Const.FirstOrDefault(y => + y.ConstValue == x.HazardType && y.GroupId == ConstValue.Group_LargerHazardType).ConstText, + IsSuperLargerHazard = x.IsSuperLargerHazard, + IsArgument = x.IsArgument, + Address = x.Address, + Descriptions = x.Descriptions, + TrainPersonNum = x.TrainPersonNum, + RecordTime = x.RecordTime, + ExpectedTime = x.ExpectedTime, + States = x.States, + StatesStr = x.States == "0" ? "已取消" : + x.States == "1" ? "未开始" : + x.States == "2" ? "作业中" : + x.States == "3" ? "已完工" : "", + }).Take(pushNum).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/SaveProjectLargeEngineeringData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + foreach (var item in items) + { + var data = db.Solution_LargerHazard.FirstOrDefault(x => + x.HazardId == item.Id && (x.IsUpdate == null || x.IsUpdate == false)); + data.IsUpdate = true; + db.SubmitChanges(); + } + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有项目危大工程业务明细数据"; + } + + return responeData; + } + + #endregion + + #region 删除危大工程业务明细数据 + + /// + /// 删除危大工程业务明细数据 + /// + /// + public static ReturnData DeleteProjectLargeEngineeringData(string Id) + { + Model.ReturnData responeData = new Model.ReturnData(); + try + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.Solution_LargerHazard + where x.HazardId == Id + select new Model.LargeEngineeringItem + { + Id = x.HazardId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.RecordTime, + AttachFile = AttachFileService.getFileUrl(x.HazardId.ToString()), + HazardName = x.HazardName, + TypeName = db.Sys_Const.FirstOrDefault(y => + y.ConstValue == x.HazardType && y.GroupId == ConstValue.Group_LargerHazardType).ConstText, + IsSuperLargerHazard = x.IsSuperLargerHazard, + IsArgument = x.IsArgument, + Address = x.Address, + Descriptions = x.Descriptions, + TrainPersonNum = x.TrainPersonNum, + OperativesNum = x.OperativesNum, + RecordTime = x.RecordTime, + ExpectedTime = x.ExpectedTime, + States = x.States, + StatesStr = x.States == "0" ? "已取消" : + x.States == "1" ? "未开始" : + x.States == "2" ? "作业中" : + x.States == "3" ? "已完工" : "", + }).ToList(); + + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/DeleteProjectLargeEngineeringData"; + responeData = ServerService.PushCNCEC(str, baseurl); + } + else + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + } + catch (Exception) + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + return responeData; + } + + #endregion + + #region 推送安全作业许可业务明细数据 + + /// + /// 推送安全作业许可业务明细数据 + /// + /// + public static ReturnData PushProjectLicenseData(int pushNum) + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.View_License_LicenseManager + where (x.IsUpdate == null || x.IsUpdate == false) && x.CompileDate > BLL.Const.DtmarkTime + select new Model.ProjectLicenseItem + { + Id = x.LicenseManagerId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CompileDate, + AttachFile = AttachFileService.getFileUrl(x.LicenseManagerId.ToString()), + LicenseManagerCode = x.LicenseManagerCode, + UnitId = x.UnitId, + UnitName = x.UnitName, + LicenseTypeName = x.LicenseTypeName, + UnitTypeName = x.UnitTypeName, + IsHighRisk = x.IsHighRisk, + WorkAreaName = x.WorkAreaName, + CompileDate = x.CompileDate, + StartDate = x.StartDate, + EndDate = x.EndDate, + WorkStatesStr = x.WorkStatesStr, + + }).Take(pushNum).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/SaveProjectLicenseData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + foreach (var item in items) + { + var data = db.License_LicenseManager.FirstOrDefault(x => + x.LicenseManagerId == item.Id && (x.IsUpdate == null || x.IsUpdate == false)); + data.IsUpdate = true; + db.SubmitChanges(); + } + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有项目安全作业许可业务明细数据"; + } + + return responeData; + } + + #endregion + + #region 删除安全作业许可业务明细数据 + + /// + /// 删除安全作业许可业务明细数据 + /// + /// + public static ReturnData DeleteProjectLicenseData(string Id) + { + Model.ReturnData responeData = new Model.ReturnData(); + try + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.View_License_LicenseManager + where x.LicenseManagerId == Id + select new Model.ProjectLicenseItem + { + Id = x.LicenseManagerId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CompileDate, + AttachFile = AttachFileService.getFileUrl(x.LicenseManagerId.ToString()), + LicenseManagerCode = x.LicenseManagerCode, + UnitId = x.UnitId, + UnitName = x.UnitName, + LicenseTypeName = x.LicenseTypeName, + UnitTypeName = x.UnitTypeName, + IsHighRisk = x.IsHighRisk, + WorkAreaName = x.WorkAreaName, + CompileDate = x.CompileDate, + StartDate = x.StartDate, + EndDate = x.EndDate, + WorkStatesStr = x.WorkStatesStr, + + }).ToList(); + + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/DeleteProjectLicenseData"; + responeData = ServerService.PushCNCEC(str, baseurl); + } + else + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + } + catch (Exception) + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + return responeData; + } + + #endregion + + #region 推送安全风险数据 + + /// + /// 推送安全风险数据 + /// + /// + public static ReturnData PushProjectSecurityRiskData(int pushNum) + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.Hazard_HazardSelectedItem + join List in db.Hazard_HazardList on x.HazardListId equals List.HazardListId into ListJ + from list in ListJ.DefaultIfEmpty() + join Level in db.Base_RiskLevel on x.HazardLevel equals Level.RiskLevelId into LevelJ + from level in LevelJ.DefaultIfEmpty() + where (x.IsUpdate == null || x.IsUpdate == false) && level.RiskLevelName != "" && list.States == BLL.Const.State_2 + select new Model.ProjectSecurityRiskItem + { + Id = x.HazardSelectedItemId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CheckStartDate, + // AttachFile = AttachFileService.getFileUrl(x.HazardListId.ToString()), + WorkAreaName = list.WorkAreaName, + WorkStageName = ConvertWorkStage(x.WorkStage), + SupHazardListType = ConvertSupHazardListTypeId(x.HazardListTypeId), + HazardListType = ConvertHazardListTypeId(x.HazardListTypeId), + Hazard = ConvertHazardCode(x.HazardId), + HazardItems = x.HazardItems, + DefectsType = x.DefectsType, + MayLeadAccidents = x.MayLeadAccidents, + HelperMethod = x.HelperMethod, + HazardJudge_L = x.HazardJudge_L, + HazardJudge_E = x.HazardJudge_E, + HazardJudge_C = x.HazardJudge_C, + HazardJudge_D = x.HazardJudge_D, + RiskLevelName = level.RiskLevelName, + RiskLevel = level.RiskLevel, + ControlMeasures = x.ControlMeasures, + }).Take(pushNum).ToList(); + Model.ReturnData responeData = new Model.ReturnData(); + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/SaveProjectSecurityRiskData"; + responeData = ServerService.PushCNCEC(str, baseurl); + if (responeData.code == 1) + { + foreach (var item in items) + { + var data = db.Hazard_HazardSelectedItem.FirstOrDefault(x => + x.HazardSelectedItemId == item.Id && (x.IsUpdate == null || x.IsUpdate == false)); + data.IsUpdate = true; + db.SubmitChanges(); + } + } + } + else + { + responeData.code = 0; + responeData.message = "当前没有项目安全风险数据"; + } + + return responeData; + } + + #region 转换字符串 + + /// + /// 转换工作阶段 + /// + /// + /// + public static string ConvertWorkStage(object workStage) + { + if (workStage != null) + { + string workStages = string.Empty; + string[] strList = workStage.ToString().Split(','); + foreach (string str in strList) + { + Model.Base_WorkStage c = BLL.WorkStageService.GetWorkStageById(str); + if (c != null) + { + workStages += c.WorkStageName + ","; + } + } + + if (!string.IsNullOrEmpty(workStages)) + { + workStages = workStages.Substring(0, workStages.LastIndexOf(",")); + } + + return workStages; + } + + return ""; + } + + /// + /// 获取危险源编号 + /// + /// + /// + public static string ConvertHazardCode(object HazardId) + { + string hazardCode = string.Empty; + if (HazardId != null) + { + Model.Technique_HazardList hazardList = BLL.HazardListService.GetHazardListById(HazardId.ToString()); + if (hazardList != null) + { + hazardCode = hazardList.HazardCode; + } + } + + return hazardCode; + } + + /// + /// 获取危险源类别 + /// + /// + /// + public static string ConvertSupHazardListTypeId(object hazardListTypeId) + { + if (hazardListTypeId != null) + { + Model.Technique_HazardListType hazardListType = + BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString()); + if (hazardListType != null) + { + var hazard = BLL.HazardListTypeService.GetHazardListTypeById(hazardListType.SupHazardListTypeId); + if (hazard != null) + { + return hazard.HazardListTypeName; + } + } + } + + return null; + } + + /// + /// 获取危险源项 + /// + /// + /// + public static string ConvertHazardListTypeId(object hazardListTypeId) + { + if (hazardListTypeId != null) + { + Model.Technique_HazardListType hazardListType = + BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString()); + if (hazardListType != null) + { + return hazardListType.HazardListTypeName; + } + } + + return null; + } + + #endregion + + #endregion + + #region 删除安全风险数据 + + /// + /// 删除安全风险数据 + /// + /// + public static ReturnData DeleteProjectSecurityRiskData(string Id) + { + Model.ReturnData responeData = new Model.ReturnData(); + try + { + var thisUnit = CommonService.GetIsThisUnit(); + Model.SUBQHSEDB db = Funs.DB; + var items = (from x in db.Hazard_HazardSelectedItem + join List in db.Hazard_HazardList on x.HazardListId equals List.HazardListId into ListJ + from list in ListJ.DefaultIfEmpty() + join Level in db.Base_RiskLevel on x.HazardLevel equals Level.RiskLevelId into LevelJ + from level in LevelJ.DefaultIfEmpty() + where x.HazardSelectedItemId == Id + select new Model.ProjectSecurityRiskItem + { + Id = x.HazardSelectedItemId, + SourceUnitId = thisUnit.UnitId, + ProjectId = x.ProjectId, + CollCropCode = thisUnit.CollCropCode, + DataDate = x.CheckStartDate, + // AttachFile = AttachFileService.getFileUrl(x.HazardListId.ToString()), + WorkAreaName = list.WorkAreaName, + WorkStageName = ConvertWorkStage(x.WorkStage), + SupHazardListType = ConvertSupHazardListTypeId(x.HazardListTypeId), + HazardListType = ConvertHazardListTypeId(x.HazardListTypeId), + Hazard = ConvertHazardCode(x.HazardId), + HazardItems = x.HazardItems, + DefectsType = x.DefectsType, + MayLeadAccidents = x.MayLeadAccidents, + HelperMethod = x.HelperMethod, + HazardJudge_L = x.HazardJudge_L, + HazardJudge_E = x.HazardJudge_E, + HazardJudge_C = x.HazardJudge_C, + HazardJudge_D = x.HazardJudge_D, + RiskLevelName = level.RiskLevelName, + RiskLevel = level.RiskLevel, + ControlMeasures = x.ControlMeasures, + }).ToList(); + + if (items.Count() > 0) + { + var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items }; + var str = JsonConvert.SerializeObject(newItem); + var baseurl = "/api/HSSEData/DeleteProjectSecurityRiskData"; + responeData = ServerService.PushCNCEC(str, baseurl); + } + else + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + } + catch (Exception) + { + responeData.code = 0; + responeData.message = "集团数据删除失败"; + } + return responeData; + } + + #endregion + } } \ No newline at end of file diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs index 8908b90..eee7559 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs @@ -1,5 +1,4 @@ using FineUIPro; -using Microsoft.SqlServer.Dts.Runtime; using Model; using System; using System.Collections; diff --git a/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs b/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs index 449b7fa..8cf74d0 100644 --- a/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs +++ b/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs @@ -36,6 +36,8 @@ namespace BLL UnitId = superviseCheckReport.UnitId, CheckTeam = superviseCheckReport.CheckTeam, EvaluationResult = superviseCheckReport.EvaluationResult, + CheckUnitId = superviseCheckReport.CheckUnitId, + CheckMainType = superviseCheckReport.CheckMainType, CheckType = superviseCheckReport.CheckType, AttachUrl = superviseCheckReport.AttachUrl, IsIssued = superviseCheckReport.IsIssued @@ -59,9 +61,12 @@ namespace BLL newSuperviseCheckReport.UnitId = superviseCheckReport.UnitId; newSuperviseCheckReport.CheckTeam = superviseCheckReport.CheckTeam; newSuperviseCheckReport.EvaluationResult = superviseCheckReport.EvaluationResult; + newSuperviseCheckReport.CheckUnitId = superviseCheckReport.CheckUnitId; + newSuperviseCheckReport.CheckMainType = superviseCheckReport.CheckMainType; newSuperviseCheckReport.CheckType = superviseCheckReport.CheckType; newSuperviseCheckReport.AttachUrl = superviseCheckReport.AttachUrl; newSuperviseCheckReport.IsIssued = superviseCheckReport.IsIssued; + newSuperviseCheckReport.IsUpdate = null; Funs.DB.SubmitChanges(); } } diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs index c744708..169dfd0 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs @@ -599,10 +599,34 @@ namespace FineUIPro.Web.CQMS.Check string codes = Grid1.SelectedRowID.Split(',')[0]; var checks = BLL.CheckControlService.GetCheckControl(codes); - BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes); - BLL.CheckControlService.DeleteCheckControl(codes); - //Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityProblem); - BLL.LogService.AddSys_Log(this.CurrUser, checks.DocCode, codes, BLL.Const.CheckListMenuId, "删除质量巡检记录"); + if (checks != null) + { + if (checks.IsUpdate == true) + { + var returndata = Project_CQMSDataService.DeleteProjectQualityProblemData(codes); + if (returndata.code == 1) + { + BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes); + BLL.CheckControlService.DeleteCheckControl(codes); + //Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityProblem); + BLL.LogService.AddSys_Log(this.CurrUser, checks.DocCode, codes, BLL.Const.CheckListMenuId, "删除质量巡检记录"); + + } + else + { + Alert.ShowInTop("记录已上报集团,集团删除失败,无法删除本地数据!", MessageBoxIcon.Warning); + return; + } + } + else + { + BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes); + BLL.CheckControlService.DeleteCheckControl(codes); + //Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityProblem); + BLL.LogService.AddSys_Log(this.CurrUser, checks.DocCode, codes, BLL.Const.CheckListMenuId, "删除质量巡检记录"); + } + + } Grid1.DataBind(); BindGrid(); Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success); diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx new file mode 100644 index 0000000..8fc35f3 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx @@ -0,0 +1,163 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCGroupRegistration.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCGroupRegistration" %> + +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs new file mode 100644 index 0000000..d48cbc5 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs @@ -0,0 +1,272 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + public partial class QCGroupRegistration : PageBase + { + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + this.ucTree.UnitId = this.CurrUser.UnitId; + this.ucTree.ProjectId = this.ProjectId; + // if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) ) + // { + this.panelLeftRegion.Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + // } + btnNew.OnClientClick = Window1.GetShowReference("QCGroupRegistrationEdit.aspx") + "return false;"; + BindGrid(); + } + } + /// + /// 公司级树加载 + /// + /// + /// + protected void changeTree(object sender, EventArgs e) + { + this.ProjectId = this.ucTree.ProjectId; + this.GetButtonPower(); + if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + btnNew.Hidden = true; + } + this.BindGrid(); + } + /// + /// 绑定数据 + /// + + public void BindGrid() + { + // if (string.IsNullOrEmpty(this.ProjectId)) + // { + // return; + // } + DataTable tb = ChecklistData(); + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + protected DataTable ChecklistData() + { + string strSql = + @"select C.*,p.UserName,u.UnitName, (case C.AwardType when '1' then '创优' when '2' then 'QC' end) as AwardTypeName, + (case C.AwardLevel when '1' then '鲁班奖' + when '2' then '国优奖' + when '3' then '省部级' + when '4' then '市级' + when '5' then '省部级' + when '6' then '集团级' + when '7' then '企业级' end) as AwardLevelName + from [dbo].[QCManage_QCGroupRegistration] C + left join Sys_User p on p.UserId=C.CompileMan + left join Base_Unit u on u.UnitId = c.UnitId + where 1=1 "; + List listStr = new List(); + // strSql += " AND C.ProjectId = @ProjectId"; + // listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + /// + /// 窗体关闭 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + //右键编辑 + protected void btnMenuModify_Click(object sender, EventArgs e) + { + EditData(); + } + //双击编辑 + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + //分页 + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QCGroupRegistrationEdit.aspx?QCGroupRegistrationId={0}", Grid1.SelectedRowID, "编辑 - "))); + + } + //右键查看 + protected void btnMenuView_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QCGroupRegistrationView.aspx?QCGroupRegistrationId={0}", Grid1.SelectedRowID, "查看 - "))); + } + //右键删除 + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(rowID); + + if (QCGroupRegistration != null) + { + if (QCGroupRegistration.IsUpdate == true) + { + var returndata = Project_CQMSDataService.DeleteQCRegistrationData(rowID); + if (returndata.code == 1) + { + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(rowID); + BLL.QCManage_QCGroupRegistrationService.DeleteQCGroupRegistrationById(rowID); + } + else + { + Alert.ShowInTop("记录已上报集团,集团删除失败,无法删除本地数据!", MessageBoxIcon.Warning); + return; + } + } + else + { + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(rowID); + BLL.QCManage_QCGroupRegistrationService.DeleteQCGroupRegistrationById(rowID); + } + } + + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + /// + /// 搜索 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + /// + /// 重置 + /// + /// + /// + protected void btnRset_Click(object sender, EventArgs e) + { + BindGrid(); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectQCGroupRegistrationListMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuModify.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + } + } + #endregion + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + object[] keys = Grid1.DataKeys[e.RowIndex]; + string fileId = string.Empty; + if (keys == null) + { + return; + } + else + { + fileId = keys[0].ToString(); + } + if (e.CommandName.Equals("download")) + { + string menuId = Const.ProjectQCGroupRegistrationListMenuId; + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../../AttachFile/webuploader.aspx?type=-1&source=1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", fileId, menuId))); + } + } + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.designer.cs new file mode 100644 index 0000000..3f429a8 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + + + public partial class QCGroupRegistration + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + + /// + /// btnMenuView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuView; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx new file mode 100644 index 0000000..96a7eff --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx @@ -0,0 +1,130 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCGroupRegistrationEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCGroupRegistrationEdit" %> + + + + + + QC小组注册 + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs new file mode 100644 index 0000000..f0d34e5 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs @@ -0,0 +1,188 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Data; +using System.Data.SqlClient; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + public partial class QCGroupRegistrationEdit : PageBase + { + /// + /// 主键 + /// + public string QCGroupRegistrationId + { + get + { + return (string)ViewState["QCGroupRegistrationId"]; + } + set + { + ViewState["QCGroupRegistrationId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + // BLL.UnitService.InitProjectUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); + BLL.UnitService.InitAllUnitDownList(this.drpUnitId, true); + + QCGroupRegistrationId = Request.Params["QCGroupRegistrationId"]; + if (!string.IsNullOrEmpty(QCGroupRegistrationId)) + { + hdId.Text = this.QCGroupRegistrationId; + Model.QCManage_QCGroupRegistration QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(QCGroupRegistrationId); + this.txtCode.Text = QCGroupRegistration.Code; + this.txtName.Text = QCGroupRegistration.Name; + if (!string.IsNullOrEmpty(QCGroupRegistration.CompileMan)) + { + this.txtCompileMan.Text = UserService.GetUserNameByUserId(QCGroupRegistration.CompileMan); + } + if (QCGroupRegistration.CompileDate != null) + { + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", QCGroupRegistration.CompileDate); + } + if (!string.IsNullOrEmpty(QCGroupRegistration.UnitId)) + { + this.drpUnitId.SelectedValue = QCGroupRegistration.UnitId; + } + txtSubjects.Text = QCGroupRegistration.Subjects; + txtProcess.Text = QCGroupRegistration.Process; + txtAchievement.Text = QCGroupRegistration.Achievement; + txtAwardName.Text = QCGroupRegistration.AwardName; + if (!string.IsNullOrEmpty(QCGroupRegistration.AwardType)) + { + drpAwardType.SelectedValue = QCGroupRegistration.AwardType; + if (QCGroupRegistration.AwardType == "1") { + drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1")); + drpAwardLevel.Items.Add(new ListItem("国优奖", "2")); + drpAwardLevel.Items.Add(new ListItem("省部级", "3")); + drpAwardLevel.Items.Add(new ListItem("市级", "4")); + } + else if (QCGroupRegistration.AwardType == "2") { + drpAwardLevel.Items.Add(new ListItem("省部级", "5")); + drpAwardLevel.Items.Add(new ListItem("集团级", "6")); + drpAwardLevel.Items.Add(new ListItem("企业级", "7")); + } + } + if (!string.IsNullOrEmpty(QCGroupRegistration.AwardLevel)) + { + drpAwardLevel.SelectedValue = QCGroupRegistration.AwardLevel; + } + txtAwardingUnit.Text = QCGroupRegistration.AwardingUnit; + } + else + { + this.txtCompileMan.Text = this.CurrUser.UserName; + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + + } + + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + + } + + protected void imgBtnFile_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(hdId.Text)) + { + hdId.Text = SQLHelper.GetNewID(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../../AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", hdId.Text, BLL.Const.ProjectQCGroupRegistrationListMenuId))); + } + + protected void btnSave_Click(object sender, EventArgs e) + { + Saveinspection("save"); + } + + /// + /// 保存 + /// + public void Saveinspection(string saveType) + { + Model.QCManage_QCGroupRegistration QCGroupRegistration = new Model.QCManage_QCGroupRegistration(); + QCGroupRegistration.ProjectId = this.CurrUser.LoginProjectId; + QCGroupRegistration.Code = this.txtCode.Text.Trim(); + QCGroupRegistration.Name = this.txtName.Text.Trim(); + QCGroupRegistration.CompileMan = this.CurrUser.UserId; + QCGroupRegistration.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim()); + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + QCGroupRegistration.UnitId = this.drpUnitId.SelectedValue; + } + QCGroupRegistration.Subjects = txtSubjects.Text.Trim(); + QCGroupRegistration.Process = txtProcess.Text.Trim(); + QCGroupRegistration.Achievement = txtAchievement.Text.Trim(); + QCGroupRegistration.AwardName = txtAwardName.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAwardType.SelectedValue)) + { + QCGroupRegistration.AwardType = this.drpAwardType.SelectedValue; + } + if (!string.IsNullOrEmpty(this.drpAwardLevel.SelectedValue)) + { + QCGroupRegistration.AwardLevel = this.drpAwardLevel.SelectedValue; + } + QCGroupRegistration.AwardingUnit = txtAwardingUnit.Text.Trim(); + if (!string.IsNullOrEmpty(this.QCGroupRegistrationId)) + { + QCGroupRegistration.QCGroupRegistrationId = this.QCGroupRegistrationId; + QCManage_QCGroupRegistrationService.UpdateQCGroupRegistration(QCGroupRegistration); + LogService.AddSys_Log(CurrUser, QCGroupRegistration.Code, QCGroupRegistration.QCGroupRegistrationId, Const.ProjectQCGroupRegistrationListMenuId, "修改QC小组注册"); + } + else + { + if (string.IsNullOrEmpty(hdId.Text)) + { + QCGroupRegistration.QCGroupRegistrationId = SQLHelper.GetNewID(); + QCGroupRegistrationId = QCGroupRegistration.QCGroupRegistrationId; + } + else + { + QCGroupRegistration.QCGroupRegistrationId = hdId.Text; + } + QCManage_QCGroupRegistrationService.AddQCGroupRegistration(QCGroupRegistration); + LogService.AddSys_Log(CurrUser, QCGroupRegistration.Code, QCGroupRegistration.QCGroupRegistrationId, Const.ProjectQCGroupRegistrationListMenuId, "增加QC小组注册"); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + protected void Change_AwardType(object sender, EventArgs eventArgs) + { + + drpAwardLevel.Items.Clear(); + drpAwardLevel.Items.Add(new ListItem("-请选择-", "")); + + if (drpAwardType.SelectedValue == "1") { + drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1")); + drpAwardLevel.Items.Add(new ListItem("国优奖", "2")); + drpAwardLevel.Items.Add(new ListItem("省部级", "3")); + drpAwardLevel.Items.Add(new ListItem("市级", "4")); + } + else if (drpAwardType.SelectedValue == "2") { + drpAwardLevel.Items.Add(new ListItem("省部级", "5")); + drpAwardLevel.Items.Add(new ListItem("集团级", "6")); + drpAwardLevel.Items.Add(new ListItem("企业级", "7")); + } + // 设置选中第一项 + if (drpAwardLevel.Items.Count > 0) + { + drpAwardLevel.SelectedIndex = 0; + } + + } + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.designer.cs new file mode 100644 index 0000000..61698fd --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.designer.cs @@ -0,0 +1,251 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + + + public partial class QCGroupRegistrationEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ContentPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel2; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// txtSubjects 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSubjects; + + /// + /// txtProcess 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProcess; + + /// + /// txtAchievement 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAchievement; + + /// + /// txtAwardName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAwardName; + + /// + /// txtAwardingUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAwardingUnit; + + /// + /// drpAwardType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAwardType; + + /// + /// drpAwardLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAwardLevel; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompileDate; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// imgBtnFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnFile; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdId; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdAttachUrl; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx new file mode 100644 index 0000000..ff5c9b1 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx @@ -0,0 +1,128 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCGroupRegistrationView.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCGroupRegistrationView" %> + + + + + + QC小组注册 + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs new file mode 100644 index 0000000..06c5de4 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs @@ -0,0 +1,130 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Data; +using System.Data.SqlClient; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + public partial class QCGroupRegistrationView : PageBase + { + /// + /// 主键 + /// + public string QCGroupRegistrationId + { + get + { + return (string)ViewState["QCGroupRegistrationId"]; + } + set + { + ViewState["QCGroupRegistrationId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + // BLL.UnitService.InitProjectUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); + BLL.UnitService.InitAllUnitDownList(this.drpUnitId, true); + QCGroupRegistrationId = Request.Params["QCGroupRegistrationId"]; + if (!string.IsNullOrEmpty(QCGroupRegistrationId)) + { + hdId.Text = this.QCGroupRegistrationId; + Model.QCManage_QCGroupRegistration QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(QCGroupRegistrationId); + this.txtCode.Text = QCGroupRegistration.Code; + this.txtName.Text = QCGroupRegistration.Name; + if (!string.IsNullOrEmpty(QCGroupRegistration.CompileMan)) + { + this.txtCompileMan.Text = UserService.GetUserNameByUserId(QCGroupRegistration.CompileMan); + } + if (QCGroupRegistration.CompileDate != null) + { + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", QCGroupRegistration.CompileDate); + } + if (!string.IsNullOrEmpty(QCGroupRegistration.UnitId)) + { + this.drpUnitId.SelectedValue = QCGroupRegistration.UnitId; + } + txtSubjects.Text = QCGroupRegistration.Subjects; + txtProcess.Text = QCGroupRegistration.Process; + txtAchievement.Text = QCGroupRegistration.Achievement; + txtAwardName.Text = QCGroupRegistration.AwardName; + if (!string.IsNullOrEmpty(QCGroupRegistration.AwardType)) + { + drpAwardType.SelectedValue = QCGroupRegistration.AwardType; + if (QCGroupRegistration.AwardType == "1") { + drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1")); + drpAwardLevel.Items.Add(new ListItem("国优奖", "2")); + drpAwardLevel.Items.Add(new ListItem("省部级", "3")); + drpAwardLevel.Items.Add(new ListItem("市级", "4")); + } + else if (QCGroupRegistration.AwardType == "2") { + drpAwardLevel.Items.Add(new ListItem("省部级", "5")); + drpAwardLevel.Items.Add(new ListItem("集团级", "6")); + drpAwardLevel.Items.Add(new ListItem("企业级", "7")); + } + } + if (!string.IsNullOrEmpty(QCGroupRegistration.AwardLevel)) + { + drpAwardLevel.SelectedValue = QCGroupRegistration.AwardLevel; + } + txtAwardingUnit.Text = QCGroupRegistration.AwardingUnit; + } + else + { + this.txtCompileMan.Text = this.CurrUser.UserName; + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + + } + + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + + } + + protected void imgBtnFile_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(hdId.Text)) + { + hdId.Text = SQLHelper.GetNewID(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", hdId.Text, BLL.Const.ProjectQCGroupRegistrationListMenuId))); + } + + protected void Change_AwardType(object sender, EventArgs eventArgs) + { + + drpAwardLevel.Items.Clear(); + drpAwardLevel.Items.Add(new ListItem("-请选择-", "")); + + if (drpAwardType.SelectedValue == "1") { + drpAwardLevel.Items.Add(new ListItem("国家级", "1")); + drpAwardLevel.Items.Add(new ListItem("省部级", "2")); + drpAwardLevel.Items.Add(new ListItem("市级", "3")); + } + else if (drpAwardType.SelectedValue == "2") { + drpAwardLevel.Items.Add(new ListItem("省部级", "4")); + drpAwardLevel.Items.Add(new ListItem("集团级", "5")); + drpAwardLevel.Items.Add(new ListItem("企业级", "6")); + } + // 设置选中第一项 + if (drpAwardLevel.Items.Count > 0) + { + drpAwardLevel.SelectedIndex = 0; + } + + } + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.designer.cs new file mode 100644 index 0000000..5f30c35 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.designer.cs @@ -0,0 +1,242 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + + + public partial class QCGroupRegistrationView + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ContentPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel2; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// txtSubjects 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSubjects; + + /// + /// txtProcess 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProcess; + + /// + /// txtAchievement 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAchievement; + + /// + /// txtAwardName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAwardName; + + /// + /// txtAwardingUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAwardingUnit; + + /// + /// drpAwardType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAwardType; + + /// + /// drpAwardLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAwardLevel; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompileDate; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// imgBtnFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnFile; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdId; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdAttachUrl; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx new file mode 100644 index 0000000..91c7437 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx @@ -0,0 +1,160 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCStatics.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCStatics" %> + +<%--<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>--%> + + + + + + + QC统计 + + + +
+ + + + <%-- + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs new file mode 100644 index 0000000..e24ed65 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs @@ -0,0 +1,191 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + public partial class QCStatics : PageBase + { + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //this.ProjectId = this.CurrUser.LoginProjectId; + //if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + //{ + // this.ProjectId = Request.Params["projectId"]; + //} + + //this.ucTree.UnitId = this.CurrUser.UnitId; + //this.ucTree.ProjectId = this.ProjectId; + //if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + //{ + // this.panelLeftRegion.Hidden = true; + ////权限按钮方法 + //this.GetButtonPower(); + //} + BLL.ProjectService.InitAllProjectDropDownList(this.drpProjectId, true); + BLL.UnitService.InitProjectUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); + + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.drpProjectId.Hidden = true; + this.Grid1.Columns[1].Hidden = true; + } + else + { + this.drpProjectId.Hidden = false; + this.Grid1.Columns[1].Hidden = false; + } + BindGrid(); + } + } + /// + /// 公司级树加载 + /// + /// + /// + //protected void changeTree(object sender, EventArgs e) + //{ + //this.ProjectId = this.ucTree.ProjectId; + //this.GetButtonPower(); + //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + //{ + //} + // this.BindGrid(); + //} + /// + /// 绑定数据 + /// + //private DataTable tb = null; + + public void BindGrid() + { + //List listStr = new List + //{ + //}; + //if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + //{ + // listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + //} + //else + //{ + // if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue)) + // { + // listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue)); + // } + // else + // { + // listStr.Add(new SqlParameter("@projectId", null)); + // } + //} + //SqlParameter[] parameter = listStr.ToArray(); + //tb = SQLHelper.GetDataTableRunProc("Sp_QCStatics", parameter); + //this.Grid1.RecordCount = tb.Rows.Count; + //var table = this.GetPagedDataTable(Grid1, tb); + //Grid1.DataSource = table; + //Grid1.DataBind(); + string strSql = @"select C.*,p.UserName,u.UnitName,pro.ProjectName,(case C.AwardLevel when '1' then '国家' when '2' then '省部' when '3' then '企业' end) as AwardLevelName + from [dbo].[QCManage_QCGroupRegistration] C + left join Sys_User p on p.UserId=C.CompileMan + left join Base_Unit u on u.UnitId = c.UnitId + left join Base_Project pro on pro.ProjectId = C.ProjectId + where 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + strSql += " AND C.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + } + else + { + if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue)) + { + strSql += " AND C.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.drpProjectId.SelectedValue)); + } + } + if (this.drpUnitId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnitId.SelectedValue)) + { + strSql += " AND C.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + //分页 + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 统计按钮 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + BindGrid(); + } + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + object[] keys = Grid1.DataKeys[e.RowIndex]; + string fileId = string.Empty; + if (keys == null) + { + return; + } + else + { + fileId = keys[0].ToString(); + } + if (e.CommandName.Equals("download")) + { + string menuId = Const.ProjectQCGroupRegistrationListMenuId; + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../../AttachFile/webuploader.aspx?type=-1&source=1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", fileId, menuId))); + } + } + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.designer.cs new file mode 100644 index 0000000..6fdd3c5 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityActivity.QCManage +{ + + + public partial class QCStatics + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs index 5d9635b..1598eff 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs @@ -102,7 +102,7 @@ namespace FineUIPro.Web.CQMS.Solution BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpModelType, false); BLL.SpecialSchemeTypeService.InitSpecialSchemeTypeDropDownList(drpSpecialType,1, false); UnitService.InitMainAndSubUnitDropDownList(drpUnit, CurrUser.LoginProjectId, false); - if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId) + if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId) { drpUnit.SelectedValue = this.CurrUser.UnitId; drpUnit.Enabled = false; diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx new file mode 100644 index 0000000..259643c --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx @@ -0,0 +1,150 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Rectify.aspx.cs" Inherits="FineUIPro.Web.CQMS.Technique.Rectify" %> + + + + + + 质量隐患 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.cs new file mode 100644 index 0000000..de35d21 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.cs @@ -0,0 +1,561 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; +using System.Web.UI; + +namespace FineUIPro.Web.CQMS.Technique +{ + public partial class Rectify : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + btnSelectColumns.OnClientClick = Window5.GetShowReference("RectifySelectCloumn.aspx"); + ////权限按钮方法 + this.GetButtonPower(); + InitTreeMenu(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT RectifyItem.RectifyItemId,RectifyItem.RectifyId,RectifyItem.HazardSourcePoint,(CASE WHEN LEN(RectifyItem.HazardSourcePoint) > 30 THEN LEFT(RectifyItem.HazardSourcePoint,30) + '...' ELSE RectifyItem.HazardSourcePoint END) AS ShortHazardSourcePoint, " + + @" RectifyItem.RiskAnalysis,(CASE WHEN LEN(RectifyItem.RiskPrevention) > 30 THEN LEFT(RectifyItem.RiskPrevention,30) + '...' ELSE RectifyItem.RiskPrevention END) AS ShortRiskPrevention,RectifyItem.RiskPrevention, " + + @" RectifyItem.SimilarRisk,(CASE WHEN LEN(RectifyItem.SimilarRisk) > 30 THEN LEFT(RectifyItem.SimilarRisk,30) + '...' ELSE RectifyItem.SimilarRisk END) AS ShortSimilarRisk,R.RectifyName,R.RectifyCode,RectifyItem.CompileMan,RectifyItem.CompileDate," + + @" RectifyItem.AuditMan,RectifyItem.AuditDate,RectifyItem.IsPass,U.UserName AS CompileManName,UR.UserName AS AuditManName" + + @" FROM dbo.Technique_RectifyItem AS RectifyItem" + + @" LEFT JOIN dbo.Technique_Rectify AS R ON R.RectifyId=RectifyItem.RectifyId" + + @" LEFT JOIN dbo.Sys_User AS U ON U.UserId=RectifyItem.CompileMan" + + @" LEFT JOIN dbo.Sys_User AS UR ON U.UserId=RectifyItem.AuditMan" + + @" WHERE RectifyItem.RectifyId=@RectifyId"; + List listStr = new List + { + new SqlParameter("@RectifyId", this.trRectify.SelectedNode.NodeID) + }; + if (!string.IsNullOrEmpty(this.RectifyName.Text.Trim())) + { + strSql += " AND RectifyName LIKE @RectifyName"; + listStr.Add(new SqlParameter("@RectifyName", "%" + this.RectifyName.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.HazardSourcePoint.Text.Trim())) + { + strSql += " AND HazardSourcePoint LIKE @HazardSourcePoint"; + listStr.Add(new SqlParameter("@HazardSourcePoint", "%" + this.HazardSourcePoint.Text.Trim() + "%")); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 加载树 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.trRectify.Nodes.Clear(); + this.trRectify.ShowBorder = false; + this.trRectify.ShowHeader = false; + this.trRectify.EnableIcons = true; + this.trRectify.AutoScroll = true; + this.trRectify.EnableSingleClickExpand = true; + TreeNode rootNode = new TreeNode + { + Text = "隐患类型", + NodeID = "0", + Expanded = true + }; + this.trRectify.Nodes.Add(rootNode); + BoundTree(rootNode.Nodes, "0"); + } + + /// + /// 加载树 + /// + /// + /// + private void BoundTree(TreeNodeCollection nodes, string menuId) + { + var dt = BLL.RectifyService.GetRectifyBySupRectifyId(menuId,"1"); + if (dt.Count() > 0) + { + TreeNode tn = null; + foreach (var dr in dt) + { + tn = new TreeNode + { + Text = dr.RectifyName, + ToolTip = dr.RectifyName, + NodeID = dr.RectifyId, + EnableClickEvent = true + }; + nodes.Add(tn); + BoundTree(tn.Nodes, dr.RectifyId); + } + } + } + #endregion + + #region 添加按钮 + /// + /// 添加安全隐患类型按钮 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + + if (this.trRectify.SelectedNode != null) + { + Model.Technique_Rectify rectify = BLL.RectifyService.GetRectifyById(this.trRectify.SelectedNode.NodeID); + if ((rectify != null && rectify.IsEndLever == false) || this.trRectify.SelectedNode.NodeID == "0") //根节点或者非末级节点,可以增加 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyEdit.aspx?SupRectifyId={0}", this.trRectify.SelectedNode.NodeID, "编辑 - "))); + } + else + { + ShowNotify("选择的项已是末级!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("请选择树节点!", MessageBoxIcon.Success); + } + } + #endregion + + #region 修改 + /// + /// 修改安全隐患类型 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + if (this.trRectify.SelectedNode != null) + { + if (this.trRectify.SelectedNode.NodeID != "0") //非根节点可以编辑 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyEdit.aspx?RectifyId={0}", this.trRectify.SelectedNode.NodeID, "编辑 - "))); + } + else + { + ShowNotify("根节点无法编辑!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请选择树节点!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 删除 + /// + /// 删除安全试题类型 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + if (this.trRectify.SelectedNode != null) + { + var q = BLL.RectifyService.GetRectifyById(this.trRectify.SelectedNode.NodeID); + + if (q != null && BLL.RectifyService.IsDeleteRectify(this.trRectify.SelectedNode.NodeID)) + { + BLL.LogService.AddSys_Log(this.CurrUser, q.RectifyName, q.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnDelete); + BLL.RectifyItemService.DeleteRectifyItemByRectifyId(this.trRectify.SelectedNode.NodeID); + BLL.RectifyService.DeleteRectify(this.trRectify.SelectedNode.NodeID); + InitTreeMenu(); + } + else + { + ShowNotify("存在下级菜单或已增加资源数据或者为内置项,不允许删除!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请选择删除项!", MessageBoxIcon.Warning); + } + } + #endregion + + #region Tree点击事件 + /// + /// tree点击事件 + /// + /// + /// + protected void trRectify_NodeCommand(object sender, TreeCommandEventArgs e) + { + BindGrid(); + } + #endregion + + #region 文本框查询事件 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.CQMSRectifyMenuId, Const.BtnQuery); + } + #endregion + + #region 增加明细 + /// + /// 增加安全隐患明细 + /// + /// + /// + protected void btnNewDetail_Click(object sender, EventArgs e) + { + if (this.trRectify.SelectedNode != null) + { + if (this.trRectify.SelectedNode.Nodes.Count == 0) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("RectifyItemEdit.aspx?RectifyId={0}", this.trRectify.SelectedNode.NodeID, "编辑 - "))); + } + else + { + ShowNotify("请选择末级节点!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请选择树节点!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 编辑明细 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + string rectifyItemId = Grid1.SelectedRowID; + + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("RectifyItemEdit.aspx?RectifyItemId={0}", rectifyItemId, "编辑 - "))); + } + #endregion + + #region 删除明细 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + if (judgementDelete(rowID, true)) + { + var rectifyItem = BLL.RectifyItemService.GetRectifyItemById(rowID); + if (rectifyItem != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, rectifyItem.HazardSourcePoint, rectifyItem.RectifyItemId, BLL.Const.CQMSRectifyMenuId, Const.BtnDelete); + BLL.RectifyItemService.DeleteRectifyItem(rowID); + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + } + } + } + #endregion + + #region 表头分页、排序 + /// + /// Grid分页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region Grid行双击事件 + /// + /// Grid1行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + #endregion + + #region 关闭弹出框 + /// + /// 关闭弹出窗口1 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + InitTreeMenu(); + } + + /// + /// 关闭弹出窗口2 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 导出 + /// + /// 关闭导出窗口 + /// + /// + /// + protected void Window5_Close(object sender, WindowCloseEventArgs e) + { + Response.ClearContent(); + Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1, e.CloseArgument.Split('#'))); + Response.End(); + } + + /// + /// 导出 + /// + /// + /// + /// + private string GetGridTableHtml(Grid grid, string[] columns) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + List columnHeaderTexts = new List(columns); + List columnIndexs = new List(); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (columnHeaderTexts.Contains(column.HeaderText)) + { + sb.AppendFormat("", column.HeaderText); + columnIndexs.Add(column.ColumnIndex); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + int columnIndex = 0; + foreach (object value in row.Values) + { + if (columnIndexs.Contains(columnIndex)) + { + string html = value.ToString(); + if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX)) + { + // 模板列 + string templateID = html.Substring(Grid.TEMPLATE_PLACEHOLDER_PREFIX.Length); + Control templateCtrl = row.FindControl(templateID); + html = GetRenderedHtmlSource(templateCtrl); + } + //else + //{ + // // 处理CheckBox + // if (html.Contains("f-grid-static-checkbox")) + // { + // if (!html.Contains("f-checked")) + // { + // html = "×"; + // } + // else + // { + // html = "√"; + // } + // } + // // 处理图片 + // if (html.Contains("{0}", html); + } + columnIndex++; + } + sb.Append(""); + } + sb.Append("
{0}
"); + return sb.ToString(); + } + + /// + /// 获取控件渲染后的HTML源代码 + /// + /// + /// + private string GetRenderedHtmlSource(Control ctrl) + { + if (ctrl != null) + { + using (StringWriter sw = new StringWriter()) + { + using (HtmlTextWriter htw = new HtmlTextWriter(sw)) + { + ctrl.RenderControl(htw); + return sw.ToString(); + } + } + } + return String.Empty; + } + #endregion + + #region 判断是否可删除 + /// + /// 判断是否可以删除 + /// + /// + private bool judgementDelete(string id, bool isShow) + { + string content = string.Empty; + //if (Funs.DB.Supervise_SuperviseCheckRectifyItem.FirstOrDefault(x => x.RectifyItemId == id) != null) + //{ + // content = "该安全隐患已在【检查整改】中使用,不能删除!"; + //} + if (string.IsNullOrEmpty(content)) + { + return true; + } + else + { + if (isShow) + { + Alert.ShowInTop(content); + } + return false; + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + this.btnNewDetail.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + this.btnMenuDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnOut)) + { + this.btnSelectColumns.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.designer.cs new file mode 100644 index 0000000..a163ba3 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.designer.cs @@ -0,0 +1,296 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Technique +{ + + + public partial class Rectify + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// trRectify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trRectify; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// RectifyName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox RectifyName; + + /// + /// HazardSourcePoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox HazardSourcePoint; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// btnNewDetail 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNewDetail; + + /// + /// btnSelectColumns 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSelectColumns; + + /// + /// lblRectifyName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblRectifyName; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window5; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx new file mode 100644 index 0000000..ebeb831 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx @@ -0,0 +1,51 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectifyEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Technique.RectifyEdit" %> + + + + + 编辑安全隐患类型 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.cs new file mode 100644 index 0000000..bfc4a7b --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.cs @@ -0,0 +1,148 @@ +using BLL; +using System; +using System.Linq; + +namespace FineUIPro.Web.CQMS.Technique +{ + public partial class RectifyEdit : PageBase + { + #region 定义变量 + /// + /// 安全隐患主键 + /// + public string RectifyId + { + get + { + return (string)ViewState["RectifyId"]; + } + set + { + ViewState["RectifyId"] = value; + } + } + + /// + /// 上一节点id + /// + public string SupRectifyId + { + get + { + return (string)ViewState["SupRectifyId"]; + } + set + { + ViewState["SupRectifyId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ////权限按钮方法 + this.GetButtonPower(); + this.drpIsEndLever.DataTextField = "TypeName"; + drpIsEndLever.DataValueField = "TypeId"; + drpIsEndLever.DataSource = BLL.TrainingService.GetIsEndLeverList(); + drpIsEndLever.DataBind(); + + this.RectifyId = Request.Params["RectifyId"]; + this.SupRectifyId = Request.Params["SupRectifyId"]; + if (!string.IsNullOrEmpty(this.RectifyId)) + { + Model.Technique_Rectify rectify = BLL.RectifyService.GetRectifyById(this.RectifyId); + if (rectify != null) + { + this.txtRectifyCode.Text = rectify.RectifyCode; + this.txtRectifyName.Text = rectify.RectifyName; + if (rectify.IsEndLever == true) + { + this.drpIsEndLever.SelectedValue = "true"; + } + else + { + this.drpIsEndLever.SelectedValue = "false"; + } + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Model.Technique_Rectify rectify = new Model.Technique_Rectify + { + RectifyType = "1",//质量 + RectifyCode = this.txtRectifyCode.Text.Trim(), + RectifyName = this.txtRectifyName.Text.Trim() + }; + if (this.drpIsEndLever.SelectedValue == "true") + { + rectify.IsEndLever = true; + } + else + { + rectify.IsEndLever = false; + } + if (string.IsNullOrEmpty(this.RectifyId)) + { + rectify.SupRectifyId = this.SupRectifyId; + rectify.RectifyId = SQLHelper.GetNewID(typeof(Model.Technique_Rectify)); + BLL.RectifyService.AddRectify(rectify); + + BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnAdd); + } + else + { + Model.Technique_Rectify r = BLL.RectifyService.GetRectifyById(this.RectifyId); + if (r != null) + { + rectify.SupRectifyId = r.SupRectifyId; + } + rectify.RectifyId = this.RectifyId; + BLL.RectifyService.UpdateRectify(rectify); + + BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnModify); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId); + if (buttonList.Count() > 0) + { + + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.designer.cs new file mode 100644 index 0000000..8d92276 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Technique +{ + + + public partial class RectifyEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtRectifyCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRectifyCode; + + /// + /// txtRectifyName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRectifyName; + + /// + /// drpIsEndLever 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsEndLever; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx new file mode 100644 index 0000000..80fdaa7 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx @@ -0,0 +1,61 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectifyItemEdit.aspx.cs" + Async="true" Inherits="FineUIPro.Web.CQMS.Technique.RectifyItemEdit" %> + + + + + 隐患详细 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.cs new file mode 100644 index 0000000..77dfadc --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.cs @@ -0,0 +1,164 @@ +using BLL; +using System; +using System.Linq; + +namespace FineUIPro.Web.CQMS.Technique +{ + public partial class RectifyItemEdit : PageBase + { + #region 定义变量 + /// + /// 质量隐患主键 + /// + public string RectifyId + { + get + { + return (string)ViewState["RectifyId"]; + } + set + { + ViewState["RectifyId"] = value; + } + } + + /// + /// 质量隐患明细主键 + /// + public string RectifyItemId + { + get + { + return (string)ViewState["RectifyItemId"]; + } + set + { + ViewState["RectifyItemId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + this.RectifyId = Request.Params["RectifyId"]; + this.RectifyItemId = Request.Params["RectifyItemId"]; + if (!string.IsNullOrEmpty(this.RectifyItemId)) + { + var rectifyItem = BLL.RectifyItemService.GetRectifyItemById(this.RectifyItemId); + if (rectifyItem != null) + { + if (!string.IsNullOrEmpty(rectifyItem.RectifyId)) + { + var rectify = BLL.RectifyService.GetRectifyById(rectifyItem.RectifyId); + if (rectify != null) + { + this.lblRectifyName.Text = rectify.RectifyName; + } + } + this.txtHazardSourcePoint.Text = rectifyItem.HazardSourcePoint; + this.txtRiskAnalysis.Text = rectifyItem.RiskAnalysis; + this.txtRiskPrevention.Text = rectifyItem.RiskPrevention; + this.txtSimilarRisk.Text = rectifyItem.SimilarRisk; + } + } + else + { + if (!string.IsNullOrEmpty(this.RectifyId)) + { + var rectify = BLL.RectifyService.GetRectifyById(this.RectifyId); + if (rectify != null) + { + this.lblRectifyName.Text = rectify.RectifyName; + } + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存数据 + /// + private void SaveData() + { + Model.Technique_RectifyItem rectifyItem = new Model.Technique_RectifyItem + { + HazardSourcePoint = this.txtHazardSourcePoint.Text.Trim(), + RiskAnalysis = this.txtRiskAnalysis.Text.Trim(), + RiskPrevention = this.txtRiskPrevention.Text.Trim(), + SimilarRisk = this.txtSimilarRisk.Text.Trim(), + }; + if (string.IsNullOrEmpty(this.RectifyItemId)) + { + rectifyItem.CompileMan = this.CurrUser.UserName; + rectifyItem.UnitId = String.IsNullOrEmpty(this.CurrUser.UnitId) ? CommonService.GetMainProjectUnitId(this.CurrUser.LoginProjectId) : this.CurrUser.UnitId; + rectifyItem.CompileDate = DateTime.Now; + rectifyItem.IsPass = true; + rectifyItem.RectifyItemId = SQLHelper.GetNewID(typeof(Model.Technique_RectifyItem)); + RectifyItemId = rectifyItem.RectifyItemId; + rectifyItem.RectifyId = this.RectifyId; + BLL.RectifyItemService.AddRectifyItem(rectifyItem); + BLL.LogService.AddSys_Log(this.CurrUser, rectifyItem.HazardSourcePoint, rectifyItem.RectifyItemId, BLL.Const.CQMSRectifyMenuId, Const.BtnAdd); + } + else + { + rectifyItem.RectifyItemId = this.RectifyItemId; + Model.Technique_RectifyItem r = BLL.RectifyItemService.GetRectifyItemById(this.RectifyId); + if (r != null) + { + rectifyItem.RectifyId = r.RectifyId; + } + BLL.RectifyItemService.UpdateRectifyItem(rectifyItem); + BLL.LogService.AddSys_Log(this.CurrUser, rectifyItem.HazardSourcePoint, rectifyItem.RectifyItemId, BLL.Const.CQMSRectifyMenuId, Const.BtnModify); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + SaveData(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId); + if (buttonList.Count() > 0) + { + + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.designer.cs new file mode 100644 index 0000000..16f5613 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.designer.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Technique +{ + + + public partial class RectifyItemEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// lblRectifyName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblRectifyName; + + /// + /// txtHazardSourcePoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtHazardSourcePoint; + + /// + /// txtRiskAnalysis 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRiskAnalysis; + + /// + /// txtRiskPrevention 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRiskPrevention; + + /// + /// txtSimilarRisk 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtSimilarRisk; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx new file mode 100644 index 0000000..600dd4f --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx @@ -0,0 +1,38 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectifySelectCloumn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Technique.RectifySelectCloumn" %> + + + + + + 质量隐患导出选择列 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.cs new file mode 100644 index 0000000..03eb713 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Technique +{ + public partial class RectifySelectCloumn : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + } + } + #endregion + + #region 导出 + /// + /// 导出按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + // 1. 这里放置保存窗体中数据的逻辑 + // 2. 关闭本窗体,然后回发父窗体 + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference(String.Join("#", cblColumns.SelectedValueArray))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnOut)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.designer.cs new file mode 100644 index 0000000..9b90b09 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Technique +{ + + + public partial class RectifySelectCloumn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// cblColumns 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBoxList cblColumns; + } +} diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs index 2079d86..ee6e47c 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs @@ -949,11 +949,15 @@ namespace FineUIPro.Web.CQMS.WBS } else if (CheckAcceptType.ToString() == "4") { - name = "单位工程一次验收"; + name = "单位工程验收"; } else if (CheckAcceptType.ToString() == "5") { - name = "材料进场复验"; + name = "分部工程验收"; + } + else if (CheckAcceptType.ToString() == "6") + { + name = "分项工程验收"; } } return name; diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx index b765044..0217ecf 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx +++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx @@ -46,11 +46,12 @@ - - - - - + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs index c711f7b..3c2dbce 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs @@ -1,239 +1,241 @@ //------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 +// +// This code was generated by a tool. // -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.WBS { - - - public partial class EditBreakdown { - +namespace FineUIPro.Web.CQMS.WBS +{ + + + public partial class EditBreakdown + { + /// - /// form1 控件。 + /// form1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// - /// PageManager1 控件。 + /// PageManager1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.PageManager PageManager1; - + /// - /// SimpleForm1 控件。 + /// SimpleForm1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Form SimpleForm1; - + /// - /// txtBreakdownCode 控件。 + /// txtBreakdownCode control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtBreakdownCode; - + /// - /// txtBreakdownName 控件。 + /// txtBreakdownName control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtBreakdownName; - + /// - /// txtBasis 控件。 + /// txtBasis control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtBasis; - + /// - /// txtCheckPoints 控件。 + /// txtCheckPoints control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtCheckPoints; - + /// - /// txtRecordAndCode 控件。 + /// txtRecordAndCode control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtRecordAndCode; - + /// - /// txtClass 控件。 + /// txtClass control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtClass; - + /// - /// drpCheckAcceptType 控件。 + /// drpCheckAcceptType control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.DropDownList drpCheckAcceptType; - + /// - /// tr1 控件。 + /// tr1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr1; - + /// - /// FenBao 控件。 + /// FenBao control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox FenBao; - + /// - /// tr2 控件。 + /// tr2 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr2; - + /// - /// WuHuan 控件。 + /// WuHuan control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox WuHuan; - + /// - /// tr3 控件。 + /// tr3 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr3; - + /// - /// JianLi 控件。 + /// JianLi control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox JianLi; - + /// - /// tr4 控件。 + /// tr4 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr4; - + /// - /// YeZhu 控件。 + /// YeZhu control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox YeZhu; - + /// - /// txtSortIndex 控件。 + /// txtSortIndex control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.NumberBox txtSortIndex; - + /// - /// txtRemark 控件。 + /// txtRemark control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtRemark; - + /// - /// rblIsAcceptance 控件。 + /// rblIsAcceptance control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.RadioButtonList rblIsAcceptance; - + /// - /// Toolbar1 控件。 + /// Toolbar1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Toolbar Toolbar1; - + /// - /// btnAttachUrl 控件。 + /// btnAttachUrl control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Button btnAttachUrl; - + /// - /// btnSave 控件。 + /// btnSave control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Button btnSave; - + /// - /// WindowAtt 控件。 + /// WindowAtt control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Window WindowAtt; } diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx index 4e60027..b1f595a 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx +++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx @@ -46,11 +46,12 @@ - - - - - + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs index 939f238..7a5cbd6 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs @@ -1,239 +1,241 @@ //------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 +// +// This code was generated by a tool. // -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.WBS { - - - public partial class EditBreakdownProject { - +namespace FineUIPro.Web.CQMS.WBS +{ + + + public partial class EditBreakdownProject + { + /// - /// form1 控件。 + /// form1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// - /// PageManager1 控件。 + /// PageManager1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.PageManager PageManager1; - + /// - /// SimpleForm1 控件。 + /// SimpleForm1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Form SimpleForm1; - + /// - /// txtBreakdownCode 控件。 + /// txtBreakdownCode control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtBreakdownCode; - + /// - /// txtBreakdownName 控件。 + /// txtBreakdownName control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtBreakdownName; - + /// - /// txtBasis 控件。 + /// txtBasis control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtBasis; - + /// - /// txtCheckPoints 控件。 + /// txtCheckPoints control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtCheckPoints; - + /// - /// txtRecordAndCode 控件。 + /// txtRecordAndCode control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtRecordAndCode; - + /// - /// txtClass 控件。 + /// txtClass control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtClass; - + /// - /// drpCheckAcceptType 控件。 + /// drpCheckAcceptType control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.DropDownList drpCheckAcceptType; - + /// - /// tr1 控件。 + /// tr1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr1; - + /// - /// FenBao 控件。 + /// FenBao control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox FenBao; - + /// - /// tr2 控件。 + /// tr2 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr2; - + /// - /// WuHuan 控件。 + /// WuHuan control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox WuHuan; - + /// - /// tr3 控件。 + /// tr3 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr3; - + /// - /// JianLi 控件。 + /// JianLi control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox JianLi; - + /// - /// tr4 控件。 + /// tr4 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.FormRow tr4; - + /// - /// YeZhu 控件。 + /// YeZhu control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox YeZhu; - + /// - /// txtSortIndex 控件。 + /// txtSortIndex control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.NumberBox txtSortIndex; - + /// - /// txtRemark 控件。 + /// txtRemark control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtRemark; - + /// - /// rblIsAcceptance 控件。 + /// rblIsAcceptance control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.RadioButtonList rblIsAcceptance; - + /// - /// Toolbar1 控件。 + /// Toolbar1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Toolbar Toolbar1; - + /// - /// btnAttachUrl 控件。 + /// btnAttachUrl control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Button btnAttachUrl; - + /// - /// btnSave 控件。 + /// btnSave control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Button btnSave; - + /// - /// WindowAtt 控件。 + /// WindowAtt control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Window WindowAtt; } diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx index a0ba5c0..3425754 100644 --- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx +++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx @@ -1,12 +1,10 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectControlPoint.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.ProjectControlPoint" %> - -<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> - +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> - + 现场控制点裁剪 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.cs new file mode 100644 index 0000000..9bed1bb --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.cs @@ -0,0 +1,192 @@ +using BLL; +using FineUIPro.Web.Controls; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.DataSync +{ + public partial class PersonnelChangeRecord : PageBase + { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + this.ucTree.UnitId = this.CurrUser.UnitId; + this.ucTree.ProjectId = this.ProjectId; + + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.panelLeftRegion.Hidden = true; + } + Funs.DropDownPageSize(this.ddlPageSize); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + protected void changeTree(object sender, EventArgs e) + { + this.ProjectId = this.ucTree.ProjectId; + this.BindGrid(); + } + + public void BindGrid() + { + string strSql = @"SELECT a.ProjectPersonnelChangeRecordId,a.ProjectId,a.RoleId,a.Remarks,a.UserId,a.StartTime,a.EndTime,b.UserName,c.RoleName " + + @" FROM Project_PersonnelChangeRecord a " + + @" LEFT JOIN Sys_Role c on a.RoleId=c.RoleId " + + @" LEFT JOIN Sys_User b on a.UserId=b.UserId WHERE "; + List listStr = new List(); + if (!string.IsNullOrWhiteSpace(this.ProjectId)) + { + strSql += " a.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + } + else + { + strSql += " 1<>1 "; + } + if (!string.IsNullOrWhiteSpace(this.txtUserName.Text)) + { + strSql += " AND b.UserName = @UserName"; + listStr.Add(new SqlParameter("@UserName", this.txtUserName.Text)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #region 分页 排序 + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员变动记录" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.designer.cs new file mode 100644 index 0000000..7bf4416 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataSync +{ + + + public partial class PersonnelChangeRecord + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtUserName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUserName; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx index ba9be4c..09d4b09 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx @@ -27,8 +27,8 @@ AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px" LabelAlign="right"> - <%-- - --%> + + diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs index 7aa2074..b8ac6e6 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs @@ -40,12 +40,13 @@ namespace FineUIPro.Web.ZHGL.Emergency { ////权限按钮方法 this.GetButtonPower(); - var thisUnit = CommonService.GetIsThisUnit(); - if (thisUnit != null) - { - this.UnitId = thisUnit.UnitId; - } - + //var thisUnit = CommonService.GetIsThisUnit(); + //if (thisUnit != null) + //{ + // this.UnitId = thisUnit.UnitId; + //} + + BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, true); this.btnNew.OnClientClick = Window1.GetShowReference("DrillRecordListEdit.aspx") + "return false;"; if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) { @@ -70,16 +71,21 @@ namespace FineUIPro.Web.ZHGL.Emergency + @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId" + @" LEFT JOIN Sys_User AS Users ON DrillRecordList.CompileMan=Users.UserId WHERE 1=1 "; List listStr = new List(); - strSql += " AND DrillRecordList.UnitIds =@UnitId"; + //strSql += " AND DrillRecordList.UnitIds =@UnitId"; if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值 { - listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + //listStr.Add(new SqlParameter("@UnitId", this.UnitId)); strSql += " AND DrillRecordList.States = @States"; ///状态为已完成 listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); } else { - listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + //listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + } + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + strSql += " AND DrillRecordList.UnitIds = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim())); } if (!string.IsNullOrEmpty(this.txtDrillRecordCode.Text.Trim())) @@ -307,6 +313,10 @@ namespace FineUIPro.Web.ZHGL.Emergency this.btnMenuDelete.Hidden = false; } } + //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + //{ + // btnNew.Hidden = true; + //} } #endregion } diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs index 08d9644..e9aa1d9 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs @@ -68,6 +68,15 @@ namespace FineUIPro.Web.ZHGL.Emergency /// protected global::FineUIPro.TextBox txtDrillRecordCode; + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + /// /// txtDrillRecordName 控件。 /// diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx index cd13316..f055fd9 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx @@ -31,9 +31,11 @@ - - + --%> + + diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs index 59416fa..55b6644 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs @@ -21,17 +21,17 @@ namespace FineUIPro.Web.ZHGL.Emergency ViewState["DrillRecordListId"] = value; } } - public string UnitId - { - get - { - return (string)ViewState["UnitId"]; - } - set - { - ViewState["UnitId"] = value; - } - } + //public string UnitId + //{ + // get + // { + // return (string)ViewState["UnitId"]; + // } + // set + // { + // ViewState["UnitId"] = value; + // } + //} #endregion #region 加载 @@ -59,7 +59,11 @@ namespace FineUIPro.Web.ZHGL.Emergency { this.drpDrillRecordType.SelectedValue = DrillRecordList.DrillRecordType; } - this.txtUnit.Text = DrillRecordList.UnitNames; + //this.txtUnit.Text = DrillRecordList.UnitNames; + if (!string.IsNullOrEmpty(DrillRecordList.UnitIds)) + { + this.drpUnit.SelectedValue = DrillRecordList.UnitIds; + } this.txtDrillRecordDate.Text = string.Format("{0:yyyy-MM-dd}", DrillRecordList.DrillRecordDate); if (DrillRecordList.JointPersonNum != null) { @@ -81,9 +85,11 @@ namespace FineUIPro.Web.ZHGL.Emergency // this.txtDrillRecordContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template); //} + var thisUnit = BLL.CommonService.GetIsThisUnit(); ////自动生成编码 - this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, null, this.UnitId); + this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, null, thisUnit.UnitId); this.txtDrillRecordName.Text = this.SimpleForm1.Title; + this.drpUnit.SelectedValue = thisUnit.UnitId; } ///初始化审核菜单 @@ -100,12 +106,13 @@ namespace FineUIPro.Web.ZHGL.Emergency private void InitDropDownList() { //BLL.UnitService.InitUnitDropDownList(this.drpUnits, this.ProjectId, false); - var thisUnit = CommonService.GetIsThisUnit(); - if (thisUnit != null) - { - this.txtUnit.Text = thisUnit.UnitName; - this.UnitId = thisUnit.UnitId; - } + //var thisUnit = CommonService.GetIsThisUnit(); + //if (thisUnit != null) + //{ + // this.txtUnit.Text = thisUnit.UnitName; + // this.UnitId = thisUnit.UnitId; + //} + BLL.UnitService.InitBranchUnitDropDownList(this.drpUnit, false); BLL.ConstValue.InitConstValueDropDownList(this.drpDrillRecordType, BLL.ConstValue.Group_DrillRecordType, false); } #endregion @@ -155,8 +162,10 @@ namespace FineUIPro.Web.ZHGL.Emergency DrillCost = Funs.GetNewDecimalOrZero(this.txtDrillCost.Text.Trim()) }; //参与单位 - DrillRecordList.UnitIds = this.UnitId; - DrillRecordList.UnitNames = this.txtUnit.Text; + //DrillRecordList.UnitIds = this.UnitId; + //DrillRecordList.UnitNames = this.txtUnit.Text; + DrillRecordList.UnitIds = this.drpUnit.SelectedValue; + DrillRecordList.UnitNames = this.drpUnit.SelectedText; ////单据状态 DrillRecordList.States = BLL.Const.State_2; diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs index f88b04c..6a72a7f 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs @@ -69,13 +69,13 @@ namespace FineUIPro.Web.ZHGL.Emergency protected global::FineUIPro.DatePicker txtDrillRecordDate; /// - /// txtUnit 控件。 + /// drpUnit 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtUnit; + protected global::FineUIPro.DropDownList drpUnit; /// /// drpDrillRecordType 控件。 diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx index 883e576..0baa3a5 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx @@ -24,8 +24,8 @@ AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px" LabelAlign="right"> - <%-- - --%> + + diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs index 921e259..d71ba3f 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs @@ -37,12 +37,13 @@ namespace FineUIPro.Web.ZHGL.Emergency Funs.DropDownPageSize(this.ddlPageSize); ////权限按钮方法 this.GetButtonPower(); - var thisUnit = CommonService.GetIsThisUnit(); - if (thisUnit != null) - { - this.UnitId = thisUnit.UnitId; - } - + //var thisUnit = CommonService.GetIsThisUnit(); + //if (thisUnit != null) + //{ + // this.UnitId = thisUnit.UnitId; + //} + + BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, true); //BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true); //if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) //{ @@ -76,16 +77,16 @@ namespace FineUIPro.Web.ZHGL.Emergency + @" LEFT JOIN Sys_User AS ApproveMan ON ApproveMan.UserId=EmergencyList.ApproveMan" + @" LEFT JOIN Sys_User AS Users ON EmergencyList.CompileMan=Users.UserId WHERE 1=1 "; List listStr = new List(); - strSql += " AND EmergencyList.UnitId = @UnitId"; + //strSql += " AND EmergencyList.UnitId = @UnitId"; if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值 { - listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + //listStr.Add(new SqlParameter("@UnitId", this.UnitId)); strSql += " AND EmergencyList.States = @States"; ///状态为已完成 listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); } else { - listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + //listStr.Add(new SqlParameter("@UnitId", this.UnitId)); } if (!string.IsNullOrEmpty(this.txtEmergencyCode.Text.Trim())) @@ -93,11 +94,11 @@ namespace FineUIPro.Web.ZHGL.Emergency strSql += " AND EmergencyCode LIKE @EmergencyCode"; listStr.Add(new SqlParameter("@EmergencyCode", "%" + this.txtEmergencyCode.Text.Trim() + "%")); } - //if (this.drpUnitId.SelectedValue != BLL.Const._Null) - //{ - // strSql += " AND EmergencyList.UnitId = @UnitId"; - // listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim())); - //} + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + strSql += " AND EmergencyList.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim())); + } if (!string.IsNullOrEmpty(this.txtEmergencyName.Text.Trim())) { strSql += " AND EmergencyList.EmergencyName LIKE @EmergencyName"; @@ -260,6 +261,12 @@ namespace FineUIPro.Web.ZHGL.Emergency this.btnMenuDelete.Hidden = false; } } + //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + //{ + // btnNew.Hidden = true; + // btnMenuEdit.Hidden = true; + // btnMenuDelete.Hidden = true; + //} } #endregion diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs index 8740591..850e1e9 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs @@ -68,6 +68,15 @@ namespace FineUIPro.Web.ZHGL.Emergency /// protected global::FineUIPro.TextBox txtEmergencyCode; + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + /// /// txtEmergencyName 控件。 /// diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx index cc5284b..c782244 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx @@ -1,5 +1,6 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmergencyListEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Emergency.EmergencyListEdit" ValidateRequest="false" %> + <%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> @@ -10,53 +11,53 @@
- - - - - - - - - - - - - - - - - - - - <%-- - --%> - - - - - - - - - <%-- + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + <%-- - --%> - - - - - - - - - <%-- + --%> + + + + + + + + + <%-- @@ -64,30 +65,30 @@ --%> - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs index d431a8b..502df7c 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs @@ -21,20 +21,20 @@ namespace FineUIPro.Web.ZHGL.Emergency ViewState["EmergencyListId"] = value; } } - /// - /// 单位 - /// - public string UnitId - { - get - { - return (string)ViewState["UnitId"]; - } - set - { - ViewState["UnitId"] = value; - } - } + ///// + ///// 单位 + ///// + //public string UnitId + //{ + // get + // { + // return (string)ViewState["UnitId"]; + // } + // set + // { + // ViewState["UnitId"] = value; + // } + //} #endregion #region 加载 @@ -47,7 +47,7 @@ namespace FineUIPro.Web.ZHGL.Emergency { if (!IsPostBack) { - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.InitDropDownList(); this.EmergencyListId = Request.Params["EmergencyListId"]; @@ -56,26 +56,31 @@ namespace FineUIPro.Web.ZHGL.Emergency Model.Emergency_EmergencyList_Unit EmergencyList = BLL.UnitEmergencyListService.GetEmergencyListById(this.EmergencyListId); if (EmergencyList != null) { - ///读取编号 + ///读取编号 this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.EmergencyListId); this.txtEmergencyName.Text = EmergencyList.EmergencyName; - txtUnit.Text = BLL.UnitService.GetUnitNameByUnitId(EmergencyList.UnitId); if (!string.IsNullOrEmpty(EmergencyList.EmergencyTypeId)) { this.drpEmergencyType.SelectedValue = EmergencyList.EmergencyTypeId; } this.txtVersionCode.Text = EmergencyList.VersionCode; + //txtUnit.Text = BLL.UnitService.GetUnitNameByUnitId(EmergencyList.UnitId); + if (!string.IsNullOrEmpty(EmergencyList.UnitId)) + { + this.drpUnit.SelectedValue = EmergencyList.UnitId; + BLL.UserService.InitUserUnitIdDropDownList(this.drpCompileMan, drpUnit.SelectedValue, true); + } if (!string.IsNullOrEmpty(EmergencyList.CompileMan)) { this.drpCompileMan.SelectedValue = EmergencyList.CompileMan; } this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", EmergencyList.CompileDate); - + this.txtEmergencyContents.Text = HttpUtility.HtmlDecode(EmergencyList.EmergencyContents); } } else - { + { this.drpCompileMan.SelectedValue = this.CurrUser.UserId; this.txtVersionCode.Text = "V1.0"; this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); @@ -87,6 +92,9 @@ namespace FineUIPro.Web.ZHGL.Emergency ////自动生成编码 this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitEmergencyListMenuId, null, this.CurrUser.UnitId); this.txtEmergencyName.Text = this.SimpleForm1.Title; + var thisUnit = BLL.CommonService.GetIsThisUnit(); + this.drpUnit.SelectedValue = thisUnit.UnitId; + BLL.UserService.InitUserUnitIdDropDownList(this.drpCompileMan, thisUnit.UnitId, true); } ///初始化审核菜单 @@ -97,23 +105,35 @@ namespace FineUIPro.Web.ZHGL.Emergency } } #endregion - + /// /// 初始化下拉框 /// private void InitDropDownList() { - var thisUnit = CommonService.GetIsThisUnit(); - if (thisUnit != null) - { - this.txtUnit.Text = thisUnit.UnitName; - this.UnitId = thisUnit.UnitId; - } - // BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); - BLL.UserService.InitUserUnitIdDropDownList(this.drpCompileMan, this.UnitId, true); + //var thisUnit = CommonService.GetIsThisUnit(); + //if (thisUnit != null) + //{ + // //this.txtUnit.Text = thisUnit.UnitName; + // this.UnitId = thisUnit.UnitId; + //} + //BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); + //BLL.UserService.InitUserUnitIdDropDownList(this.drpCompileMan, this.UnitId, true); + BLL.UnitService.InitBranchUnitDropDownList(this.drpUnit, false); BLL.EmergencyTypeService.InitEmergencyTypeDropDownList(this.drpEmergencyType, true); } + /// + /// 单位下拉加载 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + //整理人 + BLL.UserService.InitUserUnitIdDropDownList(this.drpCompileMan, this.drpUnit.SelectedValue, true); + } + #region 保存 /// /// 保存按钮 @@ -121,7 +141,7 @@ namespace FineUIPro.Web.ZHGL.Emergency /// /// protected void btnSave_Click(object sender, EventArgs e) - { + { this.SaveData(BLL.Const.BtnSave); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } @@ -150,23 +170,27 @@ namespace FineUIPro.Web.ZHGL.Emergency { Model.Emergency_EmergencyList_Unit EmergencyList = new Model.Emergency_EmergencyList_Unit { - UnitId = this.UnitId, + //UnitId = this.UnitId, EmergencyCode = this.txtEmergencyCode.Text.Trim(), EmergencyName = this.txtEmergencyName.Text.Trim() }; - + + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + EmergencyList.UnitId = this.drpUnit.SelectedValue; + } if (this.drpEmergencyType.SelectedValue != BLL.Const._Null) { EmergencyList.EmergencyTypeId = this.drpEmergencyType.SelectedValue; } EmergencyList.VersionCode = this.txtVersionCode.Text.Trim(); EmergencyList.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim()); - if (this.drpCompileMan.SelectedValue!=BLL.Const._Null) + if (this.drpCompileMan.SelectedValue != BLL.Const._Null) { EmergencyList.CompileMan = this.drpCompileMan.SelectedValue; } EmergencyList.EmergencyContents = HttpUtility.HtmlEncode(this.txtEmergencyContents.Text); - + ////单据状态 EmergencyList.States = BLL.Const.State_2; //if (type == BLL.Const.BtnSubmit) @@ -203,7 +227,7 @@ namespace FineUIPro.Web.ZHGL.Emergency { SaveData(BLL.Const.BtnSave); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EmergencyListAttachUrl&menuId={1}", EmergencyListId,BLL.Const.UnitEmergencyListMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EmergencyListAttachUrl&menuId={1}", EmergencyListId, BLL.Const.UnitEmergencyListMenuId))); } #endregion } diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs index 9936dc2..2f17145 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs @@ -78,13 +78,13 @@ namespace FineUIPro.Web.ZHGL.Emergency protected global::FineUIPro.TextBox txtVersionCode; /// - /// txtUnit 控件。 + /// drpUnit 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtUnit; + protected global::FineUIPro.DropDownList drpUnit; /// /// drpCompileMan 控件。 diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx index e600b75..7df5f13 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx @@ -5,7 +5,7 @@ - 安全隐患 + 隐患 + + +
+ + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.cs new file mode 100644 index 0000000..dc9f7d7 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.cs @@ -0,0 +1,659 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class SuperviseCheckReportFinalizeEdit : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string SuperviseCheckReportId + { + get + { + return (string)ViewState["SuperviseCheckReportId"]; + } + set + { + ViewState["SuperviseCheckReportId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List superviseCheckReportItems = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //hdItemId.Text = string.Empty; + hdAttachUrl.Text = string.Empty; + hdId.Text = string.Empty; + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + superviseCheckReportItems.Clear(); + if (Request.Params["type"] != "-1") + { + ////权限按钮方法 + this.GetButtonPower(); + } + + BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, true); + BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); + BLL.UnitService.InitBranchUnitDropDownList(this.ddlCheckUnitId, false); + Funs.FineUIPleaseSelect(this.drpCheckMainType); + //Funs.FineUIPleaseSelect(this.drpCheckType); + this.SuperviseCheckReportId = Request.Params["SuperviseCheckReportId"]; + var superviseCheckReport = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + if (superviseCheckReport != null) + { + this.txtSuperviseCheckReportCode.Text = superviseCheckReport.SuperviseCheckReportCode; + if (superviseCheckReport.CheckDate != null) + { + this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", superviseCheckReport.CheckDate); + } + if (!string.IsNullOrWhiteSpace(superviseCheckReport.CheckMainType)) + { + this.drpCheckMainType.SelectedValue = superviseCheckReport.CheckMainType; + BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, superviseCheckReport.CheckMainType, false); + } + if (!string.IsNullOrWhiteSpace(superviseCheckReport.CheckType)) + { + this.drpCheckType.SelectedValue = superviseCheckReport.CheckType; + } + if (!string.IsNullOrWhiteSpace(superviseCheckReport.ProjectId)) + { + this.ddlProjectId.SelectedValue = superviseCheckReport.ProjectId; + + this.ddlUnitId.Items.Clear(); + BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); + if (!string.IsNullOrWhiteSpace(superviseCheckReport.UnitId)) + { + this.ddlUnitId.SelectedValue = superviseCheckReport.UnitId; + } + } + if (!string.IsNullOrWhiteSpace(superviseCheckReport.CheckUnitId)) + { + this.ddlCheckUnitId.SelectedValue = superviseCheckReport.CheckUnitId; + } + this.txtCheckTeam.Text = superviseCheckReport.CheckTeam; + superviseCheckReportItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == this.SuperviseCheckReportId orderby x.RectifyCode select x).ToList(); + + + //var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + //if (report != null && report.IsIssued == "1") //已下发 + //{ + // this.btnSave.Hidden = true; + // this.btnSelect.Hidden = true; + // Grid1.Columns[10].Hidden = true; + //} + } + else + { + var thisUnit = BLL.CommonService.GetIsThisUnit(); + this.ddlCheckUnitId.SelectedValue = thisUnit.UnitId; + this.txtCheckTeam.Text = BLL.UnitService.GetUnitNameByUnitId(this.CurrUser.UnitId) + this.CurrUser.UserName; + this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + //Grid1.DataSource = superviseCheckReportItems; + //Grid1.DataBind(); + //GetCheckItem(); + } + } + /// + /// 检查大类下拉加载 + /// + /// + /// + protected void drpCheckMainType_SelectedIndexChanged(object sender, EventArgs e) + { + //检查类别 + BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, this.drpCheckMainType.SelectedValue, false); + } + + //private void GetCheckItem() + //{ + // for (int i = 0; i < Grid1.Rows.Count; i++) + // { + // var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == Grid1.Rows[i].Values[7].ToString()); + // if (item != null) + // { + // CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); + // if (item.IsSelected == true) + // { + // //Grid1.Rows[i].Values[6] = "True"; + // checkField.SetCheckedState(i, true); + // } + // } + // } + //} + #endregion + + #region Grid行点击事件 + ///// + ///// Grid行事件 + ///// + ///// + ///// + //protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + //{ + // string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + // if (e.CommandName == "IsSelected") + // { + // CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); + // if (checkField.GetCheckedState(e.RowIndex)) + // { + // hdId.Text = rowID; + // PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdAttachUrl.ClientID) + // + Window1.GetShowReference("ShowFileUpload.aspx")); + // } + // } + // if (e.CommandName == "Attach") + // { + // var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == Grid1.Rows[e.RowIndex].Values[7].ToString()); + // if (item != null) + // { + // PageBase.ShowFileEvent(item.AttachUrl); + // } + // } + + // if (e.CommandName == "Delete") + // { + // //jerqueSaveList(); + // //superviseCheckReportItems = (from x in superviseCheckReportItems where x.SuperviseCheckReportItemId != rowID select x).ToList(); + // //Grid1.DataSource = superviseCheckReportItems; + // //Grid1.DataBind(); + // GetCheckItem(); + + // ShowNotify("删除数据成功!", MessageBoxIcon.Success); + // } + //} + #endregion + + #region 选择按钮 + ///// + ///// 选择按钮 + ///// + ///// + ///// + //protected void btnSelect_Click(object sender, EventArgs e) + //{ + // jerqueSaveList(); + // string lists = string.Empty; + // foreach (var item in superviseCheckReportItems) + // { + // lists += item.RectifyItemId + ","; + // } + // if (!string.IsNullOrWhiteSpace(lists)) + // { + // lists = lists.Substring(0, lists.LastIndexOf(",")); + // } + + // string type = this.drpCheckMainType.SelectedValue; + // string window = String.Format("ShowRectifyItem.aspx?lists={0}&type={1}", lists, type, "选择 - "); + // PageContext.RegisterStartupScript(Window2.GetSaveStateReference(hdItemId.ClientID) + // + Window2.GetShowReference(window)); + //} + #endregion + + #region 关闭窗口 + ///// + ///// 关闭窗口 + ///// + ///// + ///// + //protected void Window2_Close(object sender, EventArgs e) + //{ + // if (!string.IsNullOrWhiteSpace(hdItemId.Text)) + // { + // if (superviseCheckReportItems.Count == 0) + // { + // List itemIds = hdItemId.Text.Split(',').ToList(); + // var rectifyItem = from x in Funs.DB.View_Technique_RectifyItem where itemIds.Contains(x.RectifyItemId) orderby x.RectifyCode select x; + // foreach (var item in rectifyItem) + // { + // Model.View_Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.View_Supervise_SuperviseCheckReportItem + // { + // SuperviseCheckReportItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReportItem)), + // SuperviseCheckReportId = this.SuperviseCheckReportId, + // RectifyItemId = item.RectifyItemId, + // HazardSourcePoint = item.HazardSourcePoint, + // RiskAnalysis = item.RiskAnalysis, + // RiskPrevention = item.RiskPrevention, + // SimilarRisk = item.SimilarRisk, + // RectifyName = item.RectifyName, + // RectifyCode = item.RectifyCode, + // IsSelected = false + // }; + // superviseCheckReportItems.Add(superviseCheckReportItem); + // } + // } + // else + // { + // List itemIds = hdItemId.Text.Split(',').ToList(); + // List superviseCheckReportItemsRectifyItemIds = superviseCheckReportItems.Select(x => x.RectifyItemId).ToList(); + // foreach (var item in itemIds) + // { + // if (!superviseCheckReportItemsRectifyItemIds.Contains(item)) + // { + // var rectifyItem = (from x in Funs.DB.View_Technique_RectifyItem where x.RectifyItemId == item orderby x.RectifyCode select x).FirstOrDefault(); + // if (rectifyItem != null) + // { + // Model.View_Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.View_Supervise_SuperviseCheckReportItem + // { + // SuperviseCheckReportItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReportItem)), + // SuperviseCheckReportId = this.SuperviseCheckReportId, + // RectifyItemId = rectifyItem.RectifyItemId, + // HazardSourcePoint = rectifyItem.HazardSourcePoint, + // RiskAnalysis = rectifyItem.RiskAnalysis, + // RiskPrevention = rectifyItem.RiskPrevention, + // SimilarRisk = rectifyItem.SimilarRisk, + // RectifyName = rectifyItem.RectifyName, + // RectifyCode = rectifyItem.RectifyCode, + // IsSelected = false + // }; + // superviseCheckReportItems.Add(superviseCheckReportItem); + // } + // } + // } + // superviseCheckReportItems = (from x in superviseCheckReportItems + // join y in Funs.DB.View_Technique_RectifyItem + // on x.RectifyItemId equals y.RectifyItemId + // orderby y.RectifyCode + // select x).ToList(); + // } + // Grid1.DataSource = superviseCheckReportItems; + // Grid1.DataBind(); + // hdItemId.Text = string.Empty; + // } + //} + #endregion + + #region 保存按钮 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.drpCheckMainType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查大类不能为空!", MessageBoxIcon.Warning); + return; + } + if (this.drpCheckType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning); + return; + } + if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查单位不能为空!", MessageBoxIcon.Warning); + return; + } + Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport + { + SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim() + }; + if (!string.IsNullOrWhiteSpace(this.dpkCheckDate.Text.Trim())) + { + superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim()); + } + if (this.drpCheckType.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckType = this.drpCheckType.SelectedValue; + } + if (this.drpCheckMainType.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckMainType = this.drpCheckMainType.SelectedValue; + } + if (this.ddlProjectId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue; + } + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.UnitId = this.ddlUnitId.SelectedValue; + } + if (this.ddlCheckUnitId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckUnitId = this.ddlCheckUnitId.SelectedValue; + } + superviseCheckReport.CheckTeam = this.txtCheckTeam.Text.Trim(); + superviseCheckReport.IsIssued = "1"; + if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId)) + { + superviseCheckReport.SuperviseCheckReportId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReport)); + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId; + BLL.SuperviseCheckReportService.AddSuperviseCheckReport(superviseCheckReport); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnAdd); + } + else + { + var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + if (report.IsIssued == "1") //已下发 + { + ShowNotify("已下发检查整改,无法修改!", MessageBoxIcon.Warning); + return; + } + superviseCheckReport.SuperviseCheckReportId = this.SuperviseCheckReportId; + BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(superviseCheckReport); + BLL.SuperviseCheckReportItemService.DeleteSuperviseCheckReportItemBySuperviseCheckReportId(this.SuperviseCheckReportId); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnModify); + } + //jerqueSaveList(); + foreach (var item in superviseCheckReportItems) + { + Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.Supervise_SuperviseCheckReportItem + { + SuperviseCheckReportItemId = item.SuperviseCheckReportItemId, + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId, + RectifyItemId = item.RectifyItemId, + IsSelected = item.IsSelected, + AttachUrl = item.AttachUrl + }; + BLL.SuperviseCheckReportItemService.AddSuperviseCheckReportItem(superviseCheckReportItem); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + //jerqueSaveList(); + if (!string.IsNullOrWhiteSpace(hdAttachUrl.Text)) + { + var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == hdId.Text); + item.AttachUrl = hdAttachUrl.Text; + item.AttachUrlName = hdAttachUrl.Text.Substring((hdAttachUrl.Text.LastIndexOf("~") + 1), (hdAttachUrl.Text.Length - hdAttachUrl.Text.LastIndexOf("~") - 1)); + } + //Grid1.DataSource = superviseCheckReportItems; + //Grid1.DataBind(); + //GetCheckItem(); + hdId.Text = string.Empty; + hdAttachUrl.Text = string.Empty; + } + #endregion + + #region 保存集合 + ///// + ///// 保存集合 + ///// + //private void jerqueSaveList() + //{ + // for (int i = 0; i < Grid1.Rows.Count; i++) + // { + // if (Grid1.Rows[i].Values[7] != null && Grid1.Rows[i].Values[7].ToString() != "") + // { + // var item = superviseCheckReportItems.FirstOrDefault(e => e.SuperviseCheckReportItemId == Grid1.Rows[i].Values[7].ToString()); + // //item.IsSelected = ((System.Web.UI.WebControls.CheckBox)(Grid1.Rows[i].FindControl("ckbIsSelected"))).Checked; + // CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); + // item.IsSelected = checkField.GetCheckedState(i); + // item.AttachUrl = Grid1.Rows[i].Values[8].ToString(); + // } + // } + //} + #endregion + + #region 验证检查编号是否存在 + /// + /// 验证检查编号是否存在 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + var standard = Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(x => x.SuperviseCheckReportCode == this.txtSuperviseCheckReportCode.Text.Trim() && (x.SuperviseCheckReportId != this.SuperviseCheckReportId || (this.SuperviseCheckReportId == null && x.SuperviseCheckReportId != null))); + if (standard != null) + { + ShowNotify("输入的检查编号已存在!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SuperviseCheckReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + + protected void ddlProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.ddlUnitId.Items.Clear(); + BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); + } + + #region 报告报告 + /// + /// 报告报告 + /// + /// + /// + protected void btnSubRec_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId)) + { + if (this.drpCheckMainType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查大类不能为空!", MessageBoxIcon.Warning); + return; + } + if (this.drpCheckType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning); + return; + } + if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查单位不能为空!", MessageBoxIcon.Warning); + return; + } + Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport + { + SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim() + }; + if (!string.IsNullOrWhiteSpace(this.dpkCheckDate.Text.Trim())) + { + superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim()); + } + if (this.drpCheckMainType.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckMainType = this.drpCheckMainType.SelectedValue; + } + if (this.drpCheckType.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckType = this.drpCheckType.SelectedValue; + } + if (this.ddlProjectId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue; + } + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.UnitId = this.ddlUnitId.SelectedValue; + } + if (this.ddlCheckUnitId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckUnitId = this.ddlCheckUnitId.SelectedValue; + } + + superviseCheckReport.CheckTeam = this.txtCheckTeam.Text.Trim(); + if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId)) + { + superviseCheckReport.SuperviseCheckReportId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReport)); + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId; + BLL.SuperviseCheckReportService.AddSuperviseCheckReport(superviseCheckReport); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnAdd); + this.SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId; + } + else + { + var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + if (report.IsIssued == "1") //已下发 + { + ShowNotify("已下发检查整改,无法修改!", MessageBoxIcon.Warning); + return; + } + superviseCheckReport.SuperviseCheckReportId = this.SuperviseCheckReportId; + BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(superviseCheckReport); + BLL.SuperviseCheckReportItemService.DeleteSuperviseCheckReportItemBySuperviseCheckReportId(this.SuperviseCheckReportId); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnModify); + } + //jerqueSaveList(); + foreach (var item in superviseCheckReportItems) + { + Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.Supervise_SuperviseCheckReportItem + { + SuperviseCheckReportItemId = item.SuperviseCheckReportItemId, + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId, + RectifyItemId = item.RectifyItemId, + IsSelected = item.IsSelected, + AttachUrl = item.AttachUrl + }; + BLL.SuperviseCheckReportItemService.AddSuperviseCheckReportItem(superviseCheckReportItem); + } + } + + if (!string.IsNullOrWhiteSpace(this.SuperviseCheckReportId)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SubUnitCheckRectifyEdit.aspx?SuperviseCheckReportId={0}", this.SuperviseCheckReportId, "编辑 - "))); + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId)) + { + if (this.drpCheckMainType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查大类不能为空!", MessageBoxIcon.Warning); + return; + } + if (this.drpCheckType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning); + return; + } + if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查单位不能为空!", MessageBoxIcon.Warning); + return; + } + Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport + { + SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim() + }; + if (!string.IsNullOrWhiteSpace(this.dpkCheckDate.Text.Trim())) + { + superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim()); + } + if (this.drpCheckMainType.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckMainType = this.drpCheckMainType.SelectedValue; + } + if (this.drpCheckType.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckType = this.drpCheckType.SelectedValue; + } + if (this.ddlProjectId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue; + } + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.UnitId = this.ddlUnitId.SelectedValue; + } + if (this.ddlCheckUnitId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckUnitId = this.ddlCheckUnitId.SelectedValue; + } + + superviseCheckReport.CheckTeam = this.txtCheckTeam.Text.Trim(); + if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId)) + { + superviseCheckReport.SuperviseCheckReportId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReport)); + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId; + BLL.SuperviseCheckReportService.AddSuperviseCheckReport(superviseCheckReport); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnAdd); + } + else + { + var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + if (report.IsIssued == "1") //已下发 + { + ShowNotify("已下发检查整改,无法修改!", MessageBoxIcon.Warning); + return; + } + superviseCheckReport.SuperviseCheckReportId = this.SuperviseCheckReportId; + BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(superviseCheckReport); + BLL.SuperviseCheckReportItemService.DeleteSuperviseCheckReportItemBySuperviseCheckReportId(this.SuperviseCheckReportId); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnModify); + } + //jerqueSaveList(); + foreach (var item in superviseCheckReportItems) + { + Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.Supervise_SuperviseCheckReportItem + { + SuperviseCheckReportItemId = item.SuperviseCheckReportItemId, + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId, + RectifyItemId = item.RectifyItemId, + IsSelected = item.IsSelected, + AttachUrl = item.AttachUrl + }; + BLL.SuperviseCheckReportItemService.AddSuperviseCheckReportItem(superviseCheckReportItem); + } + } + if (btnSave.Hidden == true) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SuperviseCheckReportEdit&type=-1&menuId={1}", SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SuperviseCheckReportEdit&menuId={1}", SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId))); + } + + } + #endregion + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.designer.cs new file mode 100644 index 0000000..e8ae3d3 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportFinalizeEdit.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise +{ + + + public partial class SuperviseCheckReportFinalizeEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtSuperviseCheckReportCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSuperviseCheckReportCode; + + /// + /// dpkCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCheckDate; + + /// + /// drpCheckMainType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckMainType; + + /// + /// drpCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckType; + + /// + /// ddlProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlProjectId; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlCheckUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlCheckUnitId; + + /// + /// txtCheckTeam 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckTeam; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSubRec 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubRec; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdId; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdAttachUrl; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SUBQHSE/Model/APIItem/HSSE/Hazard_HazardRegisterItem.cs b/SUBQHSE/Model/APIItem/HSSE/Hazard_HazardRegisterItem.cs new file mode 100644 index 0000000..fb7f1e0 --- /dev/null +++ b/SUBQHSE/Model/APIItem/HSSE/Hazard_HazardRegisterItem.cs @@ -0,0 +1,245 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Model +{ + public class Hazard_HazardRegisterItem + { + /// + /// 巡检ID + /// + public string HazardRegisterId + { + get; + set; + } + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + /// + /// 编制日期 + /// + public DateTime? RegisterDate + { + get; + set; + } + /// + /// 问题描述 + /// + public string RegisterDef + { + get; + set; + } + /// + /// 整改措施 -反馈 + /// + public string Rectification + { + get; + set; + } + /// + /// 区域名称 + /// + public string WorkAreaName + { + get; + set; + } + /// + /// 责任单位-名称 + /// + public string ResponsibilityUnitName + { + get; + set; + } + /// + /// 责任单位-社会信用码 + /// + public string ResponsibilityUnitCollCropCode + { + get; + set; + } + /// + /// 风险等级 + /// + public string Risk_Level + { + get; + set; + } + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + /// + /// 项目名称 + /// + public string ProjectName + { + get; + set; + } + /// + /// 状态 + /// + public string States + { + get; + set; + } + /// + /// 状态名称 + /// + public string StatesStr + { + get; + set; + } + /// + ///责任人 -名称 + /// + public string ResponsibilityManName + { + get; + set; + } + /// + /// 检查人姓名 + /// + public string CheckManName + { + get; + set; + } + /// + /// 检查时间 + /// + public DateTime? CheckTime + { + get; + set; + } + /// + /// 整改期限 + /// + public DateTime? RectificationPeriod + { + get; + set; + } + /// + /// 整改前照片 + /// + public string ImageUrl + { + get; + set; + } + /// + ///整改前照片附件字节 + /// + + public List ImageUrlFileContext + { + get; + set; + } + /// + /// 整改后照片 + /// + public string RectificationImageUrl + { + get; + set; + } + /// + ///整改后照片附件字节 + /// + + public List RectificationImageUrlFileContext + { + get; + set; + } + /// + /// 整改时间 + /// + public DateTime? RectificationTime + { + get; + set; + } + /// + /// 确认人名称 + /// + public string ConfirmManName + { + get; + set; + } + /// + /// 确认时间 + /// + public DateTime? ConfirmDate + { + get; + set; + } + /// + /// 复检问题描述 + /// + public string HandleIdea + { + get; + set; + } + /// + /// 处罚金额 + /// + public int CutPayment + { + get; + set; + } + /// + /// 巡检类型(D-日 W-周 M-月) + /// + public string CheckCycle + { + get; + set; + } + /// + /// 问题类型名称 + /// + public string RegisterTypesName + { + get; + set; + } + /// + /// 整改要求 + /// + public string Requirements + { + get; + set; + } + } +} diff --git a/SUBQHSE/Model/APIItem/HSSE/LargeEngineeringItem.cs b/SUBQHSE/Model/APIItem/HSSE/LargeEngineeringItem.cs new file mode 100644 index 0000000..fe65e56 --- /dev/null +++ b/SUBQHSE/Model/APIItem/HSSE/LargeEngineeringItem.cs @@ -0,0 +1,159 @@ +using System; + + +namespace Model +{ + public class LargeEngineeringItem + { + //// + /// 主键ID + /// + public string Id { get; set; } + + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + + /// + /// 责任单位-社会信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 数据日期 + /// + public DateTime? DataDate + { + get; + set; + } + /// + /// 附件路径 + /// + public string AttachFile + { + get; + set; + } + /// + /// 方案名称 + /// + public string HazardName + { + get; + set; + } + /// + /// 类型 + /// + public string TypeName + { + get; + set; + } + /// + /// 超危大工程 + /// + public bool? IsSuperLargerHazard + { + get; + set; + } + + /// + /// 专家论证 + /// + public bool? IsArgument + { + get; + set; + } + + /// + /// 地点 + /// + public string Address + { + get; + set; + } + /// + /// 描述 + /// + public string Descriptions + { + get; + set; + } + /// + /// 培训人数 + /// + public int? TrainPersonNum + { + get; + set; + } + /// + /// 培训人数 + /// + public int? OperativesNum + { + get; + set; + } + + /// + /// 编制时间 + /// + public DateTime? RecordTime + { + get; + set; + } + + /// + /// 预计施工时间 + /// + public DateTime? ExpectedTime + { + get; + set; + } + /// + /// 状态(0 已取消 1 未开始 2 作业中 3 已完工 ) + /// + public string States + { + get; + set; + } + /// + /// 状态字符串(0 已取消 1 未开始 2 作业中 3 已完工 ) + /// + public string StatesStr + { + get; + set; + } + + + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/APIItem/HSSE/ProjectLicenseItem.cs b/SUBQHSE/Model/APIItem/HSSE/ProjectLicenseItem.cs new file mode 100644 index 0000000..5b7b2b2 --- /dev/null +++ b/SUBQHSE/Model/APIItem/HSSE/ProjectLicenseItem.cs @@ -0,0 +1,147 @@ +using System; +namespace Model +{ + public class ProjectLicenseItem + { + //// + /// 主键ID + /// + public string Id { get; set; } + + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + + /// + /// 责任单位-社会信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 数据日期 + /// + public DateTime? DataDate + { + get; + set; + } + /// + /// 附件路径 + /// + public string AttachFile + { + get; + set; + } + /// + /// 许可证编号 + /// + public string LicenseManagerCode + { + get; + set; + } + /// + /// 申请单位id + /// + public string UnitId + { + get; + set; + } + /// + /// 申请单位名称 + /// + public string UnitName + { + get; + set; + } + + /// + /// 类型名称 + /// + public string LicenseTypeName + { + get; + set; + } + + /// + /// 单位类型名称 + /// + public string UnitTypeName + { + get; + set; + } + /// + /// 是否高风险作业 + /// + public bool? IsHighRisk + { + get; + set; + } + /// + /// 单位工程 + /// + public string WorkAreaName + { + get; + set; + } + + /// + /// 申请日期 + /// + public DateTime? CompileDate + { + get; + set; + } + + /// + /// 开始时间 + /// + public DateTime? StartDate + { + get; + set; + } + /// + /// 结束时间 + /// + public DateTime? EndDate + { + get; + set; + } + /// + /// 状态 + /// + public string WorkStatesStr + { + get; + set; + } + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/APIItem/HSSE/ProjectSecurityRiskItem.cs b/SUBQHSE/Model/APIItem/HSSE/ProjectSecurityRiskItem.cs new file mode 100644 index 0000000..3d9b8e2 --- /dev/null +++ b/SUBQHSE/Model/APIItem/HSSE/ProjectSecurityRiskItem.cs @@ -0,0 +1,188 @@ +using System; +namespace Model +{ + public class ProjectSecurityRiskItem + { + //// + /// 主键ID + /// + public string Id { get; set; } + + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + + /// + /// 责任单位-社会信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 数据日期 + /// + public DateTime? DataDate + { + get; + set; + } + /// + /// 附件路径 + /// + public string AttachFile + { + get; + set; + } + /// + /// 单位工程 + /// + public string WorkAreaName + { + get; + set; + } + /// + /// 工作阶段 + /// + public string WorkStageName + { + get; + set; + } + /// + /// 危险源类别 + /// + public string SupHazardListType + { + get; + set; + } + + /// + /// 危险源项 + /// + public string HazardListType + { + get; + set; + } + + /// + /// 危险源代码 + /// + public string Hazard + { + get; + set; + } + /// + /// 危险因素明细 + /// + public string HazardItems + { + get; + set; + } + /// + /// 缺陷类型 + /// + public string DefectsType + { + get; + set; + } + + /// + /// 可能导致的事故 + /// + public string MayLeadAccidents + { + get; + set; + } + + /// + /// 辅助方法 + /// + public string HelperMethod + { + get; + set; + } + /// + /// 危险评价(L) + /// + public decimal? HazardJudge_L + { + get; + set; + } + /// + /// 危险评价(E) + /// + public decimal? HazardJudge_E + { + get; + set; + } + /// + /// 危险评价(C) + /// + public decimal? HazardJudge_C + { + get; + set; + } + + /// + /// 危险评价(D) + /// + public decimal? HazardJudge_D + { + get; + set; + } + /// + /// 危险级别 + /// + public int? RiskLevel + { + get; + set; + } + /// + /// 危险级别 + /// + public string RiskLevelName + { + get; + set; + } + /// + /// 控制措施 + /// + public string ControlMeasures + { + get; + set; + } + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/APIItem/HSSE/QCRegistrationItem.cs b/SUBQHSE/Model/APIItem/HSSE/QCRegistrationItem.cs new file mode 100644 index 0000000..fd0a593 --- /dev/null +++ b/SUBQHSE/Model/APIItem/HSSE/QCRegistrationItem.cs @@ -0,0 +1,163 @@ +using System; +namespace Model{ + public class QCRegistrationItem + { + //// + /// 主键ID + /// + public string Id { get; set; } + + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + + /// + /// 责任单位-社会信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 数据日期 + /// + public DateTime? DataDate + { + get; + set; + } + /// + /// 附件文件路径 + /// + public string AttachFile + { + get; + set; + } + /// + /// 编号 + /// + public string Code + { + get; + set; + } + /// + /// 名称 + /// + public string Name + { + get; + set; + } + /// + /// 编制人 + /// + public string CompileManName + { + get; + set; + } + + /// + /// 编制时间 + /// + public DateTime? CompileDate + { + get; + set; + } + + /// + /// 所属公司 + /// + public string UnitName + { + get; + set; + } + /// + /// 所属公司社会统一信用代码 + /// + public string UnitCollCropCode + { + get; + set; + } + /// + /// 课题 + /// + public string Subjects + { + get; + set; + } + + /// + /// 过程 + /// + public string Process + { + get; + set; + } + + /// + /// 成果 + /// + public string Achievement + { + get; + set; + } + /// + /// 奖项名称 + /// + public string AwardName + { + get; + set; + } + /// + /// 奖项类型 + /// + public string AwardType + { + get; + set; + } + /// + /// 获奖等级(1-国家、2-省部、3-企业) + /// + public string AwardLevel + { + get; + set; + } + /// + /// 颁奖单位 + /// + public string AwardingUnit + { + get; + set; + } + + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/APIItem/HSSE/QualityProblemItem.cs b/SUBQHSE/Model/APIItem/HSSE/QualityProblemItem.cs new file mode 100644 index 0000000..5c395d7 --- /dev/null +++ b/SUBQHSE/Model/APIItem/HSSE/QualityProblemItem.cs @@ -0,0 +1,132 @@ +using System; +namespace Model +{ + public class QualityProblemItem + { + //// + /// 主键ID + /// + public string Id { get; set; } + + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + + /// + /// 责任单位-社会信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 数据日期 + /// + public DateTime? DataDate + { + get; + set; + } + /// + /// 巡检日期 + /// + public DateTime? CheckDate + { + get; + set; + } + /// + /// 单位工程名称 + /// + public string UnitWorkName + { + get; + set; + } + /// + /// 施工单位 + /// + public string UnitName + { + get; + set; + } + /// + /// 专业 + /// + public string ProfessionalName + { + get; + set; + } + + /// + /// 问题类别 + /// + public string QuestionType + { + get; + set; + } + + /// + /// 整改前图片路径 + /// + public string ImageUrl + { + get; + set; + } + /// + /// 整改后图片路径 + /// + public string RectificationImageUrl + { + get; + set; + } + /// + /// 部位 + /// + public string CheckSite + { + get; + set; + } + + /// + /// 状态(1已整改-待复查验收 2已闭环 3超期未整改 4 待整改) + /// + public string States + { + get; + set; + } + + /// + /// 状态(1已整改-待复查验收 2已闭环 3超期未整改 4 待整改) + /// + public string StatesStr + { + get; + set; + } + + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/APIItem/SuperviseCheckReportDetailItem.cs b/SUBQHSE/Model/APIItem/SuperviseCheckReportDetailItem.cs new file mode 100644 index 0000000..2ef4c60 --- /dev/null +++ b/SUBQHSE/Model/APIItem/SuperviseCheckReportDetailItem.cs @@ -0,0 +1,82 @@ +using System; +namespace Model +{ + public class SuperviseCheckReportDetailItem + { + //// + /// 主键ID + /// + public string Id { get; set; } + + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + + /// + /// 责任单位-社会信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 数据日期 + /// + public DateTime? DataDate + { + get; + set; + } + /// + /// 附件路径 + /// + public string AttachFile + { + get; + set; + } + + /// + /// 申请单位id + /// + public string UnitId + { + get; + set; + } + /// + /// 申请单位名称 + /// + public string UnitName + { + get; + set; + } + + public string SuperviseCheckReportId { get; set; } + public string RectifyItemId { get; set; } + public bool? IsSelected { get; set; } + public string HazardSourcePoint { get; set; } + public string RiskAnalysis { get; set; } + public string RiskPrevention { get; set; } + public string SimilarRisk { get; set; } + public string RectifyName { get; set; } + public string RectifyCode { get; set; } + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/APIItem/SuperviseCheckReportItem.cs b/SUBQHSE/Model/APIItem/SuperviseCheckReportItem.cs new file mode 100644 index 0000000..7d20113 --- /dev/null +++ b/SUBQHSE/Model/APIItem/SuperviseCheckReportItem.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; + +namespace Model +{ + public class SuperviseCheckReportItem + { + //// + /// 主键ID + /// + public string Id { get; set; } + + /// + /// 来源单位Id + /// + public string SourceUnitId + { + get; + set; + } + + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + + /// + /// 责任单位-社会信用码 + /// + public string CollCropCode + { + get; + set; + } + + /// + /// 数据日期 + /// + public DateTime? DataDate + { + get; + set; + } + /// + /// 附件路径 + /// + public string AttachFile + { + get; + set; + } + + /// + /// 申请单位id + /// + public string UnitId + { + get; + set; + } + /// + /// 申请单位名称 + /// + public string UnitName + { + get; + set; + } + + + + public string SuperviseCheckReportCode { get; set; } + public DateTime? CheckDate { get; set; } + public string CheckTeam { get; set; } + public string CheckType { get; set; } + public string CheckTypeName { get; set; } + public string CheckMainType { get; set; } + public string CheckMainTypeName { get; set; } + public string CheckUnitId { get; set; } + public string CheckUnitName { get; set; } + public List SuperviseCheckReportDetail { get; set; } + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/Model.cs b/SUBQHSE/Model/Model.cs index 6daa770..1f74829 100644 --- a/SUBQHSE/Model/Model.cs +++ b/SUBQHSE/Model/Model.cs @@ -230,6 +230,9 @@ namespace Model partial void InsertBase_SpecialSchemeType(Base_SpecialSchemeType instance); partial void UpdateBase_SpecialSchemeType(Base_SpecialSchemeType instance); partial void DeleteBase_SpecialSchemeType(Base_SpecialSchemeType instance); + partial void InsertBase_SuperviseCheckType(Base_SuperviseCheckType instance); + partial void UpdateBase_SuperviseCheckType(Base_SuperviseCheckType instance); + partial void DeleteBase_SuperviseCheckType(Base_SuperviseCheckType instance); partial void InsertBase_TemperatureSet(Base_TemperatureSet instance); partial void UpdateBase_TemperatureSet(Base_TemperatureSet instance); partial void DeleteBase_TemperatureSet(Base_TemperatureSet instance); @@ -539,6 +542,9 @@ namespace Model partial void InsertComprehensive_ContactList(Comprehensive_ContactList instance); partial void UpdateComprehensive_ContactList(Comprehensive_ContactList instance); partial void DeleteComprehensive_ContactList(Comprehensive_ContactList instance); + partial void InsertComprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure instance); + partial void UpdateComprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure instance); + partial void DeleteComprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure instance); partial void InsertComprehensive_DataDistribution(Comprehensive_DataDistribution instance); partial void UpdateComprehensive_DataDistribution(Comprehensive_DataDistribution instance); partial void DeleteComprehensive_DataDistribution(Comprehensive_DataDistribution instance); @@ -626,9 +632,15 @@ namespace Model partial void InsertComprehensive_QualityAccidentApprove(Comprehensive_QualityAccidentApprove instance); partial void UpdateComprehensive_QualityAccidentApprove(Comprehensive_QualityAccidentApprove instance); partial void DeleteComprehensive_QualityAccidentApprove(Comprehensive_QualityAccidentApprove instance); + partial void InsertComprehensive_QualityAssurance(Comprehensive_QualityAssurance instance); + partial void UpdateComprehensive_QualityAssurance(Comprehensive_QualityAssurance instance); + partial void DeleteComprehensive_QualityAssurance(Comprehensive_QualityAssurance instance); partial void InsertComprehensive_QualitySampleFirstAccFile(Comprehensive_QualitySampleFirstAccFile instance); partial void UpdateComprehensive_QualitySampleFirstAccFile(Comprehensive_QualitySampleFirstAccFile instance); partial void DeleteComprehensive_QualitySampleFirstAccFile(Comprehensive_QualitySampleFirstAccFile instance); + partial void InsertComprehensive_ReviewDrawings(Comprehensive_ReviewDrawings instance); + partial void UpdateComprehensive_ReviewDrawings(Comprehensive_ReviewDrawings instance); + partial void DeleteComprehensive_ReviewDrawings(Comprehensive_ReviewDrawings instance); partial void InsertComprehensive_SiteVisaManagement(Comprehensive_SiteVisaManagement instance); partial void UpdateComprehensive_SiteVisaManagement(Comprehensive_SiteVisaManagement instance); partial void DeleteComprehensive_SiteVisaManagement(Comprehensive_SiteVisaManagement instance); @@ -2048,6 +2060,9 @@ namespace Model partial void InsertPW_WeldingProcedure(PW_WeldingProcedure instance); partial void UpdatePW_WeldingProcedure(PW_WeldingProcedure instance); partial void DeletePW_WeldingProcedure(PW_WeldingProcedure instance); + partial void InsertQCManage_QCGroupRegistration(QCManage_QCGroupRegistration instance); + partial void UpdateQCManage_QCGroupRegistration(QCManage_QCGroupRegistration instance); + partial void DeleteQCManage_QCGroupRegistration(QCManage_QCGroupRegistration instance); partial void InsertQualityAudit_EquipmentPersonQuality(QualityAudit_EquipmentPersonQuality instance); partial void UpdateQualityAudit_EquipmentPersonQuality(QualityAudit_EquipmentPersonQuality instance); partial void DeleteQualityAudit_EquipmentPersonQuality(QualityAudit_EquipmentPersonQuality instance); @@ -3501,6 +3516,14 @@ namespace Model } } + public System.Data.Linq.Table Base_SuperviseCheckType + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Base_TemperatureSet { get @@ -4325,6 +4348,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_ConTechnologyDisclosure + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_DataDistribution { get @@ -4557,6 +4588,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_QualityAssurance + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_QualitySampleFirstAccFile { get @@ -4565,6 +4604,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_ReviewDrawings + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_SiteVisaManagement { get @@ -8381,6 +8428,14 @@ namespace Model } } + public System.Data.Linq.Table QCManage_QCGroupRegistration + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table QualityAudit_EquipmentPersonQuality { get @@ -19772,6 +19827,8 @@ namespace Model private EntitySet _Base_DesignProfessional; + private EntitySet _Comprehensive_ConTechnologyDisclosure; + private EntitySet _Comprehensive_DataDistribution; private EntitySet _Comprehensive_DesignChangeOrder; @@ -19818,6 +19875,7 @@ namespace Model { this._Comprehensive_InspectionMachine = new EntitySet(new Action(this.attach_Comprehensive_InspectionMachine), new Action(this.detach_Comprehensive_InspectionMachine)); this._Base_DesignProfessional = new EntitySet(new Action(this.attach_Base_DesignProfessional), new Action(this.detach_Base_DesignProfessional)); + this._Comprehensive_ConTechnologyDisclosure = new EntitySet(new Action(this.attach_Comprehensive_ConTechnologyDisclosure), new Action(this.detach_Comprehensive_ConTechnologyDisclosure)); this._Comprehensive_DataDistribution = new EntitySet(new Action(this.attach_Comprehensive_DataDistribution), new Action(this.detach_Comprehensive_DataDistribution)); this._Comprehensive_DesignChangeOrder = new EntitySet(new Action(this.attach_Comprehensive_DesignChangeOrder), new Action(this.detach_Comprehensive_DesignChangeOrder)); this._Comprehensive_DesignDrawings = new EntitySet(new Action(this.attach_Comprehensive_DesignDrawings), new Action(this.detach_Comprehensive_DesignDrawings)); @@ -19941,6 +19999,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Base_CNProfessional", Storage="_Comprehensive_ConTechnologyDisclosure", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_ConTechnologyDisclosure + { + get + { + return this._Comprehensive_ConTechnologyDisclosure; + } + set + { + this._Comprehensive_ConTechnologyDisclosure.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DataDistribution_Base_CNProfessional", Storage="_Comprehensive_DataDistribution", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] public EntitySet Comprehensive_DataDistribution { @@ -20167,6 +20238,18 @@ namespace Model entity.Base_CNProfessional = null; } + private void attach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Base_CNProfessional = this; + } + + private void detach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Base_CNProfessional = null; + } + private void attach_Comprehensive_DataDistribution(Comprehensive_DataDistribution entity) { this.SendPropertyChanging(); @@ -27742,6 +27825,8 @@ namespace Model private EntitySet _InformationProject_ConstructionStandardIdentify; + private EntitySet _Comprehensive_ConTechnologyDisclosure; + private EntitySet _Comprehensive_DataDistribution; private EntitySet _Comprehensive_DataReceiving; @@ -27768,6 +27853,8 @@ namespace Model private EntitySet _Comprehensive_QualityAccident; + private EntitySet _Comprehensive_QualityAssurance; + private EntitySet _Comprehensive_SiteVisaManagement; private EntitySet _Comprehensive_SpecialEquipment; @@ -28438,6 +28525,7 @@ namespace Model this._Check_TechnicalContactList = new EntitySet(new Action(this.attach_Check_TechnicalContactList), new Action(this.detach_Check_TechnicalContactList)); this._Check_ViolationPerson = new EntitySet(new Action(this.attach_Check_ViolationPerson), new Action(this.detach_Check_ViolationPerson)); this._InformationProject_ConstructionStandardIdentify = new EntitySet(new Action(this.attach_InformationProject_ConstructionStandardIdentify), new Action(this.detach_InformationProject_ConstructionStandardIdentify)); + this._Comprehensive_ConTechnologyDisclosure = new EntitySet(new Action(this.attach_Comprehensive_ConTechnologyDisclosure), new Action(this.detach_Comprehensive_ConTechnologyDisclosure)); this._Comprehensive_DataDistribution = new EntitySet(new Action(this.attach_Comprehensive_DataDistribution), new Action(this.detach_Comprehensive_DataDistribution)); this._Comprehensive_DataReceiving = new EntitySet(new Action(this.attach_Comprehensive_DataReceiving), new Action(this.detach_Comprehensive_DataReceiving)); this._Comprehensive_DesignChangeOrder = new EntitySet(new Action(this.attach_Comprehensive_DesignChangeOrder), new Action(this.detach_Comprehensive_DesignChangeOrder)); @@ -28451,6 +28539,7 @@ namespace Model this._Comprehensive_NCRManagement = new EntitySet(new Action(this.attach_Comprehensive_NCRManagement), new Action(this.detach_Comprehensive_NCRManagement)); this._Comprehensive_PressurePipe = new EntitySet(new Action(this.attach_Comprehensive_PressurePipe), new Action(this.detach_Comprehensive_PressurePipe)); this._Comprehensive_QualityAccident = new EntitySet(new Action(this.attach_Comprehensive_QualityAccident), new Action(this.detach_Comprehensive_QualityAccident)); + this._Comprehensive_QualityAssurance = new EntitySet(new Action(this.attach_Comprehensive_QualityAssurance), new Action(this.detach_Comprehensive_QualityAssurance)); this._Comprehensive_SiteVisaManagement = new EntitySet(new Action(this.attach_Comprehensive_SiteVisaManagement), new Action(this.detach_Comprehensive_SiteVisaManagement)); this._Comprehensive_SpecialEquipment = new EntitySet(new Action(this.attach_Comprehensive_SpecialEquipment), new Action(this.detach_Comprehensive_SpecialEquipment)); this._Comprehensive_TrainingRecords = new EntitySet(new Action(this.attach_Comprehensive_TrainingRecords), new Action(this.detach_Comprehensive_TrainingRecords)); @@ -30182,6 +30271,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Base_Project", Storage="_Comprehensive_ConTechnologyDisclosure", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_ConTechnologyDisclosure + { + get + { + return this._Comprehensive_ConTechnologyDisclosure; + } + set + { + this._Comprehensive_ConTechnologyDisclosure.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DataDistribution_Base_Project", Storage="_Comprehensive_DataDistribution", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Comprehensive_DataDistribution { @@ -30351,6 +30453,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_QualityAssurance_Base_Project", Storage="_Comprehensive_QualityAssurance", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_QualityAssurance + { + get + { + return this._Comprehensive_QualityAssurance; + } + set + { + this._Comprehensive_QualityAssurance.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_SiteVisaManagement_Base_Project", Storage="_Comprehensive_SiteVisaManagement", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Comprehensive_SiteVisaManagement { @@ -34431,6 +34546,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Comprehensive_DataDistribution(Comprehensive_DataDistribution entity) { this.SendPropertyChanging(); @@ -34587,6 +34714,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Comprehensive_QualityAssurance(Comprehensive_QualityAssurance entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Comprehensive_QualityAssurance(Comprehensive_QualityAssurance entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Comprehensive_SiteVisaManagement(Comprehensive_SiteVisaManagement entity) { this.SendPropertyChanging(); @@ -40622,6 +40761,164 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_SuperviseCheckType")] + public partial class Base_SuperviseCheckType : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CheckTypeId; + + private string _CheckTypeCode; + + private string _CheckTypeName; + + private string _CheckMainType; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCheckTypeIdChanging(string value); + partial void OnCheckTypeIdChanged(); + partial void OnCheckTypeCodeChanging(string value); + partial void OnCheckTypeCodeChanged(); + partial void OnCheckTypeNameChanging(string value); + partial void OnCheckTypeNameChanged(); + partial void OnCheckMainTypeChanging(string value); + partial void OnCheckMainTypeChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Base_SuperviseCheckType() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTypeId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CheckTypeId + { + get + { + return this._CheckTypeId; + } + set + { + if ((this._CheckTypeId != value)) + { + this.OnCheckTypeIdChanging(value); + this.SendPropertyChanging(); + this._CheckTypeId = value; + this.SendPropertyChanged("CheckTypeId"); + this.OnCheckTypeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTypeCode", DbType="NVarChar(50)")] + public string CheckTypeCode + { + get + { + return this._CheckTypeCode; + } + set + { + if ((this._CheckTypeCode != value)) + { + this.OnCheckTypeCodeChanging(value); + this.SendPropertyChanging(); + this._CheckTypeCode = value; + this.SendPropertyChanged("CheckTypeCode"); + this.OnCheckTypeCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTypeName", DbType="NVarChar(50)")] + public string CheckTypeName + { + get + { + return this._CheckTypeName; + } + set + { + if ((this._CheckTypeName != value)) + { + this.OnCheckTypeNameChanging(value); + this.SendPropertyChanging(); + this._CheckTypeName = value; + this.SendPropertyChanged("CheckTypeName"); + this.OnCheckTypeNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckMainType", DbType="NVarChar(10)")] + public string CheckMainType + { + get + { + return this._CheckMainType; + } + set + { + if ((this._CheckMainType != value)) + { + this.OnCheckMainTypeChanging(value); + this.SendPropertyChanging(); + this._CheckMainType = value; + this.SendPropertyChanged("CheckMainType"); + this.OnCheckMainTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_TemperatureSet")] public partial class Base_TemperatureSet : INotifyPropertyChanging, INotifyPropertyChanged { @@ -41978,6 +42275,8 @@ namespace Model private EntitySet _Check_ViolationPerson; + private EntitySet _Comprehensive_ConTechnologyDisclosure; + private EntitySet _Comprehensive_GeneralPlanApproval; private EntitySet _Comprehensive_GeneralPlanApprovalItem; @@ -42429,6 +42728,7 @@ namespace Model this._Check_SupervisionNotice = new EntitySet(new Action(this.attach_Check_SupervisionNotice), new Action(this.detach_Check_SupervisionNotice)); this._Check_TechnicalContactList = new EntitySet(new Action(this.attach_Check_TechnicalContactList), new Action(this.detach_Check_TechnicalContactList)); this._Check_ViolationPerson = new EntitySet(new Action(this.attach_Check_ViolationPerson), new Action(this.detach_Check_ViolationPerson)); + this._Comprehensive_ConTechnologyDisclosure = new EntitySet(new Action(this.attach_Comprehensive_ConTechnologyDisclosure), new Action(this.detach_Comprehensive_ConTechnologyDisclosure)); this._Comprehensive_GeneralPlanApproval = new EntitySet(new Action(this.attach_Comprehensive_GeneralPlanApproval), new Action(this.detach_Comprehensive_GeneralPlanApproval)); this._Comprehensive_GeneralPlanApprovalItem = new EntitySet(new Action(this.attach_Comprehensive_GeneralPlanApprovalItem), new Action(this.detach_Comprehensive_GeneralPlanApprovalItem)); this._Comprehensive_InspectionEquipment = new EntitySet(new Action(this.attach_Comprehensive_InspectionEquipment), new Action(this.detach_Comprehensive_InspectionEquipment)); @@ -43573,6 +43873,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Base_Unit", Storage="_Comprehensive_ConTechnologyDisclosure", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_ConTechnologyDisclosure + { + get + { + return this._Comprehensive_ConTechnologyDisclosure; + } + set + { + this._Comprehensive_ConTechnologyDisclosure.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_GeneralPlanApproval_Base_Unit", Storage="_Comprehensive_GeneralPlanApproval", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Comprehensive_GeneralPlanApproval { @@ -46279,6 +46592,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Comprehensive_GeneralPlanApproval(Comprehensive_GeneralPlanApproval entity) { this.SendPropertyChanging(); @@ -59898,6 +60223,8 @@ namespace Model private string _SaveHandleMan; + private System.Nullable _IsUpdate; + private EntityRef _Base_Project; private EntityRef _Sys_User; @@ -59954,6 +60281,8 @@ namespace Model partial void OnProposeUnitIdChanged(); partial void OnSaveHandleManChanging(string value); partial void OnSaveHandleManChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); #endregion public Check_CheckControl() @@ -60432,6 +60761,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckControl_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -90998,6 +91347,544 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_ConTechnologyDisclosure")] + public partial class Comprehensive_ConTechnologyDisclosure : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ConTechnologyDisclosureId; + + private string _ProjectId; + + private string _CNProfessionalId; + + private string _DisclosureCode; + + private string _DisclosureName; + + private string _UnitId; + + private string _DisclosureMan; + + private System.Nullable _DisclosureDate; + + private string _UnitWorkId; + + private string _AttendMan; + + private System.Nullable _DisclosurePersonNum; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private System.Nullable _RemarkCode; + + private EntityRef _Base_CNProfessional; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnConTechnologyDisclosureIdChanging(string value); + partial void OnConTechnologyDisclosureIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnCNProfessionalIdChanging(string value); + partial void OnCNProfessionalIdChanged(); + partial void OnDisclosureCodeChanging(string value); + partial void OnDisclosureCodeChanged(); + partial void OnDisclosureNameChanging(string value); + partial void OnDisclosureNameChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnDisclosureManChanging(string value); + partial void OnDisclosureManChanged(); + partial void OnDisclosureDateChanging(System.Nullable value); + partial void OnDisclosureDateChanged(); + partial void OnUnitWorkIdChanging(string value); + partial void OnUnitWorkIdChanged(); + partial void OnAttendManChanging(string value); + partial void OnAttendManChanged(); + partial void OnDisclosurePersonNumChanging(System.Nullable value); + partial void OnDisclosurePersonNumChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnRemarkCodeChanging(System.Nullable value); + partial void OnRemarkCodeChanged(); + #endregion + + public Comprehensive_ConTechnologyDisclosure() + { + this._Base_CNProfessional = default(EntityRef); + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConTechnologyDisclosureId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ConTechnologyDisclosureId + { + get + { + return this._ConTechnologyDisclosureId; + } + set + { + if ((this._ConTechnologyDisclosureId != value)) + { + this.OnConTechnologyDisclosureIdChanging(value); + this.SendPropertyChanging(); + this._ConTechnologyDisclosureId = value; + this.SendPropertyChanged("ConTechnologyDisclosureId"); + this.OnConTechnologyDisclosureIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CNProfessionalId", DbType="NVarChar(50)")] + public string CNProfessionalId + { + get + { + return this._CNProfessionalId; + } + set + { + if ((this._CNProfessionalId != value)) + { + if (this._Base_CNProfessional.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCNProfessionalIdChanging(value); + this.SendPropertyChanging(); + this._CNProfessionalId = value; + this.SendPropertyChanged("CNProfessionalId"); + this.OnCNProfessionalIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisclosureCode", DbType="NVarChar(50)")] + public string DisclosureCode + { + get + { + return this._DisclosureCode; + } + set + { + if ((this._DisclosureCode != value)) + { + this.OnDisclosureCodeChanging(value); + this.SendPropertyChanging(); + this._DisclosureCode = value; + this.SendPropertyChanged("DisclosureCode"); + this.OnDisclosureCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisclosureName", DbType="NVarChar(50)")] + public string DisclosureName + { + get + { + return this._DisclosureName; + } + set + { + if ((this._DisclosureName != value)) + { + this.OnDisclosureNameChanging(value); + this.SendPropertyChanging(); + this._DisclosureName = value; + this.SendPropertyChanged("DisclosureName"); + this.OnDisclosureNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisclosureMan", DbType="NVarChar(50)")] + public string DisclosureMan + { + get + { + return this._DisclosureMan; + } + set + { + if ((this._DisclosureMan != value)) + { + this.OnDisclosureManChanging(value); + this.SendPropertyChanging(); + this._DisclosureMan = value; + this.SendPropertyChanged("DisclosureMan"); + this.OnDisclosureManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisclosureDate", DbType="DateTime")] + public System.Nullable DisclosureDate + { + get + { + return this._DisclosureDate; + } + set + { + if ((this._DisclosureDate != value)) + { + this.OnDisclosureDateChanging(value); + this.SendPropertyChanging(); + this._DisclosureDate = value; + this.SendPropertyChanged("DisclosureDate"); + this.OnDisclosureDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(500)")] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this.OnUnitWorkIdChanging(value); + this.SendPropertyChanging(); + this._UnitWorkId = value; + this.SendPropertyChanged("UnitWorkId"); + this.OnUnitWorkIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttendMan", DbType="NVarChar(100)")] + public string AttendMan + { + get + { + return this._AttendMan; + } + set + { + if ((this._AttendMan != value)) + { + this.OnAttendManChanging(value); + this.SendPropertyChanging(); + this._AttendMan = value; + this.SendPropertyChanged("AttendMan"); + this.OnAttendManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisclosurePersonNum", DbType="Int")] + public System.Nullable DisclosurePersonNum + { + get + { + return this._DisclosurePersonNum; + } + set + { + if ((this._DisclosurePersonNum != value)) + { + this.OnDisclosurePersonNumChanging(value); + this.SendPropertyChanging(); + this._DisclosurePersonNum = value; + this.SendPropertyChanged("DisclosurePersonNum"); + this.OnDisclosurePersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode + { + get + { + return this._RemarkCode; + } + set + { + if ((this._RemarkCode != value)) + { + this.OnRemarkCodeChanging(value); + this.SendPropertyChanging(); + this._RemarkCode = value; + this.SendPropertyChanged("RemarkCode"); + this.OnRemarkCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] + public Base_CNProfessional Base_CNProfessional + { + get + { + return this._Base_CNProfessional.Entity; + } + set + { + Base_CNProfessional previousValue = this._Base_CNProfessional.Entity; + if (((previousValue != value) + || (this._Base_CNProfessional.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_CNProfessional.Entity = null; + previousValue.Comprehensive_ConTechnologyDisclosure.Remove(this); + } + this._Base_CNProfessional.Entity = value; + if ((value != null)) + { + value.Comprehensive_ConTechnologyDisclosure.Add(this); + this._CNProfessionalId = value.CNProfessionalId; + } + else + { + this._CNProfessionalId = default(string); + } + this.SendPropertyChanged("Base_CNProfessional"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Comprehensive_ConTechnologyDisclosure.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Comprehensive_ConTechnologyDisclosure.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Comprehensive_ConTechnologyDisclosure.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Comprehensive_ConTechnologyDisclosure.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Comprehensive_ConTechnologyDisclosure.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Comprehensive_ConTechnologyDisclosure.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DataDistribution")] public partial class Comprehensive_DataDistribution : INotifyPropertyChanging, INotifyPropertyChanged { @@ -97144,6 +98031,8 @@ namespace Model private System.Nullable _IsCheckOK; + private string _SType; + private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -97196,6 +98085,8 @@ namespace Model partial void OnStatusChanged(); partial void OnIsCheckOKChanging(System.Nullable value); partial void OnIsCheckOKChanged(); + partial void OnSTypeChanging(string value); + partial void OnSTypeChanged(); #endregion public Comprehensive_InspectionMachine() @@ -97638,6 +98529,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="sType", Storage="_SType", DbType="Char(10)")] + public string SType + { + get + { + return this._SType; + } + set + { + if ((this._SType != value)) + { + this.OnSTypeChanging(value); + this.SendPropertyChanging(); + this._SType = value; + this.SendPropertyChanged("SType"); + this.OnSTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -102749,6 +103660,318 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_QualityAssurance")] + public partial class Comprehensive_QualityAssurance : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _QualityAssuranceId; + + private string _ProjectId; + + private string _QualityAssuranceCode; + + private string _QualityAssuranceName; + + private string _QualityAssuranceType; + + private string _ContentTexts; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnQualityAssuranceIdChanging(string value); + partial void OnQualityAssuranceIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnQualityAssuranceCodeChanging(string value); + partial void OnQualityAssuranceCodeChanged(); + partial void OnQualityAssuranceNameChanging(string value); + partial void OnQualityAssuranceNameChanged(); + partial void OnQualityAssuranceTypeChanging(string value); + partial void OnQualityAssuranceTypeChanged(); + partial void OnContentTextsChanging(string value); + partial void OnContentTextsChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Comprehensive_QualityAssurance() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityAssuranceId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string QualityAssuranceId + { + get + { + return this._QualityAssuranceId; + } + set + { + if ((this._QualityAssuranceId != value)) + { + this.OnQualityAssuranceIdChanging(value); + this.SendPropertyChanging(); + this._QualityAssuranceId = value; + this.SendPropertyChanged("QualityAssuranceId"); + this.OnQualityAssuranceIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityAssuranceCode", DbType="NVarChar(50)")] + public string QualityAssuranceCode + { + get + { + return this._QualityAssuranceCode; + } + set + { + if ((this._QualityAssuranceCode != value)) + { + this.OnQualityAssuranceCodeChanging(value); + this.SendPropertyChanging(); + this._QualityAssuranceCode = value; + this.SendPropertyChanged("QualityAssuranceCode"); + this.OnQualityAssuranceCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityAssuranceName", DbType="NVarChar(100)")] + public string QualityAssuranceName + { + get + { + return this._QualityAssuranceName; + } + set + { + if ((this._QualityAssuranceName != value)) + { + this.OnQualityAssuranceNameChanging(value); + this.SendPropertyChanging(); + this._QualityAssuranceName = value; + this.SendPropertyChanged("QualityAssuranceName"); + this.OnQualityAssuranceNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityAssuranceType", DbType="NVarChar(50)")] + public string QualityAssuranceType + { + get + { + return this._QualityAssuranceType; + } + set + { + if ((this._QualityAssuranceType != value)) + { + this.OnQualityAssuranceTypeChanging(value); + this.SendPropertyChanging(); + this._QualityAssuranceType = value; + this.SendPropertyChanged("QualityAssuranceType"); + this.OnQualityAssuranceTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContentTexts", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string ContentTexts + { + get + { + return this._ContentTexts; + } + set + { + if ((this._ContentTexts != value)) + { + this.OnContentTextsChanging(value); + this.SendPropertyChanging(); + this._ContentTexts = value; + this.SendPropertyChanged("ContentTexts"); + this.OnContentTextsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_QualityAssurance_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Comprehensive_QualityAssurance.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Comprehensive_QualityAssurance.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_QualityAssurance_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Comprehensive_QualityAssurance.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Comprehensive_QualityAssurance.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_QualitySampleFirstAccFile")] public partial class Comprehensive_QualitySampleFirstAccFile : INotifyPropertyChanging, INotifyPropertyChanged { @@ -103003,6 +104226,332 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_ReviewDrawings")] + public partial class Comprehensive_ReviewDrawings : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _DraCode; + + private string _CNProfessionalId; + + private System.Nullable _ReviewDate; + + private string _UnitWorkId; + + private string _ReceiveUnits; + + private string _Status; + + private string _Remarks; + + private string _CreateMan; + + private System.Nullable _CreateDate; + + private System.Nullable _RemarkCode; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnDraCodeChanging(string value); + partial void OnDraCodeChanged(); + partial void OnCNProfessionalIdChanging(string value); + partial void OnCNProfessionalIdChanged(); + partial void OnReviewDateChanging(System.Nullable value); + partial void OnReviewDateChanged(); + partial void OnUnitWorkIdChanging(string value); + partial void OnUnitWorkIdChanged(); + partial void OnReceiveUnitsChanging(string value); + partial void OnReceiveUnitsChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnRemarksChanging(string value); + partial void OnRemarksChanged(); + partial void OnCreateManChanging(string value); + partial void OnCreateManChanged(); + partial void OnCreateDateChanging(System.Nullable value); + partial void OnCreateDateChanged(); + partial void OnRemarkCodeChanging(System.Nullable value); + partial void OnRemarkCodeChanged(); + #endregion + + public Comprehensive_ReviewDrawings() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DraCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DraCode + { + get + { + return this._DraCode; + } + set + { + if ((this._DraCode != value)) + { + this.OnDraCodeChanging(value); + this.SendPropertyChanging(); + this._DraCode = value; + this.SendPropertyChanged("DraCode"); + this.OnDraCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CNProfessionalId", DbType="NVarChar(50)")] + public string CNProfessionalId + { + get + { + return this._CNProfessionalId; + } + set + { + if ((this._CNProfessionalId != value)) + { + this.OnCNProfessionalIdChanging(value); + this.SendPropertyChanging(); + this._CNProfessionalId = value; + this.SendPropertyChanged("CNProfessionalId"); + this.OnCNProfessionalIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewDate", DbType="DateTime")] + public System.Nullable ReviewDate + { + get + { + return this._ReviewDate; + } + set + { + if ((this._ReviewDate != value)) + { + this.OnReviewDateChanging(value); + this.SendPropertyChanging(); + this._ReviewDate = value; + this.SendPropertyChanged("ReviewDate"); + this.OnReviewDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(2000)")] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this.OnUnitWorkIdChanging(value); + this.SendPropertyChanging(); + this._UnitWorkId = value; + this.SendPropertyChanged("UnitWorkId"); + this.OnUnitWorkIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReceiveUnits", DbType="NVarChar(800)")] + public string ReceiveUnits + { + get + { + return this._ReceiveUnits; + } + set + { + if ((this._ReceiveUnits != value)) + { + this.OnReceiveUnitsChanging(value); + this.SendPropertyChanging(); + this._ReceiveUnits = value; + this.SendPropertyChanged("ReceiveUnits"); + this.OnReceiveUnitsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remarks", DbType="NVarChar(500)")] + public string Remarks + { + get + { + return this._Remarks; + } + set + { + if ((this._Remarks != value)) + { + this.OnRemarksChanging(value); + this.SendPropertyChanging(); + this._Remarks = value; + this.SendPropertyChanged("Remarks"); + this.OnRemarksChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateMan", DbType="NVarChar(50)")] + public string CreateMan + { + get + { + return this._CreateMan; + } + set + { + if ((this._CreateMan != value)) + { + this.OnCreateManChanging(value); + this.SendPropertyChanging(); + this._CreateMan = value; + this.SendPropertyChanged("CreateMan"); + this.OnCreateManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateDate", DbType="DateTime")] + public System.Nullable CreateDate + { + get + { + return this._CreateDate; + } + set + { + if ((this._CreateDate != value)) + { + this.OnCreateDateChanging(value); + this.SendPropertyChanging(); + this._CreateDate = value; + this.SendPropertyChanged("CreateDate"); + this.OnCreateDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode + { + get + { + return this._RemarkCode; + } + set + { + if ((this._RemarkCode != value)) + { + this.OnRemarkCodeChanging(value); + this.SendPropertyChanging(); + this._RemarkCode = value; + this.SendPropertyChanged("RemarkCode"); + this.OnRemarkCodeChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_SiteVisaManagement")] public partial class Comprehensive_SiteVisaManagement : INotifyPropertyChanging, INotifyPropertyChanged { @@ -128029,6 +129578,30 @@ namespace Model private System.Nullable _SubdivisionalWorksAcceptOKNum; + private System.Nullable _InspectionMachineNum; + + private System.Nullable _InspectionMachineQualifiedNum; + + private System.Nullable _ComprehensiveReviewDrawingsNum; + + private System.Nullable _ComprehensiveConTechnologyDisclosureNum; + + private System.Nullable _ComprehensiveConTechnologyDisclosurePersonNum; + + private System.Nullable _UnitCheckNum; + + private System.Nullable _UnitCheckClosedNum; + + private System.Nullable _UnitCheckNotClosedNum; + + private System.Nullable _BranchCheckNum; + + private System.Nullable _BranchCheckClosedNum; + + private System.Nullable _BranchCheckNotClosedNum; + + private System.Nullable _ProjectSubPersonNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -128145,6 +129718,30 @@ namespace Model partial void OnSubdivisionalWorksAcceptNumChanged(); partial void OnSubdivisionalWorksAcceptOKNumChanging(System.Nullable value); partial void OnSubdivisionalWorksAcceptOKNumChanged(); + partial void OnInspectionMachineNumChanging(System.Nullable value); + partial void OnInspectionMachineNumChanged(); + partial void OnInspectionMachineQualifiedNumChanging(System.Nullable value); + partial void OnInspectionMachineQualifiedNumChanged(); + partial void OnComprehensiveReviewDrawingsNumChanging(System.Nullable value); + partial void OnComprehensiveReviewDrawingsNumChanged(); + partial void OnComprehensiveConTechnologyDisclosureNumChanging(System.Nullable value); + partial void OnComprehensiveConTechnologyDisclosureNumChanged(); + partial void OnComprehensiveConTechnologyDisclosurePersonNumChanging(System.Nullable value); + partial void OnComprehensiveConTechnologyDisclosurePersonNumChanged(); + partial void OnUnitCheckNumChanging(System.Nullable value); + partial void OnUnitCheckNumChanged(); + partial void OnUnitCheckClosedNumChanging(System.Nullable value); + partial void OnUnitCheckClosedNumChanged(); + partial void OnUnitCheckNotClosedNumChanging(System.Nullable value); + partial void OnUnitCheckNotClosedNumChanged(); + partial void OnBranchCheckNumChanging(System.Nullable value); + partial void OnBranchCheckNumChanged(); + partial void OnBranchCheckClosedNumChanging(System.Nullable value); + partial void OnBranchCheckClosedNumChanged(); + partial void OnBranchCheckNotClosedNumChanging(System.Nullable value); + partial void OnBranchCheckNotClosedNumChanged(); + partial void OnProjectSubPersonNumChanging(System.Nullable value); + partial void OnProjectSubPersonNumChanged(); #endregion public CQMSData_CQMS() @@ -129272,6 +130869,246 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineNum", DbType="Int")] + public System.Nullable InspectionMachineNum + { + get + { + return this._InspectionMachineNum; + } + set + { + if ((this._InspectionMachineNum != value)) + { + this.OnInspectionMachineNumChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineNum = value; + this.SendPropertyChanged("InspectionMachineNum"); + this.OnInspectionMachineNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineQualifiedNum", DbType="Int")] + public System.Nullable InspectionMachineQualifiedNum + { + get + { + return this._InspectionMachineQualifiedNum; + } + set + { + if ((this._InspectionMachineQualifiedNum != value)) + { + this.OnInspectionMachineQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineQualifiedNum = value; + this.SendPropertyChanged("InspectionMachineQualifiedNum"); + this.OnInspectionMachineQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensiveReviewDrawingsNum", DbType="Int")] + public System.Nullable ComprehensiveReviewDrawingsNum + { + get + { + return this._ComprehensiveReviewDrawingsNum; + } + set + { + if ((this._ComprehensiveReviewDrawingsNum != value)) + { + this.OnComprehensiveReviewDrawingsNumChanging(value); + this.SendPropertyChanging(); + this._ComprehensiveReviewDrawingsNum = value; + this.SendPropertyChanged("ComprehensiveReviewDrawingsNum"); + this.OnComprehensiveReviewDrawingsNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensiveConTechnologyDisclosureNum", DbType="Int")] + public System.Nullable ComprehensiveConTechnologyDisclosureNum + { + get + { + return this._ComprehensiveConTechnologyDisclosureNum; + } + set + { + if ((this._ComprehensiveConTechnologyDisclosureNum != value)) + { + this.OnComprehensiveConTechnologyDisclosureNumChanging(value); + this.SendPropertyChanging(); + this._ComprehensiveConTechnologyDisclosureNum = value; + this.SendPropertyChanged("ComprehensiveConTechnologyDisclosureNum"); + this.OnComprehensiveConTechnologyDisclosureNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensiveConTechnologyDisclosurePersonNum", DbType="Int")] + public System.Nullable ComprehensiveConTechnologyDisclosurePersonNum + { + get + { + return this._ComprehensiveConTechnologyDisclosurePersonNum; + } + set + { + if ((this._ComprehensiveConTechnologyDisclosurePersonNum != value)) + { + this.OnComprehensiveConTechnologyDisclosurePersonNumChanging(value); + this.SendPropertyChanging(); + this._ComprehensiveConTechnologyDisclosurePersonNum = value; + this.SendPropertyChanged("ComprehensiveConTechnologyDisclosurePersonNum"); + this.OnComprehensiveConTechnologyDisclosurePersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitCheckNum", DbType="Int")] + public System.Nullable UnitCheckNum + { + get + { + return this._UnitCheckNum; + } + set + { + if ((this._UnitCheckNum != value)) + { + this.OnUnitCheckNumChanging(value); + this.SendPropertyChanging(); + this._UnitCheckNum = value; + this.SendPropertyChanged("UnitCheckNum"); + this.OnUnitCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitCheckClosedNum", DbType="Int")] + public System.Nullable UnitCheckClosedNum + { + get + { + return this._UnitCheckClosedNum; + } + set + { + if ((this._UnitCheckClosedNum != value)) + { + this.OnUnitCheckClosedNumChanging(value); + this.SendPropertyChanging(); + this._UnitCheckClosedNum = value; + this.SendPropertyChanged("UnitCheckClosedNum"); + this.OnUnitCheckClosedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitCheckNotClosedNum", DbType="Int")] + public System.Nullable UnitCheckNotClosedNum + { + get + { + return this._UnitCheckNotClosedNum; + } + set + { + if ((this._UnitCheckNotClosedNum != value)) + { + this.OnUnitCheckNotClosedNumChanging(value); + this.SendPropertyChanging(); + this._UnitCheckNotClosedNum = value; + this.SendPropertyChanged("UnitCheckNotClosedNum"); + this.OnUnitCheckNotClosedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchCheckNum", DbType="Int")] + public System.Nullable BranchCheckNum + { + get + { + return this._BranchCheckNum; + } + set + { + if ((this._BranchCheckNum != value)) + { + this.OnBranchCheckNumChanging(value); + this.SendPropertyChanging(); + this._BranchCheckNum = value; + this.SendPropertyChanged("BranchCheckNum"); + this.OnBranchCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchCheckClosedNum", DbType="Int")] + public System.Nullable BranchCheckClosedNum + { + get + { + return this._BranchCheckClosedNum; + } + set + { + if ((this._BranchCheckClosedNum != value)) + { + this.OnBranchCheckClosedNumChanging(value); + this.SendPropertyChanging(); + this._BranchCheckClosedNum = value; + this.SendPropertyChanged("BranchCheckClosedNum"); + this.OnBranchCheckClosedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchCheckNotClosedNum", DbType="Int")] + public System.Nullable BranchCheckNotClosedNum + { + get + { + return this._BranchCheckNotClosedNum; + } + set + { + if ((this._BranchCheckNotClosedNum != value)) + { + this.OnBranchCheckNotClosedNumChanging(value); + this.SendPropertyChanging(); + this._BranchCheckNotClosedNum = value; + this.SendPropertyChanged("BranchCheckNotClosedNum"); + this.OnBranchCheckNotClosedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectSubPersonNum", DbType="Int")] + public System.Nullable ProjectSubPersonNum + { + get + { + return this._ProjectSubPersonNum; + } + set + { + if ((this._ProjectSubPersonNum != value)) + { + this.OnProjectSubPersonNumChanging(value); + this.SendPropertyChanging(); + this._ProjectSubPersonNum = value; + this.SendPropertyChanged("ProjectSubPersonNum"); + this.OnProjectSubPersonNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -170752,6 +172589,8 @@ namespace Model private string _QRCodeAttachUrl; + private System.Nullable _IsUpdate; + private EntitySet _Hazard_PatrolPlan; #region 可扩展性方法定义 @@ -170810,6 +172649,8 @@ namespace Model partial void OnPlanExistDateChanged(); partial void OnQRCodeAttachUrlChanging(string value); partial void OnQRCodeAttachUrlChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); #endregion public Hazard_HazardSelectedItem() @@ -171338,6 +173179,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Hazard_PatrolPlan_Hazard_HazardSelectedItem", Storage="_Hazard_PatrolPlan", ThisKey="HazardSelectedItemId", OtherKey="HazardSelectedItemId", DeleteRule="NO ACTION")] public EntitySet Hazard_PatrolPlan { @@ -203075,6 +204936,30 @@ namespace Model private System.Nullable _CompanyDrillPersonNum; + private System.Nullable _BranchComprehensivePlanNum; + + private System.Nullable _BranchSpecialPlanNum; + + private System.Nullable _BranchOnSiteDisposalPlan; + + private System.Nullable _BranchDrillNum; + + private System.Nullable _BranchDrillPersonNum; + + private System.Nullable _QualityPersonNum; + + private System.Nullable _BranchLeadShiftCheckNum; + + private System.Nullable _BranchComprehensiveCheckNum; + + private System.Nullable _BranchSpecialCheckNum; + + private System.Nullable _OperativesNum; + + private System.Nullable _SuperOperativesNum; + + private System.Nullable _ProjectSubFullTimeNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -203247,6 +205132,30 @@ namespace Model partial void OnProjectDrillPersonNumChanged(); partial void OnCompanyDrillPersonNumChanging(System.Nullable value); partial void OnCompanyDrillPersonNumChanged(); + partial void OnBranchComprehensivePlanNumChanging(System.Nullable value); + partial void OnBranchComprehensivePlanNumChanged(); + partial void OnBranchSpecialPlanNumChanging(System.Nullable value); + partial void OnBranchSpecialPlanNumChanged(); + partial void OnBranchOnSiteDisposalPlanChanging(System.Nullable value); + partial void OnBranchOnSiteDisposalPlanChanged(); + partial void OnBranchDrillNumChanging(System.Nullable value); + partial void OnBranchDrillNumChanged(); + partial void OnBranchDrillPersonNumChanging(System.Nullable value); + partial void OnBranchDrillPersonNumChanged(); + partial void OnQualityPersonNumChanging(System.Nullable value); + partial void OnQualityPersonNumChanged(); + partial void OnBranchLeadShiftCheckNumChanging(System.Nullable value); + partial void OnBranchLeadShiftCheckNumChanged(); + partial void OnBranchComprehensiveCheckNumChanging(System.Nullable value); + partial void OnBranchComprehensiveCheckNumChanged(); + partial void OnBranchSpecialCheckNumChanging(System.Nullable value); + partial void OnBranchSpecialCheckNumChanged(); + partial void OnOperativesNumChanging(System.Nullable value); + partial void OnOperativesNumChanged(); + partial void OnSuperOperativesNumChanging(System.Nullable value); + partial void OnSuperOperativesNumChanged(); + partial void OnProjectSubFullTimeNumChanging(System.Nullable value); + partial void OnProjectSubFullTimeNumChanged(); #endregion public HSSEData_HSSE() @@ -204934,6 +206843,246 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchComprehensivePlanNum", DbType="Int")] + public System.Nullable BranchComprehensivePlanNum + { + get + { + return this._BranchComprehensivePlanNum; + } + set + { + if ((this._BranchComprehensivePlanNum != value)) + { + this.OnBranchComprehensivePlanNumChanging(value); + this.SendPropertyChanging(); + this._BranchComprehensivePlanNum = value; + this.SendPropertyChanged("BranchComprehensivePlanNum"); + this.OnBranchComprehensivePlanNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchSpecialPlanNum", DbType="Int")] + public System.Nullable BranchSpecialPlanNum + { + get + { + return this._BranchSpecialPlanNum; + } + set + { + if ((this._BranchSpecialPlanNum != value)) + { + this.OnBranchSpecialPlanNumChanging(value); + this.SendPropertyChanging(); + this._BranchSpecialPlanNum = value; + this.SendPropertyChanged("BranchSpecialPlanNum"); + this.OnBranchSpecialPlanNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchOnSiteDisposalPlan", DbType="Int")] + public System.Nullable BranchOnSiteDisposalPlan + { + get + { + return this._BranchOnSiteDisposalPlan; + } + set + { + if ((this._BranchOnSiteDisposalPlan != value)) + { + this.OnBranchOnSiteDisposalPlanChanging(value); + this.SendPropertyChanging(); + this._BranchOnSiteDisposalPlan = value; + this.SendPropertyChanged("BranchOnSiteDisposalPlan"); + this.OnBranchOnSiteDisposalPlanChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchDrillNum", DbType="Int")] + public System.Nullable BranchDrillNum + { + get + { + return this._BranchDrillNum; + } + set + { + if ((this._BranchDrillNum != value)) + { + this.OnBranchDrillNumChanging(value); + this.SendPropertyChanging(); + this._BranchDrillNum = value; + this.SendPropertyChanged("BranchDrillNum"); + this.OnBranchDrillNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchDrillPersonNum", DbType="Int")] + public System.Nullable BranchDrillPersonNum + { + get + { + return this._BranchDrillPersonNum; + } + set + { + if ((this._BranchDrillPersonNum != value)) + { + this.OnBranchDrillPersonNumChanging(value); + this.SendPropertyChanging(); + this._BranchDrillPersonNum = value; + this.SendPropertyChanged("BranchDrillPersonNum"); + this.OnBranchDrillPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityPersonNum", DbType="Int")] + public System.Nullable QualityPersonNum + { + get + { + return this._QualityPersonNum; + } + set + { + if ((this._QualityPersonNum != value)) + { + this.OnQualityPersonNumChanging(value); + this.SendPropertyChanging(); + this._QualityPersonNum = value; + this.SendPropertyChanged("QualityPersonNum"); + this.OnQualityPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchLeadShiftCheckNum", DbType="Int")] + public System.Nullable BranchLeadShiftCheckNum + { + get + { + return this._BranchLeadShiftCheckNum; + } + set + { + if ((this._BranchLeadShiftCheckNum != value)) + { + this.OnBranchLeadShiftCheckNumChanging(value); + this.SendPropertyChanging(); + this._BranchLeadShiftCheckNum = value; + this.SendPropertyChanged("BranchLeadShiftCheckNum"); + this.OnBranchLeadShiftCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchComprehensiveCheckNum", DbType="Int")] + public System.Nullable BranchComprehensiveCheckNum + { + get + { + return this._BranchComprehensiveCheckNum; + } + set + { + if ((this._BranchComprehensiveCheckNum != value)) + { + this.OnBranchComprehensiveCheckNumChanging(value); + this.SendPropertyChanging(); + this._BranchComprehensiveCheckNum = value; + this.SendPropertyChanged("BranchComprehensiveCheckNum"); + this.OnBranchComprehensiveCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchSpecialCheckNum", DbType="Int")] + public System.Nullable BranchSpecialCheckNum + { + get + { + return this._BranchSpecialCheckNum; + } + set + { + if ((this._BranchSpecialCheckNum != value)) + { + this.OnBranchSpecialCheckNumChanging(value); + this.SendPropertyChanging(); + this._BranchSpecialCheckNum = value; + this.SendPropertyChanged("BranchSpecialCheckNum"); + this.OnBranchSpecialCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperativesNum", DbType="Int")] + public System.Nullable OperativesNum + { + get + { + return this._OperativesNum; + } + set + { + if ((this._OperativesNum != value)) + { + this.OnOperativesNumChanging(value); + this.SendPropertyChanging(); + this._OperativesNum = value; + this.SendPropertyChanged("OperativesNum"); + this.OnOperativesNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperOperativesNum", DbType="Int")] + public System.Nullable SuperOperativesNum + { + get + { + return this._SuperOperativesNum; + } + set + { + if ((this._SuperOperativesNum != value)) + { + this.OnSuperOperativesNumChanging(value); + this.SendPropertyChanging(); + this._SuperOperativesNum = value; + this.SendPropertyChanged("SuperOperativesNum"); + this.OnSuperOperativesNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectSubFullTimeNum", DbType="Int")] + public System.Nullable ProjectSubFullTimeNum + { + get + { + return this._ProjectSubFullTimeNum; + } + set + { + if ((this._ProjectSubFullTimeNum != value)) + { + this.OnProjectSubFullTimeNumChanging(value); + this.SendPropertyChanging(); + this._ProjectSubFullTimeNum = value; + this.SendPropertyChanged("ProjectSubFullTimeNum"); + this.OnProjectSubFullTimeNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -248805,6 +250954,8 @@ namespace Model private string _LicenseCodes; + private System.Nullable _IsUpdate; + private EntityRef _Base_LicenseType; private EntityRef _Base_Project; @@ -248851,6 +251002,8 @@ namespace Model partial void OnIsHighRiskChanged(); partial void OnLicenseCodesChanging(string value); partial void OnLicenseCodesChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); #endregion public License_LicenseManager() @@ -249218,6 +251371,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LicenseManager_Base_LicenseType", Storage="_Base_LicenseType", ThisKey="LicenseTypeId", OtherKey="LicenseTypeId", IsForeignKey=true)] public Base_LicenseType Base_LicenseType { @@ -308242,6 +310415,18 @@ namespace Model private System.Nullable _SubdivisionalWorksAcceptOKNum; + private System.Nullable _InspectionMachineNum; + + private System.Nullable _InspectionMachineQualifiedNum; + + private System.Nullable _ComprehensiveReviewDrawingsNum; + + private System.Nullable _ComprehensiveConTechnologyDisclosureNum; + + private System.Nullable _ComprehensiveConTechnologyDisclosurePersonNum; + + private System.Nullable _ProjectSubPersonNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -308354,6 +310539,18 @@ namespace Model partial void OnSubdivisionalWorksAcceptNumChanged(); partial void OnSubdivisionalWorksAcceptOKNumChanging(System.Nullable value); partial void OnSubdivisionalWorksAcceptOKNumChanged(); + partial void OnInspectionMachineNumChanging(System.Nullable value); + partial void OnInspectionMachineNumChanged(); + partial void OnInspectionMachineQualifiedNumChanging(System.Nullable value); + partial void OnInspectionMachineQualifiedNumChanged(); + partial void OnComprehensiveReviewDrawingsNumChanging(System.Nullable value); + partial void OnComprehensiveReviewDrawingsNumChanged(); + partial void OnComprehensiveConTechnologyDisclosureNumChanging(System.Nullable value); + partial void OnComprehensiveConTechnologyDisclosureNumChanged(); + partial void OnComprehensiveConTechnologyDisclosurePersonNumChanging(System.Nullable value); + partial void OnComprehensiveConTechnologyDisclosurePersonNumChanged(); + partial void OnProjectSubPersonNumChanging(System.Nullable value); + partial void OnProjectSubPersonNumChanged(); #endregion public Project_CQMSData_CQMS() @@ -309441,6 +311638,126 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineNum", DbType="Int")] + public System.Nullable InspectionMachineNum + { + get + { + return this._InspectionMachineNum; + } + set + { + if ((this._InspectionMachineNum != value)) + { + this.OnInspectionMachineNumChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineNum = value; + this.SendPropertyChanged("InspectionMachineNum"); + this.OnInspectionMachineNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineQualifiedNum", DbType="Int")] + public System.Nullable InspectionMachineQualifiedNum + { + get + { + return this._InspectionMachineQualifiedNum; + } + set + { + if ((this._InspectionMachineQualifiedNum != value)) + { + this.OnInspectionMachineQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineQualifiedNum = value; + this.SendPropertyChanged("InspectionMachineQualifiedNum"); + this.OnInspectionMachineQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensiveReviewDrawingsNum", DbType="Int")] + public System.Nullable ComprehensiveReviewDrawingsNum + { + get + { + return this._ComprehensiveReviewDrawingsNum; + } + set + { + if ((this._ComprehensiveReviewDrawingsNum != value)) + { + this.OnComprehensiveReviewDrawingsNumChanging(value); + this.SendPropertyChanging(); + this._ComprehensiveReviewDrawingsNum = value; + this.SendPropertyChanged("ComprehensiveReviewDrawingsNum"); + this.OnComprehensiveReviewDrawingsNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensiveConTechnologyDisclosureNum", DbType="Int")] + public System.Nullable ComprehensiveConTechnologyDisclosureNum + { + get + { + return this._ComprehensiveConTechnologyDisclosureNum; + } + set + { + if ((this._ComprehensiveConTechnologyDisclosureNum != value)) + { + this.OnComprehensiveConTechnologyDisclosureNumChanging(value); + this.SendPropertyChanging(); + this._ComprehensiveConTechnologyDisclosureNum = value; + this.SendPropertyChanged("ComprehensiveConTechnologyDisclosureNum"); + this.OnComprehensiveConTechnologyDisclosureNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensiveConTechnologyDisclosurePersonNum", DbType="Int")] + public System.Nullable ComprehensiveConTechnologyDisclosurePersonNum + { + get + { + return this._ComprehensiveConTechnologyDisclosurePersonNum; + } + set + { + if ((this._ComprehensiveConTechnologyDisclosurePersonNum != value)) + { + this.OnComprehensiveConTechnologyDisclosurePersonNumChanging(value); + this.SendPropertyChanging(); + this._ComprehensiveConTechnologyDisclosurePersonNum = value; + this.SendPropertyChanged("ComprehensiveConTechnologyDisclosurePersonNum"); + this.OnComprehensiveConTechnologyDisclosurePersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectSubPersonNum", DbType="Int")] + public System.Nullable ProjectSubPersonNum + { + get + { + return this._ProjectSubPersonNum; + } + set + { + if ((this._ProjectSubPersonNum != value)) + { + this.OnProjectSubPersonNumChanging(value); + this.SendPropertyChanging(); + this._ProjectSubPersonNum = value; + this.SendPropertyChanged("ProjectSubPersonNum"); + this.OnProjectSubPersonNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -311234,6 +313551,30 @@ namespace Model private System.Nullable _CompanyDrillPersonNum; + private System.Nullable _BranchComprehensivePlanNum; + + private System.Nullable _BranchSpecialPlanNum; + + private System.Nullable _BranchOnSiteDisposalPlan; + + private System.Nullable _BranchDrillNum; + + private System.Nullable _BranchDrillPersonNum; + + private System.Nullable _QualityPersonNum; + + private System.Nullable _BranchLeadShiftCheckNum; + + private System.Nullable _BranchComprehensiveCheckNum; + + private System.Nullable _BranchSpecialCheckNum; + + private System.Nullable _OperativesNum; + + private System.Nullable _SuperOperativesNum; + + private System.Nullable _ProjectSubFullTimeNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -311402,6 +313743,30 @@ namespace Model partial void OnProjectDrillPersonNumChanged(); partial void OnCompanyDrillPersonNumChanging(System.Nullable value); partial void OnCompanyDrillPersonNumChanged(); + partial void OnBranchComprehensivePlanNumChanging(System.Nullable value); + partial void OnBranchComprehensivePlanNumChanged(); + partial void OnBranchSpecialPlanNumChanging(System.Nullable value); + partial void OnBranchSpecialPlanNumChanged(); + partial void OnBranchOnSiteDisposalPlanChanging(System.Nullable value); + partial void OnBranchOnSiteDisposalPlanChanged(); + partial void OnBranchDrillNumChanging(System.Nullable value); + partial void OnBranchDrillNumChanged(); + partial void OnBranchDrillPersonNumChanging(System.Nullable value); + partial void OnBranchDrillPersonNumChanged(); + partial void OnQualityPersonNumChanging(System.Nullable value); + partial void OnQualityPersonNumChanged(); + partial void OnBranchLeadShiftCheckNumChanging(System.Nullable value); + partial void OnBranchLeadShiftCheckNumChanged(); + partial void OnBranchComprehensiveCheckNumChanging(System.Nullable value); + partial void OnBranchComprehensiveCheckNumChanged(); + partial void OnBranchSpecialCheckNumChanging(System.Nullable value); + partial void OnBranchSpecialCheckNumChanged(); + partial void OnOperativesNumChanging(System.Nullable value); + partial void OnOperativesNumChanged(); + partial void OnSuperOperativesNumChanging(System.Nullable value); + partial void OnSuperOperativesNumChanged(); + partial void OnProjectSubFullTimeNumChanging(System.Nullable value); + partial void OnProjectSubFullTimeNumChanged(); #endregion public Project_HSSEData_HSSE() @@ -313049,6 +315414,246 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchComprehensivePlanNum", DbType="Int")] + public System.Nullable BranchComprehensivePlanNum + { + get + { + return this._BranchComprehensivePlanNum; + } + set + { + if ((this._BranchComprehensivePlanNum != value)) + { + this.OnBranchComprehensivePlanNumChanging(value); + this.SendPropertyChanging(); + this._BranchComprehensivePlanNum = value; + this.SendPropertyChanged("BranchComprehensivePlanNum"); + this.OnBranchComprehensivePlanNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchSpecialPlanNum", DbType="Int")] + public System.Nullable BranchSpecialPlanNum + { + get + { + return this._BranchSpecialPlanNum; + } + set + { + if ((this._BranchSpecialPlanNum != value)) + { + this.OnBranchSpecialPlanNumChanging(value); + this.SendPropertyChanging(); + this._BranchSpecialPlanNum = value; + this.SendPropertyChanged("BranchSpecialPlanNum"); + this.OnBranchSpecialPlanNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchOnSiteDisposalPlan", DbType="Int")] + public System.Nullable BranchOnSiteDisposalPlan + { + get + { + return this._BranchOnSiteDisposalPlan; + } + set + { + if ((this._BranchOnSiteDisposalPlan != value)) + { + this.OnBranchOnSiteDisposalPlanChanging(value); + this.SendPropertyChanging(); + this._BranchOnSiteDisposalPlan = value; + this.SendPropertyChanged("BranchOnSiteDisposalPlan"); + this.OnBranchOnSiteDisposalPlanChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchDrillNum", DbType="Int")] + public System.Nullable BranchDrillNum + { + get + { + return this._BranchDrillNum; + } + set + { + if ((this._BranchDrillNum != value)) + { + this.OnBranchDrillNumChanging(value); + this.SendPropertyChanging(); + this._BranchDrillNum = value; + this.SendPropertyChanged("BranchDrillNum"); + this.OnBranchDrillNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchDrillPersonNum", DbType="Int")] + public System.Nullable BranchDrillPersonNum + { + get + { + return this._BranchDrillPersonNum; + } + set + { + if ((this._BranchDrillPersonNum != value)) + { + this.OnBranchDrillPersonNumChanging(value); + this.SendPropertyChanging(); + this._BranchDrillPersonNum = value; + this.SendPropertyChanged("BranchDrillPersonNum"); + this.OnBranchDrillPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityPersonNum", DbType="Int")] + public System.Nullable QualityPersonNum + { + get + { + return this._QualityPersonNum; + } + set + { + if ((this._QualityPersonNum != value)) + { + this.OnQualityPersonNumChanging(value); + this.SendPropertyChanging(); + this._QualityPersonNum = value; + this.SendPropertyChanged("QualityPersonNum"); + this.OnQualityPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchLeadShiftCheckNum", DbType="Int")] + public System.Nullable BranchLeadShiftCheckNum + { + get + { + return this._BranchLeadShiftCheckNum; + } + set + { + if ((this._BranchLeadShiftCheckNum != value)) + { + this.OnBranchLeadShiftCheckNumChanging(value); + this.SendPropertyChanging(); + this._BranchLeadShiftCheckNum = value; + this.SendPropertyChanged("BranchLeadShiftCheckNum"); + this.OnBranchLeadShiftCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchComprehensiveCheckNum", DbType="Int")] + public System.Nullable BranchComprehensiveCheckNum + { + get + { + return this._BranchComprehensiveCheckNum; + } + set + { + if ((this._BranchComprehensiveCheckNum != value)) + { + this.OnBranchComprehensiveCheckNumChanging(value); + this.SendPropertyChanging(); + this._BranchComprehensiveCheckNum = value; + this.SendPropertyChanged("BranchComprehensiveCheckNum"); + this.OnBranchComprehensiveCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BranchSpecialCheckNum", DbType="Int")] + public System.Nullable BranchSpecialCheckNum + { + get + { + return this._BranchSpecialCheckNum; + } + set + { + if ((this._BranchSpecialCheckNum != value)) + { + this.OnBranchSpecialCheckNumChanging(value); + this.SendPropertyChanging(); + this._BranchSpecialCheckNum = value; + this.SendPropertyChanged("BranchSpecialCheckNum"); + this.OnBranchSpecialCheckNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperativesNum", DbType="Int")] + public System.Nullable OperativesNum + { + get + { + return this._OperativesNum; + } + set + { + if ((this._OperativesNum != value)) + { + this.OnOperativesNumChanging(value); + this.SendPropertyChanging(); + this._OperativesNum = value; + this.SendPropertyChanged("OperativesNum"); + this.OnOperativesNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperOperativesNum", DbType="Int")] + public System.Nullable SuperOperativesNum + { + get + { + return this._SuperOperativesNum; + } + set + { + if ((this._SuperOperativesNum != value)) + { + this.OnSuperOperativesNumChanging(value); + this.SendPropertyChanging(); + this._SuperOperativesNum = value; + this.SendPropertyChanged("SuperOperativesNum"); + this.OnSuperOperativesNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectSubFullTimeNum", DbType="Int")] + public System.Nullable ProjectSubFullTimeNum + { + get + { + return this._ProjectSubFullTimeNum; + } + set + { + if ((this._ProjectSubFullTimeNum != value)) + { + this.OnProjectSubFullTimeNumChanging(value); + this.SendPropertyChanging(); + this._ProjectSubFullTimeNum = value; + this.SendPropertyChanged("ProjectSubFullTimeNum"); + this.OnProjectSubFullTimeNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -331705,6 +334310,404 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.QCManage_QCGroupRegistration")] + public partial class QCManage_QCGroupRegistration : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _QCGroupRegistrationId; + + private string _ProjectId; + + private string _Code; + + private string _Name; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _UnitId; + + private string _Subjects; + + private string _Process; + + private string _Achievement; + + private string _AwardName; + + private string _AwardLevel; + + private string _AwardingUnit; + + private System.Nullable _IsUpdate; + + private string _AwardType; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnQCGroupRegistrationIdChanging(string value); + partial void OnQCGroupRegistrationIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnSubjectsChanging(string value); + partial void OnSubjectsChanged(); + partial void OnProcessChanging(string value); + partial void OnProcessChanged(); + partial void OnAchievementChanging(string value); + partial void OnAchievementChanged(); + partial void OnAwardNameChanging(string value); + partial void OnAwardNameChanged(); + partial void OnAwardLevelChanging(string value); + partial void OnAwardLevelChanged(); + partial void OnAwardingUnitChanging(string value); + partial void OnAwardingUnitChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); + partial void OnAwardTypeChanging(string value); + partial void OnAwardTypeChanged(); + #endregion + + public QCManage_QCGroupRegistration() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QCGroupRegistrationId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string QCGroupRegistrationId + { + get + { + return this._QCGroupRegistrationId; + } + set + { + if ((this._QCGroupRegistrationId != value)) + { + this.OnQCGroupRegistrationIdChanging(value); + this.SendPropertyChanging(); + this._QCGroupRegistrationId = value; + this.SendPropertyChanged("QCGroupRegistrationId"); + this.OnQCGroupRegistrationIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="NVarChar(100)")] + public string Code + { + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this.OnCodeChanging(value); + this.SendPropertyChanging(); + this._Code = value; + this.SendPropertyChanged("Code"); + this.OnCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subjects", DbType="NVarChar(200)")] + public string Subjects + { + get + { + return this._Subjects; + } + set + { + if ((this._Subjects != value)) + { + this.OnSubjectsChanging(value); + this.SendPropertyChanging(); + this._Subjects = value; + this.SendPropertyChanged("Subjects"); + this.OnSubjectsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Process", DbType="NVarChar(500)")] + public string Process + { + get + { + return this._Process; + } + set + { + if ((this._Process != value)) + { + this.OnProcessChanging(value); + this.SendPropertyChanging(); + this._Process = value; + this.SendPropertyChanged("Process"); + this.OnProcessChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Achievement", DbType="NVarChar(200)")] + public string Achievement + { + get + { + return this._Achievement; + } + set + { + if ((this._Achievement != value)) + { + this.OnAchievementChanging(value); + this.SendPropertyChanging(); + this._Achievement = value; + this.SendPropertyChanged("Achievement"); + this.OnAchievementChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AwardName", DbType="NVarChar(100)")] + public string AwardName + { + get + { + return this._AwardName; + } + set + { + if ((this._AwardName != value)) + { + this.OnAwardNameChanging(value); + this.SendPropertyChanging(); + this._AwardName = value; + this.SendPropertyChanged("AwardName"); + this.OnAwardNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AwardLevel", DbType="NVarChar(50)")] + public string AwardLevel + { + get + { + return this._AwardLevel; + } + set + { + if ((this._AwardLevel != value)) + { + this.OnAwardLevelChanging(value); + this.SendPropertyChanging(); + this._AwardLevel = value; + this.SendPropertyChanged("AwardLevel"); + this.OnAwardLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AwardingUnit", DbType="NVarChar(200)")] + public string AwardingUnit + { + get + { + return this._AwardingUnit; + } + set + { + if ((this._AwardingUnit != value)) + { + this.OnAwardingUnitChanging(value); + this.SendPropertyChanging(); + this._AwardingUnit = value; + this.SendPropertyChanged("AwardingUnit"); + this.OnAwardingUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AwardType", DbType="NVarChar(2)")] + public string AwardType + { + get + { + return this._AwardType; + } + set + { + if ((this._AwardType != value)) + { + this.OnAwardTypeChanging(value); + this.SendPropertyChanging(); + this._AwardType = value; + this.SendPropertyChanged("AwardType"); + this.OnAwardTypeChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.QualityAudit_EquipmentPersonQuality")] public partial class QualityAudit_EquipmentPersonQuality : INotifyPropertyChanging, INotifyPropertyChanged { @@ -373367,6 +376370,10 @@ namespace Model private string _HazardName; + private System.Nullable _IsUpdate; + + private System.Nullable _OperativesNum; + private EntityRef _Base_Project; private EntityRef _Sys_User; @@ -373405,6 +376412,10 @@ namespace Model partial void OnIsSuperLargerHazardChanged(); partial void OnHazardNameChanging(string value); partial void OnHazardNameChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); + partial void OnOperativesNumChanging(System.Nullable value); + partial void OnOperativesNumChanged(); #endregion public Solution_LargerHazard() @@ -373722,6 +376733,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperativesNum", DbType="Int")] + public System.Nullable OperativesNum + { + get + { + return this._OperativesNum; + } + set + { + if ((this._OperativesNum != value)) + { + this.OnOperativesNumChanging(value); + this.SendPropertyChanging(); + this._OperativesNum = value; + this.SendPropertyChanged("OperativesNum"); + this.OnOperativesNumChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_LargerSolution_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -377543,6 +380594,12 @@ namespace Model private string _CheckType; + private System.Nullable _IsUpdate; + + private string _CheckMainType; + + private string _CheckUnitId; + private EntitySet _Supervise_SubUnitCheckRectify; private EntityRef _Base_CheckType; @@ -377577,6 +380634,12 @@ namespace Model partial void OnIsIssuedChanged(); partial void OnCheckTypeChanging(string value); partial void OnCheckTypeChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); + partial void OnCheckMainTypeChanging(string value); + partial void OnCheckMainTypeChanged(); + partial void OnCheckUnitIdChanging(string value); + partial void OnCheckUnitIdChanged(); #endregion public Supervise_SuperviseCheckReport() @@ -377801,6 +380864,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckMainType", DbType="NVarChar(50)")] + public string CheckMainType + { + get + { + return this._CheckMainType; + } + set + { + if ((this._CheckMainType != value)) + { + this.OnCheckMainTypeChanging(value); + this.SendPropertyChanging(); + this._CheckMainType = value; + this.SendPropertyChanged("CheckMainType"); + this.OnCheckMainTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckUnitId", DbType="NVarChar(50)")] + public string CheckUnitId + { + get + { + return this._CheckUnitId; + } + set + { + if ((this._CheckUnitId != value)) + { + this.OnCheckUnitIdChanging(value); + this.SendPropertyChanging(); + this._CheckUnitId = value; + this.SendPropertyChanged("CheckUnitId"); + this.OnCheckUnitIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectify_Supervise_SuperviseCheckReport", Storage="_Supervise_SubUnitCheckRectify", ThisKey="SuperviseCheckReportId", OtherKey="SuperviseCheckReportId", DeleteRule="NO ACTION")] public EntitySet Supervise_SubUnitCheckRectify { @@ -406173,6 +409296,8 @@ namespace Model private EntitySet _Check_ViolationPerson; + private EntitySet _Comprehensive_ConTechnologyDisclosure; + private EntitySet _Comprehensive_DataDistribution; private EntitySet _Comprehensive_DataReceiving; @@ -406185,6 +409310,8 @@ namespace Model private EntitySet _Comprehensive_QualityAccident; + private EntitySet _Comprehensive_QualityAssurance; + private EntitySet _ConstructionStandardization_BenchmarkWorkSite; private EntitySet _CostGoods_CostManage; @@ -406962,12 +410089,14 @@ namespace Model this._Check_SupervisionNotice_Sys_User1 = new EntitySet(new Action(this.attach_Check_SupervisionNotice_Sys_User1), new Action(this.detach_Check_SupervisionNotice_Sys_User1)); this._Check_TechnicalContactListApprove = new EntitySet(new Action(this.attach_Check_TechnicalContactListApprove), new Action(this.detach_Check_TechnicalContactListApprove)); this._Check_ViolationPerson = new EntitySet(new Action(this.attach_Check_ViolationPerson), new Action(this.detach_Check_ViolationPerson)); + this._Comprehensive_ConTechnologyDisclosure = new EntitySet(new Action(this.attach_Comprehensive_ConTechnologyDisclosure), new Action(this.detach_Comprehensive_ConTechnologyDisclosure)); this._Comprehensive_DataDistribution = new EntitySet(new Action(this.attach_Comprehensive_DataDistribution), new Action(this.detach_Comprehensive_DataDistribution)); this._Comprehensive_DataReceiving = new EntitySet(new Action(this.attach_Comprehensive_DataReceiving), new Action(this.detach_Comprehensive_DataReceiving)); this._Comprehensive_DesignChangeOrder = new EntitySet(new Action(this.attach_Comprehensive_DesignChangeOrder), new Action(this.detach_Comprehensive_DesignChangeOrder)); this._Comprehensive_DesignDetails = new EntitySet(new Action(this.attach_Comprehensive_DesignDetails), new Action(this.detach_Comprehensive_DesignDetails)); this._Comprehensive_InspectionPerson = new EntitySet(new Action(this.attach_Comprehensive_InspectionPerson), new Action(this.detach_Comprehensive_InspectionPerson)); this._Comprehensive_QualityAccident = new EntitySet(new Action(this.attach_Comprehensive_QualityAccident), new Action(this.detach_Comprehensive_QualityAccident)); + this._Comprehensive_QualityAssurance = new EntitySet(new Action(this.attach_Comprehensive_QualityAssurance), new Action(this.detach_Comprehensive_QualityAssurance)); this._ConstructionStandardization_BenchmarkWorkSite = new EntitySet(new Action(this.attach_ConstructionStandardization_BenchmarkWorkSite), new Action(this.detach_ConstructionStandardization_BenchmarkWorkSite)); this._CostGoods_CostManage = new EntitySet(new Action(this.attach_CostGoods_CostManage), new Action(this.detach_CostGoods_CostManage)); this._CostGoods_GoodsManage = new EntitySet(new Action(this.attach_CostGoods_GoodsManage), new Action(this.detach_CostGoods_GoodsManage)); @@ -409185,6 +412314,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_ConTechnologyDisclosure_Sys_User", Storage="_Comprehensive_ConTechnologyDisclosure", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_ConTechnologyDisclosure + { + get + { + return this._Comprehensive_ConTechnologyDisclosure; + } + set + { + this._Comprehensive_ConTechnologyDisclosure.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DataDistribution_Sys_User", Storage="_Comprehensive_DataDistribution", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Comprehensive_DataDistribution { @@ -409263,6 +412405,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_QualityAssurance_Sys_User", Storage="_Comprehensive_QualityAssurance", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_QualityAssurance + { + get + { + return this._Comprehensive_QualityAssurance; + } + set + { + this._Comprehensive_QualityAssurance.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ConstructionStandardization_BenchmarkWorkSite_Sys_User", Storage="_ConstructionStandardization_BenchmarkWorkSite", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet ConstructionStandardization_BenchmarkWorkSite { @@ -414010,6 +417165,18 @@ namespace Model entity.Sys_User = null; } + private void attach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Comprehensive_ConTechnologyDisclosure(Comprehensive_ConTechnologyDisclosure entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_Comprehensive_DataDistribution(Comprehensive_DataDistribution entity) { this.SendPropertyChanging(); @@ -414082,6 +417249,18 @@ namespace Model entity.Sys_User = null; } + private void attach_Comprehensive_QualityAssurance(Comprehensive_QualityAssurance entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Comprehensive_QualityAssurance(Comprehensive_QualityAssurance entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_ConstructionStandardization_BenchmarkWorkSite(ConstructionStandardization_BenchmarkWorkSite entity) { this.SendPropertyChanging(); @@ -427746,6 +430925,8 @@ namespace Model private string _UpState; + private string _RectifyType; + private EntitySet _Technique_RectifyItem; #region 可扩展性方法定义 @@ -427766,6 +430947,8 @@ namespace Model partial void OnIsBuildChanged(); partial void OnUpStateChanging(string value); partial void OnUpStateChanged(); + partial void OnRectifyTypeChanging(string value); + partial void OnRectifyTypeChanged(); #endregion public Technique_Rectify() @@ -427914,6 +431097,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyType", DbType="NVarChar(10)")] + public string RectifyType + { + get + { + return this._RectifyType; + } + set + { + if ((this._RectifyType != value)) + { + this.OnRectifyTypeChanging(value); + this.SendPropertyChanging(); + this._RectifyType = value; + this.SendPropertyChanged("RectifyType"); + this.OnRectifyTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technique_RectifyItem_Technique_Rectify", Storage="_Technique_RectifyItem", ThisKey="RectifyId", OtherKey="RectifyId", DeleteRule="NO ACTION")] public EntitySet Technique_RectifyItem { @@ -480803,6 +484006,8 @@ namespace Model private string _WorkStates; + private System.Nullable _IsUpdate; + private string _WorkStatesStr; private string _WorkAreaName; @@ -481179,6 +484384,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this._IsUpdate = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkStatesStr", DbType="VarChar(6) NOT NULL", CanBeNull=false)] public string WorkStatesStr { diff --git a/SUBQHSE/Model/Model.csproj b/SUBQHSE/Model/Model.csproj index 51c469e..a2ab38b 100644 --- a/SUBQHSE/Model/Model.csproj +++ b/SUBQHSE/Model/Model.csproj @@ -136,10 +136,12 @@ + + @@ -154,6 +156,10 @@ + + + + @@ -217,6 +223,8 @@ + + @@ -346,6 +354,7 @@ + diff --git a/SUBQHSE/Model/ZHGL/DataSync/BaseEntities.cs b/SUBQHSE/Model/ZHGL/DataSync/BaseEntities.cs index 33529c8..1f9b508 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/BaseEntities.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/BaseEntities.cs @@ -11,6 +11,10 @@ ///
public string ProjectId { get; set; } /// + /// 项目来源单位id + /// + public string ProjectFromUnitId { get; set; } + /// /// 项目编码 /// public string ProjectCode { get; set; } diff --git a/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs b/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs index 8d4b0ba..4b9547d 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs @@ -37,7 +37,14 @@ namespace Model public int? ProblemNotCompletedNum { get; set; } public int? ProblemNum { get; set; } public string ProblemRate { get; set; } + public int? UnitCheckNum { get; set; } + public int? UnitCheckClosedNum { get; set; } + public int? UnitCheckNotClosedNum { get; set; } + public int? BranchCheckNum { get; set; } + public int? BranchCheckClosedNum { get; set; } + public int? BranchCheckNotClosedNum { get; set; } public int? ProjectPersonNum { get; set; } + public int? ProjectSubPersonNum { get; set; } public string ReportDate { get; set; } public int? SingleProjectNum { get; set; } public int? SNum { get; set; } @@ -47,6 +54,9 @@ namespace Model public int? SubdivisionalWorksNum { get; set; } public int? SubProjectNum { get; set; } public int? TechnicalDisclosePersonNum { get; set; } + public int? ComprehensiveConTechnologyDisclosureNum { get; set; } + public int? ComprehensiveConTechnologyDisclosurePersonNum { get; set; } + public int? ComprehensiveReviewDrawingsNum { get; set; } public int? TrainPersonNum { get; set; } public string UnitId { get; set; } public int? UnitProjectNum { get; set; } @@ -73,6 +83,7 @@ namespace Model public int? SubProjectAcceptOKNum { get; set; } public int? SubdivisionalWorksAcceptNum { get; set; } public int? SubdivisionalWorksAcceptOKNum { get; set; } + public int? InspectionMachineNum { get; set; } + public int? InspectionMachineQualifiedNum { get; set; } } - } diff --git a/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs b/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs index 9f5e917..3e2a0f1 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs @@ -19,17 +19,26 @@ namespace Model ///
public partial class HsseDataItem { + public int? BranchLeadShiftCheckNum { get; set; } + public int? BranchComprehensiveCheckNum { get; set; } + public int? BranchSpecialCheckNum { get; set; } public int? BeUnderConstructionNum { get; set; } public int? BranchFullTimeNum { get; set; } public int? BranchInspectorGeneralNum { get; set; } + public int? BranchComprehensivePlanNum { get; set; } + public int? BranchSpecialPlanNum { get; set; } + public int? BranchOnSiteDisposalPlan { get; set; } public int? CertificateANum { get; set; } public int? CertificateBNum { get; set; } public int? CertificateCNum { get; set; } + public int? QualityPersonNum { get; set; } public string CollCropCode { get; set; } public int? CompanyComprehensiveCheckNum { get; set; } public int? CompanyComprehensivePlanNum { get; set; } public int? CompanyDrillNum { get; set; } public int? CompanyDrillPersonNum { get; set; } + public int? BranchDrillNum { get; set; } + public int? BranchDrillPersonNum { get; set; } public int? CompanyLeadShiftCheckNum { get; set; } public int? CompanyOnSiteDisposalPlan { get; set; } @@ -69,8 +78,9 @@ namespace Model public int? ProjectComprehensivePlanNum { get; set; } public int? ProjectDrillNum { get; set; } public int? ProjectDrillPersonNum { get; set; } - + public int? ProjectFullTimeNum { get; set; } + public int? ProjectSubFullTimeNum { get; set; } public int? ProjectInspectorGeneralNum { get; set; } public int? ProjectLeadShiftCheckNum { get; set; } public int? ProjectMajorCheckNum { get; set; } @@ -91,7 +101,7 @@ namespace Model public int? SpecialEquipmentNum { get; set; } public int? SpecialOperationTrainNum { get; set; } public int? HseTechnicalNum { get; set; } - + public int? EnvironmentalTrainNum { get; set; } public int? SpecialSeriousAccidentNum { get; set; } public int? SpecialTrainNum { get; set; } @@ -104,6 +114,8 @@ namespace Model public int? TrainPersonNum { get; set; } public string UnitId { get; set; } public int? UseEquipmentNum { get; set; } + public int? OperativesNum { get; set; } + public int? SuperOperativesNum { get; set; } public List HiddenDangerDetailItems { get; set; } } diff --git a/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs index ed306c7..4bd1df4 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs @@ -1,6 +1,6 @@ namespace Model { - public class LargeEngineeringOutput : BaseEntities + public class LargeEngineeringOutput:BaseEntities { /// /// 危大工程审批完成数 @@ -42,5 +42,13 @@ /// 超危大工程论证个数 /// public int SuperArgumentNum { get; set; } + /// + /// 危大工程作业人员数 + /// + public int OperativesNum { get; set; } + /// + /// 超危大工程作业人员数 + /// + public int SuperOperativesNum { get; set; } } } \ No newline at end of file diff --git a/SUBQHSE/Model/ZHGL/DataSync/LicenseHSETechnicalOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/LicenseHSETechnicalOutput.cs new file mode 100644 index 0000000..31c49a6 --- /dev/null +++ b/SUBQHSE/Model/ZHGL/DataSync/LicenseHSETechnicalOutput.cs @@ -0,0 +1,14 @@ +using System; + +namespace Model +{ + /// + /// 安全技术交底 + /// + public class LicenseHSETechnicalOutput : BaseEntities + { + public string HSETechnicalCode { get; set; } + public string WorkContents { get; set; } + + } +} \ No newline at end of file diff --git a/SUBQHSE/Model/ZHGL/DataSync/OfSafetySupervisorsOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/OfSafetySupervisorsOutput.cs index 318102c..9e5f5d4 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/OfSafetySupervisorsOutput.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/OfSafetySupervisorsOutput.cs @@ -25,5 +25,10 @@ /// 电话 ///
public string Phone { get; set; } + + /// + /// 是否本部人员 + /// + public bool IsOffice { get; set; } } } \ No newline at end of file diff --git a/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs b/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs index a918bed..cb516d2 100644 --- a/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs +++ b/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs @@ -19,7 +19,7 @@ namespace WebAPI.Controllers /// 获取质量统计数据 ///
/// - public Model.ReturnData PostGetCQMSData() + public async Task PostGetCQMSData() { var returnData = new Model.ReturnData(); returnData.type = "CQMS"; @@ -29,7 +29,7 @@ namespace WebAPI.Controllers returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime; if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now) { - returnData.data = CQMSDataService.GetTodayCQMSData_CQMS(); + returnData.data = await CQMSDataService.GetTodayCQMSData_CQMS(); } else { @@ -120,35 +120,6 @@ namespace WebAPI.Controllers /// 获取安全统计数据 ///
/// - /*public Model.ReturnData PostGetHSSEData() - { - var returnData = new Model.ReturnData(); - returnData.type = "HSSE"; - returnData.time = DateTime.Now.ToString(); - ServerService.GetToken(); - returnData.token = BLL.SysConstSetService.CNCECToken; - returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime; - if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now) - { - try - { - returnData.data = HSSEData_HSSEService.StatisticalDataAsync().Result; - - } - catch (Exception ex) - { - - returnData.code = 0; - returnData.message = ex.ToString(); - } - } - else - { - returnData.code = 500; - returnData.message = "token失效"; - } - return returnData; - }*/ public async Task PostGetHSSEData() { var returnData = new Model.ReturnData(); @@ -262,10 +233,10 @@ namespace WebAPI.Controllers - #region 推送项目安全隐患风险数据 + #region 推送项目安全数据 /// - /// 推送项目安全隐患风险数据 + /// 推送项目安全数据 /// /// //[HttpPost] @@ -339,5 +310,216 @@ namespace WebAPI.Controllers } #endregion + + #region 推送项目安全隐患数据 + + /// + /// 推送项目安全隐患数据 + /// + /// + //[HttpPost] + public Model.ResponeData PushProjectHazardRegisterData(int pushNum) + { + var responeData = new Model.ResponeData(); + try + { + var returndata = Project_HSSEData_HSSEService.PushProjectHazardRegisterData(pushNum); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + #region 推送项目质量巡检数据 + + /// + /// 推送项目质量巡检数据 + /// + /// + //[HttpPost] + public Model.ResponeData PushProjectCheckControlData() + { + var responeData = new Model.ResponeData(); + try + { + var returndata = Project_CQMSDataService.PushProjectHazardRegisterData(); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + #region 推送危大工程业务明细数据 + + /// + /// 推送危大工程业务明细数据 + /// + /// + //[HttpPost] + public Model.ResponeData PushProjectLargeEngineeringData(int pushNum) + { + var responeData = new Model.ResponeData(); + try + { + var returndata = Project_HSSEData_HSSEService.PushProjectLargeEngineeringData(pushNum); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + + #region 推送安全作业许可业务明细数据 + + /// + /// 推送安全作业许可业务明细数据 + /// + /// + //[HttpPost] + public Model.ResponeData PushProjectLicenseData(int pushNum) + { + var responeData = new Model.ResponeData(); + try + { + var returndata = Project_HSSEData_HSSEService.PushProjectLicenseData(pushNum); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + #region 推送项目质量隐患数据 + + /// + /// 推送项目质量隐患数据 + /// + /// + //[HttpPost] + public Model.ResponeData PushProjectQualityProblemData(int pushNum) + { + var responeData = new Model.ResponeData(); + try + { + var returndata = Project_CQMSDataService.PushProjectQualityProblemData(pushNum); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + + #region 推送质量QC活动注册数据 + + /// + /// 推送质量QC活动注册数据 + /// + /// + //[HttpPost] + public Model.ResponeData PushQCRegistrationData(int pushNum) + { + var responeData = new Model.ResponeData(); + try + { + var returndata = Project_CQMSDataService.PushQCRegistrationData(pushNum); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + #region 推送安全风险数据 + + /// + /// 推送安全风险数据HSSEData_ProjectSecurityRisk + /// + /// + //[HttpPost] + public Model.ResponeData PushProjectSecurityRiskData(int pushNum) + { + var responeData = new Model.ResponeData(); + try + { + var returndata = Project_HSSEData_HSSEService.PushProjectSecurityRiskData(pushNum); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + + #region 推送企业级检查明细数据检查 + + /// + /// 推送企业级检查明细数据检查 HSSEDate_SuperviseCheckReport + /// + /// + //[HttpPost] + public Model.ResponeData PushSuperviseCheckReportData(int pushNum) + { + var responeData = new Model.ResponeData(); + try + { + var returndata = HSSEData_HSSEService.PushSuperviseCheckReportData(pushNum); + responeData.code = returndata.code; + responeData.message = returndata.message; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion } } \ No newline at end of file