Browse Source

加入钥匙申请功能

wuxw 6 years ago
parent
commit
3e46ee5afd
37 changed files with 2234 additions and 55 deletions
  1. 93 0
      Api/src/main/java/com/java110/api/listener/applicationKey/DeleteApplicationKeyListener.java
  2. 88 0
      Api/src/main/java/com/java110/api/listener/applicationKey/ListApplicationKeysListener.java
  3. 102 0
      Api/src/main/java/com/java110/api/listener/applicationKey/SaveApplicationKeyListener.java
  4. 99 0
      Api/src/main/java/com/java110/api/listener/applicationKey/UpdateApplicationKeyListener.java
  5. 34 0
      WebService/src/main/java/com/java110/web/components/applicationKey/AddApplicationKeyComponent.java
  6. 41 0
      WebService/src/main/java/com/java110/web/components/applicationKey/ApplicationKeyManageComponent.java
  7. 41 0
      WebService/src/main/java/com/java110/web/components/applicationKey/ChooseApplicationKeyComponent.java
  8. 34 0
      WebService/src/main/java/com/java110/web/components/applicationKey/DeleteApplicationKeyComponent.java
  9. 35 0
      WebService/src/main/java/com/java110/web/components/applicationKey/EditApplicationKeyComponent.java
  10. 19 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/IAddApplicationKeySMO.java
  11. 19 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/IDeleteApplicationKeySMO.java
  12. 19 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/IEditApplicationKeySMO.java
  13. 21 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/IListApplicationKeysSMO.java
  14. 71 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/impl/AddApplicationKeySMOImpl.java
  15. 64 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/impl/DeleteApplicationKeySMOImpl.java
  16. 69 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/impl/EditApplicationKeySMOImpl.java
  17. 66 0
      WebService/src/main/java/com/java110/web/smo/applicationKey/impl/ListApplicationKeysSMOImpl.java
  18. 88 0
      WebService/src/main/resources/components/applicationKeyPackage/add-applicationKey/addApplicationKey.html
  19. 193 0
      WebService/src/main/resources/components/applicationKeyPackage/add-applicationKey/addApplicationKey.js
  20. 118 0
      WebService/src/main/resources/components/applicationKeyPackage/applicationKey-manage/applicationKeyManage.html
  21. 87 0
      WebService/src/main/resources/components/applicationKeyPackage/applicationKey-manage/applicationKeyManage.js
  22. 0 0
      WebService/src/main/resources/components/applicationKeyPackage/audit-applicationKey-manage/auditApplicationKeyManage.html
  23. 0 0
      WebService/src/main/resources/components/applicationKeyPackage/audit-applicationKey-manage/auditApplicationKeyManage.js
  24. 70 0
      WebService/src/main/resources/components/applicationKeyPackage/choose-applicationKey/chooseApplicationKey.html
  25. 64 0
      WebService/src/main/resources/components/applicationKeyPackage/choose-applicationKey/chooseApplicationKey.js
  26. 19 0
      WebService/src/main/resources/components/applicationKeyPackage/delete-applicationKey/deleteApplicationKey.html
  27. 52 0
      WebService/src/main/resources/components/applicationKeyPackage/delete-applicationKey/deleteApplicationKey.js
  28. 75 0
      WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.html
  29. 185 0
      WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js
  30. 84 0
      WebService/src/main/resources/components/applicationKeyPackage/view-applicationKey-info/viewApplicationKeyInfo.html
  31. 55 0
      WebService/src/main/resources/components/applicationKeyPackage/view-applicationKey-info/viewApplicationKeyInfo.js
  32. 36 0
      WebService/src/main/resources/views/applicationKeyFlow.html
  33. 74 0
      java110-bean/src/main/java/com/java110/vo/api/applicationKey/ApiApplicationKeyDataVo.java
  34. 19 0
      java110-bean/src/main/java/com/java110/vo/api/applicationKey/ApiApplicationKeyVo.java
  35. 68 55
      java110-code-generator/src/main/resources/web/template_1.json
  36. 1 0
      java110-utils/src/main/java/com/java110/utils/constant/PrivilegeCodeConstant.java
  37. 31 0
      java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeApplicationKeyConstant.java

+ 93 - 0
Api/src/main/java/com/java110/api/listener/applicationKey/DeleteApplicationKeyListener.java

@@ -0,0 +1,93 @@
+package com.java110.api.listener.applicationKey;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.utils.util.Assert;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.AppService;
+import com.java110.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.CommonConstant;
+import com.java110.utils.constant.ServiceCodeConstant;
+import com.java110.utils.constant.BusinessTypeConstant;
+
+import com.java110.core.annotation.Java110Listener;
+import com.java110.utils.constant.ServiceCodeApplicationKeyConstant;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 保存小区侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("deleteApplicationKeyListener")
+public class DeleteApplicationKeyListener extends AbstractServiceApiListener {
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
+
+        Assert.hasKeyAndValue(reqJson, "applicationKeyId", "钥匙申请ID不能为空");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        HttpHeaders header = new HttpHeaders();
+        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
+        JSONArray businesses = new JSONArray();
+
+        AppService service = event.getAppService();
+
+        //添加单元信息
+        businesses.add(deleteApplicationKey(reqJson, context));
+
+        JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
+
+        //将 rest header 信息传递到下层服务中去
+        super.freshHttpHeader(header, context.getRequestCurrentHeaders());
+
+        ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj);
+
+        context.setResponseEntity(responseEntity);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeApplicationKeyConstant.DELETE_APPLICATIONKEY;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+    @Override
+    public int getOrder() {
+        return DEFAULT_ORDER;
+    }
+
+
+    /**
+     * 添加小区信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    private JSONObject deleteApplicationKey(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+
+        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_DELETE_APPLICATION_KEY);
+        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);
+        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+        JSONObject businessApplicationKey = new JSONObject();
+        businessApplicationKey.putAll(paramInJson);
+        //计算 应收金额
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessApplicationKey", businessApplicationKey);
+        return business;
+    }
+
+}

+ 88 - 0
Api/src/main/java/com/java110/api/listener/applicationKey/ListApplicationKeysListener.java

@@ -0,0 +1,88 @@
+package com.java110.api.listener.applicationKey;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.smo.hardwareAdapation.IApplicationKeyInnerServiceSMO;
+import com.java110.dto.hardwareAdapation.ApplicationKeyDto;
+import com.java110.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeApplicationKeyConstant;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.api.applicationKey.ApiApplicationKeyDataVo;
+import com.java110.vo.api.applicationKey.ApiApplicationKeyVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 查询小区侦听类
+ */
+@Java110Listener("listApplicationKeysListener")
+public class ListApplicationKeysListener extends AbstractServiceApiListener {
+
+    @Autowired
+    private IApplicationKeyInnerServiceSMO applicationKeyInnerServiceSMOImpl;
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeApplicationKeyConstant.LIST_APPLICATIONKEYS;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.GET;
+    }
+
+
+    @Override
+    public int getOrder() {
+        return DEFAULT_ORDER;
+    }
+
+
+    public IApplicationKeyInnerServiceSMO getApplicationKeyInnerServiceSMOImpl() {
+        return applicationKeyInnerServiceSMOImpl;
+    }
+
+    public void setApplicationKeyInnerServiceSMOImpl(IApplicationKeyInnerServiceSMO applicationKeyInnerServiceSMOImpl) {
+        this.applicationKeyInnerServiceSMOImpl = applicationKeyInnerServiceSMOImpl;
+    }
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        ApplicationKeyDto applicationKeyDto = BeanConvertUtil.covertBean(reqJson, ApplicationKeyDto.class);
+
+        int count = applicationKeyInnerServiceSMOImpl.queryApplicationKeysCount(applicationKeyDto);
+
+        List<ApiApplicationKeyDataVo> applicationKeys = null;
+
+        if (count > 0) {
+            applicationKeys = BeanConvertUtil.covertBeanList(applicationKeyInnerServiceSMOImpl.queryApplicationKeys(applicationKeyDto), ApiApplicationKeyDataVo.class);
+        } else {
+            applicationKeys = new ArrayList<>();
+        }
+
+        ApiApplicationKeyVo apiApplicationKeyVo = new ApiApplicationKeyVo();
+
+        apiApplicationKeyVo.setTotal(count);
+        apiApplicationKeyVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row")));
+        apiApplicationKeyVo.setApplicationKeys(applicationKeys);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiApplicationKeyVo), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+
+    }
+}

+ 102 - 0
Api/src/main/java/com/java110/api/listener/applicationKey/SaveApplicationKeyListener.java

@@ -0,0 +1,102 @@
+package com.java110.api.listener.applicationKey;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.utils.util.Assert;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.AppService;
+import com.java110.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.CommonConstant;
+import com.java110.utils.constant.ServiceCodeConstant;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.ServiceCodeApplicationKeyConstant;
+
+
+import com.java110.core.annotation.Java110Listener;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 保存小区侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("saveApplicationKeyListener")
+public class SaveApplicationKeyListener extends AbstractServiceApiListener {
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
+
+        Assert.hasKeyAndValue(reqJson, "name", "必填,请填写姓名");
+        Assert.hasKeyAndValue(reqJson, "tel", "必填,请填写手机号");
+        Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择用户类型");
+        Assert.hasKeyAndValue(reqJson, "sex", "必填,请选择性别");
+        Assert.hasKeyAndValue(reqJson, "age", "必填,请填写年龄");
+        Assert.hasKeyAndValue(reqJson, "idCard", "必填,请填写身份证号");
+        Assert.hasKeyAndValue(reqJson, "startTime", "必填,请选择开始时间");
+        Assert.hasKeyAndValue(reqJson, "endTime", "必填,请选择结束时间");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        HttpHeaders header = new HttpHeaders();
+        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
+        JSONArray businesses = new JSONArray();
+
+        AppService service = event.getAppService();
+
+        //添加单元信息
+        businesses.add(addApplicationKey(reqJson, context));
+
+        JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
+
+        //将 rest header 信息传递到下层服务中去
+        super.freshHttpHeader(header, context.getRequestCurrentHeaders());
+
+        ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj);
+
+        context.setResponseEntity(responseEntity);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeApplicationKeyConstant.ADD_APPLICATIONKEY;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+    @Override
+    public int getOrder() {
+        return DEFAULT_ORDER;
+    }
+
+
+    /**
+     * 添加小区信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    private JSONObject addApplicationKey(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+
+        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_APPLICATION_KEY);
+        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);
+        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+        JSONObject businessApplicationKey = new JSONObject();
+        businessApplicationKey.putAll(paramInJson);
+        businessApplicationKey.put("applicationKeyId", "-1");
+        //计算 应收金额
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessApplicationKey", businessApplicationKey);
+        return business;
+    }
+
+}

+ 99 - 0
Api/src/main/java/com/java110/api/listener/applicationKey/UpdateApplicationKeyListener.java

@@ -0,0 +1,99 @@
+package com.java110.api.listener.applicationKey;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.CommonConstant;
+import com.java110.utils.constant.ServiceCodeConstant;
+import com.java110.utils.util.Assert;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.AppService;
+import com.java110.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeApplicationKeyConstant;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 保存钥匙申请侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("updateApplicationKeyListener")
+public class UpdateApplicationKeyListener extends AbstractServiceApiListener {
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "applicationKeyId", "钥匙申请ID不能为空");
+        Assert.hasKeyAndValue(reqJson, "name", "必填,请填写姓名");
+        Assert.hasKeyAndValue(reqJson, "tel", "必填,请填写手机号");
+        Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择用户类型");
+        Assert.hasKeyAndValue(reqJson, "sex", "必填,请选择性别");
+        Assert.hasKeyAndValue(reqJson, "age", "必填,请填写年龄");
+        Assert.hasKeyAndValue(reqJson, "idCard", "必填,请填写身份证号");
+        Assert.hasKeyAndValue(reqJson, "startTime", "必填,请选择开始时间");
+        Assert.hasKeyAndValue(reqJson, "endTime", "必填,请选择结束时间");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        HttpHeaders header = new HttpHeaders();
+        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
+        JSONArray businesses = new JSONArray();
+
+        AppService service = event.getAppService();
+
+        //添加单元信息
+        businesses.add(updateApplicationKey(reqJson, context));
+
+        JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
+
+        //将 rest header 信息传递到下层服务中去
+        super.freshHttpHeader(header, context.getRequestCurrentHeaders());
+
+        ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj);
+
+        context.setResponseEntity(responseEntity);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeApplicationKeyConstant.UPDATE_APPLICATIONKEY;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+    @Override
+    public int getOrder() {
+        return DEFAULT_ORDER;
+    }
+
+
+    /**
+     * 添加钥匙申请信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    private JSONObject updateApplicationKey(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+
+        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_APPLICATION_KEY);
+        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);
+        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+        JSONObject businessApplicationKey = new JSONObject();
+        businessApplicationKey.putAll(paramInJson);
+        //计算 应收金额
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessApplicationKey", businessApplicationKey);
+        return business;
+    }
+
+}

+ 34 - 0
WebService/src/main/java/com/java110/web/components/applicationKey/AddApplicationKeyComponent.java

@@ -0,0 +1,34 @@
+package com.java110.web.components.applicationKey;
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.applicationKey.IAddApplicationKeySMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+/**
+ * 添加钥匙申请组件
+ */
+@Component("addApplicationKey")
+public class AddApplicationKeyComponent {
+
+    @Autowired
+    private IAddApplicationKeySMO addApplicationKeySMOImpl;
+
+    /**
+     * 添加钥匙申请数据
+     * @param pd 页面数据封装
+     * @return ResponseEntity 对象
+     */
+    public ResponseEntity<String> save(IPageData pd){
+        return addApplicationKeySMOImpl.saveApplicationKey(pd);
+    }
+
+    public IAddApplicationKeySMO getAddApplicationKeySMOImpl() {
+        return addApplicationKeySMOImpl;
+    }
+
+    public void setAddApplicationKeySMOImpl(IAddApplicationKeySMO addApplicationKeySMOImpl) {
+        this.addApplicationKeySMOImpl = addApplicationKeySMOImpl;
+    }
+}

+ 41 - 0
WebService/src/main/java/com/java110/web/components/applicationKey/ApplicationKeyManageComponent.java

@@ -0,0 +1,41 @@
+package com.java110.web.components.applicationKey;
+
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.applicationKey.IListApplicationKeysSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 钥匙申请组件管理类
+ * <p>
+ * add by wuxw
+ * <p>
+ * 2019-06-29
+ */
+@Component("applicationKeyManage")
+public class ApplicationKeyManageComponent {
+
+    @Autowired
+    private IListApplicationKeysSMO listApplicationKeysSMOImpl;
+
+    /**
+     * 查询钥匙申请列表
+     *
+     * @param pd 页面数据封装
+     * @return 返回 ResponseEntity 对象
+     */
+    public ResponseEntity<String> list(IPageData pd) {
+        return listApplicationKeysSMOImpl.listApplicationKeys(pd);
+    }
+
+    public IListApplicationKeysSMO getListApplicationKeysSMOImpl() {
+        return listApplicationKeysSMOImpl;
+    }
+
+    public void setListApplicationKeysSMOImpl(IListApplicationKeysSMO listApplicationKeysSMOImpl) {
+        this.listApplicationKeysSMOImpl = listApplicationKeysSMOImpl;
+    }
+}

+ 41 - 0
WebService/src/main/java/com/java110/web/components/applicationKey/ChooseApplicationKeyComponent.java

@@ -0,0 +1,41 @@
+package com.java110.web.components.applicationKey;
+
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.applicationKey.IListApplicationKeysSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 应用组件管理类
+ * <p>
+ * add by wuxw
+ * <p>
+ * 2019-06-29
+ */
+@Component("chooseApplicationKey")
+public class ChooseApplicationKeyComponent {
+
+    @Autowired
+    private IListApplicationKeysSMO listApplicationKeysSMOImpl;
+
+    /**
+     * 查询应用列表
+     *
+     * @param pd 页面数据封装
+     * @return 返回 ResponseEntity 对象
+     */
+    public ResponseEntity<String> list(IPageData pd) {
+        return listApplicationKeysSMOImpl.listApplicationKeys(pd);
+    }
+
+    public IListApplicationKeysSMO getListApplicationKeysSMOImpl() {
+        return listApplicationKeysSMOImpl;
+    }
+
+    public void setListApplicationKeysSMOImpl(IListApplicationKeysSMO listApplicationKeysSMOImpl) {
+        this.listApplicationKeysSMOImpl = listApplicationKeysSMOImpl;
+    }
+}

+ 34 - 0
WebService/src/main/java/com/java110/web/components/applicationKey/DeleteApplicationKeyComponent.java

@@ -0,0 +1,34 @@
+package com.java110.web.components.applicationKey;
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.applicationKey.IDeleteApplicationKeySMO;
+import org.springframework.beans.factory.annotation.Autowired;
+        import org.springframework.http.ResponseEntity;
+        import org.springframework.stereotype.Component;
+
+/**
+ * 添加钥匙申请组件
+ */
+@Component("deleteApplicationKey")
+public class DeleteApplicationKeyComponent {
+
+@Autowired
+private IDeleteApplicationKeySMO deleteApplicationKeySMOImpl;
+
+/**
+ * 添加钥匙申请数据
+ * @param pd 页面数据封装
+ * @return ResponseEntity 对象
+ */
+public ResponseEntity<String> delete(IPageData pd){
+        return deleteApplicationKeySMOImpl.deleteApplicationKey(pd);
+    }
+
+public IDeleteApplicationKeySMO getDeleteApplicationKeySMOImpl() {
+        return deleteApplicationKeySMOImpl;
+    }
+
+public void setDeleteApplicationKeySMOImpl(IDeleteApplicationKeySMO deleteApplicationKeySMOImpl) {
+        this.deleteApplicationKeySMOImpl = deleteApplicationKeySMOImpl;
+    }
+            }

+ 35 - 0
WebService/src/main/java/com/java110/web/components/applicationKey/EditApplicationKeyComponent.java

@@ -0,0 +1,35 @@
+package com.java110.web.components.applicationKey;
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.applicationKey.IEditApplicationKeySMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+/**
+ * 编辑小区组件
+ */
+@Component("editApplicationKey")
+public class EditApplicationKeyComponent {
+
+    @Autowired
+    private IEditApplicationKeySMO editApplicationKeySMOImpl;
+
+    /**
+     * 添加小区数据
+     *
+     * @param pd 页面数据封装
+     * @return ResponseEntity 对象
+     */
+    public ResponseEntity<String> update(IPageData pd) {
+        return editApplicationKeySMOImpl.updateApplicationKey(pd);
+    }
+
+    public IEditApplicationKeySMO getEditApplicationKeySMOImpl() {
+        return editApplicationKeySMOImpl;
+    }
+
+    public void setEditApplicationKeySMOImpl(IEditApplicationKeySMO editApplicationKeySMOImpl) {
+        this.editApplicationKeySMOImpl = editApplicationKeySMOImpl;
+    }
+}

+ 19 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/IAddApplicationKeySMO.java

@@ -0,0 +1,19 @@
+package com.java110.web.smo.applicationKey;
+
+import com.java110.core.context.IPageData;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 添加钥匙申请接口
+ *
+ * add by wuxw 2019-06-30
+ */
+public interface IAddApplicationKeySMO {
+
+    /**
+     * 添加钥匙申请
+     * @param pd 页面数据封装
+     * @return ResponseEntity 对象
+     */
+    ResponseEntity<String> saveApplicationKey(IPageData pd);
+}

+ 19 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/IDeleteApplicationKeySMO.java

@@ -0,0 +1,19 @@
+package com.java110.web.smo.applicationKey;
+
+import com.java110.core.context.IPageData;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 添加钥匙申请接口
+ *
+ * add by wuxw 2019-06-30
+ */
+public interface IDeleteApplicationKeySMO {
+
+    /**
+     * 添加钥匙申请
+     * @param pd 页面数据封装
+     * @return ResponseEntity 对象
+     */
+    ResponseEntity<String> deleteApplicationKey(IPageData pd);
+}

+ 19 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/IEditApplicationKeySMO.java

@@ -0,0 +1,19 @@
+package com.java110.web.smo.applicationKey;
+
+import com.java110.core.context.IPageData;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 修改钥匙申请接口
+ *
+ * add by wuxw 2019-06-30
+ */
+public interface IEditApplicationKeySMO {
+
+    /**
+     * 修改小区
+     * @param pd 页面数据封装
+     * @return ResponseEntity 对象
+     */
+    ResponseEntity<String> updateApplicationKey(IPageData pd);
+}

+ 21 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/IListApplicationKeysSMO.java

@@ -0,0 +1,21 @@
+package com.java110.web.smo.applicationKey;
+
+import com.java110.utils.exception.SMOException;
+import com.java110.core.context.IPageData;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 钥匙申请管理服务接口类
+ *
+ * add by wuxw 2019-06-29
+ */
+public interface IListApplicationKeysSMO {
+
+    /**
+     * 查询钥匙申请信息
+     * @param pd 页面数据封装
+     * @return ResponseEntity 对象数据
+     * @throws SMOException 业务代码层
+     */
+    ResponseEntity<String> listApplicationKeys(IPageData pd) throws SMOException;
+}

+ 71 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/impl/AddApplicationKeySMOImpl.java

@@ -0,0 +1,71 @@
+package com.java110.web.smo.applicationKey.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.component.AbstractComponentSMO;
+import com.java110.core.context.IPageData;
+import com.java110.utils.constant.PrivilegeCodeConstant;
+import com.java110.utils.constant.ServiceConstant;
+import com.java110.utils.util.Assert;
+import com.java110.web.smo.applicationKey.IAddApplicationKeySMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+
+
+/**
+ * 添加小区服务实现类
+ * add by wuxw 2019-06-30
+ */
+@Service("addApplicationKeySMOImpl")
+public class AddApplicationKeySMOImpl extends AbstractComponentSMO implements IAddApplicationKeySMO {
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Override
+    protected void validate(IPageData pd, JSONObject paramIn) {
+
+        //super.validatePageInfo(pd);
+
+        //Assert.hasKeyAndValue(paramIn, "xxx", "xxx");
+        Assert.hasKeyAndValue(paramIn, "name", "必填,请填写姓名");
+        Assert.hasKeyAndValue(paramIn, "tel", "必填,请填写手机号");
+        Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择用户类型");
+        Assert.hasKeyAndValue(paramIn, "sex", "必填,请选择性别");
+        Assert.hasKeyAndValue(paramIn, "age", "必填,请填写年龄");
+        Assert.hasKeyAndValue(paramIn, "idCard", "必填,请填写身份证号");
+        Assert.hasKeyAndValue(paramIn, "startTime", "必填,请选择开始时间");
+        Assert.hasKeyAndValue(paramIn, "endTime", "必填,请选择结束时间");
+
+
+        super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.LIST_APPLICATION_KEY);
+
+    }
+
+    @Override
+    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) {
+        ResponseEntity<String> responseEntity = null;
+        super.validateStoreStaffCommunityRelationship(pd, restTemplate);
+
+        responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
+                ServiceConstant.SERVICE_API_URL + "/api/applicationKey.saveApplicationKey",
+                HttpMethod.POST);
+        return responseEntity;
+    }
+
+    @Override
+    public ResponseEntity<String> saveApplicationKey(IPageData pd) {
+        return super.businessProcess(pd);
+    }
+
+    public RestTemplate getRestTemplate() {
+        return restTemplate;
+    }
+
+    public void setRestTemplate(RestTemplate restTemplate) {
+        this.restTemplate = restTemplate;
+    }
+}

+ 64 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/impl/DeleteApplicationKeySMOImpl.java

@@ -0,0 +1,64 @@
+package com.java110.web.smo.applicationKey.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.component.AbstractComponentSMO;
+import com.java110.core.context.IPageData;
+import com.java110.utils.constant.PrivilegeCodeConstant;
+import com.java110.utils.constant.ServiceConstant;
+import com.java110.utils.util.Assert;
+import com.java110.web.smo.applicationKey.IDeleteApplicationKeySMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+
+
+/**
+ * 添加小区服务实现类
+ * delete by wuxw 2019-06-30
+ */
+@Service("deleteApplicationKeySMOImpl")
+public class DeleteApplicationKeySMOImpl extends AbstractComponentSMO implements IDeleteApplicationKeySMO {
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Override
+    protected void validate(IPageData pd, JSONObject paramIn) {
+
+        //super.validatePageInfo(pd);
+
+        //Assert.hasKeyAndValue(paramIn, "xxx", "xxx");
+        Assert.hasKeyAndValue(paramIn, "applicationKeyId", "钥匙申请ID不能为空");
+
+
+        super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.LIST_APPLICATION_KEY);
+
+    }
+
+    @Override
+    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) {
+        ResponseEntity<String> responseEntity = null;
+        super.validateStoreStaffCommunityRelationship(pd, restTemplate);
+
+        responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
+                ServiceConstant.SERVICE_API_URL + "/api/applicationKey.deleteApplicationKey",
+                HttpMethod.POST);
+        return responseEntity;
+    }
+
+    @Override
+    public ResponseEntity<String> deleteApplicationKey(IPageData pd) {
+        return super.businessProcess(pd);
+    }
+
+    public RestTemplate getRestTemplate() {
+        return restTemplate;
+    }
+
+    public void setRestTemplate(RestTemplate restTemplate) {
+        this.restTemplate = restTemplate;
+    }
+}

+ 69 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/impl/EditApplicationKeySMOImpl.java

@@ -0,0 +1,69 @@
+package com.java110.web.smo.applicationKey.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.component.AbstractComponentSMO;
+import com.java110.core.context.IPageData;
+import com.java110.utils.constant.PrivilegeCodeConstant;
+import com.java110.utils.constant.ServiceConstant;
+import com.java110.utils.util.Assert;
+import com.java110.web.smo.applicationKey.IEditApplicationKeySMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * 添加钥匙申请服务实现类
+ * add by wuxw 2019-06-30
+ */
+@Service("eidtApplicationKeySMOImpl")
+public class EditApplicationKeySMOImpl extends AbstractComponentSMO implements IEditApplicationKeySMO {
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Override
+    protected void validate(IPageData pd, JSONObject paramIn) {
+
+        //super.validatePageInfo(pd);
+
+        Assert.hasKeyAndValue(paramIn, "applicationKeyId", "钥匙申请ID不能为空");
+        Assert.hasKeyAndValue(paramIn, "name", "必填,请填写姓名");
+        Assert.hasKeyAndValue(paramIn, "tel", "必填,请填写手机号");
+        Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择用户类型");
+        Assert.hasKeyAndValue(paramIn, "sex", "必填,请选择性别");
+        Assert.hasKeyAndValue(paramIn, "age", "必填,请填写年龄");
+        Assert.hasKeyAndValue(paramIn, "idCard", "必填,请填写身份证号");
+        Assert.hasKeyAndValue(paramIn, "startTime", "必填,请选择开始时间");
+        Assert.hasKeyAndValue(paramIn, "endTime", "必填,请选择结束时间");
+
+
+        super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.LIST_APPLICATION_KEY);
+
+    }
+
+    @Override
+    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) {
+        ResponseEntity<String> responseEntity = null;
+        super.validateStoreStaffCommunityRelationship(pd, restTemplate);
+
+        responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
+                ServiceConstant.SERVICE_API_URL + "/api/applicationKey.updateApplicationKey",
+                HttpMethod.POST);
+        return responseEntity;
+    }
+
+    @Override
+    public ResponseEntity<String> updateApplicationKey(IPageData pd) {
+        return super.businessProcess(pd);
+    }
+
+    public RestTemplate getRestTemplate() {
+        return restTemplate;
+    }
+
+    public void setRestTemplate(RestTemplate restTemplate) {
+        this.restTemplate = restTemplate;
+    }
+}

+ 66 - 0
WebService/src/main/java/com/java110/web/smo/applicationKey/impl/ListApplicationKeysSMOImpl.java

@@ -0,0 +1,66 @@
+package com.java110.web.smo.applicationKey.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.component.AbstractComponentSMO;
+import com.java110.core.context.IPageData;
+import com.java110.entity.component.ComponentValidateResult;
+import com.java110.utils.constant.PrivilegeCodeConstant;
+import com.java110.utils.constant.ServiceConstant;
+import com.java110.utils.exception.SMOException;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.web.smo.applicationKey.IListApplicationKeysSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.Map;
+
+/**
+ * 查询applicationKey服务类
+ */
+@Service("listApplicationKeysSMOImpl")
+public class ListApplicationKeysSMOImpl extends AbstractComponentSMO implements IListApplicationKeysSMO {
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Override
+    public ResponseEntity<String> listApplicationKeys(IPageData pd) throws SMOException {
+        return businessProcess(pd);
+    }
+
+    @Override
+    protected void validate(IPageData pd, JSONObject paramIn) {
+
+        super.validatePageInfo(pd);
+
+        super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.LIST_APPLICATION_KEY);
+    }
+
+    @Override
+    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) {
+        ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate);
+
+        Map paramMap = BeanConvertUtil.beanCovertMap(result);
+        paramIn.putAll(paramMap);
+
+        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/applicationKey.listApplicationKeys" + mapToUrlParam(paramIn);
+
+
+        ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, "",
+                apiUrl,
+                HttpMethod.GET);
+
+        return responseEntity;
+    }
+
+    public RestTemplate getRestTemplate() {
+        return restTemplate;
+    }
+
+    public void setRestTemplate(RestTemplate restTemplate) {
+        this.restTemplate = restTemplate;
+    }
+}

+ 88 - 0
WebService/src/main/resources/components/applicationKeyPackage/add-applicationKey/addApplicationKey.html

@@ -0,0 +1,88 @@
+<div id = "addApplicationKeyModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content">
+            <div class="modal-body">
+                <h3 class="m-t-none m-b ">添加钥匙申请</h3>
+                <div class="ibox-content">
+                    <div>
+                        <div>
+                            <!--<div class="form-group row">
+                                <label class="col-sm-2 col-form-label">楼名称</label>
+                                <div class="col-sm-10"><input v-model="addFloorInfo.name" type="text" placeholder="必填,请填写名称" class="form-control"></div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">楼编号</label>
+                                <div class="col-sm-10"><input v-model="addFloorInfo.floorNum" type="email" placeholder="必填,请填写编号" class="form-control"></div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">备注</label>
+                                <div class="col-sm-10"><input v-model="addFloorInfo.remark" type="tel" placeholder="可填,请填写备注" class="form-control"></div>
+                            </div>-->
+
+                            <div class="form-group row">
+         <label class="col-sm-2 col-form-label">姓名</label>
+         <div class="col-sm-10">
+           <input v-model="addApplicationKeyInfo.name"                   type="text" placeholder="必填,请填写姓名" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">手机号</label>
+         <div class="col-sm-10">
+           <input v-model="addApplicationKeyInfo.tel"                   type="text" placeholder="必填,请填写手机号" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">用户类型</label>
+         <div class="col-sm-10">
+<select class="custom-select" v-model="addApplicationKeyInfo.typeCd">
+         <option selected  disabled value="">必填,请选择用户类型</option>
+         <option  value="10001">保洁</option>
+<option  value="10002">保安</option>
+<option  value="10003">其他人员</option>
+  </select>         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">性别</label>
+         <div class="col-sm-10">
+<select class="custom-select" v-model="addApplicationKeyInfo.sex">
+         <option selected  disabled value="">必填,请选择性别</option>
+         <option  value="0">男</option>
+<option  value="1">女</option>
+  </select>         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">年龄</label>
+         <div class="col-sm-10">
+           <input v-model="addApplicationKeyInfo.age"                   type="text" placeholder="必填,请填写年龄" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">身份证号</label>
+         <div class="col-sm-10">
+           <input v-model="addApplicationKeyInfo.idCard"                   type="text" placeholder="必填,请填写身份证号" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">开始时间</label>
+         <div class="col-sm-10">
+           <input v-model="addApplicationKeyInfo.startTime"                   type="text" placeholder="必填,请填写开始时间" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">结束时间</label>
+         <div class="col-sm-10">
+           <input v-model="addApplicationKeyInfo.endTime"                   type="text" placeholder="必填,请填写结束时间" class="form-control">
+         </div>
+</div>
+
+                            <div class="ibox-content">
+                                <button class="btn btn-primary float-right" type="button" v-on:click="saveApplicationKeyInfo()" ><i class="fa fa-check"></i>&nbsp;保存</button>
+                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 193 - 0
WebService/src/main/resources/components/applicationKeyPackage/add-applicationKey/addApplicationKey.js

@@ -0,0 +1,193 @@
+(function (vc) {
+
+    vc.extends({
+        propTypes: {
+            callBackListener: vc.propTypes.string, //父组件名称
+            callBackFunction: vc.propTypes.string //父组件监听方法
+        },
+        data: {
+            addApplicationKeyInfo: {
+                applicationKeyId: '',
+                name: '',
+                tel: '',
+                typeCd: '',
+                sex: '',
+                age: '',
+                idCard: '',
+                startTime: '',
+                endTime: '',
+
+            }
+        },
+        _initMethod: function () {
+
+        },
+        _initEvent: function () {
+            vc.on('addApplicationKey', 'openAddApplicationKeyModal', function () {
+                $('#addApplicationKeyModel').modal('show');
+            });
+        },
+        methods: {
+            addApplicationKeyValidate() {
+                return vc.validate.validate({
+                    addApplicationKeyInfo: vc.component.addApplicationKeyInfo
+                }, {
+                    'addApplicationKeyInfo.name': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "姓名不能为空"
+                        },
+                        {
+                            limit: "maxin",
+                            param: "1,64",
+                            errInfo: "姓名不能超过64位"
+                        },
+                    ],
+                    'addApplicationKeyInfo.tel': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "手机号不能为空"
+                        },
+                        {
+                            limit: "phone",
+                            param: "",
+                            errInfo: "手机号格式错误"
+                        },
+                    ],
+                    'addApplicationKeyInfo.typeCd': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "用户类型不能为空"
+                        },
+                        {
+                            limit: "num",
+                            param: "",
+                            errInfo: "用户类型格式错误"
+                        },
+                    ],
+                    'addApplicationKeyInfo.sex': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "性别不能为空"
+                        },
+                        {
+                            limit: "num",
+                            param: "",
+                            errInfo: "性别格式错误"
+                        },
+                    ],
+                    'addApplicationKeyInfo.age': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "年龄不能为空"
+                        },
+                        {
+                            limit: "num",
+                            param: "",
+                            errInfo: "年龄不是有效数字"
+                        },
+                    ],
+                    'addApplicationKeyInfo.idCard': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "身份证号不能为空"
+                        },
+                        {
+                            limit: "idCard",
+                            param: "",
+                            errInfo: "不是有效的身份证号"
+                        },
+                    ],
+                    'addApplicationKeyInfo.startTime': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "开始时间不能为空"
+                        },
+                        {
+                            limit: "dateTime",
+                            param: "",
+                            errInfo: "不是有效的时间格式"
+                        },
+                    ],
+                    'addApplicationKeyInfo.endTime': [
+                        {
+                            limit: "required",
+                            param: "",
+                            errInfo: "结束时间不能为空"
+                        },
+                        {
+                            limit: "dateTime",
+                            param: "",
+                            errInfo: "不是有效的时间格式"
+                        },
+                    ],
+
+
+                });
+            },
+            saveApplicationKeyInfo: function () {
+                if (!vc.component.addApplicationKeyValidate()) {
+                    vc.message(vc.validate.errInfo);
+
+                    return;
+                }
+
+                vc.component.addApplicationKeyInfo.communityId = vc.getCurrentCommunity().communityId;
+                //不提交数据将数据 回调给侦听处理
+                if (vc.notNull($props.callBackListener)) {
+                    vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addApplicationKeyInfo);
+                    $('#addApplicationKeyModel').modal('hide');
+                    return;
+                }
+
+                vc.http.post(
+                    'addApplicationKey',
+                    'save',
+                    JSON.stringify(vc.component.addApplicationKeyInfo),
+                    {
+                        emulateJSON: true
+                    },
+                    function (json, res) {
+                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                        if (res.status == 200) {
+                            //关闭model
+                            $('#addApplicationKeyModel').modal('hide');
+                            vc.component.clearAddApplicationKeyInfo();
+                            vc.emit('applicationKeyManage', 'listApplicationKey', {});
+
+                            return;
+                        }
+                        vc.message(json);
+
+                    },
+                    function (errInfo, error) {
+                        console.log('请求失败处理');
+
+                        vc.message(errInfo);
+
+                    });
+            },
+            clearAddApplicationKeyInfo: function () {
+                vc.component.addApplicationKeyInfo = {
+                    name: '',
+                    tel: '',
+                    typeCd: '',
+                    sex: '',
+                    age: '',
+                    idCard: '',
+                    startTime: '',
+                    endTime: '',
+
+                };
+            }
+        }
+    });
+
+})(window.vc);

+ 118 - 0
WebService/src/main/resources/components/applicationKeyPackage/applicationKey-manage/applicationKeyManage.html

@@ -0,0 +1,118 @@
+<div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce">
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox ">
+                <div class="ibox-title">
+                    <h5>查询条件</h5>
+                    <div class="ibox-tools" style="top:10px;">
+                        <button type="button"  class="btn btn-link btn-sm" style="margin-right:10px;"  v-on:click="_moreCondition()">{{applicationKeyManageInfo.moreCondition == true?'隐藏':'更多'}}</button>
+                    </div>
+                </div>
+                <div class="ibox-content">
+                    <div class="row">
+<div class="col-sm-4" >
+<div class="form-group">
+                                <input type="text" placeholder="请输入名称" v-model="applicationKeyManageInfo.conditions.name" class=" form-control">
+                            </div>                        </div><div class="col-sm-4" >
+<select class="custom-select" v-model="applicationKeyManageInfo.conditions.typeCd">
+         <option selected  value="">请选择用户类型</option>
+         <option  value="10001">保洁</option>
+<option  value="10002">保安</option>
+<option  value="10003">其他人员</option>
+  </select>                        </div><div class="col-sm-3" >
+<div class="form-group">
+                                <input type="text" placeholder="请输入用户手机" v-model="applicationKeyManageInfo.conditions.tel" class=" form-control">
+                            </div>                        </div><div class="col-sm-1">
+                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryApplicationKeyMethod()">
+                                    <i class="glyphicon glyphicon-search"></i> 查询
+                            </button>
+                        </div></div>
+<div class="row">
+<div class="col-sm-4" v-if="applicationKeyManageInfo.moreCondition == true">
+<div class="form-group">
+                                <input type="text" placeholder="请输入身份证号" v-model="applicationKeyManageInfo.conditions.idCard" class=" form-control">
+                            </div>                        </div></div>
+
+
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox">
+                <div class="ibox-title">
+                    <h5>钥匙申请信息</h5>
+                    <div class="ibox-tools" style="top:10px;">
+                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddApplicationKeyModal()">
+                            <i class="glyphicon glyphicon-plus"></i>
+                            添加钥匙申请
+                        </button>
+                    </div>
+                </div>
+                <div class="ibox-content">
+
+                    <table class="footable table table-stripped toggle-arrow-tiny"
+                           data-page-size="15"
+                    >
+                        <thead>
+                        <tr>
+                                                        <th class="text-center">钥匙申请ID</th>
+                            <th class="text-center">姓名</th>
+                            <th class="text-center">手机号</th>
+                            <th class="text-center">用户类型</th>
+                            <th class="text-center">性别</th>
+                            <th class="text-center">年龄</th>
+                            <th class="text-center">身份证号</th>
+                            <th class="text-center">开始时间</th>
+                            <th class="text-center">结束时间</th>
+                            <th class="text-center">操作</th>
+
+
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr v-for="applicationKey in applicationKeyManageInfo.applicationKeys">
+                                                        <td class="text-center">{{applicationKey.applicationKeyId}}</td>
+                            <td class="text-center">{{applicationKey.name}}</td>
+                            <td class="text-center">{{applicationKey.tel}}</td>
+                            <td class="text-center">{{applicationKey.typeCd}}</td>
+                            <td class="text-center">{{applicationKey.sex}}</td>
+                            <td class="text-center">{{applicationKey.age}}</td>
+                            <td class="text-center">{{applicationKey.idCard}}</td>
+                            <td class="text-center">{{applicationKey.startTime}}</td>
+                            <td class="text-center">{{applicationKey.endTime}}</td>
+                            <td class="text-center"><div class="btn-group">
+                                    <button class="btn-white btn btn-xs" v-on:click="_openEditApplicationKeyModel(applicationKey)">修改</button>
+                                </div>
+                                <div class="btn-group">
+                                    <button class="btn-white btn btn-xs" v-on:click="_openDeleteApplicationKeyModel(applicationKey)">删除</button>
+                                </div></td>
+
+                        </tr>
+                        </tbody>
+                        <tfoot>
+                        <tr>
+                            <td colspan="7">
+                                <ul class="pagination float-right"></ul>
+                            </td>
+                        </tr>
+                        </tfoot>
+                    </table>
+                    <!-- 分页 -->
+                    <vc:create name="pagination"></vc:create>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    
+
+    <vc:create name="addApplicationKey"
+               callBackListener=""
+               callBackFunction=""
+    ></vc:create>
+    <vc:create name="editApplicationKey"></vc:create>
+    <vc:create name="deleteApplicationKey"></vc:create>
+
+</div>

+ 87 - 0
WebService/src/main/resources/components/applicationKeyPackage/applicationKey-manage/applicationKeyManage.js

@@ -0,0 +1,87 @@
+/**
+    入驻小区
+**/
+(function(vc){
+    var DEFAULT_PAGE = 1;
+    var DEFAULT_ROWS = 10;
+    vc.extends({
+        data:{
+            applicationKeyManageInfo:{
+                applicationKeys:[],
+                total:0,
+                records:1,
+                moreCondition:false,
+                name:'',
+                conditions:{
+                    name:'',
+typeCd:'',
+tel:'',
+idCard:'',
+
+                }
+            }
+        },
+        _initMethod:function(){
+            vc.component._listApplicationKeys(DEFAULT_PAGE, DEFAULT_ROWS);
+        },
+        _initEvent:function(){
+            
+            vc.on('applicationKeyManage','listApplicationKey',function(_param){
+                  vc.component._listApplicationKeys(DEFAULT_PAGE, DEFAULT_ROWS);
+            });
+             vc.on('pagination','page_event',function(_currentPage){
+                vc.component._listApplicationKeys(_currentPage,DEFAULT_ROWS);
+            });
+        },
+        methods:{
+            _listApplicationKeys:function(_page, _rows){
+
+                vc.component.applicationKeyManageInfo.conditions.page = _page;
+                vc.component.applicationKeyManageInfo.conditions.row = _rows;
+                var param = {
+                    params:vc.component.applicationKeyManageInfo.conditions
+               };
+
+               //发送get请求
+               vc.http.get('applicationKeyManage',
+                            'list',
+                             param,
+                             function(json,res){
+                                var _applicationKeyManageInfo=JSON.parse(json);
+                                vc.component.applicationKeyManageInfo.total = _applicationKeyManageInfo.total;
+                                vc.component.applicationKeyManageInfo.records = _applicationKeyManageInfo.records;
+                                vc.component.applicationKeyManageInfo.applicationKeys = _applicationKeyManageInfo.applicationKeys;
+                                vc.emit('pagination','init',{
+                                     total:vc.component.applicationKeyManageInfo.records,
+                                     currentPage:_page
+                                 });
+                             },function(errInfo,error){
+                                console.log('请求失败处理');
+                             }
+                           );
+            },
+            _openAddApplicationKeyModal:function(){
+                vc.emit('addApplicationKey','openAddApplicationKeyModal',{});
+            },
+            _openEditApplicationKeyModel:function(_applicationKey){
+                vc.emit('editApplicationKey','openEditApplicationKeyModal',_applicationKey);
+            },
+            _openDeleteApplicationKeyModel:function(_applicationKey){
+                vc.emit('deleteApplicationKey','openDeleteApplicationKeyModal',_applicationKey);
+            },
+            _queryApplicationKeyMethod:function(){
+                vc.component._listApplicationKeys(DEFAULT_PAGE, DEFAULT_ROWS);
+
+            },
+            _moreCondition:function(){
+                if(vc.component.applicationKeyManageInfo.moreCondition){
+                    vc.component.applicationKeyManageInfo.moreCondition = false;
+                }else{
+                    vc.component.applicationKeyManageInfo.moreCondition = true;
+                }
+            }
+
+             
+        }
+    });
+})(window.vc);

WebService/src/main/resources/components/ownerPackage/audit-applicationKey-manage/auditApplicationKeyManage.html → WebService/src/main/resources/components/applicationKeyPackage/audit-applicationKey-manage/auditApplicationKeyManage.html


WebService/src/main/resources/components/ownerPackage/audit-applicationKey-manage/auditApplicationKeyManage.js → WebService/src/main/resources/components/applicationKeyPackage/audit-applicationKey-manage/auditApplicationKeyManage.js


+ 70 - 0
WebService/src/main/resources/components/applicationKeyPackage/choose-applicationKey/chooseApplicationKey.html

@@ -0,0 +1,70 @@
+<div id = "chooseApplicationKeyModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseApplicationKeyModelLabel" aria-hidden="true" >
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h3 class="modal-title" id="chooseApplicationKeyModelLabel">选择钥匙申请</h3>
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+            </div>
+            <div class="modal-body">
+                <div class=" row">
+                    <div class="col-lg-12">
+                        <div class="ibox ">
+                            <div class="row">
+
+                                <div class="col-sm-7 m-b-xs">
+                                </div>
+                                <div class="col-sm-5">
+                                    <div class="input-group">
+                                        <input placeholder="输入钥匙申请名称" type="text" v-model="chooseApplicationKeyInfo._currentApplicationKeyName" class="form-control form-control-sm">
+                                        <span class="input-group-append">
+                                                <button type="button" class="btn btn-sm btn-primary" v-on:click="queryApplicationKeys()">查询</button>
+                                            </span>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="table-responsive" style="margin-top:15px">
+                                <table class="table table-striped">
+                                    <thead>
+                                        <tr>
+                                                                        <th class="text-center">钥匙申请ID</th>
+                            <th class="text-center">姓名</th>
+                            <th class="text-center">手机号</th>
+                            <th class="text-center">用户类型</th>
+                            <th class="text-center">性别</th>
+                            <th class="text-center">年龄</th>
+                            <th class="text-center">身份证号</th>
+                            <th class="text-center">开始时间</th>
+                            <th class="text-center">结束时间</th>
+                            <th class="text-center">操作</th>
+
+                                        </tr>
+                                    </thead>
+                                    <tbody>
+                                        <tr v-for="applicationKey in chooseApplicationKeyInfo.applicationKeys">
+                                                                        <td class="text-center">{{applicationKey.applicationKeyId}}</td>
+                            <td class="text-center">{{applicationKey.name}}</td>
+                            <td class="text-center">{{applicationKey.tel}}</td>
+                            <td class="text-center">{{applicationKey.typeCd}}</td>
+                            <td class="text-center">{{applicationKey.sex}}</td>
+                            <td class="text-center">{{applicationKey.age}}</td>
+                            <td class="text-center">{{applicationKey.idCard}}</td>
+                            <td class="text-center">{{applicationKey.startTime}}</td>
+                            <td class="text-center">{{applicationKey.endTime}}</td>
+
+                                            <td>
+                                                <button class="btn btn-primary btn-xs" v-on:click="chooseApplicationKey(applicationKey)">选择</button>
+                                            </td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                            </div>
+
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 64 - 0
WebService/src/main/resources/components/applicationKeyPackage/choose-applicationKey/chooseApplicationKey.js

@@ -0,0 +1,64 @@
+(function(vc){
+    vc.extends({
+        propTypes: {
+           emitChooseApplicationKey:vc.propTypes.string,
+           emitLoadData:vc.propTypes.string
+        },
+        data:{
+            chooseApplicationKeyInfo:{
+                applicationKeys:[],
+                _currentApplicationKeyName:'',
+            }
+        },
+        _initMethod:function(){
+        },
+        _initEvent:function(){
+            vc.on('chooseApplicationKey','openChooseApplicationKeyModel',function(_param){
+                $('#chooseApplicationKeyModel').modal('show');
+                vc.component._refreshChooseApplicationKeyInfo();
+                vc.component._loadAllApplicationKeyInfo(1,10,'');
+            });
+        },
+        methods:{
+            _loadAllApplicationKeyInfo:function(_page,_row,_name){
+                var param = {
+                    params:{
+                        page:_page,
+                        row:_row,
+                        communityId:vc.getCurrentCommunity().communityId,
+                        name:_name
+                    }
+                };
+
+                //发送get请求
+               vc.http.get('chooseApplicationKey',
+                            'list',
+                             param,
+                             function(json){
+                                var _applicationKeyInfo = JSON.parse(json);
+                                vc.component.chooseApplicationKeyInfo.applicationKeys = _applicationKeyInfo.applicationKeys;
+                             },function(){
+                                console.log('请求失败处理');
+                             }
+                           );
+            },
+            chooseApplicationKey:function(_applicationKey){
+                if(_applicationKey.hasOwnProperty('name')){
+                     _applicationKey.applicationKeyName = _applicationKey.name;
+                }
+                vc.emit($props.emitChooseApplicationKey,'chooseApplicationKey',_applicationKey);
+                vc.emit($props.emitLoadData,'listApplicationKeyData',{
+                    applicationKeyId:_applicationKey.applicationKeyId
+                });
+                $('#chooseApplicationKeyModel').modal('hide');
+            },
+            queryApplicationKeys:function(){
+                vc.component._loadAllApplicationKeyInfo(1,10,vc.component.chooseApplicationKeyInfo._currentApplicationKeyName);
+            },
+            _refreshChooseApplicationKeyInfo:function(){
+                vc.component.chooseApplicationKeyInfo._currentApplicationKeyName = "";
+            }
+        }
+
+    });
+})(window.vc);

+ 19 - 0
WebService/src/main/resources/components/applicationKeyPackage/delete-applicationKey/deleteApplicationKey.html

@@ -0,0 +1,19 @@
+<div class="modal fade" id="deleteApplicationKeyModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5>
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+            </div>
+            <div class="modal-body">
+                <tr align="center"><th>确定删除钥匙申请</th></tr>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteApplicationKeyModel()">点错了</button>
+                <button type="button" class="btn btn-primary" v-on:click="deleteApplicationKey()">确认删除</button>
+            </div>
+        </div>
+    </div>
+</div>

+ 52 - 0
WebService/src/main/resources/components/applicationKeyPackage/delete-applicationKey/deleteApplicationKey.js

@@ -0,0 +1,52 @@
+(function(vc,vm){
+
+    vc.extends({
+        data:{
+            deleteApplicationKeyInfo:{
+
+            }
+        },
+         _initMethod:function(){
+
+         },
+         _initEvent:function(){
+             vc.on('deleteApplicationKey','openDeleteApplicationKeyModal',function(_params){
+
+                vc.component.deleteApplicationKeyInfo = _params;
+                $('#deleteApplicationKeyModel').modal('show');
+
+            });
+        },
+        methods:{
+            deleteApplicationKey:function(){
+                vc.component.deleteApplicationKeyInfo.communityId=vc.getCurrentCommunity().communityId;
+                vc.http.post(
+                    'deleteApplicationKey',
+                    'delete',
+                    JSON.stringify(vc.component.deleteApplicationKeyInfo),
+                    {
+                        emulateJSON:true
+                     },
+                     function(json,res){
+                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                        if(res.status == 200){
+                            //关闭model
+                            $('#deleteApplicationKeyModel').modal('hide');
+                            vc.emit('applicationKeyManage','listApplicationKey',{});
+                            return ;
+                        }
+                        vc.message(json);
+                     },
+                     function(errInfo,error){
+                        console.log('请求失败处理');
+                        vc.message(json);
+
+                     });
+            },
+            closeDeleteApplicationKeyModel:function(){
+                $('#deleteApplicationKeyModel').modal('hide');
+            }
+        }
+    });
+
+})(window.vc,window.vc.component);

+ 75 - 0
WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.html

@@ -0,0 +1,75 @@
+<div id = "editApplicationKeyModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content">
+            <div class="modal-body">
+                <h3 class="m-t-none m-b ">修改钥匙申请</h3>
+                <div class="ibox-content">
+                    <div>
+                        <div>
+                            <div class="form-group row">
+         <label class="col-sm-2 col-form-label">姓名</label>
+         <div class="col-sm-10">
+           <input v-model="editApplicationKeyInfo.name"                   type="text" placeholder="必填,请填写姓名" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">手机号</label>
+         <div class="col-sm-10">
+           <input v-model="editApplicationKeyInfo.tel"                   type="text" placeholder="必填,请填写手机号" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">用户类型</label>
+         <div class="col-sm-10">
+<select class="custom-select" v-model="editApplicationKeyInfo.typeCd">
+         <option selected  disabled value="">必填,请选择用户类型</option>
+         <option  value="10001">保洁</option>
+<option  value="10002">保安</option>
+<option  value="10003">其他人员</option>
+  </select>         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">性别</label>
+         <div class="col-sm-10">
+<select class="custom-select" v-model="editApplicationKeyInfo.sex">
+         <option selected  disabled value="">必填,请选择性别</option>
+         <option  value="0">男</option>
+<option  value="1">女</option>
+  </select>         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">年龄</label>
+         <div class="col-sm-10">
+           <input v-model="editApplicationKeyInfo.age"                   type="text" placeholder="必填,请填写年龄" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">身份证号</label>
+         <div class="col-sm-10">
+           <input v-model="editApplicationKeyInfo.idCard"                   type="text" placeholder="必填,请填写身份证号" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">开始时间</label>
+         <div class="col-sm-10">
+           <input v-model="editApplicationKeyInfo.startTime"                   type="text" placeholder="必填,请填写开始时间" class="form-control">
+         </div>
+</div>
+<div class="form-group row">
+         <label class="col-sm-2 col-form-label">结束时间</label>
+         <div class="col-sm-10">
+           <input v-model="editApplicationKeyInfo.endTime"                   type="text" placeholder="必填,请填写结束时间" class="form-control">
+         </div>
+</div>
+
+                            <div class="ibox-content">
+                                <button class="btn btn-primary float-right" type="button" v-on:click="editApplicationKey()" ><i class="fa fa-check"></i>&nbsp;保存</button>
+                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 185 - 0
WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js

@@ -0,0 +1,185 @@
+(function(vc,vm){
+
+    vc.extends({
+        data:{
+            editApplicationKeyInfo:{
+                applicationKeyId:'',
+name:'',
+tel:'',
+typeCd:'',
+sex:'',
+age:'',
+idCard:'',
+startTime:'',
+endTime:'',
+
+            }
+        },
+         _initMethod:function(){
+
+         },
+         _initEvent:function(){
+             vc.on('editApplicationKey','openEditApplicationKeyModal',function(_params){
+                vc.component.refreshEditApplicationKeyInfo();
+                $('#editApplicationKeyModel').modal('show');
+                vc.copyObject(_params, vc.component.editApplicationKeyInfo );
+                vc.component.editApplicationKeyInfo.communityId = vc.getCurrentCommunity().communityId;
+            });
+        },
+        methods:{
+            editApplicationKeyValidate:function(){
+                        return vc.validate.validate({
+                            editApplicationKeyInfo:vc.component.editApplicationKeyInfo
+                        },{
+                            'editApplicationKeyInfo.name':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"姓名不能为空"
+                        },
+ {
+                            limit:"maxin",
+                            param:"1,64",
+                            errInfo:"姓名不能超过64位"
+                        },
+                    ],
+'editApplicationKeyInfo.tel':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"手机号不能为空"
+                        },
+ {
+                            limit:"phone",
+                            param:"",
+                            errInfo:"手机号格式错误"
+                        },
+                    ],
+'editApplicationKeyInfo.typeCd':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"用户类型不能为空"
+                        },
+ {
+                            limit:"num",
+                            param:"",
+                            errInfo:"用户类型格式错误"
+                        },
+                    ],
+'editApplicationKeyInfo.sex':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"性别不能为空"
+                        },
+ {
+                            limit:"num",
+                            param:"",
+                            errInfo:"性别格式错误"
+                        },
+                    ],
+'editApplicationKeyInfo.age':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"年龄不能为空"
+                        },
+ {
+                            limit:"num",
+                            param:"",
+                            errInfo:"年龄不是有效数字"
+                        },
+                    ],
+'editApplicationKeyInfo.idCard':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"身份证号不能为空"
+                        },
+ {
+                            limit:"idCard",
+                            param:"",
+                            errInfo:"不是有效的身份证号"
+                        },
+                    ],
+'editApplicationKeyInfo.startTime':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"开始时间不能为空"
+                        },
+ {
+                            limit:"dateTime",
+                            param:"",
+                            errInfo:"不是有效的时间格式"
+                        },
+                    ],
+'editApplicationKeyInfo.endTime':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"结束时间不能为空"
+                        },
+ {
+                            limit:"dateTime",
+                            param:"",
+                            errInfo:"不是有效的时间格式"
+                        },
+                    ],
+'editApplicationKeyInfo.applicationKeyId':[
+{
+                            limit:"required",
+                            param:"",
+                            errInfo:"钥匙申请ID不能为空"
+                        }]
+
+                        });
+             },
+            editApplicationKey:function(){
+                if(!vc.component.editApplicationKeyValidate()){
+                    vc.message(vc.validate.errInfo);
+                    return ;
+                }
+
+                vc.http.post(
+                    'editApplicationKey',
+                    'update',
+                    JSON.stringify(vc.component.editApplicationKeyInfo),
+                    {
+                        emulateJSON:true
+                     },
+                     function(json,res){
+                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                        if(res.status == 200){
+                            //关闭model
+                            $('#editApplicationKeyModel').modal('hide');
+                             vc.emit('applicationKeyManage','listApplicationKey',{});
+                            return ;
+                        }
+                        vc.message(json);
+                     },
+                     function(errInfo,error){
+                        console.log('请求失败处理');
+
+                        vc.message(errInfo);
+                     });
+            },
+            refreshEditApplicationKeyInfo:function(){
+                vc.component.editApplicationKeyInfo= {
+                  applicationKeyId:'',
+name:'',
+tel:'',
+typeCd:'',
+sex:'',
+age:'',
+idCard:'',
+startTime:'',
+endTime:'',
+
+                }
+            }
+        }
+    });
+
+})(window.vc,window.vc.component);

+ 84 - 0
WebService/src/main/resources/components/applicationKeyPackage/view-applicationKey-info/viewApplicationKeyInfo.html

@@ -0,0 +1,84 @@
+<div class="row">
+    <div class="col-lg-12">
+        <div class="ibox ">
+            <div class="ibox-title">
+                <h5>钥匙申请信息</h5>
+                <div class="ibox-tools" style="top:10px;">
+                    <button type="button" v-if="viewApplicationKeyInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;"  v-on:click="_openSelectApplicationKeyInfoModel()">
+                        <i class="glyphicon glyphicon-search"></i> 选择钥匙申请</button>
+
+                    <button type="button" v-if="viewApplicationKeyInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddApplicationKeyInfoModel()">
+                        <i class="glyphicon glyphicon-plus"></i> 添加钥匙申请</button>
+                </div>
+            </div>
+            <div class="ibox-content">
+                <div class="row">
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >姓名:</label>
+                            <label class="">{{viewApplicationKeyInfo.name}}</label>
+                        </div>
+</div>
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >手机号:</label>
+                            <label class="">{{viewApplicationKeyInfo.tel}}</label>
+                        </div>
+</div>
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >用户类型:</label>
+                            <label class="">{{viewApplicationKeyInfo.typeCd}}</label>
+                        </div>
+</div>
+</div>
+<div class="row">
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >性别:</label>
+                            <label class="">{{viewApplicationKeyInfo.sex}}</label>
+                        </div>
+</div>
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >年龄:</label>
+                            <label class="">{{viewApplicationKeyInfo.age}}</label>
+                        </div>
+</div>
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >身份证号:</label>
+                            <label class="">{{viewApplicationKeyInfo.idCard}}</label>
+                        </div>
+</div>
+</div>
+<div class="row">
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >开始时间:</label>
+                            <label class="">{{viewApplicationKeyInfo.startTime}}</label>
+                        </div>
+</div>
+<div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >结束时间:</label>
+                            <label class="">{{viewApplicationKeyInfo.endTime}}</label>
+                        </div>
+</div>
+</div>
+
+            </div>
+        </div>
+    </div>
+
+    <vc:create name="addApplicationKey"
+               callBackListener="viewApplicationKeyInfo"
+               callBackFunction="chooseApplicationKey"
+    ></vc:create>
+
+
+    <vc:create name="chooseApplicationKey"
+               emitChooseApplicationKey="viewApplicationKeyInfo"
+               emitLoadData="viewApplicationKeyInfo"
+    ></vc:create>
+</div>

+ 55 - 0
WebService/src/main/resources/components/applicationKeyPackage/view-applicationKey-info/viewApplicationKeyInfo.js

@@ -0,0 +1,55 @@
+/**
+    钥匙申请 组件
+**/
+(function(vc){
+
+    vc.extends({
+        propTypes: {
+           callBackListener:vc.propTypes.string, //父组件名称
+           callBackFunction:vc.propTypes.string //父组件监听方法
+        },
+        data:{
+            viewApplicationKeyInfo:{
+                index:0,
+                flowComponent:'viewApplicationKeyInfo',
+                name:'',
+tel:'',
+typeCd:'',
+sex:'',
+age:'',
+idCard:'',
+startTime:'',
+endTime:'',
+
+            }
+        },
+        _initMethod:function(){
+            //根据请求参数查询 查询 业主信息
+            vc.component._loadApplicationKeyInfoData();
+        },
+        _initEvent:function(){
+            vc.on('viewApplicationKeyInfo','chooseApplicationKey',function(_app){
+                vc.copyObject(_app, vc.component.viewApplicationKeyInfo);
+                vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewApplicationKeyInfo);
+            });
+
+            vc.on('viewApplicationKeyInfo', 'onIndex', function(_index){
+                vc.component.viewApplicationKeyInfo.index = _index;
+            });
+
+        },
+        methods:{
+
+            _openSelectApplicationKeyInfoModel(){
+                vc.emit('chooseApplicationKey','openChooseApplicationKeyModel',{});
+            },
+            _openAddApplicationKeyInfoModel(){
+                vc.emit('addApplicationKey','openAddApplicationKeyModal',{});
+            },
+            _loadApplicationKeyInfoData:function(){
+
+            }
+        }
+    });
+
+})(window.vc);

+ 36 - 0
WebService/src/main/resources/views/applicationKeyFlow.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en"
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:th="http://www.thymeleaf.org"
+      xmlns:vc="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8"/>
+    <title>钥匙申请|java110</title>
+    <vc:create name="commonTop"></vc:create>
+</head>
+<body>
+<vc:create name="bodyTop"></vc:create>
+<div id="wrapper">
+    <vc:create name="menu"></vc:create>
+
+
+    <div id="page-wrapper" class="gray-bg dashbard-1">
+        <div class="row border-bottom">
+            <vc:create name="nav"></vc:create>
+        </div>
+        <div class="wrapper wrapper-content" style="padding-bottom: 0px;">
+            <vc:create name="breadcrumb"></vc:create>
+        </div>
+        <!-- id="component" -->
+        <div class="wrapper wrapper-content animated fadeInRight">
+            <vc:create name="applicationKeyManage"></vc:create>
+        </div>
+
+        <vc:create name="copyright"></vc:create>
+
+    </div>
+</div>
+
+<vc:create name="commonBottom"></vc:create>
+</body>
+</html>

+ 74 - 0
java110-bean/src/main/java/com/java110/vo/api/applicationKey/ApiApplicationKeyDataVo.java

@@ -0,0 +1,74 @@
+package com.java110.vo.api.applicationKey;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ApiApplicationKeyDataVo implements Serializable {
+
+    private String applicationKeyId;
+private String name;
+private String tel;
+private String typeCd;
+private String sex;
+private String age;
+private String idCard;
+private String startTime;
+private String endTime;
+public String getApplicationKeyId() {
+        return applicationKeyId;
+    }
+public void setApplicationKeyId(String applicationKeyId) {
+        this.applicationKeyId = applicationKeyId;
+    }
+public String getName() {
+        return name;
+    }
+public void setName(String name) {
+        this.name = name;
+    }
+public String getTel() {
+        return tel;
+    }
+public void setTel(String tel) {
+        this.tel = tel;
+    }
+public String getTypeCd() {
+        return typeCd;
+    }
+public void setTypeCd(String typeCd) {
+        this.typeCd = typeCd;
+    }
+public String getSex() {
+        return sex;
+    }
+public void setSex(String sex) {
+        this.sex = sex;
+    }
+public String getAge() {
+        return age;
+    }
+public void setAge(String age) {
+        this.age = age;
+    }
+public String getIdCard() {
+        return idCard;
+    }
+public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+
+
+}

+ 19 - 0
java110-bean/src/main/java/com/java110/vo/api/applicationKey/ApiApplicationKeyVo.java

@@ -0,0 +1,19 @@
+package com.java110.vo.api.applicationKey;
+
+import com.java110.vo.MorePageVo;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class ApiApplicationKeyVo extends MorePageVo implements Serializable {
+    List<ApiApplicationKeyDataVo> applicationKeys;
+
+
+    public List<ApiApplicationKeyDataVo> getApplicationKeys() {
+        return applicationKeys;
+    }
+
+    public void setApplicationKeys(List<ApiApplicationKeyDataVo> applicationKeys) {
+        this.applicationKeys = applicationKeys;
+    }
+}

+ 68 - 55
java110-code-generator/src/main/resources/web/template_1.json

@@ -1,23 +1,23 @@
 {
-  "templateName":"开门记录",
+  "templateName":"钥匙申请",
   "templateCode":"applicationKey",
   "templateKey":"applicationKeyId",
-  "templateKeyName":"开门记录ID",
+  "templateKeyName":"钥匙申请ID",
   "searchCode": "name",
   "searchName": "名称",
   "conditions": [
     {
-      "name": "用户名称",
+      "name": "名称",
       "inputType": "input",
       "code": "name",
       "whereCondition": "equal"
     },
     {
-      "name": "开门方式",
+      "name": "用户类型",
       "inputType": "select",
-      "code": "openTypeCd",
-      "selectValue":"1000,2000",
-      "selectValueName":"人脸开门,钥匙开门",
+      "code": "typeCd",
+      "selectValue":"10001,10002,10003",
+      "selectValueName":"保洁,保安,其他人员",
       "whereCondition": "equal"
     },
     {
@@ -27,98 +27,111 @@
       "whereCondition": "equal"
     },
     {
-      "name": "用户类型",
-      "inputType": "select",
-      "code": "ownerTypeCd",
-      "selectValue":"1001,1002",
-      "selectValueName":"业主,业主成员",
-      "whereCondition": "equal"
-    },
-    {
-      "name": "设备名称",
-      "inputType": "input",
-      "code": "machineName",
-      "whereCondition": "equal"
-    },
-    {
-      "name": "设备编码",
+      "name": "身份证号",
       "inputType": "input",
-      "code": "machineCode",
+      "code": "idCard",
       "whereCondition": "equal"
     }
   ],
   "columns":[
     {
-      "code":"machineCode",
-      "cnCode":"设备编码",
-      "desc":"必填,请填写设备编码",
+      "code":"name",
+      "cnCode":"姓名",
+      "desc":"必填,请填写姓名",
       "required":true,
       "hasDefaultValue":false,
       "inputType":"input",
       "limit":"maxin",
-      "limitParam":"1,30",
-      "limitErrInfo":"设备编码不能超过30位",
+      "limitParam":"1,64",
+      "limitErrInfo":"姓名不能超过64位",
       "show": true
     },
     {
-      "code": "machineId",
-      "cnCode":"设备ID",
-      "desc":"必填,请填写设备版本号",
+      "code": "tel",
+      "cnCode":"手机号",
+      "desc":"必填,请填写手机号",
       "required":true,
       "hasDefaultValue":false,
       "inputType": "input",
+      "limit":"phone",
+      "limitParam":"",
+      "limitErrInfo":"手机号格式错误",
+      "show": true
+    },
+    {
+      "code": "typeCd",
+      "cnCode":"用户类型",
+      "desc":"必填,请选择用户类型",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"10001,10002,10003",
+      "selectValueName":"保洁,保安,其他人员",
       "limit":"num",
-      "limitParam":"1,30",
-      "limitErrInfo":"设备ID不能超过30位",
+      "limitParam":"",
+      "limitErrInfo":"用户类型格式错误",
       "show": true
     },
     {
-      "code": "name",
-      "cnCode":"用户名称",
-      "desc":"必填,请选择用户名称",
+      "code": "sex",
+      "cnCode":"性别",
+      "desc":"必填,请选择性别",
       "required":true,
       "hasDefaultValue":false,
-      "inputType": "input",
+      "inputType": "select",
+      "selectValue":"0,1",
+      "selectValueName":"男,女",
       "limit":"num",
       "limitParam":"",
-      "limitErrInfo":"对象类型格式错误",
+      "limitErrInfo":"性别格式错误",
       "show": true
     },
     {
-      "code": "openTypeCd",
-      "cnCode":"开门方式",
-      "desc":"必填,请选择开门方式",
+      "code": "age",
+      "cnCode":"年龄",
+      "desc":"必填,请填写年龄",
       "required":true,
       "hasDefaultValue":false,
-      "selectValue":"1000,2000",
-      "selectValueName":"人脸开门,钥匙开门",
-      "limit":"1,200",
+      "inputType": "input",
+      "limit":"num",
       "limitParam":"",
-      "limitErrInfo":"开门方式不能超过200位",
+      "limitErrInfo":"年龄不是有效数字",
       "show": true
     },
     {
-      "code":"tel",
-      "cnCode":"用户手机号",
-      "desc":"必填,请填写用户手机号",
+      "code":"idCard",
+      "cnCode":"身份证号",
+      "desc":"必填,请填写身份证号",
       "required":true,
       "hasDefaultValue":false,
       "inputType":"input",
-      "limit":"num",
+      "limit":"idCard",
       "limitParam":"",
-      "limitErrInfo":"用户手机号必须为数字",
+      "limitErrInfo":"不是有效的身份证号",
       "show": true
     },
     {
-      "code": "idCard",
-      "cnCode":"身份证",
-      "desc":"必填,请填写身份证",
+      "code": "startTime",
+      "cnCode":"开始时间",
+      "desc":"必填,请选择开始时间",
       "required":true,
       "hasDefaultValue":false,
       "inputType": "input",
-      "limit":"idCard",
+      "limit":"dateTime",
+      "limitParam":"",
+      "limitErrInfo":"不是有效的时间格式",
+      "show": true
+    },
+    {
+      "code": "endTime",
+      "cnCode":"结束时间",
+      "desc":"必填,请选择结束时间",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"dateTime",
       "limitParam":"",
-      "limitErrInfo":"身份证格式错误",
+      "limitErrInfo":"不是有效的时间格式",
       "show": true
     }
   ]

+ 1 - 0
java110-utils/src/main/java/com/java110/utils/constant/PrivilegeCodeConstant.java

@@ -138,6 +138,7 @@ public final class PrivilegeCodeConstant {
     public static final String AGENT_HAS_LIST_MACHINE = "502019110809250044";
     public static final String AGENT_HAS_LIST_MACHINE_TRANSLATE = "502019111025350052";
     public static final String AGENT_HAS_LIST_MACHINE_RECORD = "502019112673230007";
+    public static final String LIST_APPLICATION_KEY = "502019120169500005";
 
 
 

+ 31 - 0
java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeApplicationKeyConstant.java

@@ -0,0 +1,31 @@
+package com.java110.utils.constant;
+
+/**
+ * 钥匙申请常量类
+ * Created by wuxw on 2017/5/20.
+ */
+public class ServiceCodeApplicationKeyConstant {
+
+    /**
+     * 添加 钥匙申请
+     */
+    public static final String ADD_APPLICATIONKEY = "applicationKey.saveApplicationKey";
+
+
+    /**
+     * 修改 钥匙申请
+     */
+    public static final String UPDATE_APPLICATIONKEY = "applicationKey.updateApplicationKey";
+    /**
+     * 删除 钥匙申请
+     */
+    public static final String DELETE_APPLICATIONKEY = "applicationKey.deleteApplicationKey";
+
+
+    /**
+     * 查询 钥匙申请
+     */
+    public static final String LIST_APPLICATIONKEYS = "applicationKey.listApplicationKeys";
+
+
+}