Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety
Commits
84e2dac6
Commit
84e2dac6
authored
Jul 07, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业基本信息
parent
e9117445
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
291 additions
and
568 deletions
+291
-568
CommonController.java
...va/com/zehong/web/controller/common/CommonController.java
+4
-2
TEnterpriseInfo.java
...c/main/java/com/zehong/system/domain/TEnterpriseInfo.java
+4
-214
TEnterpriseInfoMapper.xml
...rc/main/resources/mapper/system/TEnterpriseInfoMapper.xml
+131
-0
index.vue
gassafety-web/src/components/FileUpload/index.vue
+24
-6
index.vue
gassafety-web/src/views/enterprise/info/index.vue
+128
-346
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/common/CommonController.java
View file @
84e2dac6
...
...
@@ -74,8 +74,10 @@ public class CommonController
// 上传文件路径
String
filePath
=
GasSafetyConfig
.
getUploadPath
();
// 上传并返回新文件名称
String
fileName
=
FileUploadUtils
.
upload
(
filePath
,
file
);
String
url
=
serverConfig
.
getUrl
()
+
fileName
;
// String fileName = FileUploadUtils.upload(filePath, file);
// String url = serverConfig.getUrl() + fileName;
String
fileName
=
file
.
getOriginalFilename
();
String
url
=
serverConfig
.
getUrl
()
+
FileUploadUtils
.
upload
(
filePath
,
file
);
AjaxResult
ajax
=
AjaxResult
.
success
();
ajax
.
put
(
"fileName"
,
fileName
);
ajax
.
put
(
"url"
,
url
);
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TEnterpriseInfo.java
View file @
84e2dac6
...
...
@@ -20,11 +20,11 @@ public class TEnterpriseInfo extends BaseEntity
private
Long
infoId
;
/** 单位名称 */
@Excel
(
name
=
"
单位
名称"
)
@Excel
(
name
=
"
企业
名称"
)
private
String
unitName
;
/** 组织机构代码 */
@Excel
(
name
=
"
组织机构
代码"
)
@Excel
(
name
=
"
社会统一信用
代码"
)
private
String
orgCode
;
/** 营业执照图片路径 */
...
...
@@ -43,46 +43,6 @@ public class TEnterpriseInfo extends BaseEntity
@Excel
(
name
=
"注册地址"
)
private
String
regAddress
;
/** 监管分类大类 */
@Excel
(
name
=
"监管分类大类"
)
private
String
regulationBigType
;
/** 监管分类小类 */
@Excel
(
name
=
"监管分类小类"
)
private
String
regulationSmallType
;
/** 省份代码 */
@Excel
(
name
=
"省份代码"
)
private
String
provinceId
;
/** 省份名称 */
@Excel
(
name
=
"省份名称"
)
private
String
provinceName
;
/** 城市代码 */
@Excel
(
name
=
"城市代码"
)
private
String
cityId
;
/** 城市名称 */
@Excel
(
name
=
"城市名称"
)
private
String
cityName
;
/** 区县代码 */
@Excel
(
name
=
"区县代码"
)
private
String
countyId
;
/** 区县名称 */
@Excel
(
name
=
"区县名称"
)
private
String
countyName
;
/** 所属地区 */
@Excel
(
name
=
"所属地区"
)
private
String
areaName
;
/** 所属街道 */
@Excel
(
name
=
"所属街道"
)
private
String
streetName
;
/** 经度 */
@Excel
(
name
=
"经度"
)
private
BigDecimal
longitude
;
...
...
@@ -96,33 +56,13 @@ public class TEnterpriseInfo extends BaseEntity
private
String
legalPerson
;
/** 法定代表人手机 */
@Excel
(
name
=
"法定代表人
手机
"
)
@Excel
(
name
=
"法定代表人
电话
"
)
private
String
legalPersonPhone
;
/** 法定代表人座机号码 */
@Excel
(
name
=
"法定代表人座机号码"
)
private
String
legalPersonTelephone
;
/** 法人邮箱 */
@Excel
(
name
=
"法人邮箱"
)
private
String
legalPersonEmail
;
/** 授权书 */
@Excel
(
name
=
"授权书"
)
private
String
authorizeFile
;
/** 授权书文件原名 */
@Excel
(
name
=
"授权书文件原名"
)
private
String
authorizeFileOriginalName
;
/** 厂区边界 */
@Excel
(
name
=
"厂区边界"
)
private
String
boundary
;
/** 是否启用,0启用,1禁用 */
@Excel
(
name
=
"是否启用,0启用,1禁用"
)
private
String
isEnable
;
/** 创建人id */
@Excel
(
name
=
"创建人id"
)
private
String
createUserId
;
...
...
@@ -198,97 +138,7 @@ public class TEnterpriseInfo extends BaseEntity
{
return
regAddress
;
}
public
void
setRegulationBigType
(
String
regulationBigType
)
{
this
.
regulationBigType
=
regulationBigType
;
}
public
String
getRegulationBigType
()
{
return
regulationBigType
;
}
public
void
setRegulationSmallType
(
String
regulationSmallType
)
{
this
.
regulationSmallType
=
regulationSmallType
;
}
public
String
getRegulationSmallType
()
{
return
regulationSmallType
;
}
public
void
setProvinceId
(
String
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
;
}
public
String
getProvinceName
()
{
return
provinceName
;
}
public
void
setCityId
(
String
cityId
)
{
this
.
cityId
=
cityId
;
}
public
String
getCityId
()
{
return
cityId
;
}
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
;
}
public
String
getCityName
()
{
return
cityName
;
}
public
void
setCountyId
(
String
countyId
)
{
this
.
countyId
=
countyId
;
}
public
String
getCountyId
()
{
return
countyId
;
}
public
void
setCountyName
(
String
countyName
)
{
this
.
countyName
=
countyName
;
}
public
String
getCountyName
()
{
return
countyName
;
}
public
void
setAreaName
(
String
areaName
)
{
this
.
areaName
=
areaName
;
}
public
String
getAreaName
()
{
return
areaName
;
}
public
void
setStreetName
(
String
streetName
)
{
this
.
streetName
=
streetName
;
}
public
String
getStreetName
()
{
return
streetName
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
...
...
@@ -324,15 +174,6 @@ public class TEnterpriseInfo extends BaseEntity
{
return
legalPersonPhone
;
}
public
void
setLegalPersonTelephone
(
String
legalPersonTelephone
)
{
this
.
legalPersonTelephone
=
legalPersonTelephone
;
}
public
String
getLegalPersonTelephone
()
{
return
legalPersonTelephone
;
}
public
void
setLegalPersonEmail
(
String
legalPersonEmail
)
{
this
.
legalPersonEmail
=
legalPersonEmail
;
...
...
@@ -342,42 +183,6 @@ public class TEnterpriseInfo extends BaseEntity
{
return
legalPersonEmail
;
}
public
void
setAuthorizeFile
(
String
authorizeFile
)
{
this
.
authorizeFile
=
authorizeFile
;
}
public
String
getAuthorizeFile
()
{
return
authorizeFile
;
}
public
void
setAuthorizeFileOriginalName
(
String
authorizeFileOriginalName
)
{
this
.
authorizeFileOriginalName
=
authorizeFileOriginalName
;
}
public
String
getAuthorizeFileOriginalName
()
{
return
authorizeFileOriginalName
;
}
public
void
setBoundary
(
String
boundary
)
{
this
.
boundary
=
boundary
;
}
public
String
getBoundary
()
{
return
boundary
;
}
public
void
setIsEnable
(
String
isEnable
)
{
this
.
isEnable
=
isEnable
;
}
public
String
getIsEnable
()
{
return
isEnable
;
}
public
void
setCreateUserId
(
String
createUserId
)
{
this
.
createUserId
=
createUserId
;
...
...
@@ -416,26 +221,11 @@ public class TEnterpriseInfo extends BaseEntity
.
append
(
"orgFileName"
,
getOrgFileName
())
.
append
(
"runAddress"
,
getRunAddress
())
.
append
(
"regAddress"
,
getRegAddress
())
.
append
(
"regulationBigType"
,
getRegulationBigType
())
.
append
(
"regulationSmallType"
,
getRegulationSmallType
())
.
append
(
"provinceId"
,
getProvinceId
())
.
append
(
"provinceName"
,
getProvinceName
())
.
append
(
"cityId"
,
getCityId
())
.
append
(
"cityName"
,
getCityName
())
.
append
(
"countyId"
,
getCountyId
())
.
append
(
"countyName"
,
getCountyName
())
.
append
(
"areaName"
,
getAreaName
())
.
append
(
"streetName"
,
getStreetName
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"legalPerson"
,
getLegalPerson
())
.
append
(
"legalPersonPhone"
,
getLegalPersonPhone
())
.
append
(
"legalPersonTelephone"
,
getLegalPersonTelephone
())
.
append
(
"legalPersonEmail"
,
getLegalPersonEmail
())
.
append
(
"authorizeFile"
,
getAuthorizeFile
())
.
append
(
"authorizeFileOriginalName"
,
getAuthorizeFileOriginalName
())
.
append
(
"boundary"
,
getBoundary
())
.
append
(
"isEnable"
,
getIsEnable
())
.
append
(
"createUserId"
,
getCreateUserId
())
.
append
(
"updateUserId"
,
getUpdateUserId
())
.
append
(
"updateTime"
,
getUpdateTime
())
...
...
gassafety-system/src/main/resources/mapper/system/TEnterpriseInfoMapper.xml
0 → 100644
View file @
84e2dac6
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TEnterpriseInfoMapper"
>
<resultMap
type=
"TEnterpriseInfo"
id=
"TEnterpriseInfoResult"
>
<result
property=
"infoId"
column=
"info_id"
/>
<result
property=
"unitName"
column=
"unit_name"
/>
<result
property=
"orgCode"
column=
"org_code"
/>
<result
property=
"orgFilePath"
column=
"org_file_path"
/>
<result
property=
"orgFileName"
column=
"org_file_name"
/>
<result
property=
"runAddress"
column=
"run_address"
/>
<result
property=
"regAddress"
column=
"reg_address"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"legalPerson"
column=
"legal_person"
/>
<result
property=
"legalPersonPhone"
column=
"legal_person_phone"
/>
<result
property=
"legalPersonEmail"
column=
"legal_person_email"
/>
<result
property=
"createUserId"
column=
"create_user_id"
/>
<result
property=
"updateUserId"
column=
"update_user_id"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTEnterpriseInfoVo"
>
select info_id, unit_name, org_code, org_file_path, org_file_name, run_address, reg_address, longitude, latitude, legal_person, legal_person_phone, legal_person_email, create_user_id, update_user_id, update_time, create_time, remarks from t_enterprise_info
</sql>
<select
id=
"selectTEnterpriseInfoList"
parameterType=
"TEnterpriseInfo"
resultMap=
"TEnterpriseInfoResult"
>
<include
refid=
"selectTEnterpriseInfoVo"
/>
<where>
<if
test=
"unitName != null and unitName != ''"
>
and unit_name like concat('%', #{unitName}, '%')
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
and org_code = #{orgCode}
</if>
<if
test=
"orgFilePath != null and orgFilePath != ''"
>
and org_file_path = #{orgFilePath}
</if>
<if
test=
"orgFileName != null and orgFileName != ''"
>
and org_file_name like concat('%', #{orgFileName}, '%')
</if>
<if
test=
"runAddress != null and runAddress != ''"
>
and run_address = #{runAddress}
</if>
<if
test=
"regAddress != null and regAddress != ''"
>
and reg_address = #{regAddress}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
<if
test=
"latitude != null "
>
and latitude = #{latitude}
</if>
<if
test=
"legalPerson != null and legalPerson != ''"
>
and legal_person = #{legalPerson}
</if>
<if
test=
"legalPersonPhone != null and legalPersonPhone != ''"
>
and legal_person_phone = #{legalPersonPhone}
</if>
<if
test=
"legalPersonEmail != null and legalPersonEmail != ''"
>
and legal_person_email = #{legalPersonEmail}
</if>
<if
test=
"createUserId != null and createUserId != ''"
>
and create_user_id = #{createUserId}
</if>
<if
test=
"updateUserId != null and updateUserId != ''"
>
and update_user_id = #{updateUserId}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</select>
<select
id=
"selectTEnterpriseInfoById"
parameterType=
"Long"
resultMap=
"TEnterpriseInfoResult"
>
<include
refid=
"selectTEnterpriseInfoVo"
/>
where info_id = #{infoId}
</select>
<insert
id=
"insertTEnterpriseInfo"
parameterType=
"TEnterpriseInfo"
>
insert into t_enterprise_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"infoId != null"
>
info_id,
</if>
<if
test=
"unitName != null"
>
unit_name,
</if>
<if
test=
"orgCode != null"
>
org_code,
</if>
<if
test=
"orgFilePath != null"
>
org_file_path,
</if>
<if
test=
"orgFileName != null"
>
org_file_name,
</if>
<if
test=
"runAddress != null"
>
run_address,
</if>
<if
test=
"regAddress != null"
>
reg_address,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"legalPerson != null"
>
legal_person,
</if>
<if
test=
"legalPersonPhone != null"
>
legal_person_phone,
</if>
<if
test=
"legalPersonEmail != null"
>
legal_person_email,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"infoId != null"
>
#{infoId},
</if>
<if
test=
"unitName != null"
>
#{unitName},
</if>
<if
test=
"orgCode != null"
>
#{orgCode},
</if>
<if
test=
"orgFilePath != null"
>
#{orgFilePath},
</if>
<if
test=
"orgFileName != null"
>
#{orgFileName},
</if>
<if
test=
"runAddress != null"
>
#{runAddress},
</if>
<if
test=
"regAddress != null"
>
#{regAddress},
</if>
<if
test=
"longitude != null"
>
#{longitude},
</if>
<if
test=
"latitude != null"
>
#{latitude},
</if>
<if
test=
"legalPerson != null"
>
#{legalPerson},
</if>
<if
test=
"legalPersonPhone != null"
>
#{legalPersonPhone},
</if>
<if
test=
"legalPersonEmail != null"
>
#{legalPersonEmail},
</if>
<if
test=
"createUserId != null"
>
#{createUserId},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</insert>
<update
id=
"updateTEnterpriseInfo"
parameterType=
"TEnterpriseInfo"
>
update t_enterprise_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"unitName != null"
>
unit_name = #{unitName},
</if>
<if
test=
"orgCode != null"
>
org_code = #{orgCode},
</if>
<if
test=
"orgFilePath != null"
>
org_file_path = #{orgFilePath},
</if>
<if
test=
"orgFileName != null"
>
org_file_name = #{orgFileName},
</if>
<if
test=
"runAddress != null"
>
run_address = #{runAddress},
</if>
<if
test=
"regAddress != null"
>
reg_address = #{regAddress},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude},
</if>
<if
test=
"legalPerson != null"
>
legal_person = #{legalPerson},
</if>
<if
test=
"legalPersonPhone != null"
>
legal_person_phone = #{legalPersonPhone},
</if>
<if
test=
"legalPersonEmail != null"
>
legal_person_email = #{legalPersonEmail},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
where info_id = #{infoId}
</update>
<delete
id=
"deleteTEnterpriseInfoById"
parameterType=
"Long"
>
delete from t_enterprise_info where info_id = #{infoId}
</delete>
<delete
id=
"deleteTEnterpriseInfoByIds"
parameterType=
"String"
>
delete from t_enterprise_info where info_id in
<foreach
item=
"infoId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{infoId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
gassafety-web/src/components/FileUpload/index.vue
View file @
84e2dac6
...
...
@@ -3,12 +3,12 @@
<el-upload
:action=
"uploadFileUrl"
:before-upload=
"handleBeforeUpload"
:file-list=
"file
List
"
:file-list=
"file
Arr
"
:limit=
"1"
:on-error=
"handleUploadError"
:on-exceed=
"handleExceed"
:on-success=
"handleUploadSuccess"
:show-file-list=
"
fals
e"
:show-file-list=
"
tru
e"
:headers=
"headers"
class=
"upload-file-uploader"
ref=
"upload"
...
...
@@ -50,6 +50,10 @@ export default {
type
:
Number
,
default
:
5
,
},
fileArr
:
{
type
:
Array
,
default
:
[],
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType
:
{
type
:
Array
,
...
...
@@ -58,7 +62,7 @@ export default {
// 是否显示提示
isShowTip
:
{
type
:
Boolean
,
default
:
tru
e
default
:
fals
e
}
},
data
()
{
...
...
@@ -135,12 +139,26 @@ export default {
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
this
.
$message
.
success
(
"上传成功"
);
this
.
$emit
(
"
input"
,
res
.
url
);
this
.
$emit
(
"
resFun"
,
res
);
},
// 删除文件
handleDelete
(
index
)
{
this
.
fileList
.
splice
(
index
,
1
);
this
.
$emit
(
"input"
,
''
);
// let that = this,
// param;
// param = file.response ? file.response.fileName.replace(/\\/g, "%")
// : file.response.url.replace(/\\/g, "%").slice(9);
// $.ajax({
// type: "GET",
// url: process.env.VUE_APP_BASE_API + "/common/deleteFile",
// data: {savePath: param},
// dataType: "json",
// success: function(data){
// if (data) that.$message.success("删除成功");
// else return false;
// }
// });
},
// 获取文件名称
getFileName
(
name
)
{
...
...
@@ -152,7 +170,7 @@ export default {
}
},
created
()
{
this
.
fileList
=
this
.
list
;
//
this.fileList = this.list;
},
};
</
script
>
...
...
@@ -176,4 +194,4 @@ export default {
.ele-upload-list__item-content-action
.el-link
{
margin-right
:
10px
;
}
</
style
>
\ No newline at end of file
</
style
>
gassafety-web/src/views/enterprise/info/index.vue
View file @
84e2dac6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment