Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
781a47fe
Commit
781a47fe
authored
Apr 08, 2022
by
高东东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文件提交
parent
d7fb5ebf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
26 deletions
+52
-26
pom.xml
...le/amos-boot-module-biz/amos-boot-module-avic-biz/pom.xml
+28
-21
WebServicesFileFransferResource.java
...amos/avic/controller/WebServicesFileFransferResource.java
+24
-5
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-avic-biz/pom.xml
View file @
781a47fe
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<parent>
<groupId>
com.amosframework.boot
</groupId>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-biz
</artifactId>
<artifactId>
amos-boot-module-biz
</artifactId>
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
amos-boot-module-avic-biz
</artifactId>
<artifactId>
amos-boot-module-avic-biz
</artifactId>
<dependencies>
<dependencies>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-avic-api
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.cxf
</groupId>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
cxf-spring-boot-starter-jaxws
</artifactId>
<artifactId>
amos-boot-module-avic-api
</artifactId>
<version>
3.2.6
</version>
<version>
${amos-biz-boot.version}
</version>
</dependency>
</dependency>
</dependencies>
<dependency>
<groupId>
org.apache.cxf
</groupId>
<artifactId>
cxf-spring-boot-starter-jaxws
</artifactId>
<version>
3.2.6
</version>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
indicators-feign
</artifactId>
<version>
1.0.3-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
</project>
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-avic-biz/src/main/java/com/yeejoin/amos/avic/controller/WebServicesFileFransferResource.java
View file @
781a47fe
package
com
.
yeejoin
.
amos
.
avic
.
controller
;
package
com
.
yeejoin
.
amos
.
avic
.
controller
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
javax.activation.DataHandler
;
import
javax.activation.DataHandler
;
import
javax.activation.FileDataSource
;
import
org.apache.cxf.endpoint.Client
;
import
org.apache.cxf.endpoint.Client
;
import
org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory
;
import
org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -28,7 +28,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -28,7 +28,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.yeejoin.amos.avic.face.model.AvicCustomPathModel
;
import
com.yeejoin.amos.avic.face.model.AvicCustomPathModel
;
import
com.yeejoin.amos.avic.face.model.InputStreamDataSource
;
import
com.yeejoin.amos.avic.face.model.InputStreamDataSource
;
import
com.yeejoin.amos.avic.face.model.UploadFileModel
;
import
com.yeejoin.indicators.feign.IndicatorsManager
;
import
com.yeejoin.indicators.feign.request.DataRecordRequest
;
import
com.yeejoin.indicators.feign.workflow.WorkFlowFeign
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -42,12 +44,21 @@ public class WebServicesFileFransferResource {
...
@@ -42,12 +44,21 @@ public class WebServicesFileFransferResource {
@Value
(
"${avic.webservice.path}"
)
@Value
(
"${avic.webservice.path}"
)
String
webserviceUrl
;
String
webserviceUrl
;
@Autowired
IndicatorsManager
indicatorsManager
;
@Autowired
WorkFlowFeign
workFlowFeign
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"传输文件"
)
@ApiOperation
(
value
=
"传输文件"
)
@RequestMapping
(
value
=
"/file"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/file"
,
method
=
RequestMethod
.
POST
)
public
ResponseModel
postfile
(
@RequestPart
MultipartFile
[]
files
,
@RequestParam
String
code
,
@RequestParam
String
path
)
{
public
ResponseModel
postfile
(
@RequestPart
MultipartFile
[]
files
,
@RequestParam
String
code
,
@RequestParam
String
path
,
@RequestParam
String
processDefinitionId
,
@RequestParam
String
taskId
,
@RequestParam
String
bizId
)
{
JaxWsDynamicClientFactory
dcf
=
JaxWsDynamicClientFactory
.
newInstance
();
JaxWsDynamicClientFactory
dcf
=
JaxWsDynamicClientFactory
.
newInstance
();
Client
client
=
dcf
.
createClient
(
webserviceUrl
);
Client
client
=
dcf
.
createClient
(
webserviceUrl
);
try
{
try
{
...
@@ -64,6 +75,14 @@ public class WebServicesFileFransferResource {
...
@@ -64,6 +75,14 @@ public class WebServicesFileFransferResource {
client
.
invoke
(
"useCodetransferFile"
,
handler
,
file
.
getOriginalFilename
(),
path
,
code
);
client
.
invoke
(
"useCodetransferFile"
,
handler
,
file
.
getOriginalFilename
(),
path
,
code
);
}
}
}
}
List
<
DataRecordRequest
>
list
=
new
ArrayList
<>();
DataRecordRequest
dataRecordRequest
=
new
DataRecordRequest
();
dataRecordRequest
.
put
(
"avicCode"
,
code
);
dataRecordRequest
.
put
(
"targetPath"
,
path
);
list
.
add
(
dataRecordRequest
);
indicatorsManager
.
indicatorClient
.
saveBizRecord
(
taskId
,
bizId
,
list
);
workFlowFeign
.
startFormByProcess
(
null
,
processDefinitionId
);
}
catch
(
java
.
lang
.
Exception
e
)
{
}
catch
(
java
.
lang
.
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
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