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
904ccbf9
Commit
904ccbf9
authored
Sep 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-23 报表管理增加库存管理模块 采购入库明细
parent
0efb9a92
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1456 additions
and
0 deletions
+1456
-0
HGCG004.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG004.java
+859
-0
ServiceHGCG004.java
.../java/com/baosight/hggp/hg/cg/service/ServiceHGCG004.java
+126
-0
HGCG004.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG004.xml
+149
-0
HGCG004.js
src/main/webapp/HG/CG/HGCG004.js
+263
-0
HGCG004.jsp
src/main/webapp/HG/CG/HGCG004.jsp
+59
-0
No files found.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG004.java
0 → 100644
View file @
904ccbf9
package
com
.
baosight
.
hggp
.
hg
.
cg
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author LiuYang
* @version 1.0 2024/9/23
* @description
*/
public
class
HGCG004
extends
DaoEPBase
{
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 企业编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 记录创建名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 记录创建时间*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 记录修改者*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 记录修改名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 记录修改时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 0-未删除,1-已删除*/
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_RECEIVE_DATE
=
"receiveDate"
;
/* 收货日期*/
public
static
final
String
FIELD_RECEIVE_NO
=
"receiveNo"
;
/* 收货单号*/
public
static
final
String
FIELD_RECEIVE_LINE_NO
=
"receiveLineNo"
;
/* 收货单行号*/
public
static
final
String
FIELD_PLAN_NO
=
"planNo"
;
/* 计划单号*/
public
static
final
String
FIELD_CONTRACT_NO
=
"contractNo"
;
/* 合同号*/
public
static
final
String
FIELD_CONTRACT_LINE_NO
=
"contractLineNo"
;
/* 合同行号*/
public
static
final
String
FIELD_CONTRACT_DETAIL_ID
=
"contractDetailId"
;
/* 合同明细id*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_SPEC_ID
=
"specId"
;
/* 规格ID*/
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_MATERIAL
=
"material"
;
/* 材质*/
public
static
final
String
FIELD_UNIT
=
"unit"
;
/* 单位*/
public
static
final
String
FIELD_LENGTH
=
"length"
;
/* 长度*/
public
static
final
String
FIELD_WIDTH
=
"width"
;
/* 宽度*/
public
static
final
String
FIELD_THICK
=
"thick"
;
/* 厚度*/
public
static
final
String
FIELD_RECEIVE_QTY
=
"receiveQty"
;
/* 收货数量*/
public
static
final
String
FIELD_RECEIVE_WEIGHT
=
"receiveWeight"
;
/* 收货重量*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态:0-已收货,1-已入库,2-部分入库,3-退货*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额(不含税金额)*/
public
static
final
String
FIELD_TAX_INCLUDE_AMOUNT
=
"taxIncludeAmount"
;
/* 含税金额*/
public
static
final
String
FIELD_TAX_AMOUNT
=
"taxAmount"
;
/* 税额*/
public
static
final
String
FIELD_TAX_RATE
=
"taxRate"
;
/* 税率*/
public
static
final
String
FIELD_INVENT_TYPE_DETAIL
=
"inventTypeDetail"
;
/* 存货类型大类*/
public
static
final
String
FIELD_PRIMARY_ID
=
"primaryId"
;
/* 主表id*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_SUP_CODE
=
"supCode"
;
/* 供应商编码*/
public
static
final
String
FIELD_SUP_NAME
=
"supName"
;
/* 供应商名称*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 记录创建名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 记录创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 记录修改者*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 记录修改名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 记录修改时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 0-未删除,1-已删除*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 公司编码*/
public
static
final
String
COL_COMPANY_NAME
=
"COMPANY_NAME"
;
/* 公司名称*/
public
static
final
String
COL_RECEIVE_DATE
=
"RECEIVE_DATE"
;
/* 收货日期*/
public
static
final
String
COL_RECEIVE_NO
=
"RECEIVE_NO"
;
/* 收货单号*/
public
static
final
String
COL_CONTRACT_NO
=
"CONTRACT_NO"
;
/* 合同号*/
public
static
final
String
COL_INVENT_TYPE
=
"INVENT_TYPE"
;
/* 存货类型*/
public
static
final
String
COL_INVENT_CODE
=
"INVENT_CODE"
;
/* 存货编码*/
public
static
final
String
COL_INVENT_NAME
=
"INVENT_NAME"
;
/* 存货名称*/
public
static
final
String
COL_SPEC_ID
=
"SPEC_ID"
;
/* 规格ID*/
public
static
final
String
COL_SPEC
=
"SPEC"
;
/* 规格*/
public
static
final
String
COL_MATERIAL
=
"MATERIAL"
;
/* 材质*/
public
static
final
String
COL_UNIT
=
"UNIT"
;
/* 单位*/
public
static
final
String
COL_LENGTH
=
"LENGTH"
;
/* 长度*/
public
static
final
String
COL_WIDTH
=
"WIDTH"
;
/* 宽度*/
public
static
final
String
COL_THICK
=
"THICK"
;
/* 厚度*/
public
static
final
String
COL_RECEIVE_QTY
=
"RECEIVE_QTY"
;
/* 收货数量*/
public
static
final
String
COL_RECEIVE_WEIGHT
=
"RECEIVE_WEIGHT"
;
/* 收货重量*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态:0-已收货,1-已入库,2-部分入库,3-退货*/
public
static
final
String
COL_PRICE
=
"PRICE"
;
/* 单价*/
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额(不含税金额)*/
public
static
final
String
COL_TAX_INCLUDE_AMOUNT
=
"TAX_INCLUDE_AMOUNT"
;
/* 含税金额*/
public
static
final
String
COL_TAX_AMOUNT
=
"TAX_AMOUNT"
;
/* 税额*/
public
static
final
String
COL_TAX_RATE
=
"TAX_RATE"
;
/* 税率*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
public
static
final
String
QUERY
=
"HGCG004.query"
;
public
static
final
String
COUNT
=
"HGCG004.count"
;
public
static
final
String
INSERT
=
"HGCG004.insert"
;
public
static
final
String
UPDATE
=
"HGCG004.update"
;
public
static
final
String
DELETE
=
"HGCG004.delete"
;
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
private
String
createdName
=
" "
;
/* 记录创建名称*/
private
String
createdTime
=
" "
;
/* 记录创建时间*/
private
String
updatedBy
=
" "
;
/* 记录修改者*/
private
String
updatedName
=
" "
;
/* 记录修改名称*/
private
String
updatedTime
=
" "
;
/* 记录修改时间*/
private
Integer
deleteFlag
;
/* 0-未删除,1-已删除*/
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
receiveDate
=
" "
;
/* 收货日期*/
private
String
receiveNo
=
" "
;
/* 收货单号*/
private
String
contractNo
=
" "
;
/* 合同号*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
Long
specId
=
new
Long
(
0
);
/* 规格ID*/
private
String
spec
=
" "
;
/* 规格*/
private
BigDecimal
receiveQty
=
new
BigDecimal
(
0.000
);
/* 收货数量*/
private
BigDecimal
receiveWeight
=
new
BigDecimal
(
0.000
);
/* 收货重量*/
private
BigDecimal
price
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额(不含税金额)*/
private
BigDecimal
taxIncludeAmount
=
new
BigDecimal
(
"0"
);
/* 含税金额*/
private
BigDecimal
taxAmount
=
new
BigDecimal
(
"0"
);
/* 税额*/
private
BigDecimal
taxRate
=
new
BigDecimal
(
"0"
);
/* 税率*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
supCode
=
" "
;
/* 供应商编码*/
private
String
supName
=
" "
;
/* 供应商名称*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
.
setDescName
(
"企业编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"记录创建者"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"记录创建名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"记录创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"记录修改者"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"记录修改名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"记录修改时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
.
setDescName
(
"0-未删除,1-已删除"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"公司编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_NAME
);
eiColumn
.
setDescName
(
"公司名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_DATE
);
eiColumn
.
setDescName
(
"收货日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_NO
);
eiColumn
.
setDescName
(
"收货单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CONTRACT_NO
);
eiColumn
.
setDescName
(
"合同号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"存货编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC_ID
);
eiColumn
.
setDescName
(
"规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC
);
eiColumn
.
setDescName
(
"规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRICE
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"单价"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"金额(不含税金额)"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_TAX_INCLUDE_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"含税金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_TAX_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"税额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_TAX_RATE
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"税率"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_CODE
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SUP_CODE
);
eiColumn
.
setDescName
(
"供应商编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SUP_NAME
);
eiColumn
.
setDescName
(
"供应商名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HGCG004
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public
String
getAccountCode
()
{
return
this
.
accountCode
;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public
void
setAccountCode
(
String
accountCode
)
{
this
.
accountCode
=
accountCode
;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public
Integer
getDeleteFlag
()
{
return
this
.
deleteFlag
;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public
String
getCompanyName
()
{
return
this
.
companyName
;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
/**
* get the receiveDate - 收货日期.
* @return the receiveDate
*/
public
String
getReceiveDate
()
{
return
this
.
receiveDate
;
}
/**
* set the receiveDate - 收货日期.
*
* @param receiveDate - 收货日期
*/
public
void
setReceiveDate
(
String
receiveDate
)
{
this
.
receiveDate
=
receiveDate
;
}
/**
* get the receiveNo - 收货单号.
* @return the receiveNo
*/
public
String
getReceiveNo
()
{
return
this
.
receiveNo
;
}
/**
* set the receiveNo - 收货单号.
*
* @param receiveNo - 收货单号
*/
public
void
setReceiveNo
(
String
receiveNo
)
{
this
.
receiveNo
=
receiveNo
;
}
/**
* get the contractNo - 合同号.
* @return the contractNo
*/
public
String
getContractNo
()
{
return
this
.
contractNo
;
}
/**
* set the contractNo - 合同号.
*
* @param contractNo - 合同号
*/
public
void
setContractNo
(
String
contractNo
)
{
this
.
contractNo
=
contractNo
;
}
/**
* get the supCode - 供应商编码.
* @return the supCode
*/
public
String
getSupCode
()
{
return
this
.
supCode
;
}
/**
* set the supCode - 供应商编码.
*
* @param supCode - 供应商编码
*/
public
void
setSupCode
(
String
supCode
)
{
this
.
supCode
=
supCode
;
}
/**
* get the supName - 供应商名称.
* @return the supName
*/
public
String
getSupName
()
{
return
this
.
supName
;
}
/**
* set the supName - 供应商名称.
*
* @param supName - 供应商名称
*/
public
void
setSupName
(
String
supName
)
{
this
.
supName
=
supName
;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public
String
getInventCode
()
{
return
this
.
inventCode
;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public
void
setInventCode
(
String
inventCode
)
{
this
.
inventCode
=
inventCode
;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public
String
getInventName
()
{
return
this
.
inventName
;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public
void
setInventName
(
String
inventName
)
{
this
.
inventName
=
inventName
;
}
/**
* get the specId - 规格ID.
* @return the specId
*/
public
Long
getSpecId
()
{
return
this
.
specId
;
}
/**
* set the specId - 规格ID.
*
* @param specId - 规格ID
*/
public
void
setSpecId
(
Long
specId
)
{
this
.
specId
=
specId
;
}
/**
* get the spec - 规格.
* @return the spec
*/
public
String
getSpec
()
{
return
this
.
spec
;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public
void
setSpec
(
String
spec
)
{
this
.
spec
=
spec
;
}
/**
* get the receiveQty - 收货数量.
* @return the receiveQty
*/
public
BigDecimal
getReceiveQty
()
{
return
this
.
receiveQty
;
}
/**
* set the receiveQty - 收货数量.
*
* @param receiveQty - 收货数量
*/
public
void
setReceiveQty
(
BigDecimal
receiveQty
)
{
this
.
receiveQty
=
receiveQty
;
}
/**
* get the receiveWeight - 收货重量.
* @return the receiveWeight
*/
public
BigDecimal
getReceiveWeight
()
{
return
this
.
receiveWeight
;
}
/**
* set the receiveWeight - 收货重量.
*
* @param receiveWeight - 收货重量
*/
public
void
setReceiveWeight
(
BigDecimal
receiveWeight
)
{
this
.
receiveWeight
=
receiveWeight
;
}
/**
* get the price - 单价.
* @return the price
*/
public
BigDecimal
getPrice
()
{
return
this
.
price
;
}
/**
* set the price - 单价.
*
* @param price - 单价
*/
public
void
setPrice
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
/**
* get the amount - 金额(不含税金额).
* @return the amount
*/
public
BigDecimal
getAmount
()
{
return
this
.
amount
;
}
/**
* set the amount - 金额(不含税金额).
*
* @param amount - 金额(不含税金额)
*/
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
/**
* get the taxIncludeAmount - 含税金额.
* @return the taxIncludeAmount
*/
public
BigDecimal
getTaxIncludeAmount
()
{
return
this
.
taxIncludeAmount
;
}
/**
* set the taxIncludeAmount - 含税金额.
*
* @param taxIncludeAmount - 含税金额
*/
public
void
setTaxIncludeAmount
(
BigDecimal
taxIncludeAmount
)
{
this
.
taxIncludeAmount
=
taxIncludeAmount
;
}
/**
* get the taxAmount - 税额.
* @return the taxAmount
*/
public
BigDecimal
getTaxAmount
()
{
return
this
.
taxAmount
;
}
/**
* set the taxAmount - 税额.
*
* @param taxAmount - 税额
*/
public
void
setTaxAmount
(
BigDecimal
taxAmount
)
{
this
.
taxAmount
=
taxAmount
;
}
/**
* get the taxRate - 税率.
* @return the taxRate
*/
public
BigDecimal
getTaxRate
()
{
return
this
.
taxRate
;
}
/**
* set the taxRate - 税率.
*
* @param taxRate - 税率
*/
public
void
setTaxRate
(
BigDecimal
taxRate
)
{
this
.
taxRate
=
taxRate
;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public
String
getProjCode
()
{
return
this
.
projCode
;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public
void
setProjCode
(
String
projCode
)
{
this
.
projCode
=
projCode
;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public
String
getProjName
()
{
return
this
.
projName
;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setReceiveDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_DATE
)),
receiveDate
));
setReceiveNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_NO
)),
receiveNo
));
setContractNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_NO
)),
contractNo
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setSpecId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC_ID
)),
specId
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
setReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_QTY
)),
receiveQty
));
setReceiveWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_WEIGHT
)),
receiveWeight
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setTaxIncludeAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TAX_INCLUDE_AMOUNT
)),
taxIncludeAmount
));
setTaxAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TAX_AMOUNT
)),
taxAmount
));
setTaxRate
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TAX_RATE
)),
taxRate
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setSupCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUP_CODE
)),
supCode
));
setSupName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUP_NAME
)),
supName
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_RECEIVE_DATE
,
StringUtils
.
toString
(
receiveDate
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_DATE
)));
map
.
put
(
FIELD_RECEIVE_NO
,
StringUtils
.
toString
(
receiveNo
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_NO
)));
map
.
put
(
FIELD_CONTRACT_NO
,
StringUtils
.
toString
(
contractNo
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_NO
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_SPEC_ID
,
StringUtils
.
toString
(
specId
,
eiMetadata
.
getMeta
(
FIELD_SPEC_ID
)));
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
map
.
put
(
FIELD_RECEIVE_QTY
,
StringUtils
.
toString
(
receiveQty
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_QTY
)));
map
.
put
(
FIELD_RECEIVE_WEIGHT
,
StringUtils
.
toString
(
receiveWeight
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_WEIGHT
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_TAX_INCLUDE_AMOUNT
,
StringUtils
.
toString
(
taxIncludeAmount
,
eiMetadata
.
getMeta
(
FIELD_TAX_INCLUDE_AMOUNT
)));
map
.
put
(
FIELD_TAX_AMOUNT
,
StringUtils
.
toString
(
taxAmount
,
eiMetadata
.
getMeta
(
FIELD_TAX_AMOUNT
)));
map
.
put
(
FIELD_TAX_RATE
,
StringUtils
.
toString
(
taxRate
,
eiMetadata
.
getMeta
(
FIELD_TAX_RATE
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_SUP_CODE
,
StringUtils
.
toString
(
supCode
,
eiMetadata
.
getMeta
(
FIELD_SUP_CODE
)));
map
.
put
(
FIELD_SUP_NAME
,
StringUtils
.
toString
(
supName
,
eiMetadata
.
getMeta
(
FIELD_SUP_NAME
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG004.java
0 → 100644
View file @
904ccbf9
package
com
.
baosight
.
hggp
.
hg
.
cg
.
service
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.hg.cg.domain.HGCG003
;
import
com.baosight.hggp.hg.cg.domain.HGCG004
;
import
com.baosight.hggp.util.CommonMethod
;
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
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author LiuYang
* @version 1.0 2024/9/23
* @description
*/
public
class
ServiceHGCG004
extends
ServiceEPBase
{
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
,
DdynamicEnum
.
SUP_RECORD_BLOCK_ID
)
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG004
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
builder
(
inInfo
);
return
super
.
query
(
inInfo
,
HGCG004
.
QUERY
,
new
HGCG004
());
}
public
void
builder
(
EiInfo
eiInfo
){
String
[]
orderBy
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getString
(
EiConstant
.
orderByStr
).
split
(
","
);
if
(
orderBy
.
length
>
0
){
StringBuilder
orderByStr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
orderBy
.
length
;
i
++)
{
if
(
i
!=
0
&&
i
!=
orderByStr
.
length
()
-
1
)
{
orderByStr
.
append
(
","
);
}
switch
(
orderBy
[
i
])
{
case
"receiveDate asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveDate asc"
,
"b.receiveDate asc"
));
break
;
case
"receiveNo asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveNo asc"
,
"b.receiveNo asc"
));
break
;
case
"supCode asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"supCode asc"
,
"b.supCode asc"
));
break
;
case
"projName asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"projName asc"
,
"b.projName asc"
));
break
;
case
"contractNo asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"contractNo asc"
,
"b.contractNo asc"
));
break
;
case
"inventName asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"inventName asc"
,
"a.inventName asc"
));
break
;
case
"spec asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"spec asc"
,
"a.spec asc"
));
break
;
case
"receiveQty asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveQty asc"
,
"a.receiveQty asc"
));
break
;
case
"receiveWeight asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveWeight asc"
,
"a.receiveWeight asc"
));
break
;
case
"amount asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"amount asc"
,
"a.amount asc"
));
break
;
case
"receiveDate desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveDate desc"
,
"b.receiveDate desc"
));
break
;
case
"receiveNo desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveNo desc"
,
"b.receiveNo desc"
));
break
;
case
"supCode desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"supCode desc"
,
"b.supCode desc"
));
break
;
case
"projName desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"projName desc"
,
"b.projName desc"
));
break
;
case
"contractNo desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"contractNo desc"
,
"b.contractNo desc"
));
break
;
case
"inventName desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"inventName desc"
,
"a.inventName desc"
));
break
;
case
"spec desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"spec desc"
,
"a.spec desc"
));
break
;
case
"receiveQty desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveQty desc"
,
"a.receiveQty desc"
));
break
;
case
"receiveWeight desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"receiveWeight desc"
,
"a.receiveWeight desc"
));
break
;
case
"amount desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"amount desc"
,
"a.amount desc"
));
break
;
default
:
if
(!
orderBy
[
i
].
isEmpty
()){
orderByStr
.
append
(
orderBy
[
i
]);
}
else
{
orderByStr
.
append
(
orderBy
[
i
]);
}
break
;
}
}
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
set
(
"orderBy"
,
orderByStr
);
}
}
}
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG004.xml
0 → 100644
View file @
904ccbf9
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGCG004"
>
<sql
id=
"column"
>
A.ID as "id",
B.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
B.DEP_CODE as "depCode",
<!-- 部门编码 -->
A.CREATED_BY as "createdBy",
<!-- 记录创建者 -->
A.CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
A.CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
A.UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
A.UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
A.UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
B.DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
B.COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
B.COMPANY_NAME as "companyName",
<!-- 公司名称 -->
B.RECEIVE_DATE as "receiveDate",
<!-- 收货日期 -->
B.RECEIVE_NO as "receiveNo",
<!-- 收货单号 -->
B.CONTRACT_NO as "contractNo",
<!-- 合同号 -->
A.INVENT_CODE as "inventCode",
<!-- 存货编码 -->
A.INVENT_NAME as "inventName",
<!-- 存货名称 -->
A.SPEC_ID as "specId",
<!-- 规格ID -->
A.SPEC as "spec",
<!-- 规格 -->
A.RECEIVE_QTY as "receiveQty",
<!-- 收货数量 -->
A.RECEIVE_WEIGHT as "receiveWeight",
<!-- 收货重量 -->
A.PRICE as "price",
<!-- 单价 -->
A.AMOUNT as "amount",
<!-- 金额(不含税金额) -->
A.TAX_INCLUDE_AMOUNT as "taxIncludeAmount",
<!-- 含税金额 -->
A.TAX_AMOUNT as "taxAmount",
<!-- 税额 -->
A.TAX_RATE as "taxRate",
<!-- 税率 -->
B.PROJ_CODE as "projCode",
<!-- 项目编码 -->
B.PROJ_NAME as "projName",
<!-- 项目名称 -->
B.SUP_CODE as "supCode",
<!-- 供应商编码 -->
B.SUP_NAME as "supName"
<!-- 供应商名称 -->
</sql>
<sql
id=
"condition"
>
AND B.DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
B.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
B.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
A.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
B.DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
B.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveDate"
>
B.RECEIVE_DATE = REPLACE(#receiveDate#, '-', '')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveNo"
>
B.RECEIVE_NO LIKE CONCAT('%', #receiveNo# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractNo"
>
B.CONTRACT_NO LIKE CONCAT('%', #contractNo# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
A.INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
A.INVENT_NAME LIKE CONCAT('%', #inventName# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"specId"
>
A.SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
A.SPEC LIKE CONCAT('%', #spec# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveQty"
>
A.RECEIVE_QTY LIKE CONCAT('%', #receiveQty# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveWeight"
>
A.RECEIVE_WEIGHT LIKE CONCAT('%', #receiveWeight# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"price"
>
A.PRICE LIKE CONCAT('%', #price# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"amount"
>
A.AMOUNT LIKE CONCAT('%', #amount# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
B.PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
B.PROJ_NAME LIKE CONCAT('%', #projName# ,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"supCode"
>
B.SUP_CODE = #supCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"supName"
>
B.SUP_NAME like concat('%',#supName#,'%')
</isNotEmpty>
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
B.RECEIVE_DATE DESC
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG004"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCG003A A
INNER JOIN ${hggpSchema}.HGCG003 B ON A.PRIMARY_ID = B.ID
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"orderBy"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCG003A A
INNER JOIN ${hggpSchema}.HGCG003 B ON A.PRIMARY_ID = B.ID
WHERE 1=1
<include
refid=
"condition"
/>
</select>
</sqlMap>
\ No newline at end of file
src/main/webapp/HG/CG/HGCG004.js
0 → 100644
View file @
904ccbf9
$
(
function
()
{
//var inventRecordBoxBlockId = __eiInfo.getBlock("invent_record_box_block_id").getMappedRows();
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
pageable
:
{
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
50
,
100
],
},
columns
:
[],
beforeEdit
:
function
(
e
)
{
var
status
=
$
(
"#status"
).
val
();
if
(
status
!=
'0'
&&
status
!=
'2'
)
{
e
.
preventDefault
();
}
var
source
=
$
(
"#source"
).
val
();
if
(
source
===
'0'
)
{
//选择合同的明细不能修改存货信息
for
(
let
i
=
0
;
i
<
e
.
sender
.
columns
.
length
;
i
++
)
{
//指定的列不让修改
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"inventCode"
)
{
e
.
sender
.
columns
[
i
][
"enable"
]
=
false
;
e
.
sender
.
columns
[
i
][
"readonly"
]
=
true
;
}
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"price"
)
{
e
.
sender
.
columns
[
i
][
"enable"
]
=
false
;
}
}
}
},
loadComplete
:
function
(
grid
)
{
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
var
item
=
e
.
items
[
0
];
// 数量发生变化进行计算
if
(
e
.
field
===
"receiveQty"
){
calAmount
(
item
)
}
if
(
e
.
field
===
"price"
){
calAmount
(
item
)
}
if
(
e
.
field
===
"taxRate"
){
calAmount
(
item
)
}
if
(
e
.
field
===
"receiveWeight"
){
calAmount
(
item
)
}
if
(
e
.
field
===
"calculationMethod"
){
calAmount
(
item
)
}
if
(
e
.
field
===
"inventCode"
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlockId
.
length
;
i
++
)
{
if
(
inventRecordBoxBlockId
[
i
][
'valueField'
]
===
e
.
items
[
0
].
inventCode
)
{
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'inventName'
,
inventRecordBoxBlockId
[
i
][
'textField'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'inventTypeDetail'
,
inventRecordBoxBlockId
[
i
][
'param1Field'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'inventType'
,
inventRecordBoxBlockId
[
i
][
'param3Field'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'spec'
,
inventRecordBoxBlockId
[
i
][
'param4Field'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'material'
,
inventRecordBoxBlockId
[
i
][
'param5Field'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'unit'
,
inventRecordBoxBlockId
[
i
][
'param6Field'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'length'
,
inventRecordBoxBlockId
[
i
][
'param7Field'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'width'
,
inventRecordBoxBlockId
[
i
][
'param8Field'
]
)
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'thick'
,
inventRecordBoxBlockId
[
i
][
'param9Field'
]
)
// 系数
let
coefficient
=
inventRecordBoxBlockId
[
i
][
'param10Field'
]
calUnitWeight
(
e
.
items
[
0
],
e
.
items
[
0
].
length
,
e
.
items
[
0
].
width
,
e
.
items
[
0
].
thick
,
coefficient
);
break
}
}
}
})
},
onSave
:
function
(
e
)
{
// 阻止后台请求,使用自定义
e
.
preventDefault
();
save
();
},
onDelete
:
function
(
e
)
{
// 阻止后台请求,使用自定义
e
.
preventDefault
();
remove
();
}
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
//initInventCode();
});
/**
* 计算金额
*
* @param item
* @param length
* @param width
* @param thick
* @param coefficient
*/
let
calAmount
=
function
(
item
)
{
let
totalAmount
;
let
price
=
item
.
price
;
//计算方式为重量乘单价
if
(
item
.
calculationMethod
==
1
)
{
let
receiveWeight
=
item
.
receiveWeight
;
if
(
!
isBlank
(
receiveWeight
)
&&
!
isBlank
(
price
))
{
// 重量*单价金额
totalAmount
=
parseFloat
(
receiveWeight
)
*
parseFloat
(
price
);
}
}
else
{
let
receiveQty
=
item
.
receiveQty
;
if
(
!
isBlank
(
receiveQty
)
&&
!
isBlank
(
price
))
{
// 数量*单价金额
totalAmount
=
parseFloat
(
receiveQty
)
*
parseFloat
(
price
);
}
}
if
(
isBlank
(
totalAmount
))
{
return
;
}
// 不含税金额
let
amount
=
isBlank
(
item
.
taxRate
)
?
totalAmount
:
totalAmount
/
(
1
+
item
.
taxRate
/
100
);
// 税额
let
taxAmount
=
totalAmount
-
amount
;
// 含税金额
let
taxIncludeAmount
=
totalAmount
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'taxAmount'
,
taxAmount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
}
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 存货编号
*/
let
initInventCode
=
function
()
{
//物料信息下拉
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HGPZ005"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
let
dataSource
;
var
input
=
$
(
"#inqu_status-0-inventCode"
);
dataSource
=
ei
.
getBlock
(
"invent_record_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataSource
,
template
:
"[#:valueField#]#:textField#|#:param2Field#"
,
filter
:
"contains"
});
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
/**
* 保存
*/
let
save
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
if
(
!
isPositiveNumber
(
rows
[
i
][
'receiveQty'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行收货数量必须大于0"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG003B"
,
"save"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
/**
* 删除
*/
let
remove
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG003B"
,
"remove"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
let
calUnitWeight
=
function
(
item
,
length
,
width
,
thick
,
coefficient
)
{
let
l
=
Number
(
length
)
||
1
;
let
w
=
Number
(
width
)
||
1
;
let
t
=
Number
(
thick
)
||
1
;
let
unitWeight
=
(
l
*
w
*
t
)
>
1
?
l
*
w
*
t
*
Number
(
coefficient
)
/
100000
:
0
;
//item['amount'] = amount.toString();
resultGrid
.
setCellValue
(
item
,
'receiveUnitWeight'
,
unitWeight
);
resultGrid
.
setCellValue
(
item
,
'receiveWeight'
,
item
.
receiveQty
*
unitWeight
);
}
\ No newline at end of file
src/main/webapp/HG/CG/HGCG004.jsp
0 → 100644
View file @
904ccbf9
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/23
Time: 13:54
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="采购入库明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker cname="收货日期" blockId="inqu_status" ename="receiveDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="收货单号" blockId="inqu_status" ename="receiveNo" row="0" colWidth="3"/>
<EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/>
<EF:EFInput cname="采购合同号" blockId="inqu_status" ename="contractNo" row="0" colWidth="3"/>
<EF:EFInput cname="存货名称" blockId="inqu_status" ename="inventName" row="0" colWidth="3"/>
<EF:EFInput cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3"/>
<EF:EFInput cname="数量" blockId="inqu_status" ename="receiveQty" row="0" colWidth="3"/>
<EF:EFInput cname="重量" blockId="inqu_status" ename="receiveWeight" row="0" colWidth="3"/>
<EF:EFInput cname="金额" blockId="inqu_status" ename="amount" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" sort="all" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="receiveDate" cname="收货日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="supCode" cname="供应商名称" width="120" align="center" defaultValue=""
filter="contains">
<EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="contractNo" cname="采购合同号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" enable="false" readonly="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" enable="false"/>
<EF:EFColumn ename="receiveQty" cname="数量" width="120" align="right" format="{0:N0}" sumType="page"
required="true"/>
<EF:EFColumn ename="receiveWeight" cname="重量" width="120" align="right" format="{0:N3}" sumType="page"
required="true"/>
<EF:EFColumn ename="amount" cname="金额" width="120" align="right" format="{0:C3}" sumType="page"
required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment