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
6338851e
Commit
6338851e
authored
Apr 09, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料清单导入优化
parent
b0b39c37
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
19 deletions
+58
-19
HPSC002.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC002.java
+5
-5
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+40
-10
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+3
-2
HPSC097.js
src/main/webapp/HP/SC/HPSC097.js
+8
-1
HPSC097.jsp
src/main/webapp/HP/SC/HPSC097.jsp
+2
-1
No files found.
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC002.java
View file @
6338851e
...
@@ -138,7 +138,7 @@ public class HPSC002 extends DaoEPBase {
...
@@ -138,7 +138,7 @@ public class HPSC002 extends DaoEPBase {
@ExcelAnno
(
index
=
6
)
@ExcelAnno
(
index
=
6
)
private
BigDecimal
num
=
new
BigDecimal
(
0.000
);
/* 数量*/
private
BigDecimal
num
=
new
BigDecimal
(
0.000
);
/* 数量*/
@ExcelAnno
(
index
=
7
)
@ExcelAnno
(
index
=
7
)
private
BigDecimal
unitWt
=
new
BigDecimal
(
0.0
00
);
/* 单重*/
private
BigDecimal
unitWt
=
new
BigDecimal
(
0.0
);
/* 单重*/
private
BigDecimal
totalWt
=
new
BigDecimal
(
0.000
);
/* 总重*/
private
BigDecimal
totalWt
=
new
BigDecimal
(
0.000
);
/* 总重*/
private
String
filePath1
=
" "
;
/* 文件地址1*/
private
String
filePath1
=
" "
;
/* 文件地址1*/
private
String
filePath2
=
" "
;
/* 文件地址2*/
private
String
filePath2
=
" "
;
/* 文件地址2*/
...
@@ -225,21 +225,21 @@ public class HPSC002 extends DaoEPBase {
...
@@ -225,21 +225,21 @@ public class HPSC002 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_LENGTH
);
eiColumn
=
new
EiColumn
(
FIELD_LENGTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"长"
);
eiColumn
.
setDescName
(
"长"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WIDTH
);
eiColumn
=
new
EiColumn
(
FIELD_WIDTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"宽"
);
eiColumn
.
setDescName
(
"宽"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_THICK
);
eiColumn
=
new
EiColumn
(
FIELD_THICK
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"厚"
);
eiColumn
.
setDescName
(
"厚"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -261,7 +261,7 @@ public class HPSC002 extends DaoEPBase {
...
@@ -261,7 +261,7 @@ public class HPSC002 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_UNIT_WT
);
eiColumn
=
new
EiColumn
(
FIELD_UNIT_WT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
1
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"单重"
);
eiColumn
.
setDescName
(
"单重"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
6338851e
...
@@ -850,18 +850,48 @@ public class ServiceHPSC002 extends ServiceBase {
...
@@ -850,18 +850,48 @@ public class ServiceHPSC002 extends ServiceBase {
String
projName
=
(
String
)
params
.
get
(
"projName"
);
String
projName
=
(
String
)
params
.
get
(
"projName"
);
String
deliveryDate
=
(
String
)
params
.
get
(
"deliveryDate"
);
String
deliveryDate
=
(
String
)
params
.
get
(
"deliveryDate"
);
String
parentPrdtName
=
(
String
)
params
.
get
(
"parentPrdtName"
);
String
parentPrdtName
=
(
String
)
params
.
get
(
"parentPrdtName"
);
int
lv
=
Integer
.
parseInt
((
String
)
params
.
get
(
"lv"
))
+
1
;
Boolean
checkStatus
=
false
;
StringBuffer
sb
=
new
StringBuffer
();
// 写入数据
// 写入数据
for
(
HPSC002
hpsc002:
dataList
)
{
for
(
int
i
=
0
;
i
<
dataList
.
size
();
i
++)
{
hpsc002
.
setParentId
(
parentId
);
HPSC002
hpsc002
=
new
HPSC002
();
hpsc002
.
setProjCode
(
projCode
);
hpsc002
=
dataList
.
get
(
i
);
hpsc002
.
setProjName
(
projName
);
hpsc002
.
setLv
(
lv
);
hpsc002
.
setParentPrdtName
(
parentPrdtName
);
//产品类型是否为空
hpsc002
.
setDeliveryDate
(
deliveryDate
);
if
(
hpsc002
.
getPrdtType
()==
null
){
hpsc002
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
sb
.
append
(
"导入失败:数据错误第"
+(
i
+
1
)+
"条,产品类型不能为空!!"
);
add
(
hpsc002
);
checkStatus
=
true
;
}
else
{
//层级2
if
(
hpsc002
.
getLv
()
==
2
&&
hpsc002
.
getPrdtType
()
!=
4
)
{
sb
.
append
(
"导入失败:数据错误第"
+(
i
+
1
)+
"条,层级关系错误,当前层级只能导入部件清单!!"
);
checkStatus
=
true
;
}
else
if
(
hpsc002
.
getLv
()
==
3
)
{
if
(!(
hpsc002
.
getPrdtType
()
==
3
||
hpsc002
.
getPrdtType
()
==
2
))
{
sb
.
append
(
"导入失败:数据错误第"
+(
i
+
1
)+
"条,层级关系错误,当前层级只能导入零件或耗材清单!!"
);
checkStatus
=
true
;
}
}
}
}
if
(
checkStatus
)
{
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setMsg
(
sb
.
toString
());
}
else
{
for
(
HPSC002
hpsc002:
dataList
)
{
hpsc002
.
setLv
(
lv
);
hpsc002
.
setParentId
(
parentId
);
hpsc002
.
setProjCode
(
projCode
);
hpsc002
.
setProjName
(
projName
);
hpsc002
.
setParentPrdtName
(
parentPrdtName
);
hpsc002
.
setDeliveryDate
(
deliveryDate
);
hpsc002
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
add
(
hpsc002
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
dataList
.
size
()
+
"]条数据保存成功!"
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
dataList
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
}
...
...
src/main/webapp/HP/SC/HPSC002.js
View file @
6338851e
...
@@ -388,7 +388,8 @@ $(function () {
...
@@ -388,7 +388,8 @@ $(function () {
href
:
"HPSC097?methodName=initLoad&inqu_status-0-id=route_001&inqu_status-0-parentId="
href
:
"HPSC097?methodName=initLoad&inqu_status-0-id=route_001&inqu_status-0-parentId="
+
nodeId
+
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-projName="
+
nodeId
+
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-projName="
+
projName
+
"&inqu_status-0-parentPrdtName="
+
parentPrdtName
+
projName
+
"&inqu_status-0-parentPrdtName="
+
parentPrdtName
+
"&inqu_status-0-deliveryDate="
+
deliveryDate
,
+
"&inqu_status-0-deliveryDate="
+
deliveryDate
+
"&inqu_status-0-lv="
+
lv
,
title
:
"<div style='text-align: center;'>导入</div>"
,
title
:
"<div style='text-align: center;'>导入</div>"
,
width
:
"60%"
,
width
:
"60%"
,
height
:
"50%"
,
height
:
"50%"
,
...
@@ -396,7 +397,7 @@ $(function () {
...
@@ -396,7 +397,7 @@ $(function () {
// 刷新列表
// 刷新列表
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
// 刷新树
// 刷新树
update
Tree
();
refresh
Tree
();
// 关闭弹窗
// 关闭弹窗
JSColorbox
.
close
();
JSColorbox
.
close
();
}
}
...
...
src/main/webapp/HP/SC/HPSC097.js
View file @
6338851e
...
@@ -24,6 +24,7 @@ let upload = function () {
...
@@ -24,6 +24,7 @@ let upload = function () {
let
parentPrdtName
=
$
(
"#inqu_status-0-parentPrdtName"
).
val
();
let
parentPrdtName
=
$
(
"#inqu_status-0-parentPrdtName"
).
val
();
let
productionOrderNo
=
$
(
"#inqu_status-0-productionOrderNo"
).
val
();
let
productionOrderNo
=
$
(
"#inqu_status-0-productionOrderNo"
).
val
();
let
deliveryDate
=
$
(
"#inqu_status-0-deliveryDate"
).
val
();
let
deliveryDate
=
$
(
"#inqu_status-0-deliveryDate"
).
val
();
let
lv
=
$
(
"#inqu_status-0-lv"
).
val
();
let
_IPLAT
=
IPLAT
;
let
_IPLAT
=
IPLAT
;
_IPLAT
.
progress
(
$
(
"body"
),
true
);
_IPLAT
.
progress
(
$
(
"body"
),
true
);
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
...
@@ -35,6 +36,7 @@ let upload = function () {
...
@@ -35,6 +36,7 @@ let upload = function () {
formData
.
append
(
"projName"
,
projName
);
formData
.
append
(
"projName"
,
projName
);
formData
.
append
(
"parentPrdtName"
,
parentPrdtName
);
formData
.
append
(
"parentPrdtName"
,
parentPrdtName
);
formData
.
append
(
"deliveryDate"
,
deliveryDate
);
formData
.
append
(
"deliveryDate"
,
deliveryDate
);
formData
.
append
(
"lv"
,
lv
);
}
}
if
(
id
===
'route_002'
){
if
(
id
===
'route_002'
){
formData
.
append
(
"id"
,
id
);
formData
.
append
(
"id"
,
id
);
...
@@ -56,7 +58,12 @@ let upload = function () {
...
@@ -56,7 +58,12 @@ let upload = function () {
processData
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
_IPLAT
.
progress
(
$
(
"body"
),
false
);
_IPLAT
.
progress
(
$
(
"body"
),
false
);
parent
.
JSColorbox
.
setValueCallback
();
debugger
;
if
(
res
.
status
===
0
){
parent
.
JSColorbox
.
setValueCallback
();
}
else
{
NotificationUtil
(
res
.
msg
,
"error"
);
}
},
},
error
:
function
(
res
)
{
error
:
function
(
res
)
{
message
(
res
.
msg
);
message
(
res
.
msg
);
...
...
src/main/webapp/HP/SC/HPSC097.jsp
View file @
6338851e
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-parentPrdtName"
cname=
"项目部件名称"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-parentPrdtName"
cname=
"项目部件名称"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-productionOrderNo"
cname=
"生产订单号"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-productionOrderNo"
cname=
"生产订单号"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-deliveryDate"
cname=
"交货日期"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-deliveryDate"
cname=
"交货日期"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-lv"
cname=
"级别"
type=
"hidden"
/>
<EF:EFInput
cname=
"上传文件"
blockId=
"inqu_status"
ename=
"file"
row=
"0"
type=
"file"
/>
<EF:EFInput
cname=
"上传文件"
blockId=
"inqu_status"
ename=
"file"
row=
"0"
type=
"file"
/>
<
%
--
<
button
id=
"btn_upload"
type=
"submit"
>
提交
</button>
--%>
<
%
--
<
button
id=
"btn_upload"
type=
"submit"
>
提交
</button>
--%>
<
%
--
<
EF:EFButton
cname=
"提交"
ename=
"btn_upload"
></EF:EFButton>
--%>
<
%
--
<
EF:EFButton
cname=
"提交"
ename=
"btn_upload"
></EF:EFButton>
--%>
...
...
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