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
7327ca42
Commit
7327ca42
authored
Mar 27, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产下料导入修改
parent
17f6152d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
102 additions
and
77 deletions
+102
-77
DocRouteEnum.java
src/main/java/com/baosight/hpjx/common/DocRouteEnum.java
+4
-3
HPSC006.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC006.java
+10
-0
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+35
-0
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+3
-3
HPSC006.js
src/main/webapp/HP/SC/HPSC006.js
+27
-3
HPSC097.js
src/main/webapp/HP/SC/HPSC097.js
+17
-66
HPSC097.jsp
src/main/webapp/HP/SC/HPSC097.jsp
+6
-2
HPSC006_生产下料.xls
src/main/webapp/HP/template/SC/HPSC006_生产下料.xls
+0
-0
No files found.
src/main/java/com/baosight/hpjx/common/DocRouteEnum.java
View file @
7327ca42
...
@@ -2,15 +2,16 @@ package com.baosight.hpjx.common;
...
@@ -2,15 +2,16 @@ package com.baosight.hpjx.common;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
/**
/**
* @author:songx
* @author:songx
* @date:2022/9/23,14:51
* @date:2022/9/23,14:51
*/
*/
public
enum
DocRouteEnum
{
public
enum
DocRouteEnum
{
H
T
(
"route_001"
,
"HPSC002"
,
"importData"
,
HPSC002
.
class
);
H
PSC002
(
"route_001"
,
"HPSC002"
,
"importData"
,
HPSC002
.
class
),
HPSC006
(
"route_002"
,
"HPSC006"
,
"importData"
,
HPSC006
.
class
);
private
String
id
;
private
String
id
;
private
String
serviceNme
;
private
String
serviceNme
;
private
String
methodName
;
private
String
methodName
;
...
...
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC006.java
View file @
7327ca42
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
;
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
;
import
com.baosight.hpjx.common.ExcelAnno
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
...
@@ -117,13 +118,20 @@ public class HPSC006 extends DaoEPBase {
...
@@ -117,13 +118,20 @@ public class HPSC006 extends DaoEPBase {
private
String
productionOrderNo
=
" "
;
/* 生产订单号*/
private
String
productionOrderNo
=
" "
;
/* 生产订单号*/
private
Integer
inventType
;
/* 材料类型*/
private
Integer
inventType
;
/* 材料类型*/
private
String
inventCode
=
" "
;
/* 材料编码*/
private
String
inventCode
=
" "
;
/* 材料编码*/
@ExcelAnno
(
index
=
0
)
private
String
inventName
=
" "
;
/* 材料名称*/
private
String
inventName
=
" "
;
/* 材料名称*/
@ExcelAnno
(
index
=
1
)
private
BigDecimal
inventLength
=
new
BigDecimal
(
"0"
);
/* 材料-长*/
private
BigDecimal
inventLength
=
new
BigDecimal
(
"0"
);
/* 材料-长*/
@ExcelAnno
(
index
=
2
)
private
BigDecimal
inventWidth
=
new
BigDecimal
(
"0"
);
/* 材料-宽*/
private
BigDecimal
inventWidth
=
new
BigDecimal
(
"0"
);
/* 材料-宽*/
@ExcelAnno
(
index
=
3
)
private
BigDecimal
inventThick
=
new
BigDecimal
(
"0"
);
/* 材料-厚*/
private
BigDecimal
inventThick
=
new
BigDecimal
(
"0"
);
/* 材料-厚*/
private
String
inventSpec
=
" "
;
/* 材料规格*/
private
String
inventSpec
=
" "
;
/* 材料规格*/
@ExcelAnno
(
index
=
8
)
private
String
planCompletionDate
=
" "
;
/* 计划完成日期*/
private
String
planCompletionDate
=
" "
;
/* 计划完成日期*/
@ExcelAnno
(
index
=
6
)
private
BigDecimal
num
=
new
BigDecimal
(
0.000
);
/* 计划数量*/
private
BigDecimal
num
=
new
BigDecimal
(
0.000
);
/* 计划数量*/
@ExcelAnno
(
index
=
7
)
private
BigDecimal
unitWt
=
new
BigDecimal
(
"0"
);
/* 计划单重*/
private
BigDecimal
unitWt
=
new
BigDecimal
(
"0"
);
/* 计划单重*/
private
BigDecimal
totalWt
=
new
BigDecimal
(
0.000
);
/* 计划重量*/
private
BigDecimal
totalWt
=
new
BigDecimal
(
0.000
);
/* 计划重量*/
private
String
actualCompletionDate
=
" "
;
/* 实际完工日期*/
private
String
actualCompletionDate
=
" "
;
/* 实际完工日期*/
...
@@ -139,9 +147,11 @@ public class HPSC006 extends DaoEPBase {
...
@@ -139,9 +147,11 @@ public class HPSC006 extends DaoEPBase {
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
@ExcelAnno
(
index
=
5
)
private
String
remark
=
" "
;
/* 备注*/
private
String
remark
=
" "
;
/* 备注*/
private
String
filePath1
=
" "
;
/* 文件地址1*/
private
String
filePath1
=
" "
;
/* 文件地址1*/
private
Integer
inventRecordId
=
new
Integer
(
0
);
/* 存货档案ID*/
private
Integer
inventRecordId
=
new
Integer
(
0
);
/* 存货档案ID*/
@ExcelAnno
(
index
=
4
)
private
String
material
=
" "
;
/* 材质*/
private
String
material
=
" "
;
/* 材质*/
private
String
prdtName
=
" "
;
/* 产品名称*/
private
String
prdtName
=
" "
;
/* 产品名称*/
private
String
partName
=
" "
;
/* 零件名称*/
private
String
partName
=
" "
;
/* 零件名称*/
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
7327ca42
...
@@ -381,6 +381,41 @@ public class ServiceHPSC006 extends ServiceBase {
...
@@ -381,6 +381,41 @@ public class ServiceHPSC006 extends ServiceBase {
return
outInfo
;
return
outInfo
;
}
}
@OperationLogAnnotation
(
operModul
=
"物料清单"
,
operType
=
"导入"
,
operDesc
=
"导入"
)
public
EiInfo
importData
(
EiInfo
inInfo
)
{
try
{
List
<
HPSC006
>
dataList
=
(
List
)
inInfo
.
get
(
"dataList"
);
HashMap
params
=
(
HashMap
)
inInfo
.
get
(
"params"
);
String
productionOrderNo
=
(
String
)
params
.
get
(
"productionOrderNo"
);
String
projCode
=
(
String
)
params
.
get
(
"projCode"
);
String
projName
=
(
String
)
params
.
get
(
"projName"
);
// 写入数据
for
(
HPSC006
hpsc006:
dataList
)
{
hpsc006
.
setInventType
(
7
);
BigDecimal
num
=
hpsc006
.
getNum
();
BigDecimal
unitWt
=
hpsc006
.
getUnitWt
();
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
num
.
multiply
(
unitWt
).
floatValue
()));
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
.
setPlanCompletionDate
(
StringUtil
.
removeHorizontalLine
(
hpsc006
.
getPlanCompletionDate
()));
add
(
hpsc006
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
dataList
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
/**
/**
* 删除附件文件
* 删除附件文件
* @param id 文件ID
* @param id 文件ID
...
...
src/main/webapp/HP/SC/HPSC002.js
View file @
7327ca42
...
@@ -390,10 +390,10 @@ $(function () {
...
@@ -390,10 +390,10 @@ $(function () {
var
projName
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projName
;
var
projName
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
projName
;
var
lv
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
lv
;
var
lv
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
lv
;
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HPSC097?methodName=initLoad&inqu_status-0-parentId="
+
parentId
+
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-projName="
+
projName
+
"&inqu_status-0-parentPrdtName="
+
parentPrdtName
,
href
:
"HPSC097?methodName=initLoad&inqu_status-0-
id=route_001&inqu_status-0-
parentId="
+
parentId
+
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-projName="
+
projName
+
"&inqu_status-0-parentPrdtName="
+
parentPrdtName
,
title
:
"<div style='text-align: center;'>导入</div>"
,
title
:
"<div style='text-align: center;'>导入</div>"
,
width
:
"
7
0%"
,
width
:
"
6
0%"
,
height
:
"
7
0%"
,
height
:
"
5
0%"
,
callbackName
:
function
()
{
callbackName
:
function
()
{
// 刷新列表
// 刷新列表
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
...
...
src/main/webapp/HP/SC/HPSC006.js
View file @
7327ca42
...
@@ -268,10 +268,34 @@ $(function () {
...
@@ -268,10 +268,34 @@ $(function () {
});
});
e
.
preventDefault
();
e
.
preventDefault
();
}
else
{
}
else
{
openFileWindow
.
open
();
//openFileWindow.open();
var
productionOrderNo
=
rows
[
0
].
get
(
'prodOrderNo'
);
var
projCode
=
rows
[
0
].
get
(
'projCode'
);
var
projName
=
rows
[
0
].
get
(
'projName'
);
JSColorbox
.
open
({
href
:
"HPSC097?methodName=initLoad&inqu_status-0-id=route_002&inqu_status-0-productionOrderNo="
+
productionOrderNo
+
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-projName="
+
projName
,
title
:
"<div style='text-align: center;'>导入</div>"
,
width
:
"70%"
,
height
:
"70%"
,
callbackName
:
function
()
{
// 刷新列表
//resultGrid.dataSource.page(1);
var
info
=
new
EiInfo
();
info
.
set
(
"productionOrderNo"
,
productionOrderNo
);
EiCommunicator
.
send
(
"HPSC006"
,
"queryDetail"
,
info
,{
onSuccess
:
function
(
ei
){
//返回结果集
detailGrid
.
setEiInfo
(
ei
);
// 关闭弹窗
JSColorbox
.
close
();
},
onFail
:
function
(
ei
){}
},{
async
:
false
});
}
});
}
}
});
});
IPLATUI
.
EFUpload
=
{
/* IPLATUI.EFUpload = {
fileUpload: {
fileUpload: {
showFileList: false,
showFileList: false,
upload: function (e) {
upload: function (e) {
...
@@ -322,7 +346,7 @@ $(function () {
...
@@ -322,7 +346,7 @@ $(function () {
IPLAT.NotificationUtil('导入失败!', "error");// 失败提示信息
IPLAT.NotificationUtil('导入失败!', "error");// 失败提示信息
}
}
}
}
}
}
*/
$
(
"#DOWNLOAD"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#DOWNLOAD"
).
on
(
"click"
,
function
(
e
)
{
var
href
=
ctx
+
"
\\
HP
\\
template
\\
SC
\\
HPSC006_生产下料.xls"
;
var
href
=
ctx
+
"
\\
HP
\\
template
\\
SC
\\
HPSC006_生产下料.xls"
;
...
...
src/main/webapp/HP/SC/HPSC097.js
View file @
7327ca42
$
(
function
()
{
$
(
function
()
{
/* IPLATUI.EFUpload = {
uploadFile: {
success: function(e) {
let docId = e.response.docId;
if (isBlank(docId)) {
return;
}
$("#fileDocId").val(docId);
NotificationUtil("附件上传成功");
console.log($("#fileDocId").val())
saveTemp(e);
try {
parent.JSColorbox.setValueCallback(docId);
} catch (e){
}
},
}
};*/
// 提交
// 提交
$
(
"#upload"
).
on
(
"click"
,
upload
);
$
(
"#upload"
).
on
(
"click"
,
upload
);
function
saveTemp
(
e
)
{
let
docId
=
e
.
response
.
docId
;
let
docName
=
e
.
response
.
docName
;
let
docSize
=
e
.
response
.
docSize
;
let
docTag
=
e
.
response
.
docTag
;
let
docUrl
=
e
.
response
.
docUrl
;
let
result
=
new
EiInfo
();
result
.
set
(
"result-0-docId"
,
docId
);
result
.
set
(
"result-0-docName"
,
docName
);
result
.
set
(
"result-0-docSize"
,
docSize
);
result
.
set
(
"result-0-docTag"
,
docTag
);
result
.
set
(
"result-0-realPath"
,
docUrl
);
result
.
set
(
"result-0-bizType"
,
$
(
"#inqu_status-0-bizType"
).
val
());
result
.
set
(
"result-0-matId"
,
$
(
"#inqu_status-0-matId"
).
val
());
EiCommunicator
.
send
(
"HPDS002"
,
"insert"
,
result
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
}
});
});
/**
/**
* 上传文件
* 上传文件
...
@@ -65,25 +11,30 @@ let upload = function () {
...
@@ -65,25 +11,30 @@ let upload = function () {
message
(
"请选择文件"
);
message
(
"请选择文件"
);
return
;
return
;
}
}
/* let orderTypeCode = $("#inqu_status-0-orderTypeCode").val();
let
id
=
$
(
"#inqu_status-0-id"
).
val
();
if(isBlank(orderTypeCode)){
message("请选择类别");
return;
}*/
let
parentId
=
$
(
"#inqu_status-0-parentId"
).
val
();
let
parentId
=
$
(
"#inqu_status-0-parentId"
).
val
();
let
projCode
=
$
(
"#inqu_status-0-projCode"
).
val
();
let
projCode
=
$
(
"#inqu_status-0-projCode"
).
val
();
let
projName
=
$
(
"#inqu_status-0-projName"
).
val
();
let
projName
=
$
(
"#inqu_status-0-projName"
).
val
();
let
parentPrdtName
=
$
(
"#inqu_status-0-parentPrdtName"
).
val
();
let
parentPrdtName
=
$
(
"#inqu_status-0-parentPrdtName"
).
val
();
let
productionOrderNo
=
$
(
"#inqu_status-0-productionOrderNo"
).
val
();
let
_IPLAT
=
IPLAT
;
let
_IPLAT
=
IPLAT
;
_IPLAT
.
progress
(
$
(
"body"
),
true
);
_IPLAT
.
progress
(
$
(
"body"
),
true
);
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
formData
.
append
(
"id"
,
"route_001"
);
if
(
id
===
'route_001'
){
formData
.
append
(
"startRow"
,
"1"
);
// 第几行开始读取
formData
.
append
(
"id"
,
id
);
formData
.
append
(
"parentId"
,
parentId
);
formData
.
append
(
"startRow"
,
"1"
);
// 第几行开始读取
formData
.
append
(
"projCode"
,
projCode
);
formData
.
append
(
"parentId"
,
parentId
);
formData
.
append
(
"projName"
,
projName
);
formData
.
append
(
"projCode"
,
projCode
);
formData
.
append
(
"parentPrdtName"
,
parentPrdtName
);
formData
.
append
(
"projName"
,
projName
);
/* formData.append("orderTypeCode", orderTypeCode);*/
formData
.
append
(
"parentPrdtName"
,
parentPrdtName
);
}
if
(
id
===
'route_002'
){
formData
.
append
(
"id"
,
id
);
formData
.
append
(
"startRow"
,
"1"
);
// 第几行开始读取
formData
.
append
(
"productionOrderNo"
,
productionOrderNo
);
formData
.
append
(
"projCode"
,
projCode
);
formData
.
append
(
"projName"
,
projName
);
}
formData
.
append
(
"file"
,
$
(
"#inqu_status-0-file"
)[
0
].
files
[
0
]);
formData
.
append
(
"file"
,
$
(
"#inqu_status-0-file"
)[
0
].
files
[
0
]);
$
.
ajax
({
$
.
ajax
({
url
:
IPLATUI
.
CONTEXT_PATH
+
'/doc/import/api'
,
url
:
IPLATUI
.
CONTEXT_PATH
+
'/doc/import/api'
,
...
...
src/main/webapp/HP/SC/HPSC097.jsp
View file @
7327ca42
...
@@ -5,12 +5,16 @@
...
@@ -5,12 +5,16 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"附件上传"
>
<EF:EFPage
title=
"导入"
>
<EF:EFRegion
id=
"upload"
title=
"文件导入区"
>
<EF:EFInput
ename=
"inqu_status-0-id"
cname=
"服务Id"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-parentId"
cname=
"父Id"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-parentId"
cname=
"父Id"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-projCode"
cname=
"项目代码"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-projCode"
cname=
"项目代码"
type=
"hidden"
/>
<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
cname=
"上传文件"
blockId=
"inqu_status"
ename=
"file"
row=
"0"
type=
"file"
colWidth=
"4"
/>
<EF:EFInput
ename=
"inqu_status-0-productionOrderNo"
cname=
"生产订单号"
type=
"hidden"
/>
<EF:EFInput
cname=
"上传文件"
blockId=
"inqu_status"
ename=
"file"
row=
"0"
type=
"file"
/>
<button
id=
"upload"
type=
"submit"
>
提交
</button>
<button
id=
"upload"
type=
"submit"
>
提交
</button>
</EF:EFRegion>
</EF:EFPage>
</EF:EFPage>
<script
src=
"${ctx}/HP/SC/HPSC097.js"
></script>
<script
src=
"${ctx}/HP/SC/HPSC097.js"
></script>
src/main/webapp/HP/template/SC/HPSC006_生产下料.xls
View file @
7327ca42
No preview for this file type
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