weiximei 6 gadus atpakaļ
vecāks
revīzija
6b3ce3b531

+ 44
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/HkController.java Parādīt failu

@@ -0,0 +1,44 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.constant.Constant;
4
+import com.community.commom.mode.HkResponseBean;
5
+import com.community.commom.mode.ResponseBean;
6
+import com.community.commom.session.UserElement;
7
+import com.community.huiju.model.HkVisitorBill;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.cloud.context.config.annotation.RefreshScope;
13
+import org.springframework.web.bind.annotation.PathVariable;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RestController;
18
+
19
+import javax.servlet.http.HttpSession;
20
+
21
+/**
22
+ * @author FXF
23
+ * @date 2019-01-23
24
+ */
25
+@RestController
26
+@RefreshScope
27
+@RequestMapping("/")
28
+@Api(value = "海康相关的API",description = "海康相关的API")
29
+public class HkController {
30
+	
31
+	@ApiOperation(value = "发送访客账单", notes = "发送访客账单")
32
+	@ApiImplicitParams({ @ApiImplicitParam(paramType = "body", name = "hkVisitorBill", dataType = "String",value = "billNum: 账单号,reservationNum:预约单号,plateNum:出场车牌号,leaveTime:出场时间,billFee:账单金额")})
33
+	@RequestMapping(value = "/sendVisitorBill",method = RequestMethod.POST)
34
+	public HkResponseBean allMessageRead(@RequestBody HkVisitorBill hkVisitorBill){
35
+		HkResponseBean hkResponseBean = new HkResponseBean();
36
+		System.out.println("测试:"+hkVisitorBill.getBillFee());
37
+		System.out.println("测试:"+hkVisitorBill.getBillNum());
38
+		System.out.println("测试:"+hkVisitorBill.getPlateNum());
39
+		System.out.println("测试:"+hkVisitorBill.getReservationNum());
40
+		System.out.println("测试:"+hkVisitorBill.getLeaveTime());
41
+		hkResponseBean.addSuccess("账单发送成功","");
42
+		return hkResponseBean;
43
+	}
44
+}

+ 72
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/HkVisitorBill.java Parādīt failu

@@ -0,0 +1,72 @@
1
+package com.community.huiju.model;
2
+
3
+/**
4
+ * @author FXF
5
+ * @date 2019-01-23
6
+ */
7
+public class HkVisitorBill {
8
+	/**
9
+	 * 账单号
10
+	 */
11
+	private String billNum;
12
+	
13
+	/**
14
+	 * 预约单号
15
+	 */
16
+	private String reservationNum;
17
+	
18
+	/**
19
+	 * 出场车牌号
20
+	 */
21
+	private String plateNum;
22
+	
23
+	/**
24
+	 * 出场时间
25
+	 */
26
+	private Long leaveTime;
27
+	
28
+	/**
29
+	 * 账单金额
30
+	 */
31
+	private Integer billFee;
32
+	
33
+	public String getBillNum() {
34
+		return billNum;
35
+	}
36
+	
37
+	public void setBillNum(String billNum) {
38
+		this.billNum = billNum;
39
+	}
40
+	
41
+	public String getReservationNum() {
42
+		return reservationNum;
43
+	}
44
+	
45
+	public void setReservationNum(String reservationNum) {
46
+		this.reservationNum = reservationNum;
47
+	}
48
+	
49
+	public String getPlateNum() {
50
+		return plateNum;
51
+	}
52
+	
53
+	public void setPlateNum(String plateNum) {
54
+		this.plateNum = plateNum;
55
+	}
56
+	
57
+	public Long getLeaveTime() {
58
+		return leaveTime;
59
+	}
60
+	
61
+	public void setLeaveTime(Long leaveTime) {
62
+		this.leaveTime = leaveTime;
63
+	}
64
+	
65
+	public Integer getBillFee() {
66
+		return billFee;
67
+	}
68
+	
69
+	public void setBillFee(Integer billFee) {
70
+		this.billFee = billFee;
71
+	}
72
+}

+ 53
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/mode/HkResponseBean.java Parādīt failu

@@ -0,0 +1,53 @@
1
+package com.community.commom.mode;
2
+
3
+import java.io.Serializable;
4
+
5
+/**
6
+ * 接口统一状态返回BEAN.
7
+ */
8
+public class HkResponseBean<T> implements Serializable {
9
+
10
+    private static final long serialVersionUID = 3593827217136880822L;
11
+
12
+    public static final String CODE_SUCCESS =  "0";
13
+    public static final String CODE_FAIL =  "1";
14
+
15
+    private String errorCode = "0";
16
+
17
+    private String errorMessage = "成功";
18
+
19
+    private T data;
20
+
21
+    public HkResponseBean() {
22
+    }
23
+ 
24
+    public void addSuccess(String errorMessage,T data) {
25
+        this.errorCode = "0";
26
+        this.errorMessage = errorMessage;
27
+        this.data = data;
28
+    }
29
+    
30
+    public String getErrorCode() {
31
+        return errorCode;
32
+    }
33
+    
34
+    public void setErrorCode(String errorCode) {
35
+        this.errorCode = errorCode;
36
+    }
37
+    
38
+    public String getErrorMessage() {
39
+        return errorMessage;
40
+    }
41
+    
42
+    public void setErrorMessage(String errorMessage) {
43
+        this.errorMessage = errorMessage;
44
+    }
45
+    
46
+    public T getData() {
47
+        return data;
48
+    }
49
+    
50
+    public void setData(T data) {
51
+        this.data = data;
52
+    }
53
+}

+ 6
- 6
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/ToUserServerImpl.java Parādīt failu

@@ -208,6 +208,11 @@ public class ToUserServerImpl implements IToUserService {
208 208
         ToUser toUser = new ToUser();
209 209
 
210 210
         String loginName = object.getString("loginName");
211
+        Integer ID= object.getInteger("id");
212
+        String userName = object.getString("userName");
213
+        JSONArray List = object.getJSONArray("menuArray");
214
+        Integer[] roleIDArray = List.toArray(new Integer[]{});
215
+        String remark = object.getString("remark");
211 216
 
212 217
         if (!AccountValidatorUtil.isPhone(loginName)){
213 218
             response.addError("请输入正确的手机号!");
@@ -215,13 +220,8 @@ public class ToUserServerImpl implements IToUserService {
215 220
         }
216 221
         ToUser userLoginName= toUserMapper.selectByLoginName(loginName);
217 222
         // 修改手机号排除自身
218
-        if (null!=userLoginName && null != userLoginName.getLoginName()) {
223
+        if (null!=userLoginName && null != userLoginName.getLoginName() &&(ID).equals(userLoginName.getId())) {
219 224
             if (loginName.equals(userLoginName.getLoginName())){
220
-                Integer ID= object.getInteger("id");
221
-                String userName = object.getString("userName");
222
-                JSONArray List = object.getJSONArray("menuArray");
223
-                Integer[] roleIDArray = List.toArray(new Integer[]{});
224
-                String remark = object.getString("remark");
225 225
 
226 226
                 toUser.setUserName(userName);
227 227
                 toUser.setLoginName(loginName);

+ 4
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserServiceImpl.java Parādīt failu

@@ -276,9 +276,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
276 276
         queryWrapper.lambda().eq(User::getLoginName,loginName);
277 277
         queryWrapper.lambda().eq(User::getCommunityId,communityId);
278 278
         List<User> userLoginName= userMapper.selectList(queryWrapper);
279
+        Integer ID= object.getInteger("id");
279 280
         for (User us:userLoginName) {
280
-            // 修改手机号码时排除自身
281
-            if (null != us.getLoginName()&&loginName.equals(us.getLoginName())){
281
+            // 修改手机号码时排除自身,通过比如ID排除是不是修改的本身
282
+            if (null != us.getLoginName()&&loginName.equals(us.getLoginName()) && (ID).equals(us.getId())){
282 283
                 break;
283 284
             }
284 285
             if (null != us.getLoginName()) {
@@ -286,7 +287,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
286 287
                 return response;
287 288
             }
288 289
         }
289
-        Integer ID= object.getInteger("id");
290
+
290 291
         String userName = object.getString("userName");
291 292
         JSONArray List = object.getJSONArray("menuArray");
292 293
         Integer[] roleIDArray = List.toArray(new Integer[]{});

+ 1
- 1
VUECODE/smart-property-manage/src/views/account/user/addUser.vue Parādīt failu

@@ -54,7 +54,7 @@ export default {
54 54
         children: 'children'
55 55
       },
56 56
       rules: {
57
-        roleName: [
57
+        userName: [
58 58
           { required: true, message: '名称', trigger: 'blur' }
59 59
         ],
60 60
         loginName: [

+ 8
- 6
VUECODE/smart-property-manage/src/views/account/user/index.vue Parādīt failu

@@ -34,8 +34,8 @@
34 34
       <el-table-column prop="createNmae" label="创建人" align="center"/>
35 35
       <el-table-column prop="createDate" label="创建时间" align="center"><template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template></el-table-column>
36 36
       <el-table-column prop="id" label="操作" align="center">
37
-          <template slot-scope="scope"><a><span style="color: #63B8FF" @click="upDateStatus(scope.row.id,scope.row.status)">{{ scope.row.status =='1' ? '停用账号':'启用账号' }}</span></a></template>
38
-          </el-table-column>
37
+        <template slot-scope="scope"><a><span style="color: #63B8FF" @click="upDateStatus(scope.row.id,scope.row.status)">{{ scope.row.status =='1' ? '停用账号':'启用账号' }}</span></a></template>
38
+      </el-table-column>
39 39
     </el-table>
40 40
     <div class="block">
41 41
       <el-pagination
@@ -64,7 +64,7 @@ export default {
64 64
         createUser: '',
65 65
         updateUser: '',
66 66
         updateDate: '',
67
-        status : '',
67
+        status: '',
68 68
         pageNum: 1,
69 69
         pageSize: 10
70 70
       },
@@ -77,6 +77,10 @@ export default {
77 77
   mounted() {
78 78
     // 获取数据
79 79
     this.dataQuery()
80
+    // 截取角色
81
+    if(this.listQuery.roleName.length>1){
82
+      this.listQuery.roleName = this.listQuery.roleName.slice(0,10)+'...';
83
+    }
80 84
   },
81 85
   methods: {
82 86
     ...mapActions('listAnnouncement', [
@@ -109,11 +113,9 @@ export default {
109 113
         this.listLoading = false
110 114
         console.log('error EmployeesList')
111 115
       })
112
-      
113 116
     },
114 117
     handleSelectionChange(data) {
115
-      // 设置为 空
116
-      this.deleteIds = []
118
+      this.deleteIds = [] // 设置为 空
117 119
       for (let i = 0; i < data.length; i++) {
118 120
         this.deleteIds.push(data[i].id)
119 121
       }