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
4715141b
Commit
4715141b
authored
Jul 16, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-16 原材料成本核算选择公司提示bug修复
parent
9e263532
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
18 deletions
+40
-18
ServiceHGCB002.java
.../java/com/baosight/hggp/hg/cb/service/ServiceHGCB002.java
+1
-1
HGCW001.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
+2
-2
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+12
-1
HGCB002A.js
src/main/webapp/HG/CB/HGCB002A.js
+24
-14
HGCB002A.jsp
src/main/webapp/HG/CB/HGCB002A.jsp
+1
-0
No files found.
src/main/java/com/baosight/hggp/hg/cb/service/ServiceHGCB002.java
View file @
4715141b
...
...
@@ -85,7 +85,7 @@ public class ServiceHGCB002 extends ServiceEPBase {
public
EiInfo
selectAll
(
EiInfo
inInfo
)
{
try
{
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGCW001
hgcw001
=
HGCWTools
.
HgCw001
.
getMaxAccountPeriod
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
).
toString
()
);
HGCW001
hgcw001
=
HGCWTools
.
HgCw001
.
getMaxAccountPeriod
(
params
);
EiInfoUtils
.
addBlock
(
inInfo
,
"hgcw001_block_id"
,
hgcw001
,
HGCW001
.
class
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"同步数据失败"
);
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
View file @
4715141b
...
...
@@ -338,14 +338,14 @@
ACCOUNT_PERIOD_DATE_START as "accountPeriodDateStart",
ACCOUNT_PERIOD_DATE_END as "accountPeriodDateEnd"
from ${hggpSchema}.HGCW001
where ACCOUNT_PERIOD_STATUS =
0
where ACCOUNT_PERIOD_STATUS =
#accountPeriodStatus#
AND ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND ACCOUNT_PERIOD = (
select MAX(ACCOUNT_PERIOD) from ${hggpSchema}.HGCW001
where ACCOUNT_CODE = #accountCode#
and COMPANY_CODE = #companyCode#
and ACCOUNT_PERIOD_STATUS =
0
and ACCOUNT_PERIOD_STATUS =
#accountPeriodStatus#
)
</select>
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
4715141b
...
...
@@ -48,8 +48,19 @@ public class HGCWTools {
public
static
HGCW001
getMaxAccountPeriod
(
String
companyCode
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyCode"
,
companyCode
);
params
.
put
(
HGCW001
.
FIELD_ACCOUNT_PERIOD_STATUS
,
AccountPeriodStatusEnum
.
OPEN
.
getCode
());
List
<
HGCW001
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCW001.getMaxAccountPeriod"
,
params
);
AssertUtils
.
isEmpty
(
list
,
"未找到公司有关账状态的会计期"
);
AssertUtils
.
isEmpty
(
list
,
"未找到公司有关账状态的会计期,请先业务账期关账!"
);
return
list
.
get
(
0
);
}
public
static
HGCW001
getMaxAccountPeriod
(
Map
paramMap
)
{
AssertUtils
.
isEmpty
(
paramMap
.
get
(
"companyCode"
).
toString
(),
"公司不能为空!"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
HGCW001
.
FIELD_COMPANY_CODE
,
paramMap
.
get
(
"companyCode"
));
params
.
put
(
HGCW001
.
FIELD_ACCOUNT_PERIOD_STATUS
,
AccountPeriodStatusEnum
.
OPEN
.
getCode
());
List
<
HGCW001
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCW001.getMaxAccountPeriod"
,
params
);
AssertUtils
.
isEmpty
(
list
,
String
.
format
(
"未找到[%s]有关账状态的会计期,请先业务账期关账!"
,
paramMap
.
get
(
HGCW001
.
FIELD_COMPANY_NAME
)));
return
list
.
get
(
0
);
}
...
...
src/main/webapp/HG/CB/HGCB002A.js
View file @
4715141b
...
...
@@ -3,33 +3,43 @@ $(function() {
let
companyCodeBox
=
__eiInfo
.
getBlock
(
"roleCompany"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#inqu_status-0-companyCode"
).
on
(
"change"
,
function
()
{
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
);
let
textField
=
IPLAT
.
EFSelect
.
text
(
companyCode
);
//let valueField = IPLAT.EFSelect.value(companyCode);
$
(
"#inqu_status-0-companyName"
).
val
(
textField
);
})
$
(
"#CONFIRM"
).
on
(
"click"
,
function
()
{
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
let
companyName
=
$
(
"#inqu_status-0-companyName"
).
val
();
if
(
companyCode
.
length
<
1
)
{
message
(
"请选择公司"
);
return
;
}
let
hgcw001
=
queryHgcw001
(
companyCode
);
let
companyName
;
let
accountPeriod
=
hgcw001
[
0
].
accountPeriod
;
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
].
companyCode
==
hgcw001
[
0
].
companyCode
)
{
companyName
=
companyCodeBox
[
i
].
companyName
;
break
;
}
let
flag
=
true
;
let
hgcw001
=
queryHgcw001
(
companyCode
,
companyName
);
if
(
hgcw001
.
length
<=
0
){
flag
=
false
;
return
false
;
}
JSUtils
.
confirm
(
"确定要对["
+
companyName
+
" 会计期"
+
accountPeriod
+
"]做
\"
数据同步
\"
操作? "
,
{
ok
:
function
()
{
parent
.
JSColorbox
.
setValueCallback
(
hgcw001
[
0
]);
}
});
if
(
flag
){
let
accountPeriod
=
hgcw001
[
0
].
accountPeriod
;
JSUtils
.
confirm
(
"确定要对["
+
companyName
+
" 会计期"
+
accountPeriod
+
"]做
\"
数据同步
\"
操作? "
,
{
ok
:
function
()
{
parent
.
JSColorbox
.
setValueCallback
(
hgcw001
[
0
]);
}
});
}
});
});
let
queryHgcw001
=
function
(
companyCode
){
let
queryHgcw001
=
function
(
companyCode
,
companyName
){
var
hgcw001_block_id
=
[];
let
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-companyCode"
,
companyCode
);
info
.
set
(
"inqu_status-0-companyName"
,
companyName
);
EiCommunicator
.
send
(
"HGCB002"
,
"selectAll"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
...
...
src/main/webapp/HG/CB/HGCB002A.jsp
View file @
4715141b
...
...
@@ -20,6 +20,7 @@
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" colWidth="3" type="hidden" />
</div>
</EF:EFRegion>
</EF:EFPage>
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