Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

kop.htm 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. <?php
  2. $result_map = "";
  3. $xl = ['不限制','中专','高技','大专','本科','硕士','博士'];
  4. //先列出全国 再其他省 再到市
  5. $sql = 'select * from ey_zcwd_position where type='.$detail['sbzy'].' and sbdj='.$detail['sbdj'].' and is_del=0 and status=1'.$sql_end.' order by sf asc';
  6. $is_list_empty = '';
  7. ?>
  8. {eyou:sql sql="$sql" cachetime='3600' empty='' id="field"}
  9. <?php
  10. $is_list_empty = $field['id'];
  11. ?>
  12. <div class="panel panel-primary" style="display:none;">
  13. <div class="panel-body">
  14. {eyou:if condition='((int)$field.sf === 0)'}
  15. ({$t}匹配结果)全国通用申报要求对比结果如下:
  16. {eyou:else /}
  17. <?php
  18. if((int)$field['sf'] > 0){
  19. $sql22 = "select id,name from ey_citysite where id=".$field['sf'];
  20. $sql222 = '';
  21. if((int)$field['cs'] > 0){
  22. $sql222 = "select id,name from ey_citysite where id=".$field['cs'];
  23. }
  24. }
  25. ?>
  26. {eyou:sql sql='$sql22' cachetime='3600' empty='' id="kop"}
  27. <?php
  28. $aname = $kop['name'];
  29. ?>
  30. {/eyou:sql}
  31. {eyou:if condition='((int)$field.cs > 0)'}
  32. {eyou:sql sql='$sql222' cachetime='3600' empty='' id="kop"}
  33. <?php
  34. $bname = $kop['name'];
  35. ?>
  36. {/eyou:sql}
  37. {/eyou:if}
  38. ({$t}匹配结果){$aname}{$bname}地区申报要求对比结果如下:
  39. {/eyou:if}
  40. </div>
  41. <div class="panel-footer" style="padding:3px 5px;">
  42. <!--查询专业-->
  43. <?php
  44. $num = 0;
  45. $sql2 = "select * from ey_zcwe_position where type=".$field['id']." and is_del=0 and status=1";
  46. ?>
  47. {eyou:sql sql="$sql2" cachetime='3600' empty='暂无相关数据' id="field2"}
  48. <table class="table table-bordered" style="margin-bottom:0px;margin-top:5px;">
  49. <thead>
  50. <tr>
  51. <th scope="col" style="text-align: center;">情况<br/>{$i}</th>
  52. <th scope="col">字段<br/>信息</th>
  53. <th scope="col">实际<br/>要求</th>
  54. <th scope="col">填写<br/>资料</th>
  55. <th scope="col">匹配<br/>结果</th>
  56. </tr>
  57. </thead>
  58. <tbody>
  59. <?php
  60. //先判断学历是否符合
  61. ?>
  62. <tr>
  63. <th scope="row">1</th>
  64. <td>学历</td>
  65. <td><?php //echo $xl[$field2['xlyq']];?></td>
  66. <td><?php //echo $xl[$detail['xl']];?></td>
  67. <td>
  68. <?php
  69. if($field2['xlyq'] == $detail['xl']){
  70. //echo "<font style='color: blue;'>符合</font>";
  71. $num++;
  72. }else{
  73. //echo "<font style='color: red;'>不符合</font>";
  74. }
  75. ?>
  76. </td>
  77. </tr>
  78. <tr>
  79. <th scope="row">2</th>
  80. <td>年龄</td>
  81. <td>
  82. <?php
  83. if((int)$field2['is_ega'] === 0){
  84. //echo "不限制";
  85. }else{
  86. //echo $field2['ega_0'].'-'.$field2['ega_1'].'岁';
  87. }
  88. ?>
  89. </td>
  90. <td>
  91. {$detail.nl}岁
  92. </td>
  93. <td>
  94. <?php
  95. if((int)$detail['nl'] <= (int)$field2['ega_1'] && (int)$detail['nl'] >= (int)$field2['ega_0']){
  96. //echo "<font style='color: blue;'>符合</font>";
  97. $num++;
  98. }else{
  99. //echo "<font style='color: red;'>不符合</font>";
  100. }
  101. ?>
  102. </td>
  103. </tr>
  104. <tr>
  105. <th scope="row">3</th>
  106. <td>毕业<br/>专业</td>
  107. <td>
  108. {eyou:if condition='((int)$field2.byzy === 0)'}
  109. 不限制
  110. {eyou:else /}
  111. <?php
  112. //查询出毕业专业 $deta
  113. $zhengshu2 = json_decode($field2['zhengshu2'],true);
  114. $zhengshu2_str = '0';
  115. foreach ($zhengshu2 as $k => $v){
  116. if((int)$v > 0) {
  117. $zhengshu2_str .= ',' . $v;
  118. }
  119. }
  120. $sql3 = "select id,title from ey_zczy_position where id IN(".$zhengshu2_str.") and is_del=0 and status=1";
  121. ?>
  122. {eyou:if condition='($zhengshu2_str != "0")'}
  123. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field3"}
  124. <?php /**{$field3.title}*/ ?><br/>
  125. {/eyou:sql}
  126. {eyou:else /}
  127. 不限制
  128. {/eyou:if}
  129. {/eyou:if}
  130. </td>
  131. <td>
  132. <?php
  133. //查询出毕业专业 $deta
  134. $zhengshu = json_decode($detail['zy'],true);
  135. $zhengshu_str = '0';
  136. foreach ($zhengshu as $k => $v){
  137. if ((int)$v > 0) {
  138. $zhengshu_str .= ',' . $v;
  139. }
  140. }
  141. $sql3 = "select id,title from ey_zczy_position where id IN(".$zhengshu_str.") and is_del=0 and status=1";
  142. ?>
  143. {eyou:if condition='($zhengshu_str != "0")'}
  144. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field3"}
  145. {$field3.title}<br/>
  146. {/eyou:sql}
  147. {eyou:else /}
  148. {/eyou:if}
  149. </td>
  150. <td>
  151. <?php
  152. if((int)$field2.byzy === 0 || empty($zhengshu2)){
  153. //echo "<font style='color: blue;'>符合</font>";
  154. $num++;
  155. }else{
  156. if(empty($zhengshu)){
  157. //echo "<font style='color: red;'>不符合</font>";
  158. }else{
  159. $run = "<font style='color: red;'>不符合</font>";
  160. $ik = 1;
  161. foreach ($zhengshu as $k => $v){
  162. if(in_array($v,$zhengshu2)){
  163. //$run = '<font style="color: blue;">符合</font><br/>'.$ik.'项';
  164. $run = '<font style="color: blue;">符合</font><br/>';
  165. $ik++;
  166. }
  167. }
  168. //echo $run;
  169. if($ik>1){
  170. $num++; //符合+1
  171. }
  172. }
  173. }
  174. ?>
  175. </td>
  176. </tr>
  177. <tr>
  178. <th scope="row">4</th>
  179. <td>学校<br/>类型</td>
  180. <td>
  181. {eyou:if condition='((int)$field2.xxlx === 0)'}
  182. 不限制
  183. {eyou:else /}
  184. <?php
  185. //if((int)$field2['xxlx'] === 1) //echo "全日制";
  186. //if((int)$field2['xxlx'] === 2) //echo "非全日制";
  187. ?>
  188. {/eyou:if}
  189. </td>
  190. <td>
  191. {eyou:if condition='((int)$detail.xxlx === 1)'}
  192. 全日制
  193. {eyou:else /}
  194. 非全日制
  195. {/eyou:if}
  196. </td>
  197. <td>
  198. {eyou:if condition='((int)$field2.xxlx === 0)'}
  199. <!--<font style='color: blue;'>符合</font>-->
  200. <?php
  201. $num++;
  202. ?>
  203. {eyou:else /}
  204. <?php
  205. if((int)$field2['xxlx'] === (int)$detail['xxlx']){
  206. //echo "<font style='color: blue;'>符合</font>";
  207. $num++;
  208. }else{
  209. //echo "<font style='color: red;'>不符合</font>";
  210. }
  211. ?>
  212. {/eyou:if}
  213. </td>
  214. </tr>
  215. <tr>
  216. <th scope="row">5</th>
  217. <td>毕业<br/>时间</td>
  218. <td>
  219. {eyou:if condition='((int)$field2.bysj === 0)'}
  220. <?php /*不要求**/ ?>
  221. {eyou:else /}
  222. <?php /*要求>={$field2.bysj_time}年**/ ?>
  223. {/eyou:if}
  224. </td>
  225. <td>
  226. <?php
  227. //$detail['bysj']
  228. //假设我们要计算的时间是2000年1月1日
  229. $startDate = new DateTime($detail['bysj']);
  230. // 获取现在的日期
  231. $now = new DateTime('now');
  232. // 计算差值
  233. $interval = date_diff($startDate, $now);
  234. // 输出年份
  235. ////echo $interval->y . ' years';
  236. if($interval->y > 0){
  237. //echo '已毕业'.$interval->y . '年';
  238. }else{
  239. //echo '刚毕业不足1年';
  240. }
  241. ?>
  242. </td>
  243. <td>
  244. <?php
  245. if((int)$field2['bysj'] === 0){
  246. //echo "<font style='color: blue;'>符合</font>";
  247. $num++;
  248. }else{
  249. if((int)$field2['bysj_time'] <= $interval->y){
  250. //echo "<font style='color: blue;'>符合</font>";
  251. $num++;
  252. }else{
  253. //echo "<font style='color: red;'>不符合</font>";
  254. }
  255. }
  256. ?>
  257. </td>
  258. </tr>
  259. <tr>
  260. <th scope="row">6</th>
  261. <td>前置<br/>证书</td>
  262. <td>
  263. <?php
  264. $zhengshu3 = '';
  265. $zs_all = [];
  266. //(且或) 列出证书要求
  267. //调用需要的记录 is_zs
  268. $sql5 = "select * from ey_zcwf_position where type_son=".$field2['id']." and is_del=0 and status=1 and is_zs=1";
  269. ?>
  270. {eyou:sql sql="$sql5" cachetime='3600' empty='不限制' id="field3"}
  271. <?php
  272. if($i > 1){
  273. //echo "或<br/>";
  274. }
  275. ?>
  276. <?php
  277. //查询出证书 $deta
  278. $zhengshu3 = json_decode($field3['zhengshu'],true);
  279. $sjnx = json_decode($field3['sjnx'],true);
  280. //var_dump($field3);
  281. //var_dump($field3['zhengshu']);
  282. //var_dump($field3['sjnx']);
  283. $zs_all[] = [
  284. 'a' => $zhengshu3,
  285. 'b' => $sjnx
  286. ];
  287. //var_dump($sjnx);
  288. $zhengshu3_str = '0';
  289. foreach ($zhengshu3 as $k => $v){
  290. if((int)$v > 0) {
  291. $zhengshu3_str .= ',' . $v;
  292. }
  293. }
  294. $sql3 = "select id,title from ey_zczs_position where id IN(".$zhengshu3_str.") and is_del=0 and status=1";
  295. ?>
  296. {eyou:if condition='($zhengshu3_str != "0")'}
  297. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field4"}
  298. <?php
  299. $key_s = array_search($field4['id'], $zhengshu3);
  300. $year_s = $sjnx[$key_s];
  301. ?>
  302. <?php /**{$field4.title}(需要{$year_s}年)**/?><br/>
  303. {/eyou:sql}
  304. {eyou:else /}
  305. <!--忽略-->
  306. {/eyou:if}
  307. {/eyou:sql}
  308. </td>
  309. <td>
  310. <?php
  311. //查询出拥有的证书 $deta
  312. $zhengshu = json_decode($detail['zs'],true);
  313. $zsnx = json_decode($detail['zsnx'],true);
  314. $zhengshu_str = '0';
  315. foreach ($zhengshu as $k => $v){
  316. if((int)$v > 0){
  317. $zhengshu_str .= ','.$v;
  318. }
  319. }
  320. $sql3 = "select id,title from ey_zczs_position where id IN(".$zhengshu_str.") and is_del=0 and status=1";
  321. ?>
  322. {eyou:if condition='($zhengshu_str != "0")'}
  323. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field3"}
  324. <?php
  325. $key_s = array_search($field3['id'], $zhengshu);
  326. $year_s = $zsnx[$key_s];
  327. ?>
  328. <?php /**{$field3.title}(拥有{$year_s}年)**/ ?><br/>
  329. {/eyou:sql}
  330. {eyou:else /}
  331. {/eyou:if}
  332. </td>
  333. <td>
  334. <?php
  335. //var_dump($field['id']);
  336. //var_dump($zs_all);
  337. //表示没查出限制要求
  338. if(empty($zhengshu3)){
  339. //echo "<font style='color: blue;'>符合</font>";
  340. $num++;
  341. }else{
  342. if(empty($zhengshu)){
  343. //用户没有证书
  344. //echo "<font style='color: red;'>不符合</font>";
  345. }else{
  346. //判断是否包含
  347. //第一轮 循环 或
  348. foreach ($zs_all as $k => $v){
  349. if($k > 0){
  350. ////echo "或<br/>";
  351. }
  352. $ik = 1;
  353. $ik2 = 1;
  354. $ik3 = 1;
  355. //第二轮 循环 且
  356. //var_dump($v['a']);
  357. $ik4 = 0; //真实有效数量
  358. foreach ($v['a'] as $k2 => $v2){
  359. //var_dump($v2);
  360. //var_dump($zhengshu);
  361. //第三轮 循环 每一项要求是否在 用户拥有的证书 里面
  362. //必须完全满足
  363. if((int)$v2 > 0) {
  364. if (in_array($v2, $zhengshu)) {
  365. //判断年限是否符合要求
  366. $key_i = array_search($v2, $zhengshu);
  367. //var_dump($zsnx[$key_i]);
  368. if ((int)$zsnx[$key_i] >= (int)$v['b'][$k2]) {
  369. $run_1 = '<font style="color: blue;">符合</font><br/>' . $ik . '项';
  370. $ik++;
  371. } else {
  372. $run_2 = '<font style="color: blue;">年限不符合</font><br/>' . $ik2 . '项';
  373. $ik2++;
  374. }
  375. } else {
  376. $run_3 = '<font style="color: blue;">未拥有</font><br/>' . $ik3 . '项';
  377. $ik3++;
  378. }
  379. $ik4++;
  380. }
  381. }
  382. //具体情况 循环且
  383. ////echo $run_1;
  384. ////echo $run_2;
  385. ////echo $run_3;
  386. ////echo count($v['a']);
  387. //var_dump($ik);
  388. //var_dump(count($v['a']));
  389. if(($ik-1) === $ik4){
  390. ////echo "<font style='color: blue;'>符合1</font>";
  391. $res = "<font style='color: blue;'>符合</font>";
  392. $num++;
  393. //跳出循环 已经符合其中 一个 且了
  394. break;
  395. }else{
  396. ////echo "<font style='color: red;'>不符合2</font>";
  397. $res = "<font style='color: red;'>不符合</font>";
  398. }
  399. }
  400. //echo $res;
  401. }
  402. }
  403. ?>
  404. </td>
  405. </tr>
  406. <tr>
  407. <th scope="row">7</th>
  408. <td>综合<br/>评估</td>
  409. <td colspan="3" style="vertical-align:middle;">
  410. <?php
  411. ////echo $num;
  412. if($num >= 6){
  413. //多次循环可能大于6
  414. echo "<font style='color: blue;'>完全符合要求!</font>";
  415. if(!empty($bname)){
  416. $bname_str = '/'.$bname;
  417. }
  418. $result_map .= $aname.$bname_str.'地区<br/>';
  419. }else if($num === 0){
  420. echo "<font style='color: red;'>完全不符合要求!</font>";
  421. }else{
  422. echo "<font style='color: #ff4c08;'>未完全符合要求!</font>";
  423. }
  424. $num = 0;
  425. ?>
  426. </td>
  427. </tr>
  428. </tbody>
  429. </table>
  430. {/eyou:sql}
  431. </div>
  432. </div>
  433. {/eyou:sql}
  434. <?php
  435. //var_dump($is_list_empty);
  436. ?>
  437. {eyou:if condition='(empty($is_list_empty))'}
  438. <div class="alert alert-danger" role="alert" style="">
  439. <!--<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  440. <span class="sr-only">Error:</span>-->
  441. {$scen}
  442. </div>
  443. {eyou:else /}
  444. <?php
  445. if(empty($result_map)){
  446. $info = '';
  447. $result_map = "抱歉!未找到符合地区!";
  448. $class = 'alert-danger';
  449. }else{
  450. //$result_map;
  451. $info = "找到以下符合申请的地区:<br/><br/>";
  452. $class = 'alert-success';
  453. }
  454. ?>
  455. <div class="alert {$class}" role="alert" style="">
  456. <?php
  457. echo $info;
  458. echo $result_map;
  459. ?>
  460. </div>
  461. {/eyou:if}