Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
dd8026da
Commit
dd8026da
authored
Jan 22, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.生产入库单页面调整
parent
abfcdd85
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
673 additions
and
419 deletions
+673
-419
DaoUtils.java
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
+38
-0
HPConstant.java
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
+2
-0
HPKC003.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC003.java
+303
-166
HPKC009.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC009.java
+4
-4
ServiceHPKC003.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC003.java
+90
-66
ServiceHPKC005.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
+7
-3
ServiceHPKC009.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
+13
-13
HPKC003.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC003.xml
+75
-125
HPPZ007.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ007.xml
+2
-7
HPPZTools.java
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
+28
-0
HPXSUser.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSUser.xml
+5
-9
HPXSUserTools.java
...ain/java/com/baosight/hpjx/hp/xs/tools/HPXSUserTools.java
+13
-0
HPKC003.js
src/main/webapp/HP/KC/HPKC003.js
+63
-3
HPKC003.jsp
src/main/webapp/HP/KC/HPKC003.jsp
+30
-23
No files found.
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
View file @
dd8026da
package
com
.
baosight
.
hpjx
.
core
.
dao
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.xs.tools.HPXSUserTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
...
...
@@ -103,6 +105,24 @@ public class DaoUtils {
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人姓名失败"
,
e
);
}
// 创建人企业编码
try
{
String
companyCode
;
try
{
companyCode
=
UserSessionUtils
.
getCompanyCode
();
}
catch
(
Exception
e
)
{
companyCode
=
""
;
}
BeanUtils
.
setProperty
(
bean
,
"companyCode"
,
companyCode
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
// 创建人部门编码
try
{
BeanUtils
.
setProperty
(
bean
,
"depCode"
,
HPXSUserTools
.
getOrgId
());
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
// 创建时刻
try
{
BeanUtils
.
setProperty
(
bean
,
"createdTime"
,
DateUtils
.
shortDateTime
());
...
...
@@ -141,6 +161,24 @@ public class DaoUtils {
}
map
.
put
(
"createdName"
,
userName
);
map
.
put
(
"updatedName"
,
""
);
// 创建人企业编码
try
{
String
companyCode
;
try
{
companyCode
=
UserSessionUtils
.
getCompanyCode
();
}
catch
(
Exception
e
)
{
companyCode
=
""
;
}
map
.
put
(
"companyCode"
,
companyCode
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
// 创建人部门编码
try
{
map
.
put
(
"depCode"
,
HPXSUserTools
.
getOrgId
());
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
// 创建时刻
try
{
map
.
put
(
"createdTime"
,
DateUtils
.
shortDateTime
());
...
...
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
View file @
dd8026da
...
...
@@ -20,6 +20,8 @@ public class HPConstant {
public
static
final
String
HPKC008_NUMBER
=
"HPKC008_NUMBER"
;
// 巡检单号
public
static
final
String
HPZL001_NUMBER
=
"HPZL001_NUMBER"
;
// 生产入库单号
public
static
final
String
HPKC003_PROD_NO
=
"HPKC003_PROD_NO"
;
}
/**
...
...
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC003.java
View file @
dd8026da
/**
* Generate time : 2024-01-12 14:21:33
* Version : 1.0
*/
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
domain
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
java.math.BigDecimal
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
...
...
@@ -11,114 +9,180 @@ import java.util.Map;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* THpkc003
*
*/
* Project: <br>
* Title:THpkc003.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 9:56:00 create
*/
public
class
HPKC003
extends
DaoEPBase
{
private
Long
id
=
0L
;
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_DOCUMENT_DATE
=
"documentDate"
;
/* 单据日期*/
public
static
final
String
FIELD_PROD_NO
=
"prodNo"
;
/* 生产入库单号*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
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_AMOUNT
=
"amount"
;
/* 数量*/
public
static
final
String
FIELD_WEIGHT
=
"weight"
;
/* 重量*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
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_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_DOCUMENT_DATE
=
"DOCUMENT_DATE"
;
/* 单据日期*/
public
static
final
String
COL_PROD_NO
=
"PROD_NO"
;
/* 生产入库单号*/
public
static
final
String
COL_WH_CODE
=
"WH_CODE"
;
/* 仓库编码*/
public
static
final
String
COL_WH_NAME
=
"WH_NAME"
;
/* 仓库名称*/
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_AMOUNT
=
"AMOUNT"
;
/* 数量*/
public
static
final
String
COL_WEIGHT
=
"WEIGHT"
;
/* 重量*/
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
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_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改人名称*/
private
Long
id
=
null
;
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
documentDate
=
" "
;
/* 单据日期*/
private
String
productionNumber
=
" "
;
/* 生产入库单号*/
private
String
warehouse
Code
=
" "
;
/* 仓库编码*/
private
String
warehouse
Name
=
" "
;
/* 仓库名称*/
private
int
material
Type
;
/* 物料类型*/
private
String
material
Code
=
" "
;
/* 物料编码*/
private
String
material
Name
=
" "
;
/* 物料名称*/
private
String
number
=
" "
;
/* 数量*/
private
String
weight
=
" "
;
/* 重量*/
private
String
prodNo
=
" "
;
/* 生产入库单号*/
private
String
wh
Code
=
" "
;
/* 仓库编码*/
private
String
wh
Name
=
" "
;
/* 仓库名称*/
private
Integer
invent
Type
;
/* 物料类型*/
private
String
invent
Code
=
" "
;
/* 物料编码*/
private
String
invent
Name
=
" "
;
/* 物料名称*/
private
BigDecimal
amount
=
new
BigDecimal
(
0.00
)
;
/* 数量*/
private
BigDecimal
weight
=
new
BigDecimal
(
0.00
)
;
/* 重量*/
private
String
remark
=
" "
;
/* 备注*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
/**
* initialize the metadata
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
private
String
updatedName
=
" "
;
/* 修改人名称*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
"id"
);
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"companyCode"
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"企业编码 预留"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"depCode"
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"documentDate"
);
eiColumn
=
new
EiColumn
(
FIELD_DOCUMENT_DATE
);
eiColumn
.
setDescName
(
"单据日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"productionNumber"
);
eiColumn
=
new
EiColumn
(
FIELD_PROD_NO
);
eiColumn
.
setDescName
(
"生产入库单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"warehouseCode"
);
eiColumn
=
new
EiColumn
(
FIELD_WH_CODE
);
eiColumn
.
setDescName
(
"仓库编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"warehouseName"
);
eiColumn
=
new
EiColumn
(
FIELD_WH_NAME
);
eiColumn
.
setDescName
(
"仓库名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"materialType"
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"物料类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"materialCode"
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"物料编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"materialName"
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"物料名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"number"
);
eiColumn
=
new
EiColumn
(
FIELD_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"weight"
);
eiColumn
=
new
EiColumn
(
FIELD_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"remark"
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK
);
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"createdBy"
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"createdTime"
);
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
(
"updatedBy"
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"更新人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"updatedTime"
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"修改人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor
*/
public
HPKC003
()
{
initMetaData
();
}
}
/**
* get the id
* the constructor.
*/
public
HPKC003
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
*/
public
Long
getId
()
{
...
...
@@ -126,13 +190,15 @@ initMetaData();
}
/**
* set the id
* set the id .
*
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the companyCode - 企业编码 预留
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
...
...
@@ -140,27 +206,31 @@ initMetaData();
}
/**
* set the companyCode - 企业编码 预留
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the depCode - 部门编码
* @return the dep
Code
* get the depCode - 部门编码.
* @return the dept
Code
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码
* set the deptCode - 部门编码.
*
* @param depCode - 部门编码
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the documentDate - 单据日期
* get the documentDate - 单据日期.
* @return the documentDate
*/
public
String
getDocumentDate
()
{
...
...
@@ -168,125 +238,143 @@ initMetaData();
}
/**
* set the documentDate - 单据日期
* set the documentDate - 单据日期.
*
* @param documentDate - 单据日期
*/
public
void
setDocumentDate
(
String
documentDate
)
{
this
.
documentDate
=
documentDate
;
}
/**
* get the productionNumber - 生产入库单号
* @return the productionNumber
* get the prodNo - 生产入库单号.
* @return the prodNo
*/
public
String
getProductionNumber
()
{
return
this
.
productionNumber
;
public
String
getProdNo
()
{
return
this
.
prodNo
;
}
/**
* set the productionNumber - 生产入库单号
* set the prodNo - 生产入库单号.
*
* @param prodNo - 生产入库单号
*/
public
void
setProductionNumber
(
String
productionNumber
)
{
this
.
productionNumber
=
productionNumber
;
public
void
setProdNo
(
String
prodNo
)
{
this
.
prodNo
=
prodNo
;
}
/**
* get the warehouseCode - 仓库编码
* @return the warehouse
Code
* get the whCode - 仓库编码.
* @return the wh
Code
*/
public
String
getWarehouse
Code
()
{
return
this
.
warehouse
Code
;
public
String
getWh
Code
()
{
return
this
.
wh
Code
;
}
/**
* set the warehouseCode - 仓库编码
* set the whCode - 仓库编码.
*
* @param whCode - 仓库编码
*/
public
void
setWarehouseCode
(
String
warehouse
Code
)
{
this
.
warehouseCode
=
warehouse
Code
;
public
void
setWhCode
(
String
wh
Code
)
{
this
.
whCode
=
wh
Code
;
}
/**
* get the warehouseName - 仓库名称
* @return the warehouse
Name
* get the whName - 仓库名称.
* @return the wh
Name
*/
public
String
getWarehouse
Name
()
{
return
this
.
warehouse
Name
;
public
String
getWh
Name
()
{
return
this
.
wh
Name
;
}
/**
* set the warehouseName - 仓库名称
* set the whName - 仓库名称.
*
* @param whName - 仓库名称
*/
public
void
setWarehouseName
(
String
warehouse
Name
)
{
this
.
warehouseName
=
warehouse
Name
;
public
void
setWhName
(
String
wh
Name
)
{
this
.
whName
=
wh
Name
;
}
/**
* get the materialType - 物料类型
* @return the material
Type
* get the inventType - 物料类型.
* @return the invent
Type
*/
public
int
getMaterial
Type
()
{
return
this
.
material
Type
;
public
Integer
getInvent
Type
()
{
return
this
.
invent
Type
;
}
/**
* set the materialType - 物料类型
* set the inventType - 物料类型.
*
* @param inventType - 物料类型
*/
public
void
setMaterialType
(
int
material
Type
)
{
this
.
materialType
=
material
Type
;
public
void
setInventType
(
Integer
invent
Type
)
{
this
.
inventType
=
invent
Type
;
}
/**
* get the materialCode - 物料编码
* @return the material
Code
* get the inventCode - 物料编码.
* @return the invent
Code
*/
public
String
getMaterial
Code
()
{
return
this
.
material
Code
;
public
String
getInvent
Code
()
{
return
this
.
invent
Code
;
}
/**
* set the materialCode - 物料编码
* set the inventCode - 物料编码.
*
* @param inventCode - 物料编码
*/
public
void
setMaterialCode
(
String
material
Code
)
{
this
.
materialCode
=
material
Code
;
public
void
setInventCode
(
String
invent
Code
)
{
this
.
inventCode
=
invent
Code
;
}
/**
* get the materialName - 物料名称
* @return the material
Name
* get the inventName - 物料名称.
* @return the invent
Name
*/
public
String
getMaterial
Name
()
{
return
this
.
material
Name
;
public
String
getInvent
Name
()
{
return
this
.
invent
Name
;
}
/**
* set the materialName - 物料名称
* set the inventName - 物料名称.
*
* @param inventName - 物料名称
*/
public
void
setMaterialName
(
String
material
Name
)
{
this
.
materialName
=
material
Name
;
public
void
setInventName
(
String
invent
Name
)
{
this
.
inventName
=
invent
Name
;
}
/**
* get the number - 数量
* @return the number
* get the amount - 数量.
* @return the amount
*/
public
String
getNumber
()
{
return
this
.
number
;
public
BigDecimal
getAmount
()
{
return
this
.
amount
;
}
/**
* set the number - 数量
* set the amount - 数量.
*
* @param amount - 数量
*/
public
void
setNumber
(
String
number
)
{
this
.
number
=
number
;
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
/**
* get the weight - 重量
* get the weight - 重量.
* @return the weight
*/
public
String
getWeight
()
{
public
BigDecimal
getWeight
()
{
return
this
.
weight
;
}
/**
* set the weight - 重量
* set the weight - 重量.
*
* @param weight - 重量
*/
public
void
setWeight
(
String
weight
)
{
public
void
setWeight
(
BigDecimal
weight
)
{
this
.
weight
=
weight
;
}
/**
* get the remark - 备注
* get the remark - 备注.
* @return the remark
*/
public
String
getRemark
()
{
...
...
@@ -294,13 +382,15 @@ initMetaData();
}
/**
* set the remark - 备注
* set the remark - 备注.
*
* @param remark - 备注
*/
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/**
* get the createdBy - 创建人
* get the createdBy - 创建人.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
...
...
@@ -308,13 +398,31 @@ initMetaData();
}
/**
* set the createdBy - 创建人
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdTime - 创建时间
* 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
()
{
...
...
@@ -322,13 +430,15 @@ initMetaData();
}
/**
* set the createdTime - 创建时间
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 更新人
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
...
...
@@ -336,13 +446,15 @@ initMetaData();
}
/**
* set the updatedBy - 更新人
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedTime - 更新时间
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
...
...
@@ -350,60 +462,85 @@ initMetaData();
}
/**
* set the updatedTime - 更新时间
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
/**
* get the value from Map
*/
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
"id"
)),
id
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"companyCode"
)),
companyCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"depCode"
)),
depCode
));
setDocumentDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"documentDate"
)),
documentDate
));
setProductionNumber
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"productionNumber"
)),
productionNumber
));
setWarehouseCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"warehouseCode"
)),
warehouseCode
));
setWarehouseName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"warehouseName"
)),
warehouseName
));
setMaterialType
(
NumberUtils
.
toint
(
StringUtils
.
toString
(
map
.
get
(
"materialType"
)),
materialType
));
setMaterialCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"materialCode"
)),
materialCode
));
setMaterialName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"materialName"
)),
materialName
));
setNumber
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"number"
)),
number
));
setWeight
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"weight"
)),
weight
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"remark"
)),
remark
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"createdBy"
)),
createdBy
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"createdTime"
)),
createdTime
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"updatedBy"
)),
updatedBy
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"updatedTime"
)),
updatedTime
));
}
/**
* get the updatedName - 修改人名称.
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the value to Map
*/
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
"id"
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
"id"
)));
map
.
put
(
"companyCode"
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
"companyCode"
)));
map
.
put
(
"depCode"
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
"depCode"
)));
map
.
put
(
"documentDate"
,
StringUtils
.
toString
(
documentDate
,
eiMetadata
.
getMeta
(
"documentDate"
)));
map
.
put
(
"productionNumber"
,
StringUtils
.
toString
(
productionNumber
,
eiMetadata
.
getMeta
(
"productionNumber"
)));
map
.
put
(
"warehouseCode"
,
StringUtils
.
toString
(
warehouseCode
,
eiMetadata
.
getMeta
(
"warehouseCode"
)));
map
.
put
(
"warehouseName"
,
StringUtils
.
toString
(
warehouseName
,
eiMetadata
.
getMeta
(
"warehouseName"
)));
map
.
put
(
"materialType"
,
StringUtils
.
toString
(
materialType
,
eiMetadata
.
getMeta
(
"materialType"
)));
map
.
put
(
"materialCode"
,
StringUtils
.
toString
(
materialCode
,
eiMetadata
.
getMeta
(
"materialCode"
)));
map
.
put
(
"materialName"
,
StringUtils
.
toString
(
materialName
,
eiMetadata
.
getMeta
(
"materialName"
)));
map
.
put
(
"number"
,
StringUtils
.
toString
(
number
,
eiMetadata
.
getMeta
(
"number"
)));
map
.
put
(
"weight"
,
StringUtils
.
toString
(
weight
,
eiMetadata
.
getMeta
(
"weight"
)));
map
.
put
(
"remark"
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
"remark"
)));
map
.
put
(
"createdBy"
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
"createdBy"
)));
map
.
put
(
"createdTime"
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
"createdTime"
)));
map
.
put
(
"updatedBy"
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
"updatedBy"
)));
map
.
put
(
"updatedTime"
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
"updatedTime"
)));
return
map
;
/**
* set the updatedName - 修改人名称.
*
* @param updatedName - 修改人名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* 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
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setDocumentDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOCUMENT_DATE
)),
documentDate
));
setProdNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROD_NO
)),
prodNo
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setInventType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WEIGHT
)),
weight
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
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
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
}
/**
* 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_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_DOCUMENT_DATE
,
StringUtils
.
toString
(
documentDate
,
eiMetadata
.
getMeta
(
FIELD_DOCUMENT_DATE
)));
map
.
put
(
FIELD_PROD_NO
,
StringUtils
.
toString
(
prodNo
,
eiMetadata
.
getMeta
(
FIELD_PROD_NO
)));
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
map
.
put
(
FIELD_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
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_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_WEIGHT
,
StringUtils
.
toString
(
weight
,
eiMetadata
.
getMeta
(
FIELD_WEIGHT
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
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_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC009.java
View file @
dd8026da
...
...
@@ -84,7 +84,7 @@ public class HPKC009 extends DaoEPBase {
private
String
dateProc
=
" "
;
/* 日期*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
inventType
=
" "
;
/* 存货类型*/
private
Integer
inventType
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
String
spec
=
" "
;
/* 规格*/
...
...
@@ -380,7 +380,7 @@ public class HPKC009 extends DaoEPBase {
* get the inventType - 存货类型.
* @return the inventType
*/
public
String
getInventType
()
{
public
Integer
getInventType
()
{
return
this
.
inventType
;
}
...
...
@@ -389,7 +389,7 @@ public class HPKC009 extends DaoEPBase {
*
* @param inventType - 存货类型
*/
public
void
setInventType
(
String
inventType
)
{
public
void
setInventType
(
Integer
inventType
)
{
this
.
inventType
=
inventType
;
}
/**
...
...
@@ -680,7 +680,7 @@ public class HPKC009 extends DaoEPBase {
setDateProc
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DATE_PROC
)),
dateProc
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC003.java
View file @
dd8026da
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
service
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC003
;
import
com.baosight.hpjx.hp.kc.domain.HPKC009
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.domain.THppz004
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author
xuao
* @date
2024年01月12日 14:22
* @author
:songx
* @date
:2024/1/22,10:48
*/
public
class
ServiceHPKC003
extends
ServiceBase
{
/**
* 画面初始化.
* 画面初始化
*
* @param inInfo
* @return
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HPKC003
hpkc003
=
new
HPKC003
();
EiInfo
outInfo
=
new
EiInfo
();
outInfo
.
addBlock
(
EiConstant
.
resultBlock
);
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
hpkc003
.
eiMetadata
);
return
outInfo
;
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_QUERY_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
null
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC003
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作.
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
/* 调用EI查询方法.*/
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"HPKC003.query"
,
new
HPKC003
());
return
outInfo
;
try
{
inInfo
=
super
.
query
(
inInfo
,
"HPKC003.query"
,
new
HPPZ009
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 新增操作.
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
try
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRowCount
();
i
++)
{
// String inventName =inInfo.getCellStr(EiConstant.resultBlock,i,"inventName");
// String[] str = inventName.split("-");
// inInfo.setCell(EiConstant.resultBlock,i,"inventCode", str[0]);
// inInfo.setCell(EiConstant.resultBlock,i,"inventName", str[1]);
String
documentDate
=
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
i
,
"documentDate"
);
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"documentDate"
,
StringUtil
.
removeHorizontalLine
(
documentDate
));
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据写入
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC003
fKc003
=
new
HPKC003
();
fKc003
.
fromMap
(
resultRows
.
get
(
i
));
fKc003
.
setDocumentDate
(
StringUtil
.
removeHorizontalLine
(
fKc003
.
getDocumentDate
()));
// 仓库名称
fKc003
.
setWhName
(
HPPZTools
.
getWhNameByCode
(
fKc003
.
getWhCode
()));
// 物料名称
fKc003
.
setInventName
(
HPPZTools
.
getInventNameByCode
(
fKc003
.
getInventCode
()));
// 生成入库单号
fKc003
.
setProdNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC003_PROD_NO
));
DaoUtils
.
insert
(
"HPKC003.insert"
,
fKc003
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"新增成功!"
);
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"新增失败!原因参见详细错误描述!"
);
inInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"新增失败"
,
e
.
getMessage
());
return
inInfo
;
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
return
super
.
insert
(
inInfo
,
"HPKC003.insert"
)
;
return
inInfo
;
}
/**
* 修改操作.
* 修改操作
*
* @param inInfo
* @return
*/
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
HPKC003
hpkc003
=
new
HPKC003
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpkc003
.
fromMap
(
map
);
String
documentDate
=
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
i
,
"documentDate"
);
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
i
,
"documentDate"
,
StringUtil
.
removeHorizontalLine
(
documentDate
));
this
.
dao
.
update
(
"HPKC003.update"
,
hpkc003
.
toMap
());
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC003
fKc003
=
new
HPKC003
();
fKc003
.
fromMap
(
resultRows
.
get
(
i
));
fKc003
.
setDocumentDate
(
StringUtil
.
removeHorizontalLine
(
fKc003
.
getDocumentDate
()));
// 仓库名称
fKc003
.
setWhName
(
HPPZTools
.
getWhNameByCode
(
fKc003
.
getWhCode
()));
// 物料名称
fKc003
.
setInventName
(
HPPZTools
.
getInventNameByCode
(
fKc003
.
getInventCode
()));
DaoUtils
.
update
(
"HPKC003.update"
,
fKc003
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"修改成功!"
);
}
catch
(
PlatException
e
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
"操作失败!原因参见详细错误描述!"
);
inInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
query
(
inInfo
)
;
return
inInfo
;
}
/**
* 删除操作.
* 删除操作
*
* @param eiInfo
* @return
*/
public
EiInfo
delete
(
EiInfo
eiInfo
)
{
HPKC003
hpkc003
=
new
HPKC003
();
...
...
@@ -109,19 +139,13 @@ public class ServiceHPKC003 extends ServiceBase {
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpkc003
.
fromMap
(
map
);
this
.
dao
.
delete
(
"HPKC003.delete"
,
hpkc003
.
toMap
());
}
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"删除失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"删除失败!"
,
e
.
getMessage
());
return
eiInfo
;
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
eiInfo
,
e
,
"删除失败"
);
}
return
eiInfo
;
}
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
View file @
dd8026da
...
...
@@ -30,13 +30,17 @@ import java.util.Map;
import
java.util.stream.Collectors
;
/**
* @author YK
* @date 2024年01月09日 10:18
*
* @author:songx
* @date:2024/1/22,10:51
*/
public
class
ServiceHPKC005
extends
ServiceBase
{
/**
* 画面初始化.
* 画面初始化
*
* @param inInfo
* @return
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
HPKC005
HPKC005
=
new
HPKC005
();
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
View file @
dd8026da
...
...
@@ -204,7 +204,7 @@ public class ServiceHPKC009 extends ServiceBase {
+
aItem
.
getWhCode
()
+
"#"
+
aItem
.
getMaterialType
()
+
"#"
+
aItem
.
getMaterialCode
()
+
"#"
+
aItem
.
getSpec
();
HPKC009
kc009
=
BeanUtils
.
copy
(
aItem
,
HPKC009
.
class
);
kc009
.
setInventType
(
aItem
.
getMaterialType
(
));
kc009
.
setInventType
(
Integer
.
parseInt
(
aItem
.
getMaterialType
()
));
kc009
.
setInventCode
(
aItem
.
getMaterialCode
());
kc009
.
setKcType
(
HPConstant
.
KcType
.
CG
);
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
...
...
@@ -251,8 +251,8 @@ public class ServiceHPKC009 extends ServiceBase {
queryMap
.
put
(
"createdTimeTo"
,
queryMap
.
get
(
"yesterday"
)
+
"235959"
);
List
<
HPKC003
>
bItems
=
dao
.
query
(
"HPKC003.statDate"
,
queryMap
);
Map
<
String
,
HPKC003
>
bItemMap
=
bItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getW
arehouse
Code
()
+
"#"
+
item
.
get
MaterialType
()
+
"#"
+
item
.
getMaterial
Code
(),
item
->
item
));
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getW
h
Code
()
+
"#"
+
item
.
get
InventType
()
+
"#"
+
item
.
getInvent
Code
(),
item
->
item
));
// 1.3、发出
List
<
HPKC004
>
cItems
=
dao
.
query
(
"HPKC004.statDate"
,
queryMap
);
Map
<
String
,
HPKC004
>
cItemMap
=
cItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
...
...
@@ -268,22 +268,22 @@ public class ServiceHPKC009 extends ServiceBase {
// 根据期末库存生成收发存对象
for
(
HPKC003
aItem
:
aItems
)
{
String
key
=
aItem
.
getCompanyCode
()
+
"#"
+
aItem
.
getDepCode
()
+
"#"
+
aItem
.
getW
arehouseCode
()
+
"#"
+
aItem
.
getMaterial
Type
()
+
"#"
+
aItem
.
get
Material
Code
();
+
aItem
.
getW
hCode
()
+
"#"
+
aItem
.
getInvent
Type
()
+
"#"
+
aItem
.
get
Invent
Code
();
HPKC009
kc009
=
BeanUtils
.
copy
(
aItem
,
HPKC009
.
class
);
kc009
.
setWhCode
(
aItem
.
getW
arehouse
Code
());
kc009
.
setInventType
(
aItem
.
get
MaterialType
()
+
""
);
kc009
.
setInventCode
(
aItem
.
get
Material
Code
());
kc009
.
setWhCode
(
aItem
.
getW
h
Code
());
kc009
.
setInventType
(
aItem
.
get
InventType
()
);
kc009
.
setInventCode
(
aItem
.
get
Invent
Code
());
kc009
.
setKcType
(
HPConstant
.
KcType
.
SC
);
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
// 期末
kc009
.
setEndAmount
(
new
BigDecimal
(
aItem
.
getNumber
()
));
kc009
.
setEndWeight
(
new
BigDecimal
(
aItem
.
getWeight
()
));
kc009
.
setEndAmount
(
aItem
.
getAmount
(
));
kc009
.
setEndWeight
(
aItem
.
getWeight
(
));
// 收入
HPKC003
bItem
=
bItemMap
.
get
(
key
);
kc009
.
setStockinAmount
(
bItem
==
null
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
bItem
.
getNumber
()
));
kc009
.
setStockinWeight
(
bItem
==
null
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
bItem
.
getWeight
()
));
kc009
.
setStockinAmount
(
bItem
==
null
?
BigDecimal
.
ZERO
:
bItem
.
getAmount
(
));
kc009
.
setStockinWeight
(
bItem
==
null
?
BigDecimal
.
ZERO
:
bItem
.
getWeight
(
));
// 发出
HPKC004
cItem
=
cItemMap
.
get
(
key
);
kc009
.
setStockoutAmount
(
cItem
==
null
?
BigDecimal
.
ZERO
:
cItem
.
getAmount
());
...
...
@@ -338,7 +338,7 @@ public class ServiceHPKC009 extends ServiceBase {
String
key
=
aItem
.
getCompanyCode
()
+
"#"
+
aItem
.
getDepCode
()
+
"#"
+
aItem
.
getWhCode
()
+
"#"
+
aItem
.
getMatType
()
+
"#"
+
aItem
.
getMatCode
();
HPKC009
kc009
=
BeanUtils
.
copy
(
aItem
,
HPKC009
.
class
);
kc009
.
setInventType
(
aItem
.
getMatType
(
));
kc009
.
setInventType
(
Integer
.
parseInt
(
aItem
.
getMatType
()
));
kc009
.
setInventCode
(
aItem
.
getMatCode
());
kc009
.
setKcType
(
HPConstant
.
KcType
.
QT
);
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC003.xml
View file @
dd8026da
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-12 14:21:33
Version : 1.0
tableName :hpjx.t_hpkc003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
DOCUMENT_DATE VARCHAR NOT NULL,
PRODUCTION_NUMBER VARCHAR NOT NULL,
WAREHOUSE_CODE VARCHAR NOT NULL,
WAREHOUSE_NAME VARCHAR NOT NULL,
MATERIAL_TYPE TINYINT NOT NULL,
MATERIAL_CODE VARCHAR NOT NULL,
MATERIAL_NAME VARCHAR NOT NULL,
NUMBER VARCHAR NOT NULL,
WEIGHT VARCHAR NOT NULL,
REMARK VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap
namespace=
"HPKC003"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC003"
>
SELECT
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
DOCUMENT_DATE as "documentDate",
<!-- 单据日期 -->
PRODUCTION_NUMBER as "productionNumber
",
<!-- 生产入库单号 -->
WAREHOUSE_CODE as "warehouse
Code",
<!-- 仓库编码 -->
WAREHOUSE_NAME as "warehouse
Name",
<!-- 仓库名称 -->
MATERIAL_TYPE as "material
Type",
<!-- 物料类型 -->
MATERIAL_CODE as "material
Code",
<!-- 物料编码 -->
MATERIAL_NAME as "material
Name",
<!-- 物料名称 -->
NUMBER as "number
",
<!-- 数量 -->
PROD_NO as "prodNo
",
<!-- 生产入库单号 -->
WH_CODE as "wh
Code",
<!-- 仓库编码 -->
WH_NAME as "wh
Name",
<!-- 仓库名称 -->
INVENT_TYPE as "invent
Type",
<!-- 物料类型 -->
INVENT_CODE as "invent
Code",
<!-- 物料编码 -->
INVENT_NAME as "invent
Name",
<!-- 物料名称 -->
AMOUNT as "amount
",
<!-- 数量 -->
WEIGHT as "weight",
<!-- 重量 -->
REMARK as "remark",
<!-- 备注 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime"
<!-- 更新时间 -->
FROM hpjx.t_hpkc003 WHERE 1=1
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
UPDATED_NAME as "updatedName"
<!-- 修改人名称 -->
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentDate"
>
DOCUMENT_DATE = #documentDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productionNumber"
>
PRODUCTION_NUMBER = #productionNumber#
<isNotEmpty
prepend=
" AND "
property=
"prodNo"
>
PROD_NO = #prodNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"warehouseNam
e"
>
WAREHOUSE_NAME = #warehouseNam
e#
<isNotEmpty
prepend=
" AND "
property=
"inventTyp
e"
>
INVENT_TYPE = #inventTyp
e#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
ID DESC
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC003"
>
SELECT
<include
refid=
"column"
/>
FROM hpjx.t_hpkc003 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpkc003 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<include
refid=
"condition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentDate">
DOCUMENT_DATE = #documentDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionNumber">
PRODUCTION_NUMBER = #productionNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="warehouseCode">
WAREHOUSE_CODE = #warehouseCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="warehouseName">
WAREHOUSE_NAME = #warehouseName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialType">
MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialCode">
MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialName">
MATERIAL_NAME = #materialName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="number">
NUMBER = #number#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO hpjx.t_hpkc
003 (
INSERT INTO ${hpjxSchema}.T_HPKC
003 (
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP
_CODE,
<!-- 部门编码 -->
DEPT
_CODE,
<!-- 部门编码 -->
DOCUMENT_DATE,
<!-- 单据日期 -->
PRODUCTION_NUMBER
,
<!-- 生产入库单号 -->
WAREHOUSE
_CODE,
<!-- 仓库编码 -->
WAREHOUSE
_NAME,
<!-- 仓库名称 -->
MATERIAL
_TYPE,
<!-- 物料类型 -->
MATERIAL
_CODE,
<!-- 物料编码 -->
MATERIAL
_NAME,
<!-- 物料名称 -->
NUMBER
,
<!-- 数量 -->
PROD_NO
,
<!-- 生产入库单号 -->
WH
_CODE,
<!-- 仓库编码 -->
WH
_NAME,
<!-- 仓库名称 -->
INVENT
_TYPE,
<!-- 物料类型 -->
INVENT
_CODE,
<!-- 物料编码 -->
INVENT
_NAME,
<!-- 物料名称 -->
AMOUNT
,
<!-- 数量 -->
WEIGHT,
<!-- 重量 -->
REMARK,
<!-- 备注 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME
<!-- 创建时间 -->
) VALUES (
#companyCode#, #deptCode#, #documentDate#, #prodNo#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #amount#, #weight#, #remark#,
#createdBy#, #createdName#, #createdTime#
)
VALUES ( #companyCode#, #depCode#, #documentDate#, #productionNumber#, #warehouseCode#, #warehouseName#, #materialType#, #materialCode#, #materialName#, #number#, #weight#, #remark#, #createdBy#, #createdTime#)
</insert>
<delete
id=
"delete"
>
DELETE FROM hpjx.t_hpkc003 WHERE
ID = #id#
DELETE FROM hpjx.t_hpkc003 WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE hpjx.t_hpkc
003
UPDATE ${hpjxSchema}.T_HPKC
003
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#,
<!-- 部门编码 -->
DOCUMENT_DATE = #documentDate#,
<!-- 单据日期 -->
PRODUCTION_NUMBER = #productionNumber
#,
<!-- 生产入库单号 -->
WAREHOUSE_CODE = #warehouse
Code#,
<!-- 仓库编码 -->
WAREHOUSE_NAME = #warehouse
Name#,
<!-- 仓库名称 -->
MATERIAL_TYPE = #material
Type#,
<!-- 物料类型 -->
MATERIAL_CODE = #material
Code#,
<!-- 物料编码 -->
MATERIAL_NAME = #material
Name#,
<!-- 物料名称 -->
NUMBER = #number
#,
<!-- 数量 -->
PROD_NO = #prodNo
#,
<!-- 生产入库单号 -->
WH_CODE = #wh
Code#,
<!-- 仓库编码 -->
WH_NAME = #wh
Name#,
<!-- 仓库名称 -->
INVENT_TYPE = #invent
Type#,
<!-- 物料类型 -->
INVENT_CODE = #invent
Code#,
<!-- 物料编码 -->
INVENT_NAME = #invent
Name#,
<!-- 物料名称 -->
AMOUNT = #amount
#,
<!-- 数量 -->
WEIGHT = #weight#,
<!-- 重量 -->
REMARK = #remark#,
<!-- 备注 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
WHERE
ID = #id#
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
UPDATED_NAME = #updatedName#
<!-- 修改人名称 -->
WHERE
ID = #id#
</update>
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC003"
>
SELECT
COMPANY_CODE AS "companyCode",
DEP
_CODE AS "dep
Code",
W
AREHOUSE_CODE AS "warehouse
Code",
MATERIAL_TYPE AS "material
Type",
MATERIAL_CODE AS "material
Code",
COALESCE(SUM(
NUMBER), 0) AS "number
",
DEP
T_CODE AS "dept
Code",
W
H_CODE AS "wh
Code",
INVENT_TYPE AS "invent
Type",
INVENT_CODE AS "invent
Code",
COALESCE(SUM(
AMOUNT), 0) AS "amount
",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC003
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP
_CODE, WAREHOUSE_CODE, MATERIAL_TYPE, MATERIAL
_CODE
GROUP BY COMPANY_CODE, DEP
T_CODE, WH_CODE, INVENT_TYPE, INVENT
_CODE
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ007.xml
View file @
dd8026da
...
...
@@ -154,15 +154,10 @@
ORDER BY WH_CODE
</select>
<select
id=
"queryByWhCode"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ007"
>
<select
id=
"queryByWhCode"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ007"
>
SELECT WH_NAME as "whName"
FROM hpjx.t_hppz007 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
AND WH_CODE = #whCode#
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
View file @
dd8026da
...
...
@@ -21,6 +21,34 @@ import java.util.stream.Collectors;
public
class
HPPZTools
{
/**
* 查询存货名称
*
* @param inventCode
* @return
*/
public
static
String
getInventNameByCode
(
String
inventCode
)
{
AssertUtils
.
isEmpty
(
inventCode
,
"存货编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventCode"
,
inventCode
);
List
<
THppz004
>
pz004s
=
DaoBase
.
getInstance
().
query
(
"HPPZ004.queryMatNameByCode"
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
pz004s
)
?
null
:
pz004s
.
get
(
0
).
getInventName
();
}
/**
* 查询仓库名称
*
* @param whCode
* @return
*/
public
static
String
getWhNameByCode
(
String
whCode
)
{
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"whCode"
,
whCode
);
List
<
HPPZ007
>
pz007s
=
DaoBase
.
getInstance
().
query
(
"HPPZ007.queryByWhCode"
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
pz007s
)
?
null
:
pz007s
.
get
(
0
).
getWhName
();
}
/**
* 查询存货信息
*
* @param inventCodes
...
...
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSUser.xml
View file @
dd8026da
...
...
@@ -52,15 +52,11 @@
AND MEMBER_ID = #memberId#
</select>
<!-- 用户组查询 -->
<select
id=
"queryGroupEname"
resultClass=
"java.util.LinkedHashMap"
>
SELECT
ID as "id",
<!-- id -->
GROUP_ENAME as "groupEname",
<!-- 用户组id -->
GROUP_CNAME as "groupCname"
<!-- 用户组名字 -->
FROM ${platSchema}.XS_USER_GROUP
WHERE 1=1
AND ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
<!-- 查询用户组织机构 -->
<select
id=
"queryOrgId"
resultClass=
"java.util.LinkedHashMap"
>
SELECT ORG_ID AS "orgId"
FROM ${platSchema}.TXSOG02
WHERE USER_ID = #userId#
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/xs/tools/HPXSUserTools.java
View file @
dd8026da
package
com
.
baosight
.
hpjx
.
hp
.
xs
.
tools
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
org.springframework.util.CollectionUtils
;
import
java.util.HashMap
;
...
...
@@ -26,4 +27,16 @@ public class HPXSUserTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
0
:
results
.
get
(
0
);
}
/**
* 查询用户组织机构
*
* @return
*/
public
static
String
getOrgId
()
{
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"userId"
,
UserSession
.
getLoginName
());
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
"HPXSUser.queryOrgId"
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
""
:
results
.
get
(
0
).
get
(
"orgId"
).
toString
();
}
}
src/main/webapp/HP/KC/HPKC003.js
View file @
dd8026da
let
inventNameGlobalData
=
[];
$
(
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
});
$
(
"#QUERY"
).
on
(
"click"
,
query
);
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
},
columns
:
[{
field
:
"inventCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
inventNameGlobalData
.
length
;
i
++
)
{
if
(
inventNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventCode'
])
{
return
inventNameGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
var
cellIndex
=
grid
.
cellIndex
(
container
);
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
let
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"inventType"
,
options
.
model
[
"inventType"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
inventNameGlobalData
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
}
}]
}
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 存货名称
let
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventNameGlobalData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
src/main/webapp/HP/KC/HPKC003.jsp
View file @
dd8026da
...
...
@@ -6,38 +6,45 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"生产入库单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"inqu_status-0-documentDate"
cname=
"单据日期"
format=
"yyyy-MM-dd"
/>
<EF:EFInput
ename=
"inqu_status-0-productionNumber"
cname=
"生产入库单号"
colWidth=
"4"
readonly=
"false"
/>
<EF:EFInput
ename=
"inqu_status-0-warehouseName"
cname=
"仓库名称"
colWidth=
"4"
readonly=
"false"
/>
<EF:EFDatePicker
ename=
"inqu_status-0-documentDate"
cname=
"单据日期"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"true"
/>
<EF:EFInput
ename=
"inqu_status-0-prodNo"
cname=
"生产入库单号"
colWidth=
"3"
/>
<EF:EFSelect
ename=
"inqu_status-0-whCode"
cname=
"仓库名称"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"请选择"
value=
""
/>
<EF:EFOptions
blockId=
"whName_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-inventCode"
cname=
"存货名称"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"请选择"
value=
""
/>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</div>
<EF:EFButton
ename=
"QUERY"
cname=
"查询"
row=
"1"
class=
"btn-align-right"
></EF:EFButton>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"false"
isFloat=
"true"
autoFit=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"documentDate"
cname=
"单据日期"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
width=
"100"
readonly=
"false"
/>
<EF:EFColumn
ename=
"productionNumber"
cname=
"生产入库单号"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"warehouseCode"
cname=
"仓库编码"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"warehouseName"
cname=
"仓库名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFComboColumn
ename=
"materialType"
cname=
"物料类型"
align=
"center"
columnTemplate=
"#=valueField#-#=textField#"
optionLabel=
" "
itemTemplate=
"#=valueField#-#=textField#"
textField=
"textField"
valueField=
"valueField"
width=
"100"
>
<EF:EFOption
label=
"--请选择--"
value=
""
></EF:EFOption>
<EF:EFOption
label=
"待补充"
value=
"1"
></EF:EFOption>
<EF:EFColumn
ename=
"prodNo"
cname=
"生产入库单号"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"documentDate"
cname=
"单据日期"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFComboColumn
cname=
"仓库名称"
ename=
"whCode"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
blockName=
"whName_block_id"
textField=
"textField"
valueField=
"valueField"
align=
"center"
filter=
"contains"
width=
"100"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"materialCode"
cname=
"物料编码"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"materialName"
cname=
"物料名称"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"number"
cname=
"数量"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
width=
"100"
readonly=
"false"
required=
"true"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"100"
readonly=
"false"
/>
<EF:EFComboColumn
cname=
"存货类型"
ename=
"inventType"
width=
"90"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFComboColumn>
<EF:EFColumn
cname=
"存货名称"
ename=
"inventCode"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"数量"
ename=
"amount"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
cname=
"重量"
ename=
"weight"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
editType=
"textarea"
/>
<EF:EFColumn
cname=
"创建人名称"
ename=
"createdName"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"创建时间"
ename=
"createdTime"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
</EF:EFGrid>
</EF:EFRegion>
...
...
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