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
5b393644
Commit
5b393644
authored
Feb 29, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化代码,存货新增时校验逻辑
parent
fca2f656
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
65 additions
and
104 deletions
+65
-104
ServiceHPKC006.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
+7
-5
ServiceHPPZ004.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ004.java
+0
-33
ServiceHPPZ006.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
+2
-47
HPPZ004.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ004.xml
+18
-3
HPPZ006.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ006.xml
+22
-0
HPPZTools.java
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
+0
-0
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+7
-7
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+4
-4
ExcelUtils.java
src/main/java/com/baosight/hpjx/util/ExcelUtils.java
+4
-4
HPKC006.jsp
src/main/webapp/HP/KC/HPKC006.jsp
+1
-1
No files found.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
View file @
5b393644
...
...
@@ -131,15 +131,17 @@ public class ServiceHPKC006 extends ServiceBase {
this
.
setBaseInfo
(
fKc006
);
// 生成入库单号
fKc006
.
setOtherEnterNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
OTHER_ENTER_NO
));
HPPZ006
hppz006
=
HPPZTools
.
checkAndSavePZ06
(
fKc006
.
getInventType
(),
fKc006
.
getInventName
(),
fKc006
.
getLength
(),
fKc006
.
getWidth
(),
fKc006
.
getThick
(),
fKc006
.
getCoefficient
(),
fKc006
.
getMaterial
(),
fKc006
.
getUnit
()
// 检查规格,如果不存在就新增
HPPZ006
dbPz006
=
HPPZTools
.
HpPz006
.
checkAndSave
(
fKc006
.
getInventType
(),
fKc006
.
getInventName
(),
fKc006
.
getLength
(),
fKc006
.
getWidth
(),
fKc006
.
getThick
(),
fKc006
.
getCoefficient
(),
fKc006
.
getMaterial
(),
fKc006
.
getUnit
()
);
// 根据规格计算单重
fKc006
.
setUnitWeight
(
HPPZTools
.
HpPz006
.
calcUnitWeight
(
hppz006
.
getId
()
));
fKc006
.
setUnitWeight
(
HPPZTools
.
HpPz006
.
calcUnitWeight
(
dbPz006
));
// 计算总重
fKc006
.
setWeight
(
fKc006
.
getAmount
().
multiply
(
fKc006
.
getUnitWeight
()));
fKc006
.
setInventRecordId
(
hpp
z006
.
getId
());
fKc006
.
setInventCode
(
hpp
z006
.
getInventCode
());
fKc006
.
setInventRecordId
(
dbP
z006
.
getId
());
fKc006
.
setInventCode
(
dbP
z006
.
getInventCode
());
fKc006
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPKC006
.
INSERT
,
fKc006
);
// 修改库存
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ004.java
View file @
5b393644
...
...
@@ -116,39 +116,6 @@ public class ServiceHPPZ004 extends ServiceBase {
}
return
inInfo
;
}
/**
* 判断存货名称是否存在,如果存在返回编码,否则新增并返回编码
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"存货类型"
,
operType
=
"查询"
,
operDesc
=
"判断存货名称是否存在,如果存在返回编码,否则新增并返回编码"
)
public
EiInfo
checkAndSave
(
EiInfo
inInfo
){
String
inventType
=
inInfo
.
getString
(
"inventType"
);
String
inventName
=
inInfo
.
getString
(
"inventName"
);
List
<
Map
>
list
=
dao
.
query
(
"HPPZ004.queryByCondition"
,
new
HashMap
<
String
,
Object
>(){{
put
(
"inventType"
,
inventType
);
put
(
"inventName"
,
inventName
);
}});
HPPZ004
hppz004
=
new
HPPZ004
();
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
hppz004
.
fromMap
(
list
.
get
(
0
));
if
(
hppz004
.
getDeleteFlag
()==
CommonConstant
.
YesNo
.
YES_1
)
{
hppz004
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
update
(
HPPZ004
.
DELETE_BACK
,
hppz004
);
}
}
else
{
// 生成编码
hppz004
.
setInventCode
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
INVENT_CODE
));
hppz004
.
setInventType
(
Integer
.
parseInt
(
inventType
));
hppz004
.
setInventName
(
inventName
);
hppz004
.
setStatus
(
CommonConstant
.
YesNo
.
YES_1
.
intValue
());
DaoUtils
.
insert
(
HPPZ004
.
INSERT
,
hppz004
);
}
inInfo
.
setAttr
(
new
HashMap
(){{
put
(
"inventCode"
,
hppz004
.
getInventCode
());}});
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
return
inInfo
;
}
/**
* 删除操作
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
View file @
5b393644
...
...
@@ -5,7 +5,6 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.common.InitiateModeEnum
;
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.HPKC010
;
import
com.baosight.hpjx.hp.kc.tools.HPKCTools
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ006
;
...
...
@@ -20,11 +19,9 @@ 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
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
...
...
@@ -88,7 +85,7 @@ public class ServiceHPPZ006 extends ServiceBase {
fPz006
.
fromMap
(
resultRows
.
get
(
i
));
// 存货名称
fPz006
.
setInventName
(
HPPZTools
.
HpPz004
.
getByCode
(
fPz006
.
getInventCode
()).
getInventName
());
fPz006
.
setSpec
(
HPPZTools
.
jointSpec
(
fPz006
.
getLength
(),
fPz006
.
getWidth
(),
fPz006
.
getThick
()));
fPz006
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
fPz006
.
getLength
(),
fPz006
.
getWidth
(),
fPz006
.
getThick
()));
DaoUtils
.
insert
(
HPPZ006
.
INSERT
,
fPz006
);
}
inInfo
=
this
.
query
(
inInfo
);
...
...
@@ -141,7 +138,7 @@ public class ServiceHPPZ006 extends ServiceBase {
fPz006
.
fromMap
(
resultRows
.
get
(
i
));
// 存货名称
fPz006
.
setInventName
(
HPPZTools
.
HpPz004
.
getByCode
(
fPz006
.
getInventCode
()).
getInventName
());
fPz006
.
setSpec
(
HPPZTools
.
jointSpec
(
fPz006
.
getLength
(),
fPz006
.
getWidth
(),
fPz006
.
getThick
()));
fPz006
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
fPz006
.
getLength
(),
fPz006
.
getWidth
(),
fPz006
.
getThick
()));
DaoUtils
.
update
(
HPPZ006
.
UPDATE
,
fPz006
);
}
inInfo
=
this
.
query
(
inInfo
);
...
...
@@ -190,48 +187,6 @@ public class ServiceHPPZ006 extends ServiceBase {
return
inInfo
;
}
/**
* 判断存货档案是否存在,如果存在返回ID,否则新增并返回ID
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"存货档案"
,
operType
=
"查询"
,
operDesc
=
"判断存货档案是否存在,如果存在返回ID,否则新增并返回ID"
)
public
EiInfo
checkAndSave
(
EiInfo
inInfo
){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_INVENT_TYPE
,
inInfo
.
getString
(
"inventType"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_INVENT_CODE
,
inInfo
.
getString
(
"inventCode"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_INVENT_NAME
,
inInfo
.
getString
(
"inventName"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_LENGTH
,
inInfo
.
getString
(
"length"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_WIDTH
,
inInfo
.
getString
(
"width"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_THICK
,
inInfo
.
getString
(
"thick"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_MATERIAL
,
inInfo
.
getString
(
"material"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_COEFFICIENT
,
inInfo
.
getString
(
"coefficient"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
HPPZ006
.
FIELD_UNIT
,
inInfo
.
getString
(
"unit"
));
EiInfo
eiInfo
=
super
.
query
(
inInfo
,
"HPPZ006.queryByCondition"
,
new
HPPZ006
());
HPPZ006
hppz006
=
new
HPPZ006
();
if
(
CollectionUtils
.
isNotEmpty
(
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
())){
Map
map
=
(
Map
)
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
().
get
(
0
);
hppz006
.
fromMap
(
map
);
}
else
{
// 生成编码
hppz006
.
setInventType
(
Integer
.
parseInt
(
inInfo
.
getString
(
"inventType"
)));
hppz006
.
setInventCode
(
inInfo
.
getString
(
"inventCode"
));
hppz006
.
setInventName
(
inInfo
.
getString
(
"inventName"
));
hppz006
.
setLength
(
new
BigDecimal
(
inInfo
.
getString
(
"length"
)));
hppz006
.
setWidth
(
new
BigDecimal
(
inInfo
.
getString
(
"width"
)));
hppz006
.
setThick
(
new
BigDecimal
(
inInfo
.
getString
(
"thick"
)));
hppz006
.
setMaterial
(
inInfo
.
getString
(
"material"
));
hppz006
.
setCoefficient
(
new
BigDecimal
(
inInfo
.
getString
(
"coefficient"
)));
hppz006
.
setUnit
(
inInfo
.
getString
(
"unit"
));
hppz006
.
setStatus
(
CommonConstant
.
YesNo
.
YES_1
.
intValue
());
hppz006
.
setSpec
(
HPPZTools
.
jointSpec
(
hppz006
.
getLength
(),
hppz006
.
getWidth
(),
hppz006
.
getThick
()));
DaoUtils
.
insert
(
HPPZ006
.
INSERT
,
hppz006
);
}
inInfo
.
setAttr
(
new
HashMap
(){{
put
(
"obj"
,
hppz006
);}});
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
return
inInfo
;
}
/**
* 规格下拉框
*
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ004.xml
View file @
5b393644
...
...
@@ -36,15 +36,21 @@
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
</sql>
<sql
id=
"getCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypes"
>
INVENT_TYPE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventTypes"
>
#inventTypes[]#
</iterate>
</isNotEmpty>
...
...
@@ -73,6 +79,15 @@
<include
refid=
"order"
/>
</select>
<select
id=
"get"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ004"
>
SELECT
<include
refid=
"column"
/>
FROM hpjx.t_hppz004 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"getCondition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"queryByCondition"
resultClass=
"java.util.HashMap"
>
SELECT
<include
refid=
"column"
/>
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ006.xml
View file @
5b393644
...
...
@@ -45,6 +45,24 @@
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotNull
prepend=
" AND "
property=
"length"
>
LENGTH = #length#
</isNotNull>
<isNotNull
prepend=
" AND "
property=
"width"
>
WIDTH = #width#
</isNotNull>
<isNotNull
prepend=
" AND "
property=
"thick"
>
THICK = #thick#
</isNotNull>
<isNotNull
prepend=
" AND "
property=
"material"
>
MATERIAL = #material#
</isNotNull>
<isNotNull
prepend=
" AND "
property=
"coefficient"
>
COEFFICIENT = #coefficient#
</isNotNull>
<isNotNull
prepend=
" AND "
property=
"unit"
>
UNIT = #unit#
</isNotNull>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
...
...
@@ -53,6 +71,10 @@
</isNotNull>
</sql>
<sql
id=
"getCondition"
>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"inventTypes"
>
INVENT_TYPE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventTypes"
>
#inventTypes[]#
</iterate>
...
...
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
View file @
5b393644
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
5b393644
...
...
@@ -99,11 +99,11 @@ public class ServiceHPSC002 extends ServiceBase {
// if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
// hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
// }
hppz002
.
setSpec
(
HPPZTools
.
jointSpec
(
hppz002
.
getLength
(),
hppz002
.
getWidth
(),
hppz002
.
getThick
()));
hppz002
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
hppz002
.
getLength
(),
hppz002
.
getWidth
(),
hppz002
.
getThick
()));
if
(
hppz002
.
getParentId
().
equals
(
"root"
)){
hppz002
.
setLv
(
new
Integer
(
1
));
}
else
{
hppz002
.
setPrdtCode
(
HPPZTools
.
checkAndSavePZ04
(
hppz002
.
getPrdtType
(),
hppz002
.
getPrdtName
()));
hppz002
.
setPrdtCode
(
HPPZTools
.
HpPz004
.
checkAndSave
(
hppz002
.
getPrdtType
(),
hppz002
.
getPrdtName
()));
Integer
lv
=
(
Integer
)
this
.
dao
.
get
(
"HPSC002.queryLv"
,
"id"
,
hppz002
.
getParentId
());
hppz002
.
setLv
(
lv
.
intValue
()+
1
);
}
...
...
@@ -171,7 +171,7 @@ public class ServiceHPSC002 extends ServiceBase {
hpsc005
.
setPrdtLength
(
hppz002
.
getLength
());
hpsc005
.
setPrdtWidth
(
hppz002
.
getWidth
());
hpsc005
.
setPrdtThick
(
hppz002
.
getThick
());
hpsc005
.
setPrdtSpec
(
HPPZTools
.
jointSpec
(
hpsc005
.
getPrdtLength
(),
hpsc005
.
getPrdtWidth
(),
hpsc005
.
getPrdtThick
()));
hpsc005
.
setPrdtSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
hpsc005
.
getPrdtLength
(),
hpsc005
.
getPrdtWidth
(),
hpsc005
.
getPrdtThick
()));
DaoUtils
.
update
(
"HPSC005.update"
,
hpsc005
.
toMap
());
}
}
...
...
@@ -210,7 +210,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC005
.
setNum
(
hppz002
.
getNum
());
HPSC005
.
setUnitWt
(
hppz002
.
getUnitWt
());
HPSC005
.
setTotalWt
(
hppz002
.
getTotalWt
());
HPSC005
.
setPartSpec
(
HPPZTools
.
jointSpec
(
HPSC005
.
getPartLength
(),
HPSC005
.
getPartWidth
(),
HPSC005
.
getPartThick
()));
HPSC005
.
setPartSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
HPSC005
.
getPartLength
(),
HPSC005
.
getPartWidth
(),
HPSC005
.
getPartThick
()));
DaoUtils
.
update
(
"HPSC005.update"
,
HPSC005
.
toMap
());
}
}
else
{
...
...
@@ -243,7 +243,7 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
Math
.
round
(
num
.
multiply
(
unitWt
).
floatValue
())));
hppz002
.
setDelStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
hppz002
.
setTotalWt
(
totalWt
);
hppz002
.
setSpec
(
HPPZTools
.
jointSpec
(
hppz002
.
getLength
(),
hppz002
.
getWidth
(),
hppz002
.
getThick
()));
hppz002
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
hppz002
.
getLength
(),
hppz002
.
getWidth
(),
hppz002
.
getThick
()));
DaoUtils
.
update
(
"HPSC002.update"
,
hppz002
.
toMap
());
}
...
...
@@ -251,7 +251,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003
.
setLength
(
hppz002
.
getLength
());
HPSC003
.
setWidth
(
hppz002
.
getWidth
());
HPSC003
.
setThick
(
hppz002
.
getThick
());
HPSC003
.
setSpec
(
HPPZTools
.
jointSpec
(
HPSC003
.
getLength
(),
HPSC003
.
getWidth
(),
HPSC003
.
getThick
()));
HPSC003
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
HPSC003
.
getLength
(),
HPSC003
.
getWidth
(),
HPSC003
.
getThick
()));
DaoUtils
.
update
(
"HPSC003.update"
,
HPSC003
.
toMap
());
}
...
...
@@ -262,7 +262,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004
.
setNum
(
hppz002
.
getNum
());
HPSC004
.
setUnitWt
(
hppz002
.
getUnitWt
());
HPSC004
.
setTotalWt
(
hppz002
.
getTotalWt
());
HPSC004
.
setSpec
(
HPPZTools
.
jointSpec
(
HPSC004
.
getLength
(),
HPSC004
.
getWidth
(),
HPSC004
.
getThick
()));
HPSC004
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
HPSC004
.
getLength
(),
HPSC004
.
getWidth
(),
HPSC004
.
getThick
()));
DaoUtils
.
update
(
"HPSC004.update"
,
HPSC004
.
toMap
());
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
5b393644
...
...
@@ -106,13 +106,13 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal
unitWt
=
HPSC006
.
getUnitWt
();
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
Math
.
round
(
num
.
multiply
(
unitWt
).
floatValue
())));
HPSC006
.
setInventSpec
(
HPPZTools
.
jointSpec
(
HPSC006
.
getInventLength
(),
HPSC006
.
getInventWidth
(),
HPSC006
.
getInventThick
()));
HPSC006
.
setInventSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
HPSC006
.
getInventLength
(),
HPSC006
.
getInventWidth
(),
HPSC006
.
getInventThick
()));
HPSC006
.
setProjCode
(
projCode
);
HPSC006
.
setProjName
(
projName
);
HPSC006
.
setProductionOrderNo
(
productionOrderNo
);
HPSC006
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
HPSC006
.
setTotalWt
(
totalWt
);
HPSC006
.
setInventCode
(
HPPZTools
.
checkAndSavePZ04
(
HPSC006
.
getInventType
(),
HPSC006
.
getInventName
()));
HPSC006
.
setInventCode
(
HPPZTools
.
HpPz004
.
checkAndSave
(
HPSC006
.
getInventType
(),
HPSC006
.
getInventName
()));
if
(
HPSC006
.
getFactoryCode
()!=
null
&&
!(
HPSC006
.
getFactoryCode
().
equals
(
" "
)))
{
AssertUtils
.
isEmpty
(
HPSC006
.
getOrgNo
(),
"已选择厂区,下料组不能为空"
);
HPSC006
.
setStatus
(
1
);
...
...
@@ -152,12 +152,12 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal
unitWt
=
HPSC006
.
getUnitWt
();
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
Math
.
round
(
num
.
multiply
(
unitWt
).
floatValue
())));
HPSC006
.
setInventSpec
(
HPPZTools
.
jointSpec
(
HPSC006
.
getInventLength
(),
HPSC006
.
getInventWidth
(),
HPSC006
.
getInventThick
()));
HPSC006
.
setInventSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
HPSC006
.
getInventLength
(),
HPSC006
.
getInventWidth
(),
HPSC006
.
getInventThick
()));
HPSC006
.
setProjCode
(
projCode
);
HPSC006
.
setProjName
(
projName
);
HPSC006
.
setProductionOrderNo
(
productionOrderNo
);
HPSC006
.
setTotalWt
(
totalWt
);
HPSC006
.
setInventCode
(
HPPZTools
.
checkAndSavePZ04
(
HPSC006
.
getInventType
(),
HPSC006
.
getInventName
()));
HPSC006
.
setInventCode
(
HPPZTools
.
HpPz004
.
checkAndSave
(
HPSC006
.
getInventType
(),
HPSC006
.
getInventName
()));
DaoUtils
.
update
(
"HPSC006.update"
,
HPSC006
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
src/main/java/com/baosight/hpjx/util/ExcelUtils.java
View file @
5b393644
...
...
@@ -282,8 +282,8 @@ public class ExcelUtils {
HPSC002
.
setDelStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
HPSC002
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
HPSC002
.
setTotalWt
(
totalWt
);
HPSC002
.
setSpec
(
HPPZTools
.
jointSpec
(
HPSC002
.
getLength
(),
HPSC002
.
getWidth
(),
HPSC002
.
getThick
()));
HPSC002
.
setPrdtCode
(
HPPZTools
.
checkAndSavePZ04
(
HPSC002
.
getPrdtType
(),
HPSC002
.
getPrdtName
()));
HPSC002
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
HPSC002
.
getLength
(),
HPSC002
.
getWidth
(),
HPSC002
.
getThick
()));
HPSC002
.
setPrdtCode
(
HPPZTools
.
HpPz004
.
checkAndSave
(
HPSC002
.
getPrdtType
(),
HPSC002
.
getPrdtName
()));
if
(!
checkStatus
)
{
checkOkBlock
.
addRow
(
HPSC002
.
toMap
());
}
...
...
@@ -317,10 +317,10 @@ public class ExcelUtils {
BigDecimal
unitWt
=
HPSC006
.
getUnitWt
();
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
Math
.
round
(
num
.
multiply
(
unitWt
).
floatValue
())));
HPSC006
.
setInventSpec
(
HPPZTools
.
jointSpec
(
HPSC006
.
getInventLength
(),
HPSC006
.
getInventWidth
(),
HPSC006
.
getInventThick
()));
HPSC006
.
setInventSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
HPSC006
.
getInventLength
(),
HPSC006
.
getInventWidth
(),
HPSC006
.
getInventThick
()));
HPSC006
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
HPSC006
.
setTotalWt
(
totalWt
);
HPSC006
.
setInventCode
(
HPPZTools
.
checkAndSavePZ04
(
HPSC006
.
getInventType
(),
HPSC006
.
getInventName
()));
HPSC006
.
setInventCode
(
HPPZTools
.
HpPz004
.
checkAndSave
(
HPSC006
.
getInventType
(),
HPSC006
.
getInventName
()));
if
(!
checkStatus
)
{
checkOkBlock
.
addRow
(
HPSC006
.
toMap
());
}
...
...
src/main/webapp/HP/KC/HPKC006.jsp
View file @
5b393644
...
...
@@ -56,7 +56,7 @@
<EF:EFColumn
ename=
"inventCode"
cname=
"存货名称"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格"
width=
"120"
align=
"center"
required=
"
fals
e"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格"
width=
"120"
align=
"center"
required=
"
tru
e"
readonly=
"true"
/>
<EF:EFColumn
ename=
"amount"
cname=
"数量"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
align=
"right"
sumType=
"all"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"unitWeight"
cname=
"单重"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment