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
9dc93347
Commit
9dc93347
authored
Jul 15, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-15 业务账期维护变更
parent
fd05d0ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
HGCW001.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW001.java
+1
-1
HGCW001.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
+9
-3
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+0
-0
DateUtil.java
src/main/java/com/baosight/hggp/util/DateUtil.java
+23
-0
No files found.
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW001.java
View file @
9dc93347
...
@@ -70,7 +70,7 @@ public class HGCW001 extends DaoEPBase {
...
@@ -70,7 +70,7 @@ public class HGCW001 extends DaoEPBase {
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
accountYear
=
" "
;
/* 会计年度*/
private
String
accountYear
=
" "
;
/* 会计年度*/
private
String
accountPeriod
=
" "
;
/* 会计期*/
private
String
accountPeriod
=
" "
;
/* 会计期*/
private
Integer
accountPeriodStatus
;
/* 会计期状态0:关账1:开账*/
private
Integer
accountPeriodStatus
=
1
;
/* 会计期状态0:关账1:开账*/
private
String
accountPeriodDateStart
=
" "
;
/* 账期开始日期*/
private
String
accountPeriodDateStart
=
" "
;
/* 账期开始日期*/
private
String
accountPeriodDateEnd
=
" "
;
/* 账期结束日期*/
private
String
accountPeriodDateEnd
=
" "
;
/* 账期结束日期*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
View file @
9dc93347
...
@@ -47,10 +47,10 @@
...
@@ -47,10 +47,10 @@
ACCOUNT_PERIOD_STATUS = #accountPeriodStatus#
ACCOUNT_PERIOD_STATUS = #accountPeriodStatus#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodDateStart"
>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodDateStart"
>
ACCOUNT_PERIOD_DATE_START = #accountPeriodDateStart#
ACCOUNT_PERIOD_DATE_START
>
= #accountPeriodDateStart#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodDateEnd"
>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodDateEnd"
>
ACCOUNT_PERIOD_DATE_END = #accountPeriodDateEnd#
ACCOUNT_PERIOD_DATE_END
<
= #accountPeriodDateEnd#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
CREATED_BY = #createdBy#
...
@@ -76,6 +76,12 @@
...
@@ -76,6 +76,12 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodStart"
>
ACCOUNT_PERIOD >= #accountPeriodStart#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodEnd"
>
ACCOUNT_PERIOD
<
= #accountPeriodEnd#
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -104,7 +110,7 @@
...
@@ -104,7 +110,7 @@
$orderBy$
$orderBy$
</isNotEmpty>
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
<isEmpty
property=
"orderBy"
>
ID a
sc
ACCOUNT_YEAR desc, ACCOUNT_PERIOD desc, ID de
sc
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
9dc93347
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/util/DateUtil.java
View file @
9dc93347
...
@@ -7,6 +7,7 @@ import java.text.ParseException;
...
@@ -7,6 +7,7 @@ import java.text.ParseException;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.GregorianCalendar
;
import
java.util.Objects
;
import
java.util.Objects
;
/**
/**
...
@@ -56,6 +57,28 @@ public class DateUtil {
...
@@ -56,6 +57,28 @@ public class DateUtil {
return
""
;
return
""
;
}
}
/**
* 获取上个月的最后一天
* @param date 日期
* @param i 月数
* @return
*/
public
static
String
getLastDayInMonth
(
Date
date
,
int
i
)
{
return
getLastDayInMonth
(
date
,
i
,
-
1
,
DATE8_PATTERN
);
}
public
static
String
getLastDayInMonth
(
Date
date
,
int
i
,
int
day
,
String
pattern
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
pattern
);
if
(
date
==
null
)
{
return
null
;
}
else
{
GregorianCalendar
calendar
=
new
GregorianCalendar
();
calendar
.
setTime
(
date
);
calendar
.
add
(
2
,
i
+
1
);
calendar
.
set
(
5
,
1
);
calendar
.
add
(
5
,
day
);
return
format
.
format
(
calendar
.
getTime
());
}
}
/**、
/**、
* 返回月份天数
* 返回月份天数
* @param dateStr 日期
* @param dateStr 日期
...
...
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