diff --git a/src/main/java/com/cm/inspection/config/ResourceConfig.java b/src/main/java/com/cm/inspection/config/ResourceConfig.java
new file mode 100644
index 0000000..b60ee74
--- /dev/null
+++ b/src/main/java/com/cm/inspection/config/ResourceConfig.java
@@ -0,0 +1,33 @@
+package com.cm.inspection.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
+
+/**
+ * @ClassName: ResourceConfig
+ * @Description: 资源服务器
+ * @Author: WangGeng
+ * @Date: 2019/2/27 11:33 AM
+ * @Version: 1.0
+ **/
+@Configuration
+@EnableResourceServer
+public class ResourceConfig extends ResourceServerConfigurerAdapter {
+
+ @Override
+ public void configure(HttpSecurity http) throws Exception {
+ http
+ .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)
+ .and()
+ .requestMatchers()
+ .antMatchers("/resource/**", "/client/**")
+ .and()
+ .authorizeRequests()
+ .antMatchers("/resource/**", "/client/**")
+ .authenticated();
+ }
+
+}
diff --git a/src/main/java/com/cm/inspection/pojo/dtos/check/CheckDTO.java b/src/main/java/com/cm/inspection/pojo/dtos/check/CheckDTO.java
index 080e13d..ddaa643 100644
--- a/src/main/java/com/cm/inspection/pojo/dtos/check/CheckDTO.java
+++ b/src/main/java/com/cm/inspection/pojo/dtos/check/CheckDTO.java
@@ -55,6 +55,10 @@ public class CheckDTO {
private String masterJoinByEnterpriseId;
@ApiModelProperty(name = "phoneJoinByEnterpriseId", value = "企业ID的联系电话")
private String phoneJoinByEnterpriseId;
+ @ApiModelProperty(name = "enterpriseLngByEnterpriseId", value = "企业经度")
+ private String enterpriseLngByEnterpriseId;
+ @ApiModelProperty(name = "enterpriseLatByEnterpriseId", value = "企业纬度")
+ private String enterpriseLatByEnterpriseId;
@ApiModelProperty(name = "checkType", value = "检查类型")
private Integer checkType;
@ApiModelProperty(name = "taskCheckId", value = "任务检查ID")
@@ -224,6 +228,23 @@ public class CheckDTO {
this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId;
}
+
+ public String getEnterpriseLngByEnterpriseId() {
+ return enterpriseLngByEnterpriseId == null ? "" : enterpriseLngByEnterpriseId;
+ }
+
+ public void setEnterpriseLngByEnterpriseId(String enterpriseLngByEnterpriseId) {
+ this.enterpriseLngByEnterpriseId = enterpriseLngByEnterpriseId;
+ }
+
+ public String getEnterpriseLatByEnterpriseId() {
+ return enterpriseLatByEnterpriseId == null ? "" : enterpriseLatByEnterpriseId;
+ }
+
+ public void setEnterpriseLatByEnterpriseId(String enterpriseLatByEnterpriseId) {
+ this.enterpriseLatByEnterpriseId = enterpriseLatByEnterpriseId;
+ }
+
public Integer getCheckType() {
return checkType;
}
@@ -326,46 +347,50 @@ public class CheckDTO {
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
- sb.append("\"checkId\":")
- .append("\"").append(checkId).append("\"");
- sb.append(",\"enterpriseId\":")
- .append("\"").append(enterpriseId).append("\"");
- sb.append(",\"nameJoinByEnterpriseId\":")
- .append("\"").append(nameJoinByEnterpriseId).append("\"");
- sb.append(",\"typeJoinByEnterpriseId\":")
- .append("\"").append(typeJoinByEnterpriseId).append("\"");
- sb.append(",\"typeDictionaryName\":")
- .append("\"").append(typeDictionaryName).append("\"");
- sb.append(",\"area1JoinByEnterpriseId\":")
- .append("\"").append(area1JoinByEnterpriseId).append("\"");
- sb.append(",\"area2JoinByEnterpriseId\":")
- .append("\"").append(area2JoinByEnterpriseId).append("\"");
- sb.append(",\"area3JoinByEnterpriseId\":")
- .append("\"").append(area3JoinByEnterpriseId).append("\"");
- sb.append(",\"area4JoinByEnterpriseId\":")
- .append("\"").append(area4JoinByEnterpriseId).append("\"");
- sb.append(",\"area5JoinByEnterpriseId\":")
- .append("\"").append(area5JoinByEnterpriseId).append("\"");
- sb.append(",\"addressJoinByEnterpriseId\":")
- .append("\"").append(addressJoinByEnterpriseId).append("\"");
- sb.append(",\"industryJoinByEnterpriseId\":")
- .append("\"").append(industryJoinByEnterpriseId).append("\"");
- sb.append(",\"industryDictionaryName\":")
- .append("\"").append(industryDictionaryName).append("\"");
- sb.append(",\"engagedCountJoinByEnterpriseId\":")
- .append("\"").append(engagedCountJoinByEnterpriseId).append("\"");
- sb.append(",\"riskOperationJoinByEnterpriseId\":")
- .append("\"").append(riskOperationJoinByEnterpriseId).append("\"");
- sb.append(",\"riskOperationDictionaryName\":")
- .append("\"").append(riskOperationDictionaryName).append("\"");
- sb.append(",\"masterJoinByEnterpriseId\":")
- .append("\"").append(masterJoinByEnterpriseId).append("\"");
- sb.append(",\"phoneJoinByEnterpriseId\":")
- .append("\"").append(phoneJoinByEnterpriseId).append("\"");
+ sb.append("\"checkId\":\"")
+ .append(checkId).append('\"');
+ sb.append(",\"enterpriseId\":\"")
+ .append(enterpriseId).append('\"');
+ sb.append(",\"nameJoinByEnterpriseId\":\"")
+ .append(nameJoinByEnterpriseId).append('\"');
+ sb.append(",\"typeJoinByEnterpriseId\":\"")
+ .append(typeJoinByEnterpriseId).append('\"');
+ sb.append(",\"typeDictionaryName\":\"")
+ .append(typeDictionaryName).append('\"');
+ sb.append(",\"area1JoinByEnterpriseId\":\"")
+ .append(area1JoinByEnterpriseId).append('\"');
+ sb.append(",\"area2JoinByEnterpriseId\":\"")
+ .append(area2JoinByEnterpriseId).append('\"');
+ sb.append(",\"area3JoinByEnterpriseId\":\"")
+ .append(area3JoinByEnterpriseId).append('\"');
+ sb.append(",\"area4JoinByEnterpriseId\":\"")
+ .append(area4JoinByEnterpriseId).append('\"');
+ sb.append(",\"area5JoinByEnterpriseId\":\"")
+ .append(area5JoinByEnterpriseId).append('\"');
+ sb.append(",\"addressJoinByEnterpriseId\":\"")
+ .append(addressJoinByEnterpriseId).append('\"');
+ sb.append(",\"industryJoinByEnterpriseId\":\"")
+ .append(industryJoinByEnterpriseId).append('\"');
+ sb.append(",\"industryDictionaryName\":\"")
+ .append(industryDictionaryName).append('\"');
+ sb.append(",\"engagedCountJoinByEnterpriseId\":\"")
+ .append(engagedCountJoinByEnterpriseId).append('\"');
+ sb.append(",\"riskOperationJoinByEnterpriseId\":\"")
+ .append(riskOperationJoinByEnterpriseId).append('\"');
+ sb.append(",\"riskOperationDictionaryName\":\"")
+ .append(riskOperationDictionaryName).append('\"');
+ sb.append(",\"masterJoinByEnterpriseId\":\"")
+ .append(masterJoinByEnterpriseId).append('\"');
+ sb.append(",\"phoneJoinByEnterpriseId\":\"")
+ .append(phoneJoinByEnterpriseId).append('\"');
+ sb.append(",\"enterpriseLngByEnterpriseId\":\"")
+ .append(enterpriseLngByEnterpriseId).append('\"');
+ sb.append(",\"enterpriseLatByEnterpriseId\":\"")
+ .append(enterpriseLatByEnterpriseId).append('\"');
sb.append(",\"checkType\":")
.append(checkType);
- sb.append(",\"taskCheckId\":")
- .append("\"").append(taskCheckId).append("\"");
+ sb.append(",\"taskCheckId\":\"")
+ .append(taskCheckId).append('\"');
sb.append(",\"isCoordination\":")
.append(isCoordination);
sb.append(",\"isComplete\":")
@@ -376,14 +401,14 @@ public class CheckDTO {
.append(immediatelyChangeType);
sb.append(",\"rectificationDays\":")
.append(rectificationDays);
- sb.append(",\"summary\":")
- .append("\"").append(summary).append("\"");
- sb.append(",\"checkLng\":")
- .append("\"").append(checkLng).append("\"");
- sb.append(",\"checkLat\":")
- .append("\"").append(checkLat).append("\"");
- sb.append(",\"gmtCreate\":")
- .append("\"").append(gmtCreate).append("\"");
+ sb.append(",\"summary\":\"")
+ .append(summary).append('\"');
+ sb.append(",\"checkLng\":\"")
+ .append(checkLng).append('\"');
+ sb.append(",\"checkLat\":\"")
+ .append(checkLat).append('\"');
+ sb.append(",\"gmtCreate\":\"")
+ .append(gmtCreate).append('\"');
sb.append(",\"checkItems\":")
.append(checkItems);
sb.append('}');
diff --git a/src/main/resources/mybatis/mapper/check/check-mapper.xml b/src/main/resources/mybatis/mapper/check/check-mapper.xml
index 9635d45..f4ecd81 100644
--- a/src/main/resources/mybatis/mapper/check/check-mapper.xml
+++ b/src/main/resources/mybatis/mapper/check/check-mapper.xml
@@ -21,6 +21,8 @@
'+ row.gmtCreate +' | |
企业名称 | '+ row.nameJoinByEnterpriseId +' |
企业类型 | '+ row.typeDictionaryName +' |
管理行业 | '+ (row.industryDictionaryName ? row.industryDictionaryName : '-') +' |
作业风险 | '+ (row.riskOperationDictionaryName ? row.riskOperationDictionaryName : '-') +' |
'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '查看企业定位') +' | |
'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '-') +' |
负责人 | '+ (row.masterJoinByEnterpriseId ? row.masterJoinByEnterpriseId : '-') +' |
联系电话 | '+ (row.phoneJoinByEnterpriseId ? row.phoneJoinByEnterpriseId : '-') +' |
从业人数 | '+ (row.engagedCountJoinByEnterpriseId ? (row.engagedCountJoinByEnterpriseId +' 人') : '-') +' |
'+ checkType +' |
'+ isCoordination +' |
'+ isComplete +' |
'+ isCoordinationBtn +' |
查看检查位置 |