Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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-progress
Commits
ec9b1ab2
Commit
ec9b1ab2
authored
Mar 09, 2022
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022-3-9 吴卿华
parent
c21f497e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
TEmployedPeopleInfoController.java
...b/controller/supervise/TEmployedPeopleInfoController.java
+17
-0
TEnterpriseInfoController.java
...hong/web/controller/system/TEnterpriseInfoController.java
+16
-8
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/TEmployedPeopleInfoController.java
View file @
ec9b1ab2
package
com
.
zehong
.
web
.
controller
.
supervise
;
package
com
.
zehong
.
web
.
controller
.
supervise
;
import
java.io.File
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.config.GassafetyProgressConfig
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -85,6 +88,20 @@ public class TEmployedPeopleInfoController extends BaseController
...
@@ -85,6 +88,20 @@ public class TEmployedPeopleInfoController extends BaseController
//根据企业id查询企业名称
//根据企业id查询企业名称
String
EnterpriseName
=
tEmployedPeopleInfoService
.
selectEnterpriseName
(
tEmployedPeopleInfo
.
getBeyondEnterpriseId
());
String
EnterpriseName
=
tEmployedPeopleInfoService
.
selectEnterpriseName
(
tEmployedPeopleInfo
.
getBeyondEnterpriseId
());
tEmployedPeopleInfo
.
setBeyondEnterpriseName
(
EnterpriseName
);
tEmployedPeopleInfo
.
setBeyondEnterpriseName
(
EnterpriseName
);
//查询修改之前图片存储路径
TEmployedPeopleInfo
tEmployedPeopleInfos
=
tEmployedPeopleInfoService
.
selectTEmployedPeopleInfoById
(
tEmployedPeopleInfo
.
getEmployedPeopleId
());
//文件删除
if
(
tEmployedPeopleInfos
.
getAvatarAddress
()!=
null
){
// 上传文件路径
String
filePath
=
GassafetyProgressConfig
.
getUploadPath
();
String
[]
strs
=
tEmployedPeopleInfos
.
getAvatarAddress
().
split
(
"upload"
);
//删除图片
File
file
=
new
File
(
filePath
+
strs
[
1
].
toString
());
// 上传文件路径
if
(
file
.
isFile
()){
file
.
delete
();
}
}
return
toAjax
(
tEmployedPeopleInfoService
.
updateTEmployedPeopleInfo
(
tEmployedPeopleInfo
));
return
toAjax
(
tEmployedPeopleInfoService
.
updateTEmployedPeopleInfo
(
tEmployedPeopleInfo
));
}
}
...
...
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/system/TEnterpriseInfoController.java
View file @
ec9b1ab2
...
@@ -4,6 +4,8 @@ import java.io.File;
...
@@ -4,6 +4,8 @@ import java.io.File;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.config.GassafetyProgressConfig
;
import
com.zehong.common.config.GassafetyProgressConfig
;
import
com.zehong.common.utils.file.FileUploadUtils
;
import
com.zehong.framework.config.ServerConfig
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -38,7 +40,8 @@ public class TEnterpriseInfoController extends BaseController
...
@@ -38,7 +40,8 @@ public class TEnterpriseInfoController extends BaseController
{
{
@Autowired
@Autowired
private
ITEnterpriseInfoService
tEnterpriseInfoService
;
private
ITEnterpriseInfoService
tEnterpriseInfoService
;
@Autowired
private
ServerConfig
serverConfig
;
/**
/**
* 查询企业信息列表
* 查询企业信息列表
*/
*/
...
@@ -118,13 +121,18 @@ public class TEnterpriseInfoController extends BaseController
...
@@ -118,13 +121,18 @@ public class TEnterpriseInfoController extends BaseController
{
{
//查询修改之前图片地址
//查询修改之前图片地址
TEnterpriseInfo
tEnterpriseInfo1
=
tEnterpriseInfoService
.
selectTEnterpriseInfoById
(
tEnterpriseInfo
.
getEnterpriseId
());
TEnterpriseInfo
tEnterpriseInfo1
=
tEnterpriseInfoService
.
selectTEnterpriseInfoById
(
tEnterpriseInfo
.
getEnterpriseId
());
// //删除图片
//文件删除
// File file = new File(tEnterpriseInfo1.getDoDusiness());
if
(
tEnterpriseInfo1
.
getDoDusiness
()!=
null
){
// // 上传文件路径
// 上传文件路径
// String filePath = GassafetyProgressConfig.getUploadPath();
String
filePath
=
GassafetyProgressConfig
.
getUploadPath
();
// if(file.isFile()){
String
[]
strs
=
tEnterpriseInfo1
.
getDoDusiness
().
split
(
"upload"
);
// file.delete();
//删除图片
// }
File
file
=
new
File
(
filePath
+
strs
[
1
].
toString
());
// 上传文件路径
if
(
file
.
isFile
()){
file
.
delete
();
}
}
return
toAjax
(
tEnterpriseInfoService
.
updateTEnterpriseInfo
(
tEnterpriseInfo
));
return
toAjax
(
tEnterpriseInfoService
.
updateTEnterpriseInfo
(
tEnterpriseInfo
));
}
}
...
...
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