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
8ae1f816
Commit
8ae1f816
authored
Mar 21, 2024
by
liulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增厂区的查询条件
parent
d69424ef
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
175 additions
and
28 deletions
+175
-28
HPKC004.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC004.java
+50
-0
HPKC005.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC005.java
+50
-1
ServiceHPKC001.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
+2
-2
ServiceHPKC002.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
+1
-1
ServiceHPKC002A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002A.java
+1
-1
ServiceHPKC002B.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002B.java
+1
-1
ServiceHPKC004.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004.java
+11
-4
ServiceHPKC004B.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004B.java
+2
-1
ServiceHPKC005.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
+2
-2
ServiceHPKC005A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005A.java
+1
-1
ServiceHPKC006.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
+2
-2
ServiceHPKC007.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007.java
+3
-3
ServiceHPKC007A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007A.java
+1
-1
ServiceHPKC010.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
+1
-0
HPKC005.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC005.xml
+19
-5
HPKCTools.java
src/main/java/com/baosight/hpjx/hp/kc/tools/HPKCTools.java
+16
-3
HPKC004.jsp
src/main/webapp/HP/KC/HPKC004.jsp
+4
-0
HPKC004B.jsp
src/main/webapp/HP/KC/HPKC004B.jsp
+8
-0
No files found.
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC004.java
View file @
8ae1f816
...
...
@@ -54,6 +54,8 @@ public class HPKC004 extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 修改时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 是否删除*/
public
static
final
String
FIELD_INVENT_RECORD_ID
=
"inventRecordId"
;
/* 存货档案ID*/
public
static
final
String
FIELD_FACTORY_CODE
=
"factoryCode"
;
/* 厂区编码*/
public
static
final
String
FIELD_FACTORY_NAME
=
"factoryName"
;
/* 工厂*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
...
...
@@ -88,6 +90,8 @@ public class HPKC004 extends DaoEPBase {
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 修改时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 是否删除*/
public
static
final
String
COL_INVENT_RECORD_ID
=
"INVENT_RECORD_ID"
;
/* 存货档案ID*/
public
static
final
String
COL_FACTORY_CODE
=
"FACTORY_CODE"
;
/* 厂区编码*/
public
static
final
String
COL_FACTORY_NAME
=
"FACTORY_NAME"
;
/* 工厂*/
public
static
final
String
QUERY
=
"HPKC004.query"
;
public
static
final
String
COUNT
=
"HPKC004.count"
;
...
...
@@ -127,6 +131,8 @@ public class HPKC004 extends DaoEPBase {
private
String
updatedTime
=
" "
;
/* 修改时间*/
private
Integer
deleteFlag
;
/* 是否删除*/
private
Long
inventRecordId
=
new
Long
(
0
);
/* 存货档案ID*/
private
String
factoryCode
=
" "
;
/* 厂区编码*/
private
String
factoryName
=
" "
;
/* 工厂*/
/**
* initialize the metadata.
...
...
@@ -280,6 +286,14 @@ public class HPKC004 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_INVENT_RECORD_ID
);
eiColumn
.
setDescName
(
"存货档案ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_CODE
);
eiColumn
.
setDescName
(
"厂区编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_NAME
);
eiColumn
.
setDescName
(
"工厂"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -802,6 +816,38 @@ public class HPKC004 extends DaoEPBase {
this
.
inventRecordId
=
inventRecordId
;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public
String
getFactoryCode
()
{
return
this
.
factoryCode
;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public
void
setFactoryCode
(
String
factoryCode
)
{
this
.
factoryCode
=
factoryCode
;
}
/**
* get the factoryName - 工厂.
* @return the factoryName
*/
public
String
getFactoryName
()
{
return
this
.
factoryName
;
}
/**
* set the factoryName - 工厂.
*
* @param factoryName - 工厂
*/
public
void
setFactoryName
(
String
factoryName
)
{
this
.
factoryName
=
factoryName
;
}
/**
* get the value from Map.
*
* @param map - source data map
...
...
@@ -841,6 +887,8 @@ public class HPKC004 extends DaoEPBase {
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setInventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecordId
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
}
/**
...
...
@@ -882,6 +930,8 @@ public class HPKC004 extends DaoEPBase {
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_INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD_ID
)));
map
.
put
(
FIELD_FACTORY_CODE
,
StringUtils
.
toString
(
factoryCode
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_CODE
)));
map
.
put
(
FIELD_FACTORY_NAME
,
StringUtils
.
toString
(
factoryName
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_NAME
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC005.java
View file @
8ae1f816
...
...
@@ -52,6 +52,8 @@ public class HPKC005 extends DaoEPBase {
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_FACTORY_CODE
=
"factoryCode"
;
/* 厂区编码*/
public
static
final
String
FIELD_FACTORY_NAME
=
"factoryName"
;
/* 工厂*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
...
...
@@ -83,6 +85,8 @@ public class HPKC005 extends DaoEPBase {
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_FACTORY_CODE
=
"FACTORY_CODE"
;
/* 厂区编码*/
public
static
final
String
COL_FACTORY_NAME
=
"FACTORY_NAME"
;
/* 工厂*/
public
static
final
String
QUERY
=
"HPKC005.query"
;
public
static
final
String
COUNT
=
"HPKC005.count"
;
...
...
@@ -120,6 +124,8 @@ public class HPKC005 extends DaoEPBase {
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
;
/* 是否删除0.否1.是*/
private
String
factoryCode
=
" "
;
/* 厂区编码*/
private
String
factoryName
=
" "
;
/* 工厂*/
/**
* initialize the metadata.
...
...
@@ -272,6 +278,14 @@ public class HPKC005 extends DaoEPBase {
eiColumn
.
setDescName
(
"是否删除0.否1.是"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_CODE
);
eiColumn
.
setDescName
(
"厂区编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_NAME
);
eiColumn
.
setDescName
(
"工厂"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -763,6 +777,38 @@ public class HPKC005 extends DaoEPBase {
this
.
deleteFlag
=
deleteFlag
;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public
String
getFactoryCode
()
{
return
this
.
factoryCode
;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public
void
setFactoryCode
(
String
factoryCode
)
{
this
.
factoryCode
=
factoryCode
;
}
/**
* get the factoryName - 工厂.
* @return the factoryName
*/
public
String
getFactoryName
()
{
return
this
.
factoryName
;
}
/**
* set the factoryName - 工厂.
*
* @param factoryName - 工厂
*/
public
void
setFactoryName
(
String
factoryName
)
{
this
.
factoryName
=
factoryName
;
}
/**
* get the value from Map.
*
* @param map - source data map
...
...
@@ -800,6 +846,8 @@ public class HPKC005 extends DaoEPBase {
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
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
}
/**
...
...
@@ -839,7 +887,8 @@ public class HPKC005 extends DaoEPBase {
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_FACTORY_CODE
,
StringUtils
.
toString
(
factoryCode
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_CODE
)));
map
.
put
(
FIELD_FACTORY_NAME
,
StringUtils
.
toString
(
factoryName
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_NAME
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
View file @
8ae1f816
...
...
@@ -159,7 +159,7 @@ public class ServiceHPKC001 extends ServiceBase {
DaoUtils
.
insert
(
HPKC001
.
INSERT
,
fKc001
);
// 修改库存
HPKCTools
.
updateStock
(
fKc001
.
getWhCode
(),
fKc001
.
getInventRecordId
(),
fKc001
.
getAmount
(),
fKc001
.
getUnitWeight
(),
fKc001
.
getWeight
());
fKc001
.
getUnitWeight
(),
fKc001
.
getWeight
()
,
fKc001
.
getFactoryCode
()
);
}
/**
...
...
@@ -252,7 +252,7 @@ public class ServiceHPKC001 extends ServiceBase {
DaoUtils
.
insert
(
HPKC001
.
INSERT
,
newKc006
);
// 修改库存
HPKCTools
.
updateStock
(
dbKc001
.
getWhCode
(),
dbKc001
.
getInventRecordId
(),
dbKc001
.
getAmount
().
negate
(),
dbKc001
.
getUnitWeight
(),
dbKc001
.
getWeight
().
negate
());
dbKc001
.
getUnitWeight
(),
dbKc001
.
getWeight
().
negate
()
,
fKc001
.
getFactoryCode
()
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
View file @
8ae1f816
...
...
@@ -115,7 +115,7 @@ public class ServiceHPKC002 extends ServiceBase {
DaoUtils
.
insert
(
HPKC002
.
INSERT
,
newKc002
);
// 修改库存
HPKCTools
.
updateStock
(
dbKc002
.
getWhCode
(),
dbKc002
.
getInventRecordId
(),
dbKc002
.
getAmount
(),
dbKc002
.
getUnitWeight
(),
dbKc002
.
getWeight
());
dbKc002
.
getAmount
(),
dbKc002
.
getUnitWeight
(),
dbKc002
.
getWeight
()
,
dbKc002
.
getFactoryCode
()
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002A.java
View file @
8ae1f816
...
...
@@ -173,7 +173,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
DaoUtils
.
insert
(
HPKC002
.
INSERT
,
newKc002
);
// 修改库存数量
HPKCTools
.
updateStock
(
newKc002
.
getWhCode
(),
newKc002
.
getInventRecordId
(),
newKc002
.
getAmount
().
negate
(),
dbKc010
.
getUnitWeight
(),
newKc002
.
getWeight
().
negate
());
newKc002
.
getAmount
().
negate
(),
dbKc010
.
getUnitWeight
(),
newKc002
.
getWeight
().
negate
()
,
dbKc010
.
getFactoryCode
()
);
}
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002B.java
View file @
8ae1f816
...
...
@@ -164,7 +164,7 @@ public class ServiceHPKC002B extends ServiceEPBase {
DaoUtils
.
insert
(
HPKC002
.
INSERT
,
newKc002
);
// 修改库存数量
HPKCTools
.
updateStock
(
newKc002
.
getWhCode
(),
newKc002
.
getInventRecordId
(),
newKc002
.
getAmount
().
negate
(),
dbKc010
.
getUnitWeight
(),
newKc002
.
getWeight
().
negate
());
newKc002
.
getAmount
().
negate
(),
dbKc010
.
getUnitWeight
(),
newKc002
.
getWeight
().
negate
()
,
dbKc010
.
getFactoryCode
()
);
}
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004.java
View file @
8ae1f816
...
...
@@ -8,6 +8,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC004
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
import
com.baosight.hpjx.hp.kc.domain.HPKC011
;
import
com.baosight.hpjx.hp.kc.tools.HPKCTools
;
import
com.baosight.hpjx.util.BeanUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
...
...
@@ -53,6 +54,7 @@ public class ServiceHPKC004 extends ServiceBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC004
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
...
@@ -99,9 +101,14 @@ public class ServiceHPKC004 extends ServiceBase {
// 查询数据库记录
Map
<
String
,
HPKC004
>
mapKc004
=
HPKCTools
.
HpKc004
.
map
(
saleNos
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC011
hpkc011
=
null
;
HPKC010
hpkc010
=
null
;
HPKC004
fKc004
=
new
HPKC004
();
fKc004
.
fromMap
(
resultRows
.
get
(
i
));
HPKC010
hpkc010
=
HPKCTools
.
HpKc010
.
listById
(
fKc004
.
getKcId
());
if
(!
fKc004
.
getSubInventCode
().
equals
(
" "
))
hpkc011
=
HPKCTools
.
HpKc011
.
listById
(
fKc004
.
getKcId
());
else
hpkc010
=
HPKCTools
.
HpKc010
.
listById
(
fKc004
.
getKcId
());
DaoUtils
.
update
(
HPKC004
.
DELETE
,
fKc004
);
// 生成红冲记录
HPKC004
dbKc004
=
mapKc004
.
get
(
fKc004
.
getSaleNo
());
...
...
@@ -116,12 +123,12 @@ public class ServiceHPKC004 extends ServiceBase {
newKc004
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
insert
(
HPKC004
.
INSERT
,
newKc004
);
// 修改库存
if
(
dbKc004
.
getProdNo
().
equals
(
" "
)
)
if
(
hpkc010
!=
null
)
HPKCTools
.
updateStock
(
dbKc004
.
getWhCode
(),
hpkc010
.
getInventRecordId
(),
dbKc004
.
getAmount
(),
dbKc004
.
getWeight
().
multiply
(
new
BigDecimal
(
1000
)));
dbKc004
.
getAmount
(),
dbKc004
.
getWeight
().
multiply
(
new
BigDecimal
(
1000
))
,
hpkc010
.
getFactoryCode
()
);
else
HPKCTools
.
updateProdStock
(
dbKc004
.
getWhCode
(),
dbKc004
.
getProdNo
(),
dbKc004
.
getAmount
(),
dbKc004
.
getWeight
(),
hpkc01
0
.
getFactoryCode
());
dbKc004
.
getAmount
(),
dbKc004
.
getWeight
(),
hpkc01
1
.
getFactoryCode
());
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004B.java
View file @
8ae1f816
...
...
@@ -58,6 +58,7 @@ public class ServiceHPKC004B extends ServiceEPBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
queryMap2
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC010
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
...
@@ -163,7 +164,7 @@ public class ServiceHPKC004B extends ServiceEPBase {
// 修改库存数量
HPKCTools
.
updateStock
(
newKc004
.
getWhCode
(),
dbKc010
.
getInventRecordId
(),
newKc004
.
getAmount
().
negate
(),
dbKc010
.
getUnitWeight
(),
newKc004
.
getWeight
().
negate
());
newKc004
.
getAmount
().
negate
(),
dbKc010
.
getUnitWeight
(),
newKc004
.
getWeight
().
negate
()
,
dbKc010
.
getFactoryCode
()
);
}
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
View file @
8ae1f816
...
...
@@ -142,7 +142,7 @@ public class ServiceHPKC005 extends ServiceBase {
DaoUtils
.
insert
(
HPKC005
.
INSERT
,
fKc005
);
// 修改库存
HPKCTools
.
updateStock
(
fKc005
.
getWhCode
(),
fKc005
.
getInventRecordId
(),
fKc005
.
getDiffAmount
(),
fKc005
.
getDiffWeight
());
fKc005
.
getDiffAmount
(),
fKc005
.
getDiffWeight
()
,
fKc005
.
getFactoryCode
()
);
}
/**
...
...
@@ -238,7 +238,7 @@ public class ServiceHPKC005 extends ServiceBase {
DaoUtils
.
insert
(
HPKC005
.
INSERT
,
newKc005
);
// 修改库存
HPKCTools
.
updateStock
(
newKc005
.
getWhCode
(),
newKc005
.
getInventRecordId
(),
newKc005
.
getDiffAmount
(),
newKc005
.
getDiffWeight
());
newKc005
.
getDiffAmount
(),
newKc005
.
getDiffWeight
()
,
newKc005
.
getFactoryCode
()
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005A.java
View file @
8ae1f816
...
...
@@ -150,7 +150,7 @@ public class ServiceHPKC005A extends ServiceEPBase {
DaoUtils
.
insert
(
HPKC005
.
INSERT
,
newKc005
);
// 修改库存数量
HPKCTools
.
updateStock
(
newKc005
.
getWhCode
(),
newKc005
.
getInventRecordId
(),
newKc005
.
getDiffAmount
(),
newKc005
.
getDiffWeight
());
newKc005
.
getDiffAmount
(),
newKc005
.
getDiffWeight
()
,
dbKc010
.
getFactoryCode
()
);
}
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
View file @
8ae1f816
...
...
@@ -156,7 +156,7 @@ public class ServiceHPKC006 extends ServiceBase {
DaoUtils
.
insert
(
HPKC006
.
INSERT
,
fKc006
);
// 修改库存
HPKCTools
.
updateStock
(
fKc006
.
getWhCode
(),
fKc006
.
getInventRecordId
(),
fKc006
.
getAmount
(),
fKc006
.
getWeight
());
fKc006
.
getWeight
()
,
fKc006
.
getFactoryCode
()
);
}
/**
...
...
@@ -221,7 +221,7 @@ public class ServiceHPKC006 extends ServiceBase {
DaoUtils
.
insert
(
HPKC006
.
INSERT
,
newKc006
);
// 修改库存
HPKCTools
.
updateStock
(
dbKc006
.
getWhCode
(),
dbKc006
.
getInventRecordId
(),
dbKc006
.
getAmount
().
negate
(),
dbKc006
.
getWeight
().
negate
());
dbKc006
.
getWeight
().
negate
()
,
dbKc006
.
getFactoryCode
()
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007.java
View file @
8ae1f816
...
...
@@ -111,7 +111,7 @@ public class ServiceHPKC007 extends ServiceBase {
DaoUtils
.
insert
(
HPKC007
.
INSERT
,
fKc007
);
// 修改库存
HPKCTools
.
updateStock
(
fKc007
.
getWhCode
(),
fKc007
.
getInventRecordId
(),
fKc007
.
getAmount
().
negate
(),
fKc007
.
getWeight
().
negate
());
fKc007
.
getWeight
().
negate
()
,
fKc007
.
getFactoryCode
()
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
@@ -152,7 +152,7 @@ public class ServiceHPKC007 extends ServiceBase {
BigDecimal
diffWeight
=
fKc007
.
getWeight
().
subtract
(
dbKc007
.
getWeight
());
// 修改库存
HPKCTools
.
updateStock
(
fKc007
.
getWhCode
(),
fKc007
.
getInventRecordId
(),
diffAmount
.
negate
(),
diffWeight
.
negate
());
diffWeight
.
negate
()
,
dbKc007
.
getFactoryCode
()
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -226,7 +226,7 @@ public class ServiceHPKC007 extends ServiceBase {
DaoUtils
.
insert
(
HPKC007
.
INSERT
,
newKc007
);
// 修改库存
HPKCTools
.
updateStock
(
dbKc007
.
getWhCode
(),
dbKc007
.
getInventRecordId
(),
dbKc007
.
getAmount
(),
dbKc007
.
getWeight
());
dbKc007
.
getWeight
()
,
dbKc007
.
getFactoryCode
()
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007A.java
View file @
8ae1f816
...
...
@@ -150,7 +150,7 @@ public class ServiceHPKC007A extends ServiceEPBase {
DaoUtils
.
insert
(
HPKC007
.
INSERT
,
kc007
);
// 修改库存数量
HPKCTools
.
updateStock
(
kc007
.
getWhCode
(),
kc007
.
getInventRecordId
(),
kc007
.
getAmount
().
negate
(),
kc007
.
getWeight
().
negate
());
kc007
.
getWeight
().
negate
()
,
kc007
.
getFactoryCode
()
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
View file @
8ae1f816
...
...
@@ -125,6 +125,7 @@ public class ServiceHPKC010 extends ServiceBase {
throw
new
PlatException
(
"当前库存为空,库存变更数量与重量不能小于等于0!"
);
}
generatorBaseInfo
(
newObj
);
newObj
.
setFactoryCode
(
inInfo
.
getString
(
"factoryCode"
));
DaoUtils
.
insert
(
"HPKC010.insert"
,
newObj
);
}
else
{
//修改
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC005.xml
View file @
8ae1f816
...
...
@@ -30,7 +30,9 @@
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag"
<!-- 是否删除0.否1.是 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除0.否1.是 -->
FACTORY_CODE as "factoryCode",
<!-- 厂区编码 -->
FACTORY_NAME as "factoryName"
<!-- 工厂 -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -85,6 +87,12 @@
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
FACTORY_NAME = #factoryName#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
...
...
@@ -173,13 +181,15 @@
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
DELETE_FLAG
<!-- 是否删除0.否1.是 -->
DELETE_FLAG,
<!-- 是否删除0.否1.是 -->
FACTORY_CODE,
<!-- 厂区编码 -->
FACTORY_NAME
<!-- 工厂 -->
) VALUES (
#companyCode#, #depCode#, #receiptDate#, #checkNo#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#,
#bookWeight#, #entityAmount#, #entityWeight#, #diffAmount#, #diffWeight#,
#kcId#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#
#deleteFlag#
,#factoryCode#, #factoryName#
)
</insert>
...
...
@@ -207,7 +217,9 @@
REMARK = #remark#,
<!-- 备注 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
FACTORY_CODE = #factoryCode#,
FACTORY_NAME = #factoryName#
WHERE ID = #id#
</update>
...
...
@@ -228,6 +240,8 @@
<select
id=
"statDate"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC005"
>
SELECT
COMPANY_CODE AS "companyCode",
FACTORY_CODE as "factoryCode",
FACTORY_NAME as "factoryName",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
...
...
@@ -240,7 +254,7 @@
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
,FACTORY_CODE,FACTORY_NAME
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/kc/tools/HPKCTools.java
View file @
8ae1f816
...
...
@@ -448,8 +448,8 @@ public class HPKCTools {
* @param amount
* @param weight
*/
public
static
void
updateStock
(
String
whCode
,
Long
inventRecordId
,
BigDecimal
amount
,
BigDecimal
weight
)
{
updateStock
(
whCode
,
inventRecordId
,
amount
,
BigDecimal
.
ZERO
,
weight
);
public
static
void
updateStock
(
String
whCode
,
Long
inventRecordId
,
BigDecimal
amount
,
BigDecimal
weight
,
String
factCode
)
{
updateStock
(
whCode
,
inventRecordId
,
amount
,
BigDecimal
.
ZERO
,
weight
,
factCode
);
}
/**
...
...
@@ -476,6 +476,18 @@ public class HPKCTools {
}
/**
* 查询
*
* @param id
* @return
*/
public
static
HPKC011
listById
(
Long
id
)
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
return
(
HPKC011
)
DaoBase
.
getInstance
().
query
(
HPKC011
.
QUERY
,
queryMap
).
get
(
0
);
}
/**
* 查询库存信息
*
* @param ids
...
...
@@ -516,7 +528,7 @@ public class HPKCTools {
* @param weight
*/
public
static
void
updateStock
(
String
whCode
,
Long
inventRecordId
,
BigDecimal
amount
,
BigDecimal
unitWeight
,
BigDecimal
weight
)
{
BigDecimal
weight
,
String
factoryCode
)
{
if
(
amount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
throw
new
PlatException
(
"入库数量不能为空"
);
}
...
...
@@ -526,6 +538,7 @@ public class HPKCTools {
inInfo
.
set
(
"amount"
,
amount
);
inInfo
.
set
(
"unitWeight"
,
unitWeight
);
inInfo
.
set
(
"weight"
,
weight
);
inInfo
.
set
(
"factoryCode"
,
factoryCode
);
inInfo
.
set
(
EiConstant
.
serviceName
,
"HPKC010"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"updateStock"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
...
...
src/main/webapp/HP/KC/HPKC004.jsp
View file @
8ae1f816
...
...
@@ -41,6 +41,10 @@
<EF:EFColumn
ename=
"receiptDate"
cname=
"单据日期"
enable=
"false"
width=
"90"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFComboColumn
ename=
"factoryCode"
enable=
"false"
cname=
"厂区"
width=
"110"
align=
"center"
defaultValue=
""
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"false"
width=
"120"
align=
"center"
blockName=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
...
...
src/main/webapp/HP/KC/HPKC004B.jsp
View file @
8ae1f816
...
...
@@ -8,6 +8,10 @@
<EF:EFPage
title=
"库存查询"
>
<EF:EFRegion
id=
"inqu"
title=
"查询区域"
type=
"query"
>
<div
class=
"row"
>
<EF:EFSelect
ename=
"inqu_status-0-factoryCode"
cname=
"厂区"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"factory_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
cname=
"仓库名称"
ename=
"inqu_status-0-whCode"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
...
...
@@ -26,6 +30,10 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"库存ID"
enable=
"false"
width=
"60"
align=
"center"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"factoryCode"
enable=
"false"
cname=
"厂区"
width=
"110"
align=
"center"
defaultValue=
""
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"100"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('2')"
/>
</EF:EFComboColumn>
...
...
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