Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
1f51dbda
Commit
1f51dbda
authored
Mar 11, 2024
by
chenyuefang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
866c1b33
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
CbQuantitySummaryController.java
...com/dsk/cscec/controller/CbQuantitySummaryController.java
+2
-2
ICbQuantitySummaryService.java
...java/com/dsk/cscec/service/ICbQuantitySummaryService.java
+2
-1
CbQuantitySummaryServiceImpl.java
.../dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
+6
-5
CbSummaryServiceImpl.java
...java/com/dsk/cscec/service/impl/CbSummaryServiceImpl.java
+1
-1
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/CbQuantitySummaryController.java
View file @
1f51dbda
...
@@ -59,8 +59,8 @@ public class CbQuantitySummaryController extends BaseController {
...
@@ -59,8 +59,8 @@ public class CbQuantitySummaryController extends BaseController {
*/
*/
@GetMapping
(
value
=
"/conversionNotice"
)
@GetMapping
(
value
=
"/conversionNotice"
)
public
R
conversionNotice
(
CbQuantitySummaryListBo
bo
)
{
public
R
conversionNotice
(
CbQuantitySummaryListBo
bo
)
{
baseService
.
conversionNotice
(
bo
);
return
R
.
ok
(
);
return
baseService
.
conversionNotice
(
bo
);
}
}
/**
/**
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/ICbQuantitySummaryService.java
View file @
1f51dbda
package
com
.
dsk
.
cscec
.
service
;
package
com
.
dsk
.
cscec
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.cscec.domain.CbQuantitySummary
;
import
com.dsk.cscec.domain.CbQuantitySummary
;
import
com.dsk.cscec.domain.CbQuantitySummaryActual
;
import
com.dsk.cscec.domain.CbQuantitySummaryActual
;
import
com.dsk.cscec.domain.bo.CbProjectBaseBo
;
import
com.dsk.cscec.domain.bo.CbProjectBaseBo
;
...
@@ -30,6 +31,6 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
...
@@ -30,6 +31,6 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
boolean
batchInsert
(
List
<
CbQuantitySummary
>
list
);
boolean
batchInsert
(
List
<
CbQuantitySummary
>
list
);
void
conversionNotice
(
CbQuantitySummaryListBo
bo
);
R
conversionNotice
(
CbQuantitySummaryListBo
bo
);
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
View file @
1f51dbda
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.redis.RedisUtils
;
import
com.dsk.common.utils.redis.RedisUtils
;
...
@@ -161,7 +162,7 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
...
@@ -161,7 +162,7 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
}
}
@Override
@Override
public
void
conversionNotice
(
CbQuantitySummaryListBo
bo
)
{
public
R
conversionNotice
(
CbQuantitySummaryListBo
bo
)
{
if
(
StringUtil
.
isBlank
(
bo
.
getRecordDate
()))
{
if
(
StringUtil
.
isBlank
(
bo
.
getRecordDate
()))
{
//默认当前月
//默认当前月
bo
.
setRecordDate
(
DatePattern
.
SIMPLE_MONTH_FORMAT
.
format
(
new
Date
()));
bo
.
setRecordDate
(
DatePattern
.
SIMPLE_MONTH_FORMAT
.
format
(
new
Date
()));
...
@@ -169,13 +170,13 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
...
@@ -169,13 +170,13 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
//是否是实体工程材料
//是否是实体工程材料
CbSubject
cbSubject
=
cbSubjectMapper
.
selectOne
(
new
LambdaQueryWrapper
<
CbSubject
>().
eq
(
CbSubject:
:
getCbSubjectName
,
bo
.
getCbSubjectName
()));
CbSubject
cbSubject
=
cbSubjectMapper
.
selectOne
(
new
LambdaQueryWrapper
<
CbSubject
>().
eq
(
CbSubject:
:
getCbSubjectName
,
bo
.
getCbSubjectName
()));
if
(
ObjectUtil
.
isNull
(
cbSubject
))
{
if
(
ObjectUtil
.
isNull
(
cbSubject
))
{
return
;
return
R
.
ok
()
;
}
}
if
(
cbSubject
.
getCbSubjectNo
().
startsWith
(
"FG"
)
||
cbSubject
.
getCbSubjectNo
().
startsWith
(
"JD"
))
{
if
(
cbSubject
.
getCbSubjectNo
().
startsWith
(
"FG"
)
||
cbSubject
.
getCbSubjectNo
().
startsWith
(
"JD"
))
{
//是否存在未换算数据
//是否存在未换算数据
List
<
CbQuantitySummaryListVo
>
unconvertedList
=
baseMapper
.
unconvertedList
(
bo
);
List
<
CbQuantitySummaryListVo
>
unconvertedList
=
baseMapper
.
unconvertedList
(
bo
);
if
(
CollectionUtil
.
isEmpty
(
unconvertedList
))
{
if
(
CollectionUtil
.
isEmpty
(
unconvertedList
))
{
return
;
return
R
.
ok
()
;
}
}
//是否提示
//是否提示
String
key
=
GlobalConstants
.
UNIT_CONVERSION_NOTICE
+
LoginHelper
.
getUserId
()
+
"_"
+
bo
.
getProjectId
()
+
"_"
+
bo
.
getCbSubjectName
()
+
"_"
+
bo
.
getRecordDate
();
String
key
=
GlobalConstants
.
UNIT_CONVERSION_NOTICE
+
LoginHelper
.
getUserId
()
+
"_"
+
bo
.
getProjectId
()
+
"_"
+
bo
.
getCbSubjectName
()
+
"_"
+
bo
.
getRecordDate
();
...
@@ -183,11 +184,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
...
@@ -183,11 +184,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
Date
now
=
new
Date
();
Date
now
=
new
Date
();
long
expireTime
=
DateUtil
.
between
(
now
,
DateUtil
.
endOfDay
(
now
),
DateUnit
.
SECOND
);
long
expireTime
=
DateUtil
.
between
(
now
,
DateUtil
.
endOfDay
(
now
),
DateUnit
.
SECOND
);
RedisUtils
.
setCacheObject
(
key
,
"noticed"
,
Duration
.
ofSeconds
(
expireTime
));
RedisUtils
.
setCacheObject
(
key
,
"noticed"
,
Duration
.
ofSeconds
(
expireTime
));
Assert
.
isTrue
(
false
,
"系统检测到您近期未进行物料单位换算,请立即进行换算。"
);
return
R
.
ok
(
"系统检测到您近期未进行物料单位换算,请立即进行换算。"
,
500
);
}
}
}
}
return
R
.
ok
();
}
}
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CbSummaryServiceImpl.java
View file @
1f51dbda
...
@@ -474,7 +474,7 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
...
@@ -474,7 +474,7 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
if
(
unfilled
.
length
()
>
0
)
{
if
(
unfilled
.
length
()
>
0
)
{
unfilled
.
deleteCharAt
(
unfilled
.
lastIndexOf
(
"、"
));
unfilled
.
deleteCharAt
(
unfilled
.
lastIndexOf
(
"、"
));
unfilled
.
append
(
" 未填写成本,是否继续锁定?"
);
unfilled
.
append
(
" 未填写成本,是否继续锁定?"
);
return
R
.
fail
(
unfilled
.
toString
()
);
return
R
.
ok
(
unfilled
.
toString
(),
500
);
}
else
{
}
else
{
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
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