Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
platform
hg-smart
Commits
d430a272
Commit
d430a272
authored
Jul 15, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-15 业务账期维护账期结束日期变更
parent
7aa95d79
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+8
-7
DateUtils.java
src/main/java/com/baosight/hggp/util/DateUtils.java
+1
-1
HGCW001.jsp
src/main/webapp/HG/CW/HGCW001.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
d430a272
...
...
@@ -24,7 +24,10 @@ import java.math.BigDecimal;
import
java.math.BigInteger
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
...
...
@@ -136,14 +139,12 @@ public class HGCWTools {
paramMap
.
put
(
HGCW001
.
FIELD_ACCOUNT_PERIOD
,
DateUtils
.
formatShort
(
accountPeriod
.
substring
(
0
,
7
)));
List
<
HGCW001
>
list
=
DaoBase
.
getInstance
().
query
(
HGCW001
.
QUERY
,
paramMap
);
if
(
list
.
size
()
>
0
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
Date
account
=
formatter
.
parse
(
list
.
get
(
0
).
getAccountPeriodDateEnd
());
String
dateEnd
=
DateUtil
.
getLastDayInMonth
(
account
,
0
,
0
,
DateUtil
.
DATE10_PATTERN
);
//DateUtils.yesterdayEnd(dateStart,-1
);
inInfo
.
set
(
HGCW001
.
FIELD_ACCOUNT_PERIOD_DATE_START
,
dateEnd
);
//
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
//
Date account = formatter.parse(list.get(0).getAccountPeriodDateEnd());
//String dateEnd = DateUtil.getLastDayInMonth(account,0,0,DateUtil.DATE10_PATTERN
);
inInfo
.
set
(
HGCW001
.
FIELD_ACCOUNT_PERIOD_DATE_START
,
DateUtils
.
yesterdayEnd
(
list
.
get
(
0
).
getAccountPeriodDateEnd
(),
1
)
);
}
else
{
/*获取当前最后时间*/
//
//
/*获取当前开始时间*/
inInfo
.
set
(
HGCW001
.
FIELD_ACCOUNT_PERIOD_DATE_START
,
(
accountPeriodStr
.
substring
(
0
,
7
).
concat
(
"-01"
)));
}
}
catch
(
Exception
e
){
...
...
src/main/java/com/baosight/hggp/util/DateUtils.java
View file @
d430a272
...
...
@@ -91,7 +91,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
* @return
*/
public
static
String
yesterdayEnd
(
String
date
,
Integer
day
)
{
return
LocalDate
.
parse
(
date
).
min
usDays
(
day
).
format
(
DATE
);
return
LocalDate
.
parse
(
date
,
SHORT_DATE
).
pl
usDays
(
day
).
format
(
DATE
);
}
/**
* 获取日期字符串(yyyy-MM-dd)
...
...
src/main/webapp/HG/CW/HGCW001.jsp
View file @
d430a272
...
...
@@ -38,7 +38,7 @@
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
defaultValue=
"1"
>
<EF:EFCodeOption
codeName=
"hggp.cw.accountPeriodStatus"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"accountPeriodDateStart"
cname=
"账期开始日期"
enable=
"false"
width=
"100"
align=
"center"
<EF:EFColumn
ename=
"accountPeriodDateStart"
cname=
"账期开始日期"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFColumn
ename=
"accountPeriodDateEnd"
cname=
"账期结束日期"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
...
...
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