Procházet zdrojové kódy

Merge branch 'master' of http://101.36.160.140:21044/province-qinghai/base-server

# Conflicts:
#	base-server/src/main/resources/bootstrap-devmysql.yml
ZeroLiYi před 1 rokem
rodič
revize
c4b75b0882

+ 6 - 1
base-server/pom.xml

@@ -39,7 +39,12 @@
39 39
             <artifactId>druid</artifactId>
40 40
             <version>1.0.28</version>
41 41
         </dependency>
42
-
42
+        <!--mysql数据库-->
43
+        <dependency>
44
+            <groupId>mysql</groupId>
45
+            <artifactId>mysql-connector-java</artifactId>
46
+            <version>8.0.28</version>
47
+        </dependency>
43 48
 <!--	 	<dependency>-->
44 49
 <!--		  <groupId>com.alibaba</groupId>-->
45 50
 <!--		  <artifactId>druid-spring-boot-starter</artifactId>-->

+ 1 - 1
base-server/src/main/java/com/unis/base/server/dao/UserSealRoleDao.java

@@ -13,6 +13,6 @@ import tk.mybatis.mapper.common.Mapper;
13 13
 @Transactional(rollbackFor = Exception.class)
14 14
 public interface UserSealRoleDao extends Mapper<UserSealRoleDo> {
15 15
 
16
-    @Select("select seals from usercenter:sys_user_info where user_loginname = #{accountName, jdbcType=VARCHAR} and state_code = 1")
16
+    @Select("select seals from usercenter.sys_user_info where user_loginname = #{accountName, jdbcType=VARCHAR} and state_code = 1")
17 17
     String getSealsByAccount(@Param("accountName") String accountName);
18 18
 }

+ 6 - 10
base-server/src/main/java/com/unis/base/server/entity/DCfxxsjyDO.java

@@ -1,16 +1,6 @@
1 1
 package com.unis.base.server.entity;
2 2
 
3
-import java.math.BigDecimal;
4
-import java.util.ArrayList;
5
-import java.util.Date;
6
-import java.util.List;
7
-
8
-import javax.persistence.Column;
9
-import javax.persistence.Table;
10
-import javax.persistence.Transient;
11
-
12 3
 import com.fasterxml.jackson.annotation.JsonFormat;
13
-import com.unis.base.common.vo.DCfxxsjyUpdateLogVO;
14 4
 import io.swagger.annotations.ApiModelProperty;
15 5
 import lombok.AllArgsConstructor;
16 6
 import lombok.Getter;
@@ -18,6 +8,12 @@ import lombok.NoArgsConstructor;
18 8
 import lombok.Setter;
19 9
 import org.springframework.format.annotation.DateTimeFormat;
20 10
 
11
+import javax.persistence.Column;
12
+import javax.persistence.Table;
13
+import javax.persistence.Transient;
14
+import java.math.BigDecimal;
15
+import java.util.Date;
16
+
21 17
 /**
22 18
  * @author huangxing
23 19
  * @version 1.0

+ 13 - 24
base-server/src/main/java/com/unis/base/server/service/impl/CblyBbServiceImpl.java

@@ -1,37 +1,26 @@
1 1
 package com.unis.base.server.service.impl;
2 2
 
3 3
 
4
-import java.io.*;
5
-import java.util.ArrayList;
6
-import java.util.Date;
7
-import java.util.List;
8
-import java.util.UUID;
9
-
10
-import javax.annotation.Resource;
11
-
12
-import org.apache.poi.hssf.usermodel.HSSFCell;
13
-import org.apache.poi.hssf.usermodel.HSSFCellStyle;
14
-import org.apache.poi.hssf.usermodel.HSSFFont;
15
-import org.apache.poi.hssf.usermodel.HSSFRow;
16
-import org.apache.poi.hssf.usermodel.HSSFSheet;
17
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
18
-import org.apache.poi.ss.usermodel.*;
19
-import org.apache.poi.ss.util.CellRangeAddress;
20
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
21
-import org.springframework.stereotype.Service;
22
-import org.springframework.web.multipart.MultipartFile;
23
-
24
-import com.github.pagehelper.PageHelper;
25 4
 import com.unis.base.server.dao.TyChubeilyynbaoDao;
26 5
 import com.unis.base.server.entity.TyChubeilyynbao;
27
-import com.unis.base.server.entity.TyHly;
28 6
 import com.unis.base.server.example.TyChubeilyynbaoExample;
29
-import com.unis.base.server.example.TyHlyExample;
30 7
 import com.unis.base.server.example.TyChubeilyynbaoExample.Criteria;
31 8
 import com.unis.base.server.service.CblyBbService;
32 9
 import com.unis.common.utils.ResponseWrapper;
10
+import org.apache.poi.hssf.usermodel.*;
11
+import org.apache.poi.ss.usermodel.*;
12
+import org.apache.poi.ss.util.CellRangeAddress;
13
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
14
+import org.springframework.stereotype.Service;
15
+import org.springframework.web.multipart.MultipartFile;
33 16
 
34
-import aj.org.objectweb.asm.Type;
17
+import javax.annotation.Resource;
18
+import java.io.IOException;
19
+import java.io.InputStream;
20
+import java.util.ArrayList;
21
+import java.util.Date;
22
+import java.util.List;
23
+import java.util.UUID;
35 24
 
36 25
 
37 26
 @Service

+ 4 - 4
base-server/src/main/resources/bootstrap-devmysql.yml

@@ -14,9 +14,9 @@ spring:
14 14
     restart:
15 15
       enabled: false
16 16
   datasource:
17
-    type: com.alibaba.druid.pool.DruidDataSource
18
-    #     url: jdbc:mysql://172.16.0.46:3306/base?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
19
-    url: jdbc:mysql://101.36.160.140:10311/base?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
17
+#    type: com.alibaba.druid.pool.DruidDataSource
18
+    url: jdbc:mysql://172.16.0.46:3306/base?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
19
+#    url: jdbc:mysql://101.36.160.140:10311/base?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
20 20
     username: root
21 21
     password: admin@1234
22 22
     driver-class-name: com.mysql.cj.jdbc.Driver
@@ -60,7 +60,7 @@ eureka:
60 60
   client:
61 61
     service-url:
62 62
 #      defaultZone: http://172.16.0.73:11000/eureka/
63
-      defaultZone: http://127.0.0.1:11000/eureka/
63
+      defaultZone: http://172.16.0.4:11000/eureka/
64 64
   instance:
65 65
     prefer-ip-address: true
66 66
     status-page-url-path: /swagger-ui.html

+ 13 - 13
base-server/src/main/resources/mybatis/mapper/PersonnelMxMapper.xml

@@ -479,42 +479,42 @@
479 479
                status,
480 480
                newly
481 481
         from base.d_ryxxsjy
482
-        where rybh like '%'||#{rybh}||'%'
482
+        where rybh LIKE CONCAT('%', #{rybh}, '%')
483 483
     </select>
484 484
     <select id="selectEducation" resultType="com.unis.base.common.vo.EducationVO">
485
-        select *
486
-        from base.d_education
487
-        where rybh like '%'||#{rybh}||'%'
485
+        SELECT *
486
+        FROM base.d_education
487
+        WHERE rybh LIKE CONCAT('%', #{rybh}, '%')
488 488
     </select>
489 489
     <select id="selectReport" resultType="com.unis.base.common.vo.ReportVO">
490 490
         select *
491 491
         from base.d_report
492
-        where rybh like '%'||#{rybh}||'%'
492
+        where rybh like  CONCAT('%', #{rybh}, '%')
493 493
     </select>
494 494
     <select id="selectSkill" resultType="com.unis.base.common.vo.SkillVO">
495 495
         select *
496 496
         from base.d_skill
497
-        where rybh like '%'||#{rybh}||'%'
497
+        where rybh like CONCAT('%', #{rybh}, '%')
498 498
     </select>
499 499
     <select id="selectRotaterotateVO" resultType="com.unis.base.common.vo.RotaterotateVO">
500 500
         select *
501 501
         from base.d_rotaterotate
502
-        where rybh like '%'||#{rybh}||'%'
502
+        where rybh like CONCAT('%', #{rybh}, '%')
503 503
     </select>
504 504
     <select id="selectFeiEducationVO" resultType="com.unis.base.common.vo.FeiEducationVO">
505 505
         select *
506 506
         from base.d_feieducation
507
-        where rybh like '%'||#{rybh}||'%'
507
+        where rybh like CONCAT('%', #{rybh}, '%')
508 508
     </select>
509 509
     <select id="selectOtherCertificatesVO" resultType="com.unis.base.common.vo.OtherCertificatesVO">
510 510
         select *
511 511
         from base.d_certificates
512
-        where rybh like '%'||#{rybh}||'%'
512
+        where rybh like CONCAT('%', #{rybh}, '%')
513 513
     </select>
514 514
     <select id="selectDetailzs" resultType="com.unis.base.server.entity.PersonnelDO">
515 515
         select ryxm name, xb gender, zwmc post, zzmm politicalOutlook, lxdh telephone, person_status
516 516
         from base.d_ryxxsjy
517
-        where rybh like '%'||#{rybh}||'%'
517
+        where rybh like CONCAT('%', #{rybh}, '%')
518 518
     </select>
519 519
     <select id="selectduty1" resultType="com.unis.base.server.entity.QyiDo">
520 520
         SELECT
@@ -546,7 +546,7 @@
546 546
         <where>
547 547
             ry.status = 1
548 548
             <if test="qymc!=null and qymc!=''">
549
-                AND qy.qymc LIKE '%' || #{qymc} || '%'
549
+                AND qy.qymc  like CONCAT('%', #{qymc}, '%')
550 550
             </if>
551 551
             <if test="orgCode!=null and orgCode!=''">
552 552
                 AND qy.org_code = #{orgCode}
@@ -569,7 +569,7 @@
569 569
         from base.d_ryxxsjy
570 570
         <where>
571 571
             <if test="qymc!=null and qymc!=''">
572
-                and qymc like '%'||#{qymc}||'%'
572
+                and qymc  like CONCAT('%', #{qymc}, '%')
573 573
             </if>
574 574
             <if test="unittype!=null and unittype!=''">
575 575
                 and unittype=#{unittype}
@@ -637,7 +637,7 @@
637 637
                status,
638 638
                newly
639 639
         from base.d_ryxxsjy
640
-        where group_id like '%'||#{groupId}||'%'
640
+        where group_id like CONCAT('%', #{groupId}, '%')
641 641
     </select>
642 642
 
643 643
 

+ 29 - 15
base-server/src/main/resources/mybatis/mapper/TalentGroupDao.xml

@@ -77,7 +77,7 @@
77 77
         select * from base.d_talent_group
78 78
         <where>
79 79
             <if test="groupName!=null and groupName!='' ">
80
-                and group_name like '%'||#{groupName}||'%'
80
+                and group_name  LIKE CONCAT('%', #{groupName}, '%')
81 81
             </if>
82 82
         </where>
83 83
     </select>
@@ -94,32 +94,32 @@
94 94
     <select id="selectEducation" resultType="com.unis.base.common.vo.EducationVO">
95 95
         select *
96 96
         from base.d_education
97
-        where rybh like '%'||#{rybh}||'%'
97
+        where rybh  LIKE CONCAT('%', #{rybh}, '%')
98 98
     </select>
99 99
     <select id="selectReport" resultType="com.unis.base.common.vo.ReportVO">
100 100
         select *
101 101
         from base.d_report
102
-        where rybh like '%'||#{rybh}||'%'
102
+        where rybh  LIKE CONCAT('%', #{rybh}, '%')
103 103
     </select>
104 104
     <select id="selectSkill" resultType="com.unis.base.common.vo.SkillVO">
105 105
         select *
106 106
         from base.d_skill
107
-        where rybh like '%'||#{rybh}||'%'
107
+        where rybh LIKE CONCAT('%', #{rybh}, '%')
108 108
     </select>
109 109
     <select id="selectRotaterotateVO" resultType="com.unis.base.common.vo.RotaterotateVO">
110 110
         select *
111 111
         from base.d_rotaterotate
112
-        where rybh like '%'||#{rybh}||'%'
112
+        where rybh LIKE CONCAT('%', #{rybh}, '%')
113 113
     </select>
114 114
     <select id="selectFeiEducationVO" resultType="com.unis.base.common.vo.FeiEducationVO">
115 115
         select *
116 116
         from base.d_feieducation
117
-        where rybh like '%'||#{rybh}||'%'
117
+        where rybh LIKE CONCAT('%', #{rybh}, '%')
118 118
     </select>
119 119
     <select id="selectOtherCertificatesVO" resultType="com.unis.base.common.vo.OtherCertificatesVO">
120 120
         select *
121 121
         from base.d_certificates
122
-        where rybh like '%'||#{rybh}||'%'
122
+        where rybh LIKE CONCAT('%', #{rybh}, '%')
123 123
     </select>
124 124
     <select id="selectpersonId" resultType="com.unis.base.common.vo.SelectPersonVo">
125 125
         select rybh userId
@@ -138,16 +138,30 @@
138 138
         where u.rybh=#{userId}
139 139
     </select>
140 140
     <select id="selectGroups" resultType="com.unis.base.common.vo.GroupPersonSVO">
141
-        select u.rybh,
141
+--         select u.rybh,
142
+--                u.ryxm,
143
+--                u.qymc,
144
+--                u.zwmc,
145
+--                e.quan_highest_education xw,
146
+--                (select wm_concat(r.honorary_name) from base.d_report r where r.rybh=u.rybh) rych,
147
+--                u.lxdh
148
+--         from base.d_ryxxsjy u
149
+--             left join base.d_education e on u.rybh=e.rybh
150
+--         where u.group_id LIKE CONCAT('%', #{groupId}, '%')
151
+
152
+        SELECT u.rybh,
142 153
                u.ryxm,
143 154
                u.qymc,
144 155
                u.zwmc,
145
-               e.quan_highest_education xw,
146
-               (select wm_concat(r.honorary_name) from base.d_report r where r.rybh=u.rybh) rych,
156
+               e.quan_highest_education AS xw,
157
+               GROUP_CONCAT(r.honorary_name ORDER BY r.honorary_name SEPARATOR ',') AS rych,
147 158
                u.lxdh
148
-        from base.d_ryxxsjy u
149
-            left join base.d_education e on u.rybh=e.rybh
150
-        where u.group_id like '%'||#{groupId}||'%'
159
+        FROM base.d_ryxxsjy u
160
+                 LEFT JOIN base.d_education e ON u.rybh = e.rybh
161
+                 LEFT JOIN base.d_report r ON u.rybh = r.rybh
162
+        WHERE u.group_id LIKE CONCAT('%', #{groupId}, '%')
163
+        GROUP BY u.rybh, u.ryxm, u.qymc, u.zwmc, e.quan_highest_education, u.lxdh
164
+
151 165
     </select>
152 166
     <select id="selectname" resultType="java.lang.String">
153 167
         select id
@@ -162,7 +176,7 @@
162 176
     <select id="selectBm" resultType="com.unis.base.common.vo.BmRecordVO">
163 177
         select distinct bmmc qymc, bmdm tyshxydm
164 178
         from base.d_ryxxsjy
165
-        where qymc like '%'||#{qymc}||'%'
179
+        where qymc LIKE CONCAT('%', #{qymc}, '%')
166 180
        and bmmc is not null
167 181
     </select>
168 182
     <select id="seleRy" resultType="com.unis.base.common.vo.BRyVO">
@@ -218,7 +232,7 @@
218 232
     <select id="selectPersons" resultType="java.lang.String">
219 233
         select rybh
220 234
         from base.d_ryxxsjy
221
-        where group_id like '%'||#{groupId}||'%'
235
+        where group_id  LIKE CONCAT('%', #{groupId}, '%')
222 236
     </select>
223 237
     <select id="selectGroupInfo" resultType="com.unis.base.server.entity.TalentGroupDO">
224 238
         select *