Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
ms-data-circulation-portal-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bb40fde9
authored
2025-02-21 17:58:23 +0800
by
肖初晴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【DAOP-1.0】数据需求
【功能点】测试问题处理
1 parent
d0c58194
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
8 deletions
src/main/java/com/csbr/qingcloud/portal/domain/vo/DemandRSVO.java
src/main/java/com/csbr/qingcloud/portal/service/impl/DemandServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/util/DateUtil.java
src/main/java/com/csbr/qingcloud/portal/domain/vo/DemandRSVO.java
View file @
bb40fde
...
...
@@ -168,7 +168,7 @@ public class DemandRSVO {
* 加工单生成时间
*/
@Schema
(
description
=
"加工单生成时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
processingGenerateTime
;
/**
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/DemandServiceImpl.java
View file @
bb40fde
package
com
.
csbr
.
qingcloud
.
portal
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.csbr.cloud.common.enums.SystemError
;
...
...
@@ -13,6 +10,7 @@ import com.csbr.qingcloud.portal.domain.vo.*;
import
com.csbr.qingcloud.portal.feign.ConfigureFeign
;
import
com.csbr.qingcloud.portal.feign.DataProcessBasicFeign
;
import
com.csbr.qingcloud.portal.feign.PersonelFeign
;
import
com.csbr.qingcloud.portal.util.DateUtil
;
import
csbr.cloud.entity.domain.user.UserInfo
;
import
csbr.cloud.entity.enums.ApprovalStateEnum
;
import
com.csbr.cloud.common.exception.CsbrSystemException
;
...
...
@@ -36,7 +34,6 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Service
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -136,8 +133,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
if
(
CollectionUtils
.
isEmpty
(
guids
)){
return
null
;
}
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
guids
).
getData
();
return
map
;
try
{
Map
<
String
,
DemandUpdateStateVO
>
map
=
dataProcessBasicFeign
.
getOrderState
(
guids
).
getData
();
return
map
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
null
;
}
}
/**
...
...
@@ -595,12 +597,15 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
vo
.
setProductProcessingState
(
voState
.
getProductProcessingState
());
vo
.
setProductDeliveryState
(
voState
.
getProductDeliveryState
());
vo
.
setProductAcceptState
(
voState
.
getProductAcceptState
());
vo
.
setAcceptFinishTime
(
voState
.
getAcceptFinishTime
());
vo
.
setAcceptFinishTime
(
DateUtil
.
getShortDate
(
voState
.
getAcceptFinishTime
()));
vo
.
setFinishCycle
(
DateUtil
.
getDiffDay
(
voState
.
getAcceptFinishTime
(),
entity
.
getProcessingGenerateTime
()));
}
}
return
vo
;
}
/**
* 数据需求新增、修改和其他情况的参数转换为实体
* @author xcq
...
...
src/main/java/com/csbr/qingcloud/portal/util/DateUtil.java
0 → 100644
View file @
bb40fde
package
com
.
csbr
.
qingcloud
.
portal
.
util
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
public
class
DateUtil
{
/** 时间相差多少天 无视小时 */
public
static
int
getDiffDay
(
Date
one
,
Date
two
)
{
if
(
one
==
null
||
two
==
null
){
return
0
;
}
one
=
getDateByString
(
getShortDateToString
(
one
));
two
=
getDateByString
(
getShortDateToString
(
two
));
long
difference
=
(
one
.
getTime
()
-
two
.
getTime
())
/
86400000
;
return
(
int
)
Math
.
abs
(
difference
);
}
/** 字符串时间转日期 */
public
static
Date
getDateByString
(
String
time
){
try
{
return
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
parse
(
time
);
}
catch
(
Exception
e
)
{
return
new
Date
();
}
}
/** 时间转字符串 */
public
static
String
getShortDateToString
(
Date
time
){
if
(
time
==
null
)
{
return
""
;
}
return
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
time
);
}
/** 字符串时间转日期 */
public
static
Date
getShortDate
(
Date
time
){
if
(
time
==
null
)
{
return
null
;
}
try
{
return
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
parse
(
getShortDateToString
(
time
));
}
catch
(
Exception
e
)
{
return
new
Date
();
}
}
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment