浏览代码

凌云集团更改公司

peiguo 5 年之前
父节点
当前提交
77c51b34ea

+ 1 - 1
whepi-ui/templates/home/home.ftl

@@ -132,7 +132,7 @@
     function getUptownUnitLY() {
         $.ajax({
             type: "GET",
-            url: "/home/getUptownUnitLY.json",
+            url: "/home/getUptownUnitLY.json?uptownId=" + $("#uptownId").val(),
             data: {},
             dataType: "json",
             success: function (data) {

+ 1 - 0
whepi-ui/templates/home/ribao.ftl

@@ -353,6 +353,7 @@
                     <div class="weui-panel__hd" style=" font-size: large"><span
                             id="unitMsg">${ridgepole!''}${unit!''}</span></div>
                     <input id="unitId" type="text" hidden="hidden" value="${unitId!''}"/>
+                    <input id="uptownId" type="text" hidden="hidden" value="${uptownId!''}"/>
                     <div class="weui-cell weui-cell_select weui-cell_select-after">
                         <div class="weui-cell__hd">
                             <label for="" class="weui-label" id="danweiTitle">更改部门</label>

+ 2 - 2
whepi-web/src/main/java/com/bofeng/dao/UptownUnitMapper.java

@@ -40,6 +40,6 @@ public interface UptownUnitMapper extends BaseMapper<UptownUnit> {
             "sys_uptown u ON u.uptown_id = uu.uptown_id WHERE ur.user_id = #{userId} AND ur.role_id = 1")
     UptownUnit getUptownUnitByUser(@Param("userId") Long userId);
 
-    @Select("select * from sys_uptown_unit where status = 1 and uptown_id = 1238790987234")
-    List<UptownUnit> getUptownUnitLY();
+    @Select("select * from sys_uptown_unit where status = 1 and uptown_id = #{uptownId}")
+    List<UptownUnit> getUptownUnitLY(@Param("uptownId") Long uptownId);
 }

+ 3 - 2
whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java

@@ -179,7 +179,7 @@ public class UserOpenController {
                 model.put("uptownId", uptown_id);
                 model.put("uptown_name", uptown_name);
                 // 凌云集团的可以更改unit
-                if (uptown_id == 1238790987234L) {
+                if (uptown_id == 1238790987234L || uptown_id == 5L) {
                     UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userId);
                     model.put("ridgepole", unit.getRidgepole());
                     model.put("unit", unit.getUnit());
@@ -227,7 +227,8 @@ public class UserOpenController {
      */
     @GetMapping("/home/getUptownUnitLY.json")
     public List<UptownUnit> getUptownUnitLY(HttpServletRequest request) {
-        return uptownUnitMapper.getUptownUnitLY();
+        Long uptownId = Long.parseLong(request.getParameter("uptownId"));
+        return uptownUnitMapper.getUptownUnitLY(uptownId);
     }
 
     /**