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
c4b98103
Commit
c4b98103
authored
Jun 22, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-21 修改采购收票bug
parent
566e9512
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
539 additions
and
233 deletions
+539
-233
HGCW012.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012.java
+21
-5
HGCW012A.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012A.java
+7
-5
HGCW013.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW013.java
+1
-0
ServiceHGCW012.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
+101
-60
ServiceHGCW012A.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW012A.java
+29
-4
HGCW012.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
+49
-28
HGCW012A.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012A.xml
+78
-32
HGCW013.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW013.xml
+26
-22
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+53
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+2
-1
HGCW012.js
src/main/webapp/HG/CW/HGCW012.js
+5
-1
HGCW012.jsp
src/main/webapp/HG/CW/HGCW012.jsp
+4
-1
HGCW012A.js
src/main/webapp/HG/CW/HGCW012A.js
+158
-66
HGCW012A.jsp
src/main/webapp/HG/CW/HGCW012A.jsp
+5
-8
No files found.
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012.java
View file @
c4b98103
...
...
@@ -48,6 +48,7 @@ public class HGCW012 extends DaoEPBase {
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_REMAINING_AMOUNT
=
"remainingAmount"
;
/* 剩余开票/收票金额*/
public
static
final
String
FIELD_RECEIVE_DATE
=
"receiveDate"
;
/* 收票日期*/
public
static
final
String
FIELD_CONTRACT_TYPE
=
"contractType"
;
/* 部门编码*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -85,12 +86,12 @@ public class HGCW012 extends DaoEPBase {
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
settlementNumber
=
" "
;
/* 来源单号*/
private
Integer
billTybe
=
new
Integer
(
0
);
/* 票据类型*/
private
Integer
billTybe
=
new
Integer
(
1
);
/* 票据类型*/
private
String
billNumber
=
" "
;
/* 发票号*/
private
Integer
billState
=
new
Integer
(
0
);
/* 开票状态*/
private
String
signingDate
=
" "
;
/* 开票日期*/
private
String
partyA
=
" "
;
/* 供应商名称*/
private
Boolean
reviewStatus
;
/* 审批状态*/
private
Integer
reviewStatus
=
0
;
/* 审批状态*/
private
Integer
taxPoints
=
new
Integer
(
0
);
/* 税率*/
private
String
thisSettlementTax
=
" "
;
/* 税额*/
private
String
thisSettlementAmount
=
" "
;
/* 不含税金额*/
...
...
@@ -104,6 +105,7 @@ public class HGCW012 extends DaoEPBase {
private
String
depCode
=
" "
;
/* 部门编码*/
private
BigDecimal
remainingAmount
=
new
BigDecimal
(
"0"
);
/* 剩余开票/收票金额*/
private
String
receiveDate
=
" "
;
/* 收票日期*/
private
Integer
contractType
;
/**
* initialize the metadata.
...
...
@@ -214,6 +216,10 @@ public class HGCW012 extends DaoEPBase {
eiColumn
.
setDescName
(
"收票日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CONTRACT_TYPE
);
eiColumn
.
setDescName
(
"合同类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -388,7 +394,7 @@ public class HGCW012 extends DaoEPBase {
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public
Boolean
getReviewStatus
()
{
public
Integer
getReviewStatus
()
{
return
this
.
reviewStatus
;
}
...
...
@@ -397,7 +403,7 @@ public class HGCW012 extends DaoEPBase {
*
* @param reviewStatus - 审批状态
*/
public
void
setReviewStatus
(
Boolean
reviewStatus
)
{
public
void
setReviewStatus
(
Integer
reviewStatus
)
{
this
.
reviewStatus
=
reviewStatus
;
}
/**
...
...
@@ -608,6 +614,14 @@ public class HGCW012 extends DaoEPBase {
public
void
setReceiveDate
(
String
receiveDate
)
{
this
.
receiveDate
=
receiveDate
;
}
public
Integer
getContractType
()
{
return
contractType
;
}
public
void
setContractType
(
Integer
contractType
)
{
this
.
contractType
=
contractType
;
}
/**
* get the value from Map.
*
...
...
@@ -626,7 +640,7 @@ public class HGCW012 extends DaoEPBase {
setBillState
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BILL_STATE
)),
billState
));
setSigningDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SIGNING_DATE
)),
signingDate
));
setPartyA
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PARTY_A
)),
partyA
));
setReviewStatus
(
NumberUtils
.
to
Boolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REVIEW_STATUS
)),
reviewStatus
));
setReviewStatus
(
NumberUtils
.
to
Integer
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REVIEW_STATUS
)),
reviewStatus
));
setTaxPoints
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TAX_POINTS
)),
taxPoints
));
setThisSettlementTax
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_THIS_SETTLEMENT_TAX
)),
thisSettlementTax
));
setThisSettlementAmount
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_THIS_SETTLEMENT_AMOUNT
)),
thisSettlementAmount
));
...
...
@@ -640,6 +654,7 @@ public class HGCW012 extends DaoEPBase {
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setRemainingAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMAINING_AMOUNT
)),
remainingAmount
));
setReceiveDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_DATE
)),
receiveDate
));
setContractType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_TYPE
)),
contractType
));
}
/**
...
...
@@ -673,6 +688,7 @@ public class HGCW012 extends DaoEPBase {
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_REMAINING_AMOUNT
,
StringUtils
.
toString
(
remainingAmount
,
eiMetadata
.
getMeta
(
FIELD_REMAINING_AMOUNT
)));
map
.
put
(
FIELD_RECEIVE_DATE
,
StringUtils
.
toString
(
receiveDate
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_DATE
)));
map
.
put
(
FIELD_CONTRACT_TYPE
,
StringUtils
.
toString
(
contractType
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_TYPE
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012A.java
View file @
c4b98103
...
...
@@ -85,11 +85,13 @@ public class HGCW012A extends DaoEPBase {
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 记录修改时间*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
QUERY
=
"HGCW008.query"
;
public
static
final
String
COUNT
=
"HGCW008.count"
;
public
static
final
String
INSERT
=
"HGCW008.insert"
;
public
static
final
String
UPDATE
=
"HGCW008.update"
;
public
static
final
String
DELETE
=
"HGCW008.delete"
;
public
static
final
String
QUERY
=
"HGCW012A.query"
;
public
static
final
String
QUERY_A
=
"HGCW012A.queryA"
;
public
static
final
String
QUERY_B
=
"HGCW012A.queryB"
;
public
static
final
String
COUNT
=
"HGCW012A.count"
;
public
static
final
String
INSERT
=
"HGCW012A.insert"
;
public
static
final
String
UPDATE
=
"HGCW012A.update"
;
public
static
final
String
DELETE
=
"HGCW012A.delete"
;
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
...
...
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW013.java
View file @
c4b98103
...
...
@@ -490,6 +490,7 @@ public class HGCW013 extends DaoEPBase {
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the value from Map.
*
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
View file @
c4b98103
...
...
@@ -5,13 +5,13 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.domain.HGCW010
;
import
com.baosight.hggp.hg.cw.domain.HGCW011
;
import
com.baosight.hggp.hg.cw.domain.HGCW012
;
import
com.baosight.hggp.hg.cw.domain.HGCW013
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
...
@@ -39,12 +39,13 @@ public class ServiceHGCW012 extends ServiceBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"销售开票"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@OperationLogAnnotation
(
operModul
=
"采购收票"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SUP_RECORD_BLOCK_ID
,
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCW01
0
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCW01
2
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
...
...
@@ -57,11 +58,11 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"
销售开
票"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@OperationLogAnnotation
(
operModul
=
"
采购收
票"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGCW01
0
.
QUERY
,
new
HGCW010
());
inInfo
=
super
.
query
(
inInfo
,
HGCW01
2
.
QUERY
,
new
HGCW012
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
@@ -74,30 +75,29 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"
收款单
"
,
operType
=
"保存"
,
operDesc
=
"保存"
)
@OperationLogAnnotation
(
operModul
=
"
采购收票
"
,
operType
=
"保存"
,
operDesc
=
"保存"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW01
0
HGCW010
=
new
HGCW010
();
HGCW01
0
.
fromMap
(
resultRows
.
get
(
i
));
HGCW01
2
HGCW012
=
new
HGCW012
();
HGCW01
2
.
fromMap
(
resultRows
.
get
(
i
));
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
HGCW01
0
.
setCompanyCode
(
userVO
.
getUsercode
());
HGCW01
0
.
setCompanyName
(
userVO
.
getUsername
());
HGCW01
0
.
setBillState
(
1
);
HGCW01
0
.
setReviewStatus
(
0
);
HGCW01
0
.
setSigningDate
(
DateUtils
.
formatShort
(
HGCW010
.
getSigningDate
()));
HGCW01
2
.
setCompanyCode
(
userVO
.
getUsercode
());
HGCW01
2
.
setCompanyName
(
userVO
.
getUsername
());
HGCW01
2
.
setBillState
(
1
);
HGCW01
2
.
setReviewStatus
(
0
);
HGCW01
2
.
setSigningDate
(
DateUtils
.
formatShort
(
HGCW012
.
getSigningDate
()));
// 获取项目名称
HGSC001
HGSC001
=
HGSCTools
.
Hgsc001
.
queryByCode
(
HGCW010
.
getProjCode
());
HGCW010
.
setProjName
(
HGSC001
.
getProjName
());
if
(
HGCW01
0
.
getId
()
==
null
||
HGCW010
.
getId
()
==
0
)
{
this
.
add
(
HGCW01
0
);
//HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(HGCW012
.getProjCode());
//HGCW012
.setProjName(HGSC001.getProjName());
if
(
HGCW01
2
.
getId
()
==
null
||
HGCW012
.
getId
()
==
0
)
{
this
.
add
(
HGCW01
2
);
}
else
{
this
.
modify
(
HGCW01
0
);
this
.
modify
(
HGCW01
2
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
...
...
@@ -109,21 +109,21 @@ public class ServiceHGCW012 extends ServiceBase {
/**
* 新增操作
*
* @param
HGCW010
* @param
hgcw012
* @return
*/
public
void
add
(
HGCW01
0
HGCW010
)
{
DaoUtils
.
insert
(
"HGCW010.insert"
,
HGCW010
);
public
void
add
(
HGCW01
2
hgcw012
)
{
DaoUtils
.
insert
(
HGCW012
.
INSERT
,
hgcw012
);
}
/**
* 修改操作
*
* @param
HGCW010
* @param
hgcw012
* @return
*/
public
void
modify
(
HGCW01
0
HGCW010
)
{
DaoUtils
.
update
(
"HGCW010.update"
,
HGCW010
);
public
void
modify
(
HGCW01
2
hgcw012
)
{
DaoUtils
.
update
(
HGCW012
.
UPDATE
,
hgcw012
);
}
/**
...
...
@@ -132,15 +132,14 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"
收款单
"
,
operType
=
"删除"
,
operDesc
=
"删除"
)
@OperationLogAnnotation
(
operModul
=
"
采购收票
"
,
operType
=
"删除"
,
operDesc
=
"删除"
)
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
DaoUtils
.
update
(
"HGCW010.delete"
,
resultRows
.
get
(
i
));
DaoUtils
.
update
(
HGCW012
.
DELETE
,
resultRows
.
get
(
i
));
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
...
...
@@ -149,68 +148,110 @@ public class ServiceHGCW012 extends ServiceBase {
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"
收款单"
,
operType
=
"插入"
,
operDesc
=
"生成收款单
"
)
@OperationLogAnnotation
(
operModul
=
"
采购收票"
,
operType
=
"插入"
,
operDesc
=
"生成采购收票
"
)
public
EiInfo
select
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
queryRows
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
).
getRows
();
Map
queryRows
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
typeBlockId
=
queryRows
.
get
(
"type"
).
toString
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
typeBlockId
).
getRows
();
String
mainId
=
""
;
if
(
CollectionUtils
.
isNotEmpty
(
queryRows
))
{
mainId
=
queryRows
.
get
(
0
).
get
(
"mainId"
).
toString
();
if
(
queryRows
.
get
(
"mainId"
)!=
null
)
{
mainId
=
queryRows
.
get
(
"mainId"
).
toString
();
}
Integer
contractType
=
getContractTypeStr
(
queryRows
.
get
(
"type"
).
toString
());
//获取相应的数据
List
<
HGCW01
1
>
hgcw011List
=
HGCWTools
.
HgCw011
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW01
3
>
hgcw013List
=
HGCWTools
.
HgCw013
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw01
1
List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw01
3
List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
HGCW010
HGCW010
=
new
HGCW010
();
HGCW012
hgcw012
=
new
HGCW012
();
hgcw012
.
fromMap
(
resultRows
.
get
(
0
));
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
HGCW010
.
setCompanyCode
(
userVO
.
getUsercode
());
HGCW010
.
setCompanyName
(
userVO
.
getUsername
());
HGCW010
.
setBillState
(
1
);
HGCW010
.
setReviewStatus
(
0
);
HGCW010
.
setSigning
Date
(
DateUtils
.
shortDate
());
hgcw012
.
setCompanyCode
(
userVO
.
getUsercode
());
hgcw012
.
setCompanyName
(
userVO
.
getUsername
());
hgcw012
.
setBillState
(
1
);
hgcw012
.
setSigningDate
(
DateUtils
.
shortDate
()
);
hgcw012
.
setReceive
Date
(
DateUtils
.
shortDate
());
BigDecimal
totalContractPriceIncluding
=
BigDecimal
.
ZERO
;
StringBuffer
contractNumber
=
new
StringBuffer
();
for
(
HGCW01
1
hgcw011
:
hgcw011
List
)
{
totalContractPriceIncluding
=
totalContractPriceIncluding
.
add
(
hgcw01
1
.
getTotalContractPriceIncluding
());
for
(
HGCW01
3
hgcw013
:
hgcw013
List
)
{
totalContractPriceIncluding
=
totalContractPriceIncluding
.
add
(
hgcw01
3
.
getTotalContractPriceIncluding
());
}
HGCW010
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
HGCW010
.
setPartyA
(
hgcw011List
.
get
(
0
).
getPartyA
()
);
hgcw012
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
hgcw012
.
setContractType
(
contractType
);
this
.
add
(
HGCW010
);
this
.
add
(
hgcw012
);
//生成明细表
for
(
HGCW01
1
hgcw011
:
hgcw011
List
)
{
hgcw01
1
.
setMainId
(
HGCW010
.
getId
());
DaoUtils
.
insert
(
HGCW01
1
.
INSERT
,
hgcw011
);
for
(
HGCW01
3
hgcw013
:
hgcw013
List
)
{
hgcw01
3
.
setMainId
(
hgcw012
.
getId
());
DaoUtils
.
insert
(
HGCW01
3
.
INSERT
,
hgcw013
);
}
}
else
{
// 更新主表
HGCW01
0
HGCW010
=
HGCWTools
.
HgCw010
.
getId
(
mainId
);
HGCW01
2
HGCW012
=
HGCWTools
.
HgCw012
.
getId
(
mainId
);
BigDecimal
totalContractPriceIncluding
=
BigDecimal
.
ZERO
;
StringBuffer
contractNumber
=
new
StringBuffer
();
for
(
HGCW01
1
hgcw011
:
hgcw011
List
)
{
totalContractPriceIncluding
=
totalContractPriceIncluding
.
add
(
hgcw01
1
.
getTotalContractPriceIncluding
());
for
(
HGCW01
3
hgcw013
:
hgcw013
List
)
{
totalContractPriceIncluding
=
totalContractPriceIncluding
.
add
(
hgcw01
3
.
getTotalContractPriceIncluding
());
}
HGCW01
0
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
HGCW01
2
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
this
.
modify
(
HGCW01
0
);
this
.
modify
(
HGCW01
2
);
// 生成明细表
for
(
HGCW01
1
hgcw011
:
hgcw011
List
)
{
hgcw01
1
.
setMainId
(
HGCW010
.
getId
());
DaoUtils
.
insert
(
HGCW01
1
.
INSERT
,
hgcw011
);
for
(
HGCW01
3
hgcw013
:
hgcw013
List
)
{
hgcw01
3
.
setMainId
(
HGCW012
.
getId
());
DaoUtils
.
insert
(
HGCW01
3
.
INSERT
,
hgcw013
);
}
}
}
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"生成
收款单
失败"
);
LogUtils
.
setMsg
(
inInfo
,
e
,
"生成
采购收票
失败"
);
}
return
inInfo
;
}
/**
* 提交操作
* @param inInfo
* @return
*/
public
EiInfo
submit
(
EiInfo
inInfo
){
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW012
hgcw012
=
new
HGCW012
();
hgcw012
.
fromMap
(
resultRows
.
get
(
i
));
hgcw012
.
setReviewStatus
(
1
);
DaoUtils
.
update
(
"HGCW012.submit"
,
hgcw012
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据提交成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"审核失败,发票类型未选!"
);
}
return
inInfo
;
}
public
Integer
getContractTypeStr
(
String
contractType
)
{
Integer
contractType1
=
new
Integer
(
0
);
switch
(
contractType
)
{
case
"result"
:
contractType1
=
1
;
break
;
case
"resultA"
:
contractType1
=
2
;
break
;
case
"resultB"
:
contractType1
=
3
;
break
;
default
:
}
return
contractType1
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012A.java
View file @
c4b98103
package
com
.
baosight
.
hggp
.
hg
.
cw
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.hg.cw.domain.HGCW002
;
import
com.baosight.hggp.hg.cw.domain.HGCW006
;
import
com.baosight.hggp.hg.cw.domain.HGCW010A
;
import
com.baosight.hggp.hg.cw.domain.HGCW012A
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
...
@@ -21,10 +25,10 @@ public class ServiceHGCW012A extends ServiceBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"
账期维护
"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@OperationLogAnnotation
(
operModul
=
"
采购开票
"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCW01
0
A
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCW01
2
A
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
...
...
@@ -38,17 +42,38 @@ public class ServiceHGCW012A extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"
账期维护"
,
operType
=
"查询"
,
operDesc
=
"查询
"
)
@OperationLogAnnotation
(
operModul
=
"
采购开票"
,
operType
=
"查询"
,
operDesc
=
"查询采购开票
"
)
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGCW010A
.
QUERY
,
new
HGCW010A
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW002
.
FIELD_CONTRACT_TYPE
,
2
);
inInfo
=
super
.
query
(
inInfo
,
HGCW012A
.
QUERY
,
new
HGCW012A
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"采购开票"
,
operType
=
"查询"
,
operDesc
=
"查询劳务"
)
public
EiInfo
queryA
(
EiInfo
inInfo
)
{
try
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW002
.
FIELD_CONTRACT_TYPE
,
2
);
inInfo
=
super
.
query
(
inInfo
,
HGCW012A
.
QUERY
,
new
HGCW012A
(),
false
,
new
HGCW012A
().
eiMetadata
,
EiConstant
.
queryBlock
,
"resultA"
,
"resultA"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"采购开票"
,
operType
=
"查询"
,
operDesc
=
"查询租赁"
)
public
EiInfo
queryB
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGCW012A
.
QUERY_B
,
new
HGCW012A
(),
false
,
new
HGCW012A
().
eiMetadata
,
EiConstant
.
queryBlock
,
"resultB"
,
"resultB"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
View file @
c4b98103
...
...
@@ -31,7 +31,35 @@
-->
<sqlMap
namespace=
"HGCW012"
>
<sql
id=
"column"
>
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 来源单号 -->
BILL_TYBE as "billTybe",
<!-- 票据类型 -->
BILL_NUMBER as "billNumber",
<!-- 发票号 -->
BILL_STATE as "billState",
<!-- 开票状态 -->
SIGNING_DATE as "signingDate",
<!-- 开票日期 -->
PARTY_A as "partyA",
<!-- 供应商名称 -->
REVIEW_STATUS as "reviewStatus",
<!-- 审批状态 -->
TAX_POINTS as "taxPoints",
<!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding",
<!-- 发票总额 -->
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",
<!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount",
<!-- 剩余开票/收票金额 -->
RECEIVE_DATE as "receiveDate",
<!-- 收票日期 -->
CONTRACT_TYPE as "contractType"
</sql>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
...
...
@@ -109,30 +137,7 @@
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW012"
>
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 来源单号 -->
BILL_TYBE as "billTybe",
<!-- 票据类型 -->
BILL_NUMBER as "billNumber",
<!-- 发票号 -->
BILL_STATE as "billState",
<!-- 开票状态 -->
SIGNING_DATE as "signingDate",
<!-- 开票日期 -->
PARTY_A as "partyA",
<!-- 供应商名称 -->
REVIEW_STATUS as "reviewStatus",
<!-- 审批状态 -->
TAX_POINTS as "taxPoints",
<!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding",
<!-- 发票总额 -->
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",
<!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount",
<!-- 剩余开票/收票金额 -->
RECEIVE_DATE as "receiveDate"
<!-- 收票日期 -->
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCW012 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
...
...
@@ -140,7 +145,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID
a
sc
ID
de
sc
</isEmpty>
</dynamic>
...
...
@@ -250,9 +255,13 @@
UPDATED_TIME,
<!-- 记录修改时间 -->
DEP_CODE,
<!-- 部门编码 -->
REMAINING_AMOUNT,
<!-- 剩余开票/收票金额 -->
RECEIVE_DATE
<!-- 收票日期 -->
RECEIVE_DATE,
<!-- 收票日期 -->
CONTRACT_TYPE
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#,#contractType#)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW012
</selectKey>
</insert>
<delete
id=
"delete"
>
...
...
@@ -285,7 +294,19 @@
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
REMAINING_AMOUNT = #remainingAmount#,
<!-- 剩余开票/收票金额 -->
RECEIVE_DATE = #receiveDate#
<!-- 收票日期 -->
RECEIVE_DATE = #receiveDate#,
<!-- 收票日期 -->
CONTRACT_TYPE = #contractType#
WHERE
ID = #id#
</update>
<update
id=
"submit"
>
UPDATE ${hggpSchema}.HGCW012
SET
REVIEW_STATUS = #reviewStatus#,
<!-- 审核状态 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#
<!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012A.xml
View file @
c4b98103
...
...
@@ -35,8 +35,59 @@
-->
<sqlMap
namespace=
"HGCW012A"
>
<sql
id=
"column"
>
T1.ID as "id",
T1.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
T1.COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
T1.COMPANY_NAME as "companyName",
<!-- 公司名称 -->
T1.PROJ_CODE as "projCode",
<!-- 项目编码 -->
T1.PROJ_NAME as "projName",
<!-- 项目名称 -->
T1.CONTRACT_NUMBER as "contractNumber",
<!-- 合同号 -->
T1.CONTRACT_NAME as "contractName",
<!-- 合同名称 -->
T1.SETTLEMENT_NUMBER as "settlementNumber",
<!-- 结算编号 -->
T1.SETTLEMENT_TYPE as "settlementType",
<!-- 结算类别;1部分结算2最终结算 -->
T1.CONTRACT_DATE as "contractDate",
<!-- 结算日期 -->
T1.TAX_POINTS as "taxPoints",
<!-- 税点 -->
T1.PRICE_TAX_SEPARATION as "priceTaxSeparation",
<!-- 价税分离;1是2否 -->
T1.THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 本次结算金额 -->
T1.THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 本次结算税金 -->
T1.THIS_PRICE_TAX as "thisPriceTax",
<!-- 本次结算价税合计金额 -->
T1.TOTAL_CONTRACT_PRICE as "totalContractPrice",
<!-- 合同金额(元) -->
T1.CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount",
<!-- 累计结算金额 -->
T1.CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax",
<!-- 累计结算税金 -->
T1.CUMULATIVE_PRICE_TAX as "cumulativePriceTax",
<!-- 累计结算价税合计金额 -->
T1.REMAINING_AMOUNT as "remainingAmount",
<!-- 累计结算价税合计金额 -->
T1.REVIEW_STATUS as "reviewStatus",
<!-- 审核状态 -->
T1.CREATED_BY as "createdBy",
<!-- 记录创建者 -->
T1.CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
T1.CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
T1.UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
T1.UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
T1.UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
T1.DEP_CODE as "depCode"
<!-- 部门编码 -->
</sql>
<sql
id=
"authCondition"
>
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
T1.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(T1.CREATED_BY = #authOnlyPeople# OR T1.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
<isNotEmpty
property=
"authOnlyPeople"
>
T1.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
T1.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql
id=
"condition"
>
<include
refid=
"
HGXSDataAuth.
authCondition"
/>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
T1.ID = #id#
</isNotEmpty>
...
...
@@ -127,46 +178,21 @@
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
T1.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractType"
>
B.CONTRACT_TYPE = #contractType#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW008"
>
SELECT
T1.ID as "id",
T1.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
T1.COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
T1.COMPANY_NAME as "companyName",
<!-- 公司名称 -->
T1.PROJ_CODE as "projCode",
<!-- 项目编码 -->
T1.PROJ_NAME as "projName",
<!-- 项目名称 -->
T1.CONTRACT_NUMBER as "contractNumber",
<!-- 合同号 -->
T1.CONTRACT_NAME as "contractName",
<!-- 合同名称 -->
T1.SETTLEMENT_NUMBER as "settlementNumber",
<!-- 结算编号 -->
T1.SETTLEMENT_TYPE as "settlementType",
<!-- 结算类别;1部分结算2最终结算 -->
T1.CONTRACT_DATE as "contractDate",
<!-- 结算日期 -->
T1.TAX_POINTS as "taxPoints",
<!-- 税点 -->
T1.PRICE_TAX_SEPARATION as "priceTaxSeparation",
<!-- 价税分离;1是2否 -->
T1.THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 本次结算金额 -->
T1.THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 本次结算税金 -->
T1.THIS_PRICE_TAX as "thisPriceTax",
<!-- 本次结算价税合计金额 -->
T1.TOTAL_CONTRACT_PRICE as "totalContractPrice",
<!-- 合同金额(元) -->
T1.CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount",
<!-- 累计结算金额 -->
T1.CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax",
<!-- 累计结算税金 -->
T1.CUMULATIVE_PRICE_TAX as "cumulativePriceTax",
<!-- 累计结算价税合计金额 -->
T1.REMAINING_AMOUNT as "remainingAmount",
<!-- 累计结算价税合计金额 -->
T1.REVIEW_STATUS as "reviewStatus",
<!-- 审核状态 -->
T1.CREATED_BY as "createdBy",
<!-- 记录创建者 -->
T1.CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
T1.CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
T1.UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
T1.UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
T1.UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
T1.DEP_CODE as "depCode"
<!-- 部门编码 -->
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCW008 T1 LEFT JOIN
${hggpSchema}.HGCW002 B
ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1
AND B.CONTRACT_TYPE = 1 AND T1.SETTLEMENT_TYPE = 2
WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
...
...
@@ -180,10 +206,30 @@
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCW008 WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGCW008 WHERE 1=1
AND B.CONTRACT_TYPE = '2'
<include
refid=
"condition"
/>
</select>
<select
id=
"queryB"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW008"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCW008 T1 LEFT JOIN
${hggpSchema}.HGCW006 B
ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_STATUS = 2
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
T1.ID asc
</isEmpty>
</dynamic>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW013.xml
View file @
c4b98103
...
...
@@ -24,9 +24,31 @@
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap
namespace=
"
hgcw
013"
>
<sqlMap
namespace=
"
HGCW
013"
>
<sql
id=
"column"
>
ID as "id",
MAIN_ID as "mainId",
<!-- 主表ID -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 来源单号 -->
BILL_NUMBER as "billNumber",
<!-- 发票号 -->
PARTY_A as "partyA",
<!-- 供应商名称 -->
TAX_POINTS as "taxPoints",
<!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding",
<!-- 开票总额 -->
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"
<!-- 部门编码 -->
</sql>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
...
...
@@ -87,27 +109,9 @@
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.
service.Hgcw
013"
>
resultClass=
"com.baosight.hggp.hg.cw.
domain.HGCW
013"
>
SELECT
ID as "id",
MAIN_ID as "mainId",
<!-- 主表ID -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 来源单号 -->
BILL_NUMBER as "billNumber",
<!-- 发票号 -->
PARTY_A as "partyA",
<!-- 供应商名称 -->
TAX_POINTS as "taxPoints",
<!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding",
<!-- 开票总额 -->
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"
<!-- 部门编码 -->
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCW013 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
...
...
@@ -115,7 +119,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID
asc
ID
DESC
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
c4b98103
...
...
@@ -389,7 +389,19 @@ public class HGCWTools {
}
}
/**
* 采购收票清单
*/
public
static
class
HgCw012
{
public
static
HGCW012
getId
(
String
id
)
{
AssertUtils
.
isNull
(
id
,
"采购收票单ID不能为空!"
);
List
<
HGCW012
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW012
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"id"
,
id
);}
});
return
results
.
get
(
0
);
}
public
static
void
cutAmount
(
String
settlementNumber
,
BigDecimal
cutAmount
)
{
AssertUtils
.
isNull
(
settlementNumber
,
"来源单号不能为空!"
);
// if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
...
...
@@ -413,6 +425,47 @@ public class HGCWTools {
}
}
/**
* 采购收票明细清单
*/
public
static
class
HgCw013
{
public
static
HGCW013
getId
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"销售开票单ID不能为空!"
);
List
<
HGCW013
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW013
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"id"
,
id
);}
});
return
results
.
get
(
0
);
}
public
static
List
<
HGCW013
>
mapToList
(
List
<
Map
>
rows
,
Long
mainId
)
{
List
<
HGCW013
>
hgcw013List
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
rows
))
{
rows
.
forEach
(
row
->
{
HGCW013
hgcw013
=
new
HGCW013
();
hgcw013
.
fromMap
(
row
);
String
settlementNumber
=
row
.
get
(
"settlementNumber"
).
toString
();
String
remainingAmount
=
row
.
get
(
"thisSettlementAmount"
).
toString
();
hgcw013
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
remainingAmount
));
hgcw013
.
setSettlementNumber
(
settlementNumber
);
if
(
mainId
!=
null
)
{
hgcw013
.
setMainId
(
mainId
);
}
hgcw013List
.
add
(
hgcw013
);
});
}
return
hgcw013List
;
}
public
static
List
<
HGCW013
>
getMainId
(
Long
mainId
)
{
AssertUtils
.
isNull
(
mainId
,
"主表ID不能为空!"
);
List
<
HGCW013
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW013
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"mainId"
,
mainId
);}
});
return
results
;
}
}
public
static
class
HgCw014
{
public
static
HGCW014
getId
(
String
id
)
{
...
...
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
c4b98103
...
...
@@ -64,7 +64,8 @@
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW008.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW009.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW010A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW012.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW013.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW014.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW015.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW016.xml"
/>
...
...
src/main/webapp/HG/CW/HGCW012.js
View file @
c4b98103
...
...
@@ -26,7 +26,7 @@ $(function() {
loadComplete
:
function
(
e
)
{
$
(
"#SELECT_BILL"
).
on
(
"click"
,
addFunc
);
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
updateFunc
);
$
(
"#
BTN_
SUBMIT"
).
on
(
"click"
,
submitFunc
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
);
},
onSuccess
:
function
(
e
)
{
...
...
@@ -125,6 +125,10 @@ function submitFunc() {
}
var
flag
=
true
;
rows
.
forEach
(
function
(
row
)
{
if
(
isBlank
(
row
.
billTybe
))
{
message
(
"勾选的数据中未选择票据类型!"
);
flag
=
false
;
}
if
(
row
.
reviewStatus
==
"3"
)
{
message
(
"勾选的数据中有已经提交的合同!"
);
flag
=
false
;
...
...
src/main/webapp/HG/CW/HGCW012.jsp
View file @
c4b98103
...
...
@@ -30,7 +30,10 @@
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"partyA"
cname=
"供应商名称"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"来源单号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"billTybe"
cname=
"票据类型"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFComboColumn
ename=
"billTybe"
cname=
"票据类型"
width=
"120"
align=
"center"
required=
"true"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cw.billTybe"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"receiveDate"
cname=
"收票日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"signingDate"
cname=
"开票日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"billNumber"
cname=
"发票号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
...
...
src/main/webapp/HG/CW/HGCW012A.js
View file @
c4b98103
...
...
@@ -45,36 +45,80 @@ function cancelFunc() {
parent
.
JSColorbox
.
setValueCallback
();
}
function
btnSaveFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
function
btnSaveFunc
(
btnNode
,
gridNode
)
{
let
rows
;
if
(
gridNode
==
"result"
)
{
rows
=
resultGrid
.
getCheckedRows
();
}
else
if
(
gridNode
==
"resultA"
)
{
rows
=
resultAGrid
.
getCheckedRows
();
}
else
if
(
gridNode
==
"resultB"
)
{
rows
=
resultBGrid
.
getCheckedRows
();
}
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
thisAmount
=
rows
[
i
][
'thisAmount'
];
let
remainingAmount
=
rows
[
i
][
'remainingAmount'
];
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
thisAmount
=
item
[
'thisSettlementAmount'
];
let
remainingAmount
=
item
[
'remainingAmount'
];
let
billNumber
=
item
[
'billNumber'
];
if
(
!
isNumber
(
thisAmount
)
&&
!
isPositiveNumber
(
thisAmount
))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行本次开票金额必须是大于0的数字"
);
return
;
message
(
"勾选的第"
+
(
index
+
1
)
+
"行本次开票金额必须是大于0的数字"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
thisAmount
)
>
parseFloat
(
remainingAmount
))
{
message
(
"第"
+
(
i
+
1
)
+
"行本次开票金额不能大于剩余开票金额"
);
return
;
message
(
"第"
+
(
index
+
1
)
+
"行本次开票金额不能大于剩余开票金额"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
billNumber
))
{
message
(
"第"
+
(
index
+
1
)
+
"行发票号不能为空,请填写发票号"
);
flag
=
false
;
return
false
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据生成销售票据吗? "
,
{
});
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据生成票据吗?"
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCW010"
,
"select"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
// parent.JSColorbox.setValueCallback();
var
info
=
new
EiInfo
();
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
gridNode
));
info
.
set
(
"inqu_status-0-type"
,
gridNode
);
info
.
set
(
"inqu_status-0-mainId"
,
$
(
"#inqu_status-0-mainId"
).
val
());
EiCommunicator
.
send
(
"HGCW012"
,
"select"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
if
(
gridNode
==
"result"
)
{
resultGrid
.
dataSource
.
page
(
1
);
}
else
if
(
gridNode
==
"resultA"
)
{
resultAGrid
.
dataSource
.
page
(
1
);
}
else
if
(
gridNode
==
"resultB"
)
{
resultBGrid
.
dataSource
.
page
(
1
);
}
}
catch
(
e
)
{
// TODO: handle exception
}
);
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
}
$
(
function
()
{
...
...
@@ -102,65 +146,78 @@ $(function () {
{
field
:
"projName"
,
title
:
"项目名称"
,
headerTemplate
:
"<span style='color: '>公司名称 </span>"
,
locked
:
false
},
{
field
:
"projName"
,
title
:
"项目名称"
,
headerTemplate
:
"<span style='color: '>公司名称 </span>"
,
headerTemplate
:
"<span style='color: '>项目名称 </span>"
,
locked
:
false
},
{
field
:
"settlementNumber"
,
title
:
"结算编号"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算编号
</span>"
,
locked
:
false
},
{
field
:
"contractDate"
,
title
:
"结算日期"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算日期
</span>"
,
locked
:
false
},
{
field
:
"billNumber"
,
title
:
"发票号"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
发票号
</span>"
,
locked
:
false
},
{
field
:
"taxPoints"
,
title
:
"税率(%)"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
税率(%)
</span>"
,
locked
:
false
},
{
field
:
"thisPriceTax"
,
title
:
"结算价税合计金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算价税合计金额
</span>"
,
locked
:
false
},
{
field
:
"thisSettlementTax"
,
title
:
"结算税金"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算税金
</span>"
,
locked
:
false
},
{
field
:
"thisSettlementAmount"
,
title
:
"结算金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算金额
</span>"
,
locked
:
false
},{
field
:
"remainingAmount"
,
title
:
"剩余
收票
金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
title
:
"剩余
付款
金额"
,
headerTemplate
:
"<span style='color: '>
剩余付款金额
</span>"
,
locked
:
false
}],
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
$
(
"#info-tab-1"
).
on
(
"click"
,
function
()
{
grid
.
dataSource
.
page
(
1
);
});
},
dataBound
:
function
(
e
)
{
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
let
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
btnSaveFunc
(
btnNode
,
"result"
);
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
)
{
query
();
}
},
},
"resultA"
:
{
columns
:
[
{
...
...
@@ -173,65 +230,79 @@ $(function () {
{
field
:
"projName"
,
title
:
"项目名称"
,
headerTemplate
:
"<span style='color: '>公司名称 </span>"
,
locked
:
false
},
{
field
:
"projName"
,
title
:
"项目名称"
,
headerTemplate
:
"<span style='color: '>公司名称 </span>"
,
headerTemplate
:
"<span style='color: '>项目名称 </span>"
,
locked
:
false
},
{
field
:
"settlementNumber"
,
title
:
"结算编号"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算编号
</span>"
,
locked
:
false
},
{
field
:
"contractDate"
,
title
:
"结算日期"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算日期
</span>"
,
locked
:
false
},
{
field
:
"billNumber"
,
title
:
"发票号"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
发票号
</span>"
,
locked
:
false
},
{
field
:
"taxPoints"
,
title
:
"税率(%)"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
税率(%)
</span>"
,
locked
:
false
},
{
field
:
"thisPriceTax"
,
title
:
"结算价税合计金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算价税合计金额
</span>"
,
locked
:
false
},
{
field
:
"thisSettlementTax"
,
title
:
"结算税金"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算税金
</span>"
,
locked
:
false
},
{
field
:
"thisSettlementAmount"
,
title
:
"结算金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算金额
</span>"
,
locked
:
false
},{
field
:
"remainingAmount"
,
title
:
"剩余
收票
金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
title
:
"剩余
付款
金额"
,
headerTemplate
:
"<span style='color: '>
剩余付款金额
</span>"
,
locked
:
false
}],
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
$
(
"#info-tab-2"
).
on
(
"click"
,
function
()
{
grid
.
dataSource
.
page
(
1
);
});
},
dataBound
:
function
(
e
)
{
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
let
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
btnSaveFunc
(
btnNode
,
"resultA"
);
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
)
{
query
();
}
},
"resultB"
:
{
},
},
"resultB"
:
{
columns
:
[
{
field
:
"projCode"
,
...
...
@@ -243,68 +314,89 @@ $(function () {
{
field
:
"projName"
,
title
:
"项目名称"
,
headerTemplate
:
"<span style='color: '>公司名称 </span>"
,
locked
:
false
},
{
field
:
"projName"
,
title
:
"项目名称"
,
headerTemplate
:
"<span style='color: '>公司名称 </span>"
,
headerTemplate
:
"<span style='color: '>项目名称 </span>"
,
locked
:
false
},
{
field
:
"settlementNumber"
,
title
:
"结算编号"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算编号
</span>"
,
locked
:
false
},
{
field
:
"contractDate"
,
title
:
"结算日期"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算日期
</span>"
,
locked
:
false
},
{
field
:
"billNumber"
,
title
:
"发票号"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
发票号
</span>"
,
locked
:
false
},
{
field
:
"taxPoints"
,
title
:
"税率(%)"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
税率(%)
</span>"
,
locked
:
false
},
{
field
:
"thisPriceTax"
,
title
:
"结算价税合计金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算价税合计金额
</span>"
,
locked
:
false
},
{
field
:
"thisSettlementTax"
,
title
:
"结算税金"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算税金
</span>"
,
locked
:
false
},
{
field
:
"thisSettlementAmount"
,
title
:
"结算金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
headerTemplate
:
"<span style='color: '>
结算金额
</span>"
,
locked
:
false
},{
field
:
"remainingAmount"
,
title
:
"剩余
收票
金额"
,
headerTemplate
:
"<span style='color: '>
公司名称
</span>"
,
title
:
"剩余
付款
金额"
,
headerTemplate
:
"<span style='color: '>
剩余付款金额
</span>"
,
locked
:
false
}],
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
$
(
"#info-tab-3"
).
on
(
"click"
,
function
()
{
grid
.
dataSource
.
page
(
1
);
});
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
let
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
btnSaveFunc
(
btnNode
,
"resultB"
);
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
)
{
query
();
}
},
}
};
IPLATUI
.
EFTab
=
{
"info"
:
{
show
:
function
(
e
)
{
$
(
e
.
contentElement
).
find
(
"div[data-role='grid']"
).
data
(
"kendoGrid"
).
refresh
()
$
(
e
.
contentElement
).
find
(
"div[data-role='grid']"
).
data
(
"kendoGrid"
).
refresh
();
let
grid
=
$
(
e
.
contentElement
).
find
(
"div[data-role='grid']"
).
data
(
"kendoGrid"
);
grid
.
dataSource
.
page
(
1
)
/*if (e.name == "info-tab-1") {
} else if (e.name == "info-tab-2") {
$("#info-tab-2").click();
} else if (e.name == "info-tab-3") {
$("#info-tab-3").click();
}*/
}
}
}
...
...
src/main/webapp/HG/CW/HGCW012A.jsp
View file @
c4b98103
...
...
@@ -6,13 +6,10 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<head>
</head>
<EF:EFPage
title=
"结算单"
>
<EF:EFRegion
id=
"inqu"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"隐藏条件"
ename=
"mainId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
>
</EF:EFInput>
<EF:EFInput
cname=
"隐藏条件"
ename=
"mainId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFDateSpan
startCname=
"结算日期(从)"
endCname=
"至"
blockId=
"inqu_status"
startName=
"signingDateFrom"
endName=
"signingDateTo"
row=
"0"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
...
...
@@ -24,18 +21,18 @@
</EF:EFRegion>
<EF:EFTab
id=
"info"
>
<div
title=
"采购收货"
>
<EF:EFGrid
blockId=
"result"
autoBind=
"false"
>
<EF:EFGrid
blockId=
"result"
auto
Draw=
"override"
auto
Bind=
"false"
>
</EF:EFGrid>
</div>
<div
title=
"劳务"
>
<EF:EFGrid
blockId=
"resultA"
auto
Bind=
"false
"
>
<EF:EFGrid
blockId=
"resultA"
auto
Draw=
"override"
autoBind=
"false"
queryMethod=
"queryA
"
>
</EF:EFGrid>
</div>
<div
title=
"租赁"
>
<EF:EFGrid
blockId=
"resultB"
auto
Bind=
"false
"
>
<EF:EFGrid
blockId=
"resultB"
auto
Draw=
"override"
autoBind=
"false"
queryMethod=
"queryB
"
>
</EF:EFGrid>
</div>
</EF:EFTab>
</EF:EFTab>
</EF:EFPage>
<script>
var
ctx
=
"${ctx}"
;
...
...
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