caotao 5 роки тому
батько
коміт
b2b4f44202

+ 7 - 2
admin-ui/app/whepi/index.js

@@ -223,8 +223,13 @@ var App = {
       method: 'get',
       loadingMask: false,
       success: function (data) {
-        userRole = data.data.user.userType;
-        console.log(data.data.user.userType);
+        if(data.data.user){
+          userRole = data.data.user.userType;
+          console.log(data.data.user.userType);
+        }else{
+          userRole = 0
+        }
+        console.log(userRole);
         if (!$.trim(data.data.userId)) {
           top.window.location.href = jumpApi(YJYDLOGINURL);
           return;

+ 16 - 0
admin-ui/app/whepi/mock/menu.json

@@ -113,6 +113,22 @@
           "iconCls": "icon-blank fa fa-align-justify",
           "state": "close",
           "children": []
+        },
+        {
+          "id": "ENT101007",
+          "text": "在职人员管理",
+          "href": "/app/whepi/lingyun/lingyunUserOnJob.js",
+          "iconCls": "icon-blank fa fa-align-justify",
+          "state": "close",
+          "children": []
+        },
+        {
+          "id": "ENT101008",
+          "text": "不在职人员管理",
+          "href": "/app/whepi/lingyun/lingyunUserNotOnJob.js",
+          "iconCls": "icon-blank fa fa-align-justify",
+          "state": "close",
+          "children": []
         }
       ]
     },

+ 16 - 0
admin-ui/app/whepi/mock/menu7.json

@@ -41,6 +41,22 @@
       "iconCls": "icon-blank fa fa-align-justify",
       "state": "close",
       "children": []
+    },
+    {
+      "id": "ENT101007",
+      "text": "在职人员管理",
+      "href": "/app/whepi/scan/specialPersonnelLY.js",
+      "iconCls": "icon-blank fa fa-align-justify",
+      "state": "close",
+      "children": []
+    },
+    {
+      "id": "ENT101008",
+      "text": "不在职人员管理",
+      "href": "/app/whepi/scan/specialPersonnelLY.js",
+      "iconCls": "icon-blank fa fa-align-justify",
+      "state": "close",
+      "children": []
     }
   ]
 }

+ 5 - 0
whepi-web/src/main/java/com/bofeng/dao/OutUserMapper.java

@@ -30,4 +30,9 @@ public interface OutUserMapper extends BaseMapper<OutUser> {
     List<OutUser> getAllOutUserLY(PageDb pageDb, Map<String, Object> queryParam);
 
     Integer deleteOutUsers(@Param("ids") String ids);
+
+    Integer resignUser(@Param("ids") String ids);
+
+    Integer entryUser(@Param("ids") String ids,@Param("unitId") Long unitId,@Param("departmentId") Long departmentId);
+
 }

+ 9 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLYBM4.java

@@ -54,6 +54,8 @@ public class ExcelRiBaoLYBM4 {
 
     private Long userId;
 
+
+
     @ExcelProperty(value = "部门名称", index = 1)
     private String loudong = "";
 
@@ -391,4 +393,11 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = "个人上报状态", index = 4)
     private String reportStatusDesc = "";
 
+    @ExcelProperty(value = "是否绑定", index = 14)
+    private String isBand="";
+
+    private String oldOpenId="";
+
+    private Long houseId=0L;
+
 }

+ 4 - 0
whepi-web/src/main/java/com/bofeng/entity/UptownHouse.java

@@ -38,4 +38,8 @@ public class UptownHouse {
 
     @TableField(exist = false)
     private DateTime timeUpdate;
+
+    @TableField(exist = false)
+    private String ids;
+
 }

+ 44 - 0
whepi-web/src/main/java/com/bofeng/service/SweepCodeService.java

@@ -59,6 +59,49 @@ public class SweepCodeService {
             queryParam.put("unitId", userId);
         }
         queryParam.put("uptownId", uptownId);
+        queryParam.put("orderStr", "  suu.unit_id asc,suho.linkman ");
+
+        List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUserPage(pageDb,queryParam);
+        if (sysUptownHouses != null && sysUptownHouses.size() > 0) {
+            String tripDet;
+            for (ExcelRiBaoLYBM4 excelRiBaoLYBM4 : sysUptownHouses) {
+                if (excelRiBaoLYBM4.getIsContact() == 0) {
+                    excelRiBaoLYBM4.setIsContactDesc("否");
+                } else if (excelRiBaoLYBM4.getIsContact() == 1) {
+                    excelRiBaoLYBM4.setIsContactDesc("是");
+                }
+                if (excelRiBaoLYBM4.getIsSuspected() == 0) {
+                    excelRiBaoLYBM4.setIsSuspectedDesc("否");
+                } else if (excelRiBaoLYBM4.getIsSuspected() == 1) {
+                    excelRiBaoLYBM4.setIsSuspectedDesc("是");
+                }
+                tripDet = "";
+                //出行详细
+                List<MsTripDet> listDet = msSuspectedMapper.selectTripSuspected(excelRiBaoLYBM4.getTripId());
+                if (listDet != null && listDet.size() > 0) {
+                    for (MsTripDet msTripDet : listDet) {
+                        tripDet += "出发地:" + msReportService.getLocalOther(msTripDet.getStartLocal(), msTripDet.getStartLocalOther()) + ",";
+                        tripDet += "目的地:" + msReportService.getLocalOther(msTripDet.getEndLocal(), msTripDet.getEndLocalOther()) + ",";
+                        tripDet += "出行方式:" + msReportService.getTripType(msTripDet.getTripType()) + ",";
+                        tripDet += "车次/航班/车牌:" + msTripDet.getTripTypeDesp() + ",";
+                    }
+                    excelRiBaoLYBM4.setTripDetDesc(tripDet.substring(0, tripDet.length() - 1));
+                }
+                // 复工
+                excelRiBaoLYBM4.setReturnWork(scanService.returnWorkLYlist(excelRiBaoLYBM4.getUserId(), excelRiBaoLYBM4.getLinkman(), excelRiBaoLYBM4.getPhone()));
+            }
+        }
+        return sysUptownHouses;
+    }
+
+
+    public List<ExcelRiBaoLYBM4> selectLingyunUserNotOnJob(PageDb pageDb, Map<String, Object> queryParam,Long notOnJob) throws ParseException {
+        Long userId = JwtHelper.getUserId();
+        if (userId > 7000 && userId < 8000) {
+            queryParam.put("unitId", userId);
+        }
+        queryParam.put("notOnJob", notOnJob);
+        queryParam.put("orderStr", "  op.create_at desc ");
         List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUserPage(pageDb,queryParam);
         if (sysUptownHouses != null && sysUptownHouses.size() > 0) {
             String tripDet;
@@ -92,6 +135,7 @@ public class SweepCodeService {
         return sysUptownHouses;
     }
 
+
     public List<ExcelRiBaoLYBM4> HCUser(PageDb pageDb, Map<String, Object> queryParam) {
         queryParam.put("uptownId", 100000002L);
         List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUserPage(pageDb,queryParam);

+ 21 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/ScanAdminController.java

@@ -93,6 +93,15 @@ public class ScanAdminController {
         return Model.newSuccess(pageDb,sysUptownHouses);
     }
 
+    @ApiOperation("凌云用户管理")
+    @PostMapping("/whepi/sweepCode/selectLingyunUserNotOnJob")
+    public Model<List<ExcelRiBaoLYBM4>> selectLingyunUserNotOnJob(PageDb pageDb,HttpParameterParser parser) throws ParseException {
+//        HttpServletResponse response,HttpServletRequest request
+        List<ExcelRiBaoLYBM4> sysUptownHouses = sweepCodeService.selectLingyunUserNotOnJob(pageDb,parser.getMap(), 1238790987234L);
+        return Model.newSuccess(pageDb,sysUptownHouses);
+    }
+
+
     @ApiOperation("中建康城用户管理")
     @PostMapping("/whepi/sweepCode/selectLingyunUserZJ")
     public Model<List<ExcelRiBaoLYBM4>> selectLingyunUserZJ(PageDb pageDb,HttpParameterParser parser) throws ParseException {
@@ -431,6 +440,18 @@ public class ScanAdminController {
         return Model.newSuccess(outUserMapper.deleteOutUsers(ids));
     }
 
+    @ApiOperation("人员离职")
+    @PostMapping("/whepi/user/resignUser")
+    public Model resignUser(@Pd(name = "ids") String ids) {
+        return Model.newSuccess(outUserMapper.resignUser(ids));
+    }
+
+    @ApiOperation("人员入职")
+    @PostMapping("/whepi/user/entryUser")
+    public Model entryUser(@JsonBody UptownHouse uptownHouse) {
+        return Model.newSuccess(outUserMapper.entryUser(uptownHouse.getIds(),uptownHouse.getUnitId(),uptownHouse.getDepartmentId()));
+    }
+
     @ApiOperation("小区进出二维码")
     @PostMapping("/whepi/qrImg/scanQrImg")
     public Model<List<UptownDoor>> scanQrImg(HttpParameterParser parser, PageDb pagination) throws IOException, WriterException {

+ 24 - 8
whepi-web/src/main/resources/application-prod.yml

@@ -6,14 +6,16 @@ logging:
     console: '%d %-5level %logger{32} - %msg%n'
 
 debug: false
-ui-path: file:/home/www/ws/wuhan_epi/whepi-ui
+#ui-path: file:/home/www/ws/wuhan_epi/whepi-ui
+ui-path: file:/home/oilschedule/ws/wuhan_epi/whepi-ui
 secret: hh123 # jwt私钥
 salt: 456 #密码加盐
 token_time_minutes: 720 #12小时有效期
 token_time_minutes_mobile: 525600 #1年有效
 
 server:
-  port: 8086
+#  port: 8086
+  port: 8888
 
 yvan:
   debug: false
@@ -22,10 +24,16 @@ yvan:
   upload_domain: /static
   wechat:
     token: wuhanepi
-    appID: wx0b7d70ff931c397d
-    appsecret: 7f6af95b5f6ad1f9d45fc57c1b58f7cf
+    #appID: wx0b7d70ff931c397d
+    #appsecret: 7f6af95b5f6ad1f9d45fc57c1b58f7cf
     EncodingAESKey: Wpm1KEBmXvVLjeOyqWbn6PJlkW7tlR7MxXmrm4i9zcg
 
+    appID: wx6108f00b10079000
+    appsecret: 96a98a8fb01b170a339e44f00a6a25f4
+
+#    appID: wx91b94bb5e8334dcd
+#    appsecret: 3b52b8deb374c022437abb03fe13ce4a
+
     #token: slxtoken
     #appID: wx79c1af613d5d22dd
     #appsecret: 2de3b4abfe30ff7523f464ace8322b44
@@ -41,7 +49,8 @@ yvan:
     #qrcode_match_cust_expire_second: 10800
 
     #bofeng9999 / 789456hh
-    domain: http://caller.whyxzz.com.cn
+#    domain: http://caller.whyxzz.com.cn
+    domain: http://jy.lingyun.com
     tmpTicketExpireSeconds: 10800
     templates:
       预定信息: 'MLNz8YVi7zofQOBeLS0Ruhr-3fJpTnfsKjyPeDB879s'
@@ -58,9 +67,16 @@ spring:
     #driverClassName: com.mysql.jdbc.Driver
     #url: jdbc:mysql://localhost:3306/bofeng_test?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
     driverClassName: net.sf.log4jdbc.DriverSpy
-    url: jdbc:log4jdbc:mysql://localhost:3306/whepi?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
-    username: whepi
-    password: hust!2020epi
+
+
+#    url: jdbc:log4jdbc:mysql://localhost:3306/whepi?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+
+#    username: whepi
+#    password: hust!2020epi
+
+    url: jdbc:log4jdbc:mysql://rm-8vbjns8g515bo16crvo.mysql.zhangbei.rds.aliyuncs.com:3306/wuhan_epi?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+    username: vmes
+    password: agrvqL$D
 
   redis:
     database: 8

+ 1 - 1
whepi-web/src/main/resources/application.yml

@@ -43,7 +43,7 @@ endpoints:
 #  whitelabel.enabled: false
 
 spring:
-  profiles.active: maoyunfeng
+  profiles.active: peig
 
   application:
     name: bofeng-web

+ 12 - 0
whepi-web/src/main/resources/mapper/OutUserMapper.xml

@@ -78,4 +78,16 @@
     </delete>
 
 
+    <update id="resignUser">
+        update sys_uptown_house set unit_id = 1001 where house_id in
+        <foreach item="id" index="index" collection="ids.split(',')" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </update>
+    <update id="entryUser">
+        update sys_uptown_house set unit_id = #{unitId},department_id =  #{departmentId}   where house_id in
+        <foreach item="id" index="index" collection="ids.split(',')" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </update>
 </mapper>

+ 29 - 9
whepi-web/src/main/resources/mapper/RbMapper.xml

@@ -149,25 +149,34 @@
 
     <select id="exSelectLingyunUserPage" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
         select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
-        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,
+        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,op.old_open_id as oldOpenId,
         msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,de.department_name as departmentName,
         mss.medical,mss.temperature,mss.cough,mss.is_contact, mss.is_suspected,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,mss.temperature_score,mss.is_contact as isContact,mss.is_suspected as isSuspected,
-        tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId
+        tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId,suh.house_id as houseId
         from sys_uptown_house suh
-        inner join sys_uptown_home suho on suho.house_id=suh.house_id
-        INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}
-        left join ms_report msr on msr.house_id = suh.house_id and
+        left join sys_uptown_home suho on suho.house_id=suh.house_id
+        left JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id
+        left join ms_report msr on msr.house_id = suh.house_id
         <if test="date!=null and date!=''">
-            msr.report_date = #{date}
+            and msr.report_date = #{date}
         </if>
         <if test="date==null or date==''">
-            msr.report_date = curdate()
+            and msr.report_date = curdate()
         </if>
         left join ms_suspected mss on mss.report_id=msr.report_id
         left join ms_trip tr on mss.suspected_id=trip_id
-        INNER JOIN sys_user_role ur on ur.property_id = suho.house_id and ur.role_id = 1
+        left JOIN sys_user_role ur on ur.property_id = suho.house_id
+        left JOIN sys_user_open op on op.user_id = ur.user_id
         left join sys_department de on de.department_id = suh.department_id
         <where>
+            <if test="uptownId != null and uptownId != ''">
+                and suu.uptown_id=#{uptownId}
+            </if>
+
+            <if test="notOnJob != null and notOnJob != ''">
+                and suu.uptown_id != #{notOnJob}
+            </if>
+
             <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
                 and suu.unit_id=#{unitId}
             </if>
@@ -217,7 +226,18 @@
             <if test="isTrip == '2'.toString()">
                 and tr.is_trip = 1
             </if>
+            <if test="isBand == '1'.toString()">
+                and (op.old_open_id is null or op.old_open_id = '')
+            </if>
+            <if test="isBand == '2'.toString()">
+                and op.old_open_id is not null and op.old_open_id != ''
+            </if>
+            and ur.role_id = 1
         </where>
-        order by suu.unit_id asc,suho.linkman
+
+        <if test="orderStr != null and orderStr != ''">
+            order by ${orderStr}
+        </if>
+
     </select>
 </mapper>