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
a5b898f0
Commit
a5b898f0
authored
Jun 01, 2024
by
刘凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增:气瓶信息同步方法
parent
653b492d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
SyncCylinderDataService.java
...mos/api/openapi/face/service/SyncCylinderDataService.java
+5
-0
TmCylinderFillingCheckService.java
...i/openapi/face/service/TmCylinderFillingCheckService.java
+11
-1
TmCylinderFillingService.java
...os/api/openapi/face/service/TmCylinderFillingService.java
+9
-0
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/SyncCylinderDataService.java
View file @
a5b898f0
...
@@ -94,4 +94,9 @@ public class SyncCylinderDataService
...
@@ -94,4 +94,9 @@ public class SyncCylinderDataService
public
void
syncCylinderTag
(
List
<
CylinderTagsDto
>
cylinderTagsDtos
)
{
public
void
syncCylinderTag
(
List
<
CylinderTagsDto
>
cylinderTagsDtos
)
{
}
}
public
void
syncCylinderFillingBefore
(
List
<
CylinderFillingDto
>
cylinderFillingDtos
)
{
}
public
void
syncCylinderFillingAfter
(
List
<
CylinderFillingCheckDto
>
cylinderFillingCheckDtos
)
{
}
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderFillingCheckService.java
View file @
a5b898f0
...
@@ -4,12 +4,15 @@ package com.yeejoin.amos.api.openapi.face.service;
...
@@ -4,12 +4,15 @@ package com.yeejoin.amos.api.openapi.face.service;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderFillingCheckDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderFillingDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.yeejoin.amos.api.openapi.constant.Constant
;
import
com.yeejoin.amos.api.openapi.constant.Constant
;
...
@@ -32,12 +35,14 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck;
...
@@ -32,12 +35,14 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck;
public
class
TmCylinderFillingCheckService
extends
BaseService
<
TmCylinderFillingCheckModel
,
TmCylinderFillingCheck
,
TmCylinderFillingCheckMapper
>
{
public
class
TmCylinderFillingCheckService
extends
BaseService
<
TmCylinderFillingCheckModel
,
TmCylinderFillingCheck
,
TmCylinderFillingCheckMapper
>
{
@Autowired
@Autowired
private
RedisTemplate
redisTemplate
;
private
RedisTemplate
redisTemplate
;
@Autowired
private
SyncCylinderDataService
syncCylinderDataService
;
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
String
createCylinderFillingAfter
(
List
<
TmCylinderFillingCheckModel
>
model
)
{
public
String
createCylinderFillingAfter
(
List
<
TmCylinderFillingCheckModel
>
model
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
// if (ValidationUtil.isEmpty(model))
// if (ValidationUtil.isEmpty(model))
// throw new BadRequest("气瓶标签信息为空.");
// throw new BadRequest("气瓶标签信息为空.");
syncCylinderFillingAfter
(
model
);
for
(
TmCylinderFillingCheckModel
cylinderFillingCheckModel
:
model
)
{
for
(
TmCylinderFillingCheckModel
cylinderFillingCheckModel
:
model
)
{
cylinderFillingCheckModel
.
setRecDate
(
new
Date
());
cylinderFillingCheckModel
.
setRecDate
(
new
Date
());
cylinderFillingCheckModel
.
setAppId
(
getAppId
());
cylinderFillingCheckModel
.
setAppId
(
getAppId
());
...
@@ -46,6 +51,11 @@ public class TmCylinderFillingCheckService extends BaseService<TmCylinderFilling
...
@@ -46,6 +51,11 @@ public class TmCylinderFillingCheckService extends BaseService<TmCylinderFilling
return
"OK"
;
return
"OK"
;
}
}
private
void
syncCylinderFillingAfter
(
List
<
TmCylinderFillingCheckModel
>
model
)
{
List
<
CylinderFillingCheckDto
>
cylinderFillingCheckDtos
=
Bean
.
toModels
(
model
,
CylinderFillingCheckDto
.
class
);
syncCylinderDataService
.
syncCylinderFillingAfter
(
cylinderFillingCheckDtos
);
}
private
String
getAppId
()
{
private
String
getAppId
()
{
String
tokenKey
=
Redis
.
genKey
(
Constant
.
TOKEN_PREFIX
,
RequestContext
.
getToken
());
String
tokenKey
=
Redis
.
genKey
(
Constant
.
TOKEN_PREFIX
,
RequestContext
.
getToken
());
BizTokenModel
bizTokenModel
=
(
BizTokenModel
)
redisTemplate
.
opsForValue
().
get
(
tokenKey
);
BizTokenModel
bizTokenModel
=
(
BizTokenModel
)
redisTemplate
.
opsForValue
().
get
(
tokenKey
);
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderFillingService.java
View file @
a5b898f0
...
@@ -5,6 +5,8 @@ import java.util.Date;
...
@@ -5,6 +5,8 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.api.openapi.face.model.TmCylinderUnitModel
;
import
com.yeejoin.amos.api.openapi.face.model.TmCylinderUnitModel
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderFillingDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderInfoDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
@@ -43,6 +45,8 @@ public class TmCylinderFillingService extends BaseService<TmCylinderFillingModel
...
@@ -43,6 +45,8 @@ public class TmCylinderFillingService extends BaseService<TmCylinderFillingModel
// TODO Auto-generated method stub
// TODO Auto-generated method stub
// if (ValidationUtil.isEmpty(model))
// if (ValidationUtil.isEmpty(model))
// throw new BadRequest("气瓶标签信息为空.");
// throw new BadRequest("气瓶标签信息为空.");
syncCylinderFillingBefore
(
model
);
for
(
TmCylinderFillingModel
cylinderFillingModel
:
model
)
{
for
(
TmCylinderFillingModel
cylinderFillingModel
:
model
)
{
cylinderFillingModel
.
setRecDate
(
new
Date
());
cylinderFillingModel
.
setRecDate
(
new
Date
());
cylinderFillingModel
.
setAppId
(
getAppId
());
cylinderFillingModel
.
setAppId
(
getAppId
());
...
@@ -51,6 +55,11 @@ public class TmCylinderFillingService extends BaseService<TmCylinderFillingModel
...
@@ -51,6 +55,11 @@ public class TmCylinderFillingService extends BaseService<TmCylinderFillingModel
return
"OK"
;
return
"OK"
;
}
}
private
void
syncCylinderFillingBefore
(
List
<
TmCylinderFillingModel
>
model
)
{
List
<
CylinderFillingDto
>
cylinderFillingDtos
=
Bean
.
toModels
(
model
,
CylinderFillingDto
.
class
);
syncCylinderDataService
.
syncCylinderFillingBefore
(
cylinderFillingDtos
);
}
private
String
getAppId
()
{
private
String
getAppId
()
{
String
tokenKey
=
Redis
.
genKey
(
Constant
.
TOKEN_PREFIX
,
RequestContext
.
getToken
());
String
tokenKey
=
Redis
.
genKey
(
Constant
.
TOKEN_PREFIX
,
RequestContext
.
getToken
());
...
...
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