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
fd05d0ae
Commit
fd05d0ae
authored
Jul 09, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
cc13e013
67649b9a
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
428 additions
and
16 deletions
+428
-16
AccountPeriodStatusEnum.java
...ava/com/baosight/hggp/common/AccountPeriodStatusEnum.java
+56
-0
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+6
-3
ServiceHGCB005.java
.../java/com/baosight/hggp/hg/cb/service/ServiceHGCB005.java
+0
-1
HGCW001.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
+43
-0
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+14
-0
ServiceHGKC001.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
+3
-0
ServiceHGKC003.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
+3
-0
ServiceHGKC004.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC004.java
+3
-0
ServiceHGKC006.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
+4
-0
ServiceHGKC007.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
+4
-2
ServiceHGKC008.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
+20
-1
ServiceHGKC008A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC008A.java
+5
-2
HGKC010.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC010.xml
+3
-0
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+66
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+1
-0
ServiceXSOG0801A.java
...om/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
+2
-3
iPlatV7-index.jsp
src/main/resources/META-INF/resources/iPlatV7-index.jsp
+37
-3
HGKC007A.js
src/main/webapp/HG/KC/HGKC007A.js
+157
-0
HGKC007A.jsp
src/main/webapp/HG/KC/HGKC007A.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/common/AccountPeriodStatusEnum.java
0 → 100644
View file @
fd05d0ae
package
com
.
baosight
.
hggp
.
common
;
import
java.util.*
;
/**
* @Author wwl
* @Date 2024/1/10 14:29
*/
public
enum
AccountPeriodStatusEnum
{
OPEN
(
1
,
"开账"
),
CLOSE
(
0
,
"关账"
);
private
Integer
code
;
private
String
value
;
AccountPeriodStatusEnum
(
Integer
code
,
String
value
)
{
this
.
code
=
code
;
this
.
value
=
value
;
}
public
static
AccountPeriodStatusEnum
getEnumByCode
(
Integer
code
){
for
(
AccountPeriodStatusEnum
en
:
AccountPeriodStatusEnum
.
values
()){
if
(
code
.
compareTo
(
en
.
code
)==
0
){
return
en
;
}
}
return
null
;
}
public
static
String
getNameByCode
(
Integer
code
){
AccountPeriodStatusEnum
en
=
getEnumByCode
(
code
);
if
(
Objects
.
nonNull
(
en
)){
return
en
.
getValue
();
}
return
null
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
}
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
fd05d0ae
...
@@ -153,17 +153,20 @@ public class UserSessionUtils extends UserSession {
...
@@ -153,17 +153,20 @@ public class UserSessionUtils extends UserSession {
}
}
List
<
String
>
companyCodes
=
userGroups
.
stream
().
map
(
UserGroup:
:
getCompanyCode
)
List
<
String
>
companyCodes
=
userGroups
.
stream
().
map
(
UserGroup:
:
getCompanyCode
)
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
companyCodes
))
{
// 查询组织信息
// 查询组织信息
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
list
(
companyCodes
);
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
list
(
companyCodes
);
Optional
.
ofNullable
(
companyCodes
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
Optional
.
ofNullable
(
companyCodes
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
orgs
.
addAll
(
HGXSTools
.
XsOrg
.
queryByParent
(
code
,
OrgTypeEnum
.
COMPANY
.
getCode
()));
orgs
.
addAll
(
HGXSTools
.
XsOrg
.
queryByParent
(
code
,
OrgTypeEnum
.
COMPANY
.
getCode
()));
});
});
return
orgs
.
stream
().
filter
(
o
->
StringUtils
.
equals
(
o
.
getOrgType
(),
OrgTypeEnum
.
COMPANY
.
getCode
())).
map
(
item
->
new
Company
(
item
.
getOrgId
(),
item
.
getOrgCname
())).
collect
(
Collectors
.
collectingAndThen
(
return
orgs
.
stream
().
filter
(
o
->
StringUtils
.
equals
(
o
.
getOrgType
(),
OrgTypeEnum
.
COMPANY
.
getCode
())).
map
(
item
->
new
Company
(
item
.
getOrgId
(),
item
.
getOrgCname
())).
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toMap
(
Company:
:
getCompanyCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
Collectors
.
toMap
(
Company:
:
getCompanyCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
// 将Map转回List
// 将Map转回List
m
->
new
ArrayList
<>(
m
.
values
())
m
->
new
ArrayList
<>(
m
.
values
())
));
));
}
}
return
new
ArrayList
<
Company
>();
}
/**
/**
* 获取指定公司的部门列表
* 获取指定公司的部门列表
...
...
src/main/java/com/baosight/hggp/hg/cb/service/ServiceHGCB005.java
View file @
fd05d0ae
...
@@ -2,7 +2,6 @@ package com.baosight.hggp.hg.cb.service;
...
@@ -2,7 +2,6 @@ package com.baosight.hggp.hg.cb.service;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB002
;
import
com.baosight.hggp.hg.cb.domain.HGCB005
;
import
com.baosight.hggp.hg.cb.domain.HGCB005
;
import
com.baosight.hggp.hg.cb.tools.HGCBTools
;
import
com.baosight.hggp.hg.cb.tools.HGCBTools
;
import
com.baosight.hggp.hg.cw.domain.HGCW001
;
import
com.baosight.hggp.hg.cw.domain.HGCW001
;
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
View file @
fd05d0ae
...
@@ -289,4 +289,47 @@
...
@@ -289,4 +289,47 @@
)
)
</select>
</select>
<select
id=
"queryByBussines"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW001"
>
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear",
<!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod",
<!-- 会计期 -->
ACCOUNT_PERIOD_STATUS as "accountPeriodStatus",
<!-- 会计期状态0:关账1:开账 -->
ACCOUNT_PERIOD_DATE_START as "accountPeriodDateStart",
<!-- 账期开始日期 -->
ACCOUNT_PERIOD_DATE_END as "accountPeriodDateEnd",
<!-- 账期结束日期 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DEP_CODE as "depCode"
<!-- 部门编码 -->
FROM ${hggpSchema}.HGCW001 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"bussinessTime"
>
<![CDATA[ ACCOUNT_PERIOD_DATE_START >= #bussinessTime# ]]>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"bussinessTime"
>
<![CDATA[ ACCOUNT_PERIOD_DATE_END <= #bussinessTime# ]]>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodStatus"
>
ACCOUNT_PERIOD_STATUS = #accountPeriodStatus#
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID desc
</isEmpty>
</dynamic>
</select>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
fd05d0ae
package
com
.
baosight
.
hggp
.
hg
.
cw
.
tools
;
package
com
.
baosight
.
hggp
.
hg
.
cw
.
tools
;
import
com.baosight.hggp.common.AccountPeriodStatusEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
...
@@ -13,6 +14,7 @@ import com.baosight.hggp.util.AssertUtils;
...
@@ -13,6 +14,7 @@ import com.baosight.hggp.util.AssertUtils;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.math.BigInteger
;
...
@@ -45,6 +47,18 @@ public class HGCWTools {
...
@@ -45,6 +47,18 @@ public class HGCWTools {
List
<
HGCW001
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW001
.
QUERY
,
paramMap
);
List
<
HGCW001
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW001
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
}
public
static
HGCW001
getAccountPeriod
(
String
companyCode
,
String
bussinessTime
)
{
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
bussinessTime
),
"业务日期不能为空!"
);
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
companyCode
),
"业务公司不能为空!"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyCode"
,
companyCode
);
params
.
put
(
"bussinessTime"
,
bussinessTime
);
params
.
put
(
"accountPeriodStatus"
,
AccountPeriodStatusEnum
.
OPEN
.
getCode
());
List
<
HGCW001
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCW001.queryByBussines"
,
params
);
AssertUtils
.
isEmpty
(
list
,
"未找到公司符合"
+
bussinessTime
+
"开账的账期"
);
return
list
.
get
(
0
);
}
}
}
public
static
class
HgCw002
{
public
static
class
HgCw002
{
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
View file @
fd05d0ae
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
...
@@ -196,6 +197,8 @@ public class ServiceHGKC001 extends ServiceBase {
...
@@ -196,6 +197,8 @@ public class ServiceHGKC001 extends ServiceBase {
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgkc001
.
fromMap
(
map
);
hgkc001
.
fromMap
(
map
);
hgkc001
=
HGKCTools
.
HgKc001
.
getId
(
hgkc001
.
getId
());
hgkc001
=
HGKCTools
.
HgKc001
.
getId
(
hgkc001
.
getId
());
//查看是否能获取到账期,获取不到就提示
HGCWTools
.
HgCw001
.
getAccountPeriod
(
hgkc001
.
getCompanyCode
(),
hgkc001
.
getDepositDate
());
hgkc001
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
hgkc001
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
// 校验数据
// 校验数据
this
.
checkSubmitData
(
hgkc001
);
this
.
checkSubmitData
(
hgkc001
);
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
View file @
fd05d0ae
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
...
@@ -152,6 +153,8 @@ public class ServiceHGKC003 extends ServiceBase {
...
@@ -152,6 +153,8 @@ public class ServiceHGKC003 extends ServiceBase {
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgkc003
.
fromMap
(
map
);
hgkc003
.
fromMap
(
map
);
hgkc003
=
HGKCTools
.
HgKc003
.
getId
(
hgkc003
.
getId
());
hgkc003
=
HGKCTools
.
HgKc003
.
getId
(
hgkc003
.
getId
());
//查看是否能获取到账期,获取不到就提示
HGCWTools
.
HgCw001
.
getAccountPeriod
(
hgkc003
.
getCompanyCode
(),
hgkc003
.
getDepositDate
());
hgkc003
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
hgkc003
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
// 校验数据
// 校验数据
this
.
checkSubmitData
(
hgkc003
);
this
.
checkSubmitData
(
hgkc003
);
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC004.java
View file @
fd05d0ae
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.kc.domain.HGKC004
;
import
com.baosight.hggp.hg.kc.domain.HGKC004
;
import
com.baosight.hggp.hg.kc.domain.HGKC004A
;
import
com.baosight.hggp.hg.kc.domain.HGKC004A
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
...
@@ -166,6 +167,8 @@ public class ServiceHGKC004 extends ServiceEPBase {
...
@@ -166,6 +167,8 @@ public class ServiceHGKC004 extends ServiceEPBase {
hgkc004
.
fromMap
(
map
);
hgkc004
.
fromMap
(
map
);
HGKC004
kc004
=
HGKCTools
.
HgKc004
.
getId
(
hgkc004
.
getId
());
HGKC004
kc004
=
HGKCTools
.
HgKc004
.
getId
(
hgkc004
.
getId
());
//查看是否能获取到账期,获取不到就提示
HGCWTools
.
HgCw001
.
getAccountPeriod
(
kc004
.
getCompanyCode
(),
kc004
.
getReceiptDate
());
List
<
HGKC004A
>
hgkc004s
=
HGKCTools
.
HgKc004
.
getDetailById
(
hgkc004
.
getId
());
List
<
HGKC004A
>
hgkc004s
=
HGKCTools
.
HgKc004
.
getDetailById
(
hgkc004
.
getId
());
AssertUtils
.
isEmpty
(
hgkc004s
,
"销售出库单明细不存在!"
);
AssertUtils
.
isEmpty
(
hgkc004s
,
"销售出库单明细不存在!"
);
for
(
HGKC004A
hgkc004A
:
hgkc004s
)
{
for
(
HGKC004A
hgkc004A
:
hgkc004s
)
{
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
View file @
fd05d0ae
...
@@ -170,6 +170,10 @@ public class ServiceHGKC006 extends ServiceBase {
...
@@ -170,6 +170,10 @@ public class ServiceHGKC006 extends ServiceBase {
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgkc006
.
fromMap
(
map
);
hgkc006
.
fromMap
(
map
);
hgkc006
=
HGKCTools
.
HgKc006
.
getById
(
hgkc006
.
getId
());
//查看是否能获取到账期,获取不到就提示
HGCWTools
.
HgCw001
.
getAccountPeriod
(
hgkc006
.
getCompanyCode
(),
hgkc006
.
getOtherEnterDate
());
DaoUtils
.
update
(
HGKC006
.
CHECK
,
hgkc006
.
toMap
());
DaoUtils
.
update
(
HGKC006
.
CHECK
,
hgkc006
.
toMap
());
}
}
List
<
HGKC006A
>
hgkc006AList
=
HGKCTools
.
HgKc006A
.
getHgkc006aList
(
hgkc006
.
getId
());
List
<
HGKC006A
>
hgkc006AList
=
HGKCTools
.
HgKc006A
.
getHgkc006aList
(
hgkc006
.
getId
());
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
View file @
fd05d0ae
...
@@ -11,10 +11,8 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
...
@@ -11,10 +11,8 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.kc.domain.HGKC007
;
import
com.baosight.hggp.hg.kc.domain.HGKC007
;
import
com.baosight.hggp.hg.kc.domain.HGKC007
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.utils.HGUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
...
@@ -153,6 +151,8 @@ public class ServiceHGKC007 extends ServiceBase {
...
@@ -153,6 +151,8 @@ public class ServiceHGKC007 extends ServiceBase {
*/
*/
private
void
modify
(
HGKC007
hgkc007
)
throws
Exception
{
private
void
modify
(
HGKC007
hgkc007
)
throws
Exception
{
DaoUtils
.
update
(
HGKC007
.
UPDATE
,
hgkc007
);
DaoUtils
.
update
(
HGKC007
.
UPDATE
,
hgkc007
);
//同时修改子表的仓库数据、公司数据
HGKCTools
.
HgKc007A
.
updateWhCodeByPrimaryId
(
hgkc007
);
}
}
/**
/**
...
@@ -166,6 +166,8 @@ public class ServiceHGKC007 extends ServiceBase {
...
@@ -166,6 +166,8 @@ public class ServiceHGKC007 extends ServiceBase {
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgkc007
.
fromMap
(
map
);
hgkc007
.
fromMap
(
map
);
HGKC007
getKc007
=
HGKCTools
.
HgKc007
.
getById
(
hgkc007
.
getId
());
HGCWTools
.
HgCw001
.
getAccountPeriod
(
getKc007
.
getCompanyCode
(),
getKc007
.
getOtherOutDate
());
DaoUtils
.
update
(
HGKC007
.
CHECK
,
hgkc007
.
toMap
());
DaoUtils
.
update
(
HGKC007
.
CHECK
,
hgkc007
.
toMap
());
}
}
List
<
HGKC007A
>
hgkc007AList
=
HGKCTools
.
HgKc007A
.
getHgkc007aList
(
hgkc007
.
getId
());
List
<
HGKC007A
>
hgkc007AList
=
HGKCTools
.
HgKc007A
.
getHgkc007aList
(
hgkc007
.
getId
());
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
View file @
fd05d0ae
package
com
.
baosight
.
hggp
.
hg
.
kc
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
kc
.
service
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeDetailEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.kc.domain.HGKC008
;
import
com.baosight.hggp.hg.kc.domain.HGKC008
;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ004
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -47,8 +51,18 @@ public class ServiceHGKC008 extends ServiceBase {
...
@@ -47,8 +51,18 @@ public class ServiceHGKC008 extends ServiceBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGKC008
.
QUERY
,
new
HGKC008
());
inInfo
=
super
.
query
(
inInfo
,
HGKC008
.
QUERY
,
new
HGKC008
());
//移动端需要主表查询明细需要的下拉框
String
whCode
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGKC008A
.
FIELD_WH_CODE
);
Map
map
=
new
HashMap
();
map
.
put
(
HGKC008A
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
map
.
put
(
HGKC008A
.
FIELD_WH_CODE
,
whCode
);
map
.
put
(
HGPZ004
.
FIELD_INVENT_TYPE_DETAILS
,
InventTypeDetailEnum
.
getInentTypeThree
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_TYPE_BOX_BLOCK_ID
,
DdynamicEnum
.
INVENT_CODE_BOX_BLOCK_ID
),
map
,
false
);
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
}
catch
(
Plat
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
return
inInfo
;
return
inInfo
;
...
@@ -78,6 +92,8 @@ public class ServiceHGKC008 extends ServiceBase {
...
@@ -78,6 +92,8 @@ public class ServiceHGKC008 extends ServiceBase {
this
.
checkSaveData
(
hgkc008
);
this
.
checkSaveData
(
hgkc008
);
if
(
Objects
.
nonNull
(
hgkc008
.
getId
())&&
hgkc008
.
getId
()!=
0
){
if
(
Objects
.
nonNull
(
hgkc008
.
getId
())&&
hgkc008
.
getId
()!=
0
){
DaoUtils
.
update
(
HGKC008
.
UPDATE
,
hgkc008
);
DaoUtils
.
update
(
HGKC008
.
UPDATE
,
hgkc008
);
//同时修改子表的仓库数据、公司数据
HGKCTools
.
HgKc008A
.
updateWhCodeByReceiveId
(
hgkc008
);
}
else
{
}
else
{
//生成生产领料编号
//生成生产领料编号
hgkc008
.
setApplyCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
RECEIVE_CODE
));
hgkc008
.
setApplyCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
RECEIVE_CODE
));
...
@@ -122,6 +138,9 @@ public class ServiceHGKC008 extends ServiceBase {
...
@@ -122,6 +138,9 @@ public class ServiceHGKC008 extends ServiceBase {
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgkc008
.
fromMap
(
map
);
hgkc008
.
fromMap
(
map
);
//查看是否能获取到账期,获取不到就提示
HGKC008
getKc008
=
HGKCTools
.
HgKc008
.
getById
(
hgkc008
.
getId
());
HGCWTools
.
HgCw001
.
getAccountPeriod
(
getKc008
.
getCompanyCode
(),
getKc008
.
getReceiptDate
());
DaoUtils
.
update
(
HGKC008
.
UPDATE_STATUS
,
hgkc008
);
DaoUtils
.
update
(
HGKC008
.
UPDATE_STATUS
,
hgkc008
);
}
}
List
<
HGKC008A
>
hgkc008AList
=
HGKCTools
.
HgKc008A
.
getHgkc008aList
(
hgkc008
.
getId
());
List
<
HGKC008A
>
hgkc008AList
=
HGKCTools
.
HgKc008A
.
getHgkc008aList
(
hgkc008
.
getId
());
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008A.java
View file @
fd05d0ae
...
@@ -57,7 +57,7 @@ public class ServiceHGKC008A extends ServiceBase {
...
@@ -57,7 +57,7 @@ public class ServiceHGKC008A extends ServiceBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
//
蓝图
ids
//
明细
ids
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGKC008A
.
FIELD_ID
);
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGKC008A
.
FIELD_ID
);
DaoUtils
.
update
(
HGKC008A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
DaoUtils
.
update
(
HGKC008A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
...
@@ -131,13 +131,16 @@ public class ServiceHGKC008A extends ServiceBase {
...
@@ -131,13 +131,16 @@ public class ServiceHGKC008A extends ServiceBase {
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isNull
(
hgkc008a
.
getReceiveId
(),
"未获取到生产领料单ID信息"
);
AssertUtils
.
isNull
(
hgkc008a
.
getReceiveId
(),
"未获取到生产领料单ID信息"
);
AssertUtils
.
isTrue
(
hgkc008a
.
getInvWeight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
,
"重量不能为0"
);
if
(
Objects
.
nonNull
(
hgkc008a
.
getId
())&&
hgkc008a
.
getId
()!=
0
){
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
ZC
)
==
0
){
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
ZC
)
==
0
){
AssertUtils
.
isTrue
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
,
"此生产领料单为正常类型,数量不能小于0"
);
AssertUtils
.
isTrue
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
,
"此生产领料单为正常类型,数量不能小于0"
);
}
}
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
TK
)
==
0
){
if
(
hgkc008
.
getReceiveType
().
compareTo
(
HGConstant
.
ReceiveType
.
TK
)
==
0
){
AssertUtils
.
isTrue
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
,
"此生产领料单为退库类型,数量不能大于0"
);
AssertUtils
.
isTrue
(
hgkc008a
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
,
"此生产领料单为退库类型,数量不能大于0"
);
}
}
AssertUtils
.
isTrue
(
hgkc008a
.
getInvWeight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
,
"重量不能为0"
);
}
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC010.xml
View file @
fd05d0ae
...
@@ -98,6 +98,9 @@
...
@@ -98,6 +98,9 @@
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetails"
>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetails"
>
INVENT_TYPE_DETAIL IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventTypeDetails"
>
#inventTypeDetails[]#
</iterate>
INVENT_TYPE_DETAIL IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventTypeDetails"
>
#inventTypeDetails[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCodes"
>
INVENT_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventCodes"
>
#inventCodes[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"idCondition"
>
<sql
id=
"idCondition"
>
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
fd05d0ae
...
@@ -752,6 +752,30 @@ public class HGKCTools {
...
@@ -752,6 +752,30 @@ public class HGKCTools {
List
<
HGKC007A
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC007A
.
QUERY
,
paramMap
);
List
<
HGKC007A
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC007A
.
QUERY
,
paramMap
);
return
results
;
return
results
;
}
}
public
static
List
<
HGKC007A
>
updateWhCodeByPrimaryId
(
HGKC007
kc007
)
{
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"primaryId"
,
kc007
.
getId
());
List
<
HGKC007A
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC007A
.
QUERY
,
paramMap
);
results
.
forEach
(
o
->{
o
.
setWhName
(
kc007
.
getWhName
());
o
.
setWhCode
(
kc007
.
getWhCode
());
o
.
setCompanyCode
(
kc007
.
getCompanyCode
());
o
.
setCompanyName
(
kc007
.
getCompanyName
());
o
.
setProjCode
(
kc007
.
getProjCode
());
o
.
setProjName
(
kc007
.
getProjName
());
});
if
(!
CollectionUtil
.
isEmpty
(
results
)){
List
<
String
>
inventCodes
=
results
.
stream
().
map
(
o
->
o
.
getInventCode
()).
collect
(
Collectors
.
toList
());
List
<
HGKC010
>
kc010List
=
HGKCTools
.
HgKc010
.
getListByBussiness
(
kc007
.
getCompanyCode
(),
kc007
.
getWhCode
(),
inventCodes
);
results
.
forEach
(
o
->{
HGKC010
kc010
=
kc010List
.
stream
().
filter
(
k
->
k
.
getInventCode
().
equals
(
o
.
getInventCode
())).
findAny
().
orElse
(
null
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
kc010
),
"仓库("
+
kc007
.
getWhCode
()+
"|"
+
kc007
.
getWhName
()+
"),不存在存货信息:("
+
o
.
getInventCode
()+
"|"
+
o
.
getInventName
()+
")"
);
});
DaoUtils
.
updateBatch
(
HGKC007A
.
UPDATE
,
results
);
}
return
results
;
}
}
}
...
@@ -798,6 +822,31 @@ public class HGKCTools {
...
@@ -798,6 +822,31 @@ public class HGKCTools {
return
results
;
return
results
;
}
}
public
static
List
<
HGKC008A
>
updateWhCodeByReceiveId
(
HGKC008
kc008
)
{
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"receiveId"
,
kc008
.
getId
());
List
<
HGKC008A
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC008A
.
QUERY
,
paramMap
);
results
.
forEach
(
o
->{
o
.
setWhName
(
kc008
.
getWhName
());
o
.
setWhCode
(
kc008
.
getWhCode
());
o
.
setCompanyCode
(
kc008
.
getCompanyCode
());
o
.
setCompanyName
(
kc008
.
getCompanyName
());
o
.
setProjCode
(
kc008
.
getProjCode
());
o
.
setProjName
(
kc008
.
getProjName
());
});
if
(!
CollectionUtil
.
isEmpty
(
results
)){
List
<
String
>
inventCodes
=
results
.
stream
().
map
(
o
->
o
.
getInventCode
()).
collect
(
Collectors
.
toList
());
List
<
HGKC010
>
kc010List
=
HGKCTools
.
HgKc010
.
getListByBussiness
(
kc008
.
getCompanyCode
(),
kc008
.
getWhCode
(),
inventCodes
);
results
.
forEach
(
o
->{
HGKC010
kc010
=
kc010List
.
stream
().
filter
(
k
->
k
.
getInventCode
().
equals
(
o
.
getInventCode
())).
findAny
().
orElse
(
null
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
kc010
),
"仓库("
+
kc008
.
getWhCode
()+
"|"
+
kc008
.
getWhName
()+
"),不存在存货信息:("
+
o
.
getInventCode
()+
"|"
+
o
.
getInventName
()+
")"
);
});
DaoUtils
.
updateBatch
(
HGKC008A
.
UPDATE
,
results
);
}
return
results
;
}
}
}
/**
/**
...
@@ -861,6 +910,23 @@ public class HGKCTools {
...
@@ -861,6 +910,23 @@ public class HGKCTools {
}
}
/**
/**
* @param companyCode
* @param whCode
* @param inventCodes
*/
public
static
List
<
HGKC010
>
getListByBussiness
(
String
companyCode
,
String
whCode
,
List
<
String
>
inventCodes
)
{
AssertUtils
.
isEmpty
(
companyCode
,
"公司编码不能为空"
);
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
AssertUtils
.
isEmpty
(
inventCodes
,
"物料编码不能为空"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"companyCode"
,
companyCode
);
paramMap
.
put
(
"whCode"
,
whCode
);
paramMap
.
put
(
"inventCodes"
,
inventCodes
);
List
<
HGKC010
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC010
.
QUERY
,
paramMap
);
return
results
;
}
/**
* 查询
* 查询
*
*
* @param ids
* @param ids
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
fd05d0ae
...
@@ -391,6 +391,7 @@ public class HGSCTools {
...
@@ -391,6 +391,7 @@ public class HGSCTools {
public
static
HGSC005A
getById
(
Long
id
){
public
static
HGSC005A
getById
(
Long
id
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
id
)||
id
<=
0
,
"计划明细ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
id
)||
id
<=
0
,
"计划明细ID不能为空!"
);
HGSC005A
results
=
(
HGSC005A
)
DaoBase
.
getInstance
().
get
(
HGSC005A
.
QUERY
,
HGSC005A
.
FIELD_id
,
id
);
HGSC005A
results
=
(
HGSC005A
)
DaoBase
.
getInstance
().
get
(
HGSC005A
.
QUERY
,
HGSC005A
.
FIELD_id
,
id
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
results
),
"计划明细信息为空!"
);
return
results
;
return
results
;
}
}
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
View file @
fd05d0ae
...
@@ -60,10 +60,9 @@ public class ServiceXSOG0801A extends ServiceEPBase {
...
@@ -60,10 +60,9 @@ public class ServiceXSOG0801A extends ServiceEPBase {
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s', '%s')"
,
OrgTypeEnum
.
COMPANY
.
getCode
(),
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s', '%s')"
,
OrgTypeEnum
.
COMPANY
.
getCode
(),
OrgTypeEnum
.
FACTORY
.
getCode
(),
OrgTypeEnum
.
DEPT
.
getCode
());
OrgTypeEnum
.
FACTORY
.
getCode
(),
OrgTypeEnum
.
DEPT
.
getCode
());
}
else
if
(
OrgTypeEnum
.
FACTORY
.
getCode
().
equals
(
org
.
getOrgType
()))
{
}
else
if
(
OrgTypeEnum
.
FACTORY
.
getCode
().
equals
(
org
.
getOrgType
()))
{
condition
=
String
.
format
(
" ITEM_CODE IN ('%s'
)"
,
OrgTypeEnum
.
DEPT
.
getCode
());
condition
=
String
.
format
(
" ITEM_CODE IN ('%s'
, '%s')"
,
OrgTypeEnum
.
PROD_GROUP
.
getCode
(),
OrgTypeEnum
.
CUT_GROUP
.
getCode
());
}
else
if
(
OrgTypeEnum
.
DEPT
.
getCode
().
equals
(
org
.
getOrgType
()))
{
}
else
if
(
OrgTypeEnum
.
DEPT
.
getCode
().
equals
(
org
.
getOrgType
()))
{
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s', '%s')"
,
OrgTypeEnum
.
DEPT
.
getCode
(),
condition
=
String
.
format
(
" ITEM_CODE IN ('%s')"
,
OrgTypeEnum
.
DEPT
.
getCode
());
OrgTypeEnum
.
PROD_GROUP
.
getCode
(),
OrgTypeEnum
.
CUT_GROUP
.
getCode
());
}
else
{
}
else
{
condition
=
" ITEM_CODE = 'NOT CODE'"
;
condition
=
" ITEM_CODE = 'NOT CODE'"
;
}
}
...
...
src/main/resources/META-INF/resources/iPlatV7-index.jsp
View file @
fd05d0ae
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.ed.service.PlatApplicationDynamicContext"
%
>
<
%@
page
import=
"com.baosight.iplat4j.ed.service.PlatApplicationDynamicContext"
%
>
<
%@
page
import=
"com.baosight.hggp.hg.xs.tools.HGXSTools"
%
>
<
%@
page
import=
"com.baosight.hggp.hg.xs.domain.Org"
%
>
<
%@
page
import=
"java.util.List"
%
>
<
%@
page
import=
"org.apache.commons.collections.CollectionUtils"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
...
@@ -21,8 +25,29 @@
...
@@ -21,8 +25,29 @@
UserSession
.
web2Service
(
request
);
UserSession
.
web2Service
(
request
);
String
userName =
UserSession.getLoginCName();
String
userName =
UserSession.getLoginCName();
String
loginName =
UserSession.getLoginName();
String
loginName =
UserSession.getLoginName();
List
<
Org
>
orgList =HGXSTools.XsOrg.queryByUser();
String companyName = "";
String orgName = "";
String orgInfo = "";
if(CollectionUtils.isNotEmpty(orgList)){
Org org = orgList.get(0);
companyName = org.getCompanyName();
orgName = org.getOrgCname();
if(StringUtils.isNotBlank(companyName)) {
orgInfo = companyName;
if (!StringUtils.equals(org.getCompanyCode(), org.getOrgEname())
&&
StringUtils.isNotBlank(orgName)) {
orgInfo += "-" + orgName;
}
}
if(StringUtils.isBlank(orgName)){
orgName = companyName;
}
}
request.setAttribute("userName", userName);
request.setAttribute("userName", userName);
request.setAttribute("loginName", loginName);
request.setAttribute("loginName", loginName);
request.setAttribute("companyName", companyName);
request.setAttribute("orgName", orgName);
request.setAttribute("orgInf", orgInfo);
String efSecurityToken = null;
String efSecurityToken = null;
Boolean SideBarIsMini = PlatApplicationContext.getProperty("SideBarIsMini")==null?false: Boolean.valueOf(PlatApplicationContext.getProperty("SideBarIsMini"));
Boolean SideBarIsMini = PlatApplicationContext.getProperty("SideBarIsMini")==null?false: Boolean.valueOf(PlatApplicationContext.getProperty("SideBarIsMini"));
...
@@ -118,6 +143,11 @@
...
@@ -118,6 +143,11 @@
<c:set
var=
"loadingIcon"
value=
"<%=loadingIcon%>"
scope=
"session"
/>
<c:set
var=
"loadingIcon"
value=
"<%=loadingIcon%>"
scope=
"session"
/>
<c:set
var=
"SideBarIsMini"
value=
"<%=SideBarIsMini%>"
/>
<c:set
var=
"SideBarIsMini"
value=
"<%=SideBarIsMini%>"
/>
<c:set
var=
"loginName"
value=
"<%=loginName%>"
/>
<c:set
var=
"loginName"
value=
"<%=loginName%>"
/>
<c:set
var=
"companyName"
value=
"<%=companyName%>"
/>
<c:set
var=
"orgName"
value=
"<%=orgName%>"
/>
<c:set
var=
"orgInfo"
value=
"<%=orgInfo%>"
/>
<!--[if IE 9]>
<!--[if IE 9]>
<html class="ie9 no-focus" xmlns="http://www.w3.org/1999/xhtml">
<html class="ie9 no-focus" xmlns="http://www.w3.org/1999/xhtml">
<![endif]-->
<![endif]-->
...
@@ -167,8 +197,8 @@
...
@@ -167,8 +197,8 @@
<script
src=
"${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iPlatV7-index.js"
></script>
<script
src=
"${iPlatStaticURL}/iPlatV7-index.js"
></script>
<
%
--
<
link
href=
"${iPlatStaticURL}/Layx/layx.css"
rel=
"stylesheet"
type=
"text/css"
/>
--%
>
<link
href=
"${iPlatStaticURL}/Layx/layx.css"
rel=
"stylesheet"
type=
"text/css"
/
>
<
%
--
<
script
src=
"${iPlatStaticURL}/Layx/layx.js"
type=
"text/javascript"
></script>
--%
>
<script
src=
"${iPlatStaticURL}/Layx/layx.js"
type=
"text/javascript"
></script
>
<
%
--
<
script
src=
"${iPlatStaticURL}/EM/NT/websocket.js"
></script>
--%>
<
%
--
<
script
src=
"${iPlatStaticURL}/EM/NT/websocket.js"
></script>
--%>
</head>
</head>
...
@@ -317,8 +347,12 @@
...
@@ -317,8 +347,12 @@
<span>
${loginName}
</span>
<span>
${loginName}
</span>
</li>
</li>
<li>
<li>
<span
class=
"information"
>
公司:
</span>
<span
class=
"detail-info user-org"
>
${companyName}
</span>
</li>
<li>
<span
class=
"information"
>
组织机构:
</span>
<span
class=
"information"
>
组织机构:
</span>
<span
class=
"detail-info user-org"
></span>
<span
class=
"detail-info user-org"
>
${orgName}
</span>
</li>
</li>
<
%
--
<
li
data-accountset=
"true"
>
<
%
--
<
li
data-accountset=
"true"
>
<span
class=
"information k-link change-org"
>
公司别:
</span>
<span
class=
"information k-link change-org"
>
公司别:
</span>
...
...
src/main/webapp/HG/KC/HGKC007A.js
View file @
fd05d0ae
...
@@ -14,6 +14,81 @@ $(function () {
...
@@ -14,6 +14,81 @@ $(function () {
},
},
columns
:
[
columns
:
[
{
{
field
:
"inventCode"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
inventCode
){
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
item
.
inventName
=
inventRecordBoxBlocks
[
i
][
'textField'
];
template
=
inventRecordBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
item
.
inventCode
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
inventRecordBoxBlocks
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
valueTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
template
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
filter
:
"contains"
});
}
},
{
field
:
"prdtSpec"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
prdtSpec
){
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
prdtSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
template
=
specBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
item
.
prdtSpec
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
options
.
model
[
"whCode"
]);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
;
EiCommunicator
.
send
(
"HGKC010"
,
"querySpecBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"spec_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
filter
:
"contains"
});
}
},
{
field
:
"primaryId"
,
field
:
"primaryId"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
item
[
'primaryId'
]
=
$
(
"#inqu_status-0-primaryId"
).
val
();
item
[
'primaryId'
]
=
$
(
"#inqu_status-0-primaryId"
).
val
();
...
@@ -37,6 +112,88 @@ $(function () {
...
@@ -37,6 +112,88 @@ $(function () {
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 此grid对象
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
var
item
=
e
.
items
[
0
];
//数量计算
if
(
e
.
field
==
"invQty"
)
{
if
(
item
.
invQty
&&
item
.
invUnitWeight
){
let
totalWeight
=
item
.
invQty
*
item
.
invUnitWeight
;
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
totalWeight
)
}
if
(
item
.
price
&&
item
.
invQty
){
let
totalAmount
=
item
.
price
*
item
.
invQty
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
loadChange
(
grid
,
e
,
"price"
);
}
//单价计算
if
(
e
.
field
==
"price"
)
{
if
(
item
.
price
&&
item
.
invQty
){
let
totalAmount
=
item
.
price
*
item
.
invQty
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
}
if
(
e
.
field
==
"inventType"
)
{
//选择后,先加载此方法,再加载属性中的方法,所以存货类型加载时,先修改存货编号下拉框的查询
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
item
.
whCode
);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
item
.
companyCode
);
inInfo
.
set
(
"inqu_status-0-inventType"
,
item
.
inventType
);
EiCommunicator
.
send
(
"HGKC010"
,
"queryInventCodeBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventRecordBoxBlocks
=
ei
.
getBlock
(
"invent_code_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
resultGrid
.
setCellValue
(
item
,
'inventCode'
,
""
)
resultGrid
.
setCellValue
(
item
,
'inventName'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
loadChange
(
grid
,
e
,
"inventCode"
);
}
if
(
e
.
field
==
"inventCode"
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'inventType'
,
inventRecordBoxBlocks
[
i
][
'param1Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventName'
,
inventRecordBoxBlocks
[
i
][
'textField'
]);
resultGrid
.
setCellValue
(
item
,
'prdtSpecId'
,
inventRecordBoxBlocks
[
i
][
'param2Field'
]);
resultGrid
.
setCellValue
(
item
,
'prdtSpec'
,
inventRecordBoxBlocks
[
i
][
'param3Field'
]);
resultGrid
.
setCellValue
(
item
,
'prdtLength'
,
inventRecordBoxBlocks
[
i
][
'param4Field'
]);
resultGrid
.
setCellValue
(
item
,
'prdtWidth'
,
inventRecordBoxBlocks
[
i
][
'param5Field'
]);
resultGrid
.
setCellValue
(
item
,
'prdtThick'
,
inventRecordBoxBlocks
[
i
][
'param6Field'
]);
resultGrid
.
setCellValue
(
item
,
'invQty'
,
inventRecordBoxBlocks
[
i
][
'param7Field'
]);
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
inventRecordBoxBlocks
[
i
][
'param8Field'
]);
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
inventRecordBoxBlocks
[
i
][
'param9Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventTypeDetail'
,
inventRecordBoxBlocks
[
i
][
'param10Field'
]);
break
}
}
loadChange
(
grid
,
e
,
"price"
);
}
if
(
e
.
field
==
"prdtSpec"
)
{
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
prdtSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'prdtLength'
,
specBoxBlocks
[
i
][
'param1Field'
])
resultGrid
.
setCellValue
(
item
,
'prdtWidth'
,
specBoxBlocks
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'prdtThick'
,
specBoxBlocks
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'invQty'
,
specBoxBlocks
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
specBoxBlocks
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
specBoxBlocks
[
i
][
'param6Field'
])
resultGrid
.
setCellValue
(
item
,
'prdtSpecId'
,
specBoxBlocks
[
i
][
'param7Field'
])
break
}
}
resultGrid
.
setCellValue
(
item
,
'price'
,
""
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
""
)
loadChange
(
grid
,
e
,
"invQty"
);
}
});
});
},
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
...
...
src/main/webapp/HG/KC/HGKC007A.jsp
View file @
fd05d0ae
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<EF:EFColumn
ename=
"inventTypeDetail"
cname=
"存货类型大类"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventTypeDetail"
cname=
"存货类型大类"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"220"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"220"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"160"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"160"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"prdtSpec"
cname=
"规格"
width=
"120"
align=
"center"
enable=
"
true"
required=
"true"
/>
<EF:EFColumn
ename=
"prdtSpec"
cname=
"规格"
width=
"120"
align=
"center"
enable=
"
false"
required=
"false"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"prdtLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
...
...
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