Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-datacenter
Overview
Overview
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
huluobin
bailuntec-datacenter
Commits
d9bf5fe0
Commit
d9bf5fe0
authored
Dec 12, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新数据中心
parent
c81c7099
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
3 deletions
+65
-3
SyncFeeApp.java
...-sync-fee/src/main/java/com/bailuntec/job/SyncFeeApp.java
+1
-1
SyncFeeService.java
...c/main/java/com/bailuntec/job/service/SyncFeeService.java
+10
-1
pom.xml
datacenter-mid/mid-calculate-transit/pom.xml
+3
-1
MidCalculateTransitServiceTest.java
...bailuntec/job/service/MidCalculateTransitServiceTest.java
+51
-0
No files found.
datacenter-base/base-sync-fee/src/main/java/com/bailuntec/job/SyncFeeApp.java
View file @
d9bf5fe0
...
@@ -15,7 +15,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
...
@@ -15,7 +15,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
* @since 2020/8/29 3:29 下午
* @since 2020/8/29 3:29 下午
*/
*/
@SpringBootApplication
@SpringBootApplication
//
@EnableScheduling
@EnableScheduling
@ComponentScan
(
"com.bailuntec"
)
@ComponentScan
(
"com.bailuntec"
)
@EnableFeignClients
(
basePackages
=
{
"com.bailuntec.api"
,
"com.bailuntec.*.api"
})
@EnableFeignClients
(
basePackages
=
{
"com.bailuntec.api"
,
"com.bailuntec.*.api"
})
public
class
SyncFeeApp
{
public
class
SyncFeeApp
{
...
...
datacenter-base/base-sync-fee/src/main/java/com/bailuntec/job/service/SyncFeeService.java
View file @
d9bf5fe0
...
@@ -60,6 +60,7 @@ public class SyncFeeService {
...
@@ -60,6 +60,7 @@ public class SyncFeeService {
Integer
pageNum
=
1
;
Integer
pageNum
=
1
;
Integer
pageSize
=
100
;
Integer
pageSize
=
100
;
for
(;
;
)
{
for
(;
;
)
{
CostResult
<
List
<
CostDto
>>
result
=
costApi
.
getCostList
(
dcJobConfig
.
getStartTimeStr
(),
CostResult
<
List
<
CostDto
>>
result
=
costApi
.
getCostList
(
dcJobConfig
.
getStartTimeStr
(),
dcJobConfig
.
getEndTimeStr
(),
dcJobConfig
.
getEndTimeStr
(),
pageNum
,
pageNum
,
...
@@ -70,8 +71,15 @@ public class SyncFeeService {
...
@@ -70,8 +71,15 @@ public class SyncFeeService {
}
}
result
.
getData
().
forEach
(
costDto
->
{
result
.
getData
().
forEach
(
costDto
->
{
DcBaseFinanceFee
dcBaseFinanceFee
=
new
DcBaseFinanceFee
();
DcBaseFinanceFee
dcBaseFinanceFee
=
new
DcBaseFinanceFee
();
BeanUtils
.
copyProperties
(
costDto
,
dcBaseFinanceFee
,
"id"
);
BeanUtils
.
copyProperties
(
costDto
,
dcBaseFinanceFee
);
dcBaseFinanceFee
.
setCreateTime
(
LocalDateTime
.
ofInstant
(
costDto
.
getCreateTime
().
toInstant
(),
ZoneId
.
systemDefault
()));
dcBaseFinanceFee
.
setCreateTime
(
LocalDateTime
.
ofInstant
(
costDto
.
getCreateTime
().
toInstant
(),
ZoneId
.
systemDefault
()));
if
(
costDto
.
getPayTime
()
!=
null
)
{
dcBaseFinanceFee
.
setPayTime
(
LocalDateTime
.
ofInstant
(
costDto
.
getPayTime
().
toInstant
(),
ZoneId
.
systemDefault
()));
}
if
(
costDto
.
getAuditTime
()
!=
null
)
{
dcBaseFinanceFee
.
setAuditTime
(
LocalDateTime
.
ofInstant
(
costDto
.
getAuditTime
().
toInstant
(),
ZoneId
.
systemDefault
()));
}
dcBaseFinanceFee
.
setBjModified
(
LocalDateTime
.
now
());
dcBaseFinanceFee
.
setBjModified
(
LocalDateTime
.
now
());
//更新
//更新
int
update
=
dcBaseFinanceFeeMapper
.
update
(
dcBaseFinanceFee
,
new
LambdaQueryWrapper
<
DcBaseFinanceFee
>()
int
update
=
dcBaseFinanceFeeMapper
.
update
(
dcBaseFinanceFee
,
new
LambdaQueryWrapper
<
DcBaseFinanceFee
>()
...
@@ -83,6 +91,7 @@ public class SyncFeeService {
...
@@ -83,6 +91,7 @@ public class SyncFeeService {
}
}
log
.
info
(
"同步一条费用单,costNo:{}"
,
costDto
.
getCostNo
());
log
.
info
(
"同步一条费用单,costNo:{}"
,
costDto
.
getCostNo
());
});
});
pageNum
++;
pageNum
++;
}
}
...
...
datacenter-mid/mid-calculate-transit/pom.xml
View file @
d9bf5fe0
...
@@ -3,10 +3,11 @@
...
@@ -3,10 +3,11 @@
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>
<artifactId>
datacenter-
base
</artifactId>
<artifactId>
datacenter-
mid
</artifactId>
<groupId>
com.bailuntec
</groupId>
<groupId>
com.bailuntec
</groupId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
mid-calculate-transit
</artifactId>
<artifactId>
mid-calculate-transit
</artifactId>
...
@@ -17,6 +18,7 @@
...
@@ -17,6 +18,7 @@
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven-surefire-plugin.version>
2.18.1
</maven-surefire-plugin.version>
<maven-surefire-plugin.version>
2.18.1
</maven-surefire-plugin.version>
<maven.build.timestamp.format>
yyyyMMddHHmm
</maven.build.timestamp.format>
<maven.build.timestamp.format>
yyyyMMddHHmm
</maven.build.timestamp.format>
<skipTests>
true
</skipTests>
</properties>
</properties>
<build>
<build>
...
...
datacenter-mid/mid-calculate-transit/src/test/java/com/bailuntec/job/service/MidCalculateTransitServiceTest.java
0 → 100644
View file @
d9bf5fe0
package
com
.
bailuntec
.
job
.
service
;
import
com.bailuntec.job.MidCalculateTransitApp
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.jupiter.api.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.cloud.netflix.hystrix.EnableHystrix
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
javax.annotation.Resource
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/12/12 10:59 上午
*/
@EnableHystrix
@ActiveProfiles
(
value
=
"test"
)
@Slf4j
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
MidCalculateTransitApp
.
class
)
class
MidCalculateTransitServiceTest
{
@Resource
MidCalculateTransitService
midCalculateTransitService
;
@Test
void
midCalculateOutStockQuantity
()
{
midCalculateTransitService
.
midCalculateOutStockQuantity
();
}
@Test
void
midCalculatePurchaseTransitQuantity
()
{
midCalculateTransitService
.
midCalculatePurchaseTransitQuantity
();
}
@Test
void
midCalculateTransferTransitQuantity
()
{
midCalculateTransitService
.
midCalculateTransferTransitQuantity
();
}
@Test
void
midCalculateNoShippedQuantity
()
{
midCalculateTransitService
.
midCalculateNoShippedQuantity
();
}
}
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