Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
73e51cc1
Commit
73e51cc1
authored
Jul 29, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出功能修改
parent
9a75de24
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
102 additions
and
43 deletions
+102
-43
ServiceHGSC009.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
+16
-0
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+0
-5
HGSC009A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC009A.xml
+1
-31
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+7
-0
ExcelUtils.java
src/main/java/com/baosight/hggp/util/ExcelUtils.java
+6
-0
HGSC009.js
src/main/webapp/HG/SC/HGSC009.js
+55
-5
HGSC009.jsp
src/main/webapp/HG/SC/HGSC009.jsp
+9
-2
HGSC009A.js
src/main/webapp/HG/SC/HGSC009A.js
+8
-0
HGSC009A_材料计划.xls
src/main/webapp/common/template/SC/HGSC009A_材料计划.xls
+0
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
View file @
73e51cc1
...
...
@@ -180,5 +180,21 @@ public class ServiceHGSC009 extends ServiceEPBase {
});
}
@OperationLogAnnotation
(
operModul
=
"材料计划"
,
operType
=
"导入"
,
operDesc
=
"导入操作"
)
public
EiInfo
importDate
(
EiInfo
inInfo
)
{
try
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
10
);
String
fileName
=
inInfo
.
getString
(
"fileName"
);
params
.
put
(
HGSC009A
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
//解析文件,将文件中数据传入到inInfo中
ExcelUtils
.
importFromExcel
(
inInfo
,
fileName
,
params
,
new
HGSC009A
());
}
catch
(
Exception
e
){
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"导入失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
73e51cc1
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.AssignStatusEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeDetailEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.tools.HGCBTools
;
import
com.baosight.hggp.hg.cg.domain.HGCG001
;
import
com.baosight.hggp.hg.cg.domain.HGCG001A
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.kc.domain.HGKC004
;
import
com.baosight.hggp.hg.pz.domain.HGPZ004
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC009A.xml
View file @
73e51cc1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-29 16:14:52
Version : 1.0
schema : hggp
tableName : HGSC008A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PLAN_MATERIAL_CODE VARCHAR,
PLAN_MATERIAL_NAME VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC VARCHAR,
MATERIAL VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
QUANTITY DECIMAL,
SINGLE_WEIGHT DECIMAL,
GROSS_AMOUNT DECIMAL,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGSC009A"
>
<sql
id=
"condition"
>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
73e51cc1
...
...
@@ -1259,6 +1259,13 @@ public class HGSCTools {
AssertUtils
.
isEmpty
(
results
,
"材料明细不能为空!"
);
return
results
;
}
public
static
void
add
(
List
<
Map
>
arrayList
)
{
for
(
Map
map:
arrayList
)
{
HGSC009A
hgsc009A
=
new
HGSC009A
();
hgsc009A
.
fromMap
(
map
);
}
}
}
}
src/main/java/com/baosight/hggp/util/ExcelUtils.java
View file @
73e51cc1
...
...
@@ -4,6 +4,7 @@ import com.baosight.hggp.common.DdynamicEnum;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.sj.domain.HGSJ003
;
import
com.baosight.hggp.hg.sj.tools.HGSJTools
;
import
com.baosight.hggp.util.importer.Importer
;
...
...
@@ -246,6 +247,11 @@ public class ExcelUtils {
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"导入成功"
+
arrayList
.
size
()
+
"条"
);
break
;
case
"HGSC009"
:
HGSCTools
.
THGSC009
.
add
(
arrayList
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"导入成功"
+
arrayList
.
size
()
+
"条"
);
break
;
default
:
}
...
...
src/main/webapp/HG/SC/HGSC009.js
View file @
73e51cc1
...
...
@@ -36,7 +36,7 @@ $(function () {
}
},
{
field
:
"companyCode"
,
title
:
"公司
名称
"
,
title
:
"公司
编码
"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'companyCode'
]
===
dataItem
[
'companyCode'
])
{
...
...
@@ -97,6 +97,12 @@ $(function () {
],
beforeEdit
:
function
(
e
)
{
let
item
=
e
.
model
;
if
(
item
.
status
!=
'0'
){
e
.
preventDefault
();
}
},
loadComplete
:
function
(
grid
)
{
$
(
"#INSERTCG"
).
on
(
"click"
,
INSERTCG
);
...
...
@@ -168,6 +174,50 @@ $(function () {
};
grush
.
openImportBox
();
IPLATUI
.
EFUpload
=
{
fileUpload
:
{
showFileList
:
false
,
upload
:
function
(
e
)
{
openFileWindow
.
close
();
IPLAT
.
progress
(
$
(
"body"
),
true
);
},
success
:
function
(
e
)
{
var
src
=
e
.
response
.
docUrl
;
var
eiInfo
=
new
EiInfo
();
let
notIsExcelFile
=
isExcelFile
(
src
);
eiInfo
.
set
(
"fileName"
,
src
);
EiCommunicator
.
send
(
"HGSC009"
,
"importDate"
,
eiInfo
,
{
onSuccess
(
ei
)
{
if
(
notIsExcelFile
)
{
NotificationUtil
(
"请导入xls或xlsx文件"
,
"error"
);
return
;
}
if
(
ei
.
status
==
"-1"
)
{
NotificationUtil
(
{
msg
:
ei
.
msg
,
detailMsg
:
ei
.
detailMsg
},
"error"
);
}
else
{
NotificationUtil
(
ei
.
msg
);
query
();
}
},
onFail
(
ei
)
{
NotificationUtil
(
"调用失败,原因["
+
ei
+
"]"
,
"error"
);
}
},
{
async
:
false
});
IPLAT
.
progress
(
$
(
"body"
),
false
);
},
fail
(
e
)
{
IPLAT
.
NotificationUtil
(
'导入失败!'
,
"error"
);
}
}
}
grush
.
downloadFile
(
`
${
ctx
}
\\common\\template\\SC\\HGSC009A_材料计划.xls`
);
});
let
query
=
function
()
{
...
...
@@ -182,12 +232,12 @@ function showUploadFile(companyCode,companyName,projCode,projName,planMaterialCo
JSColorbox
.
open
({
href
:
"HGSC009A?methodName=initLoad&"
+
"inqu_status-0-companyCode="
+
companyCode
+
"&inqu_status-0-
companyName="
+
companyName
+
"&inqu_status-0-
status="
+
status
+
"&inqu_status-0-planMaterialCode="
+
planMaterialCode
+
"&inqu_status-0-planMaterialName="
+
planMaterialName
+
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-projName="
+
projName
+
"&inqu_status-0-status="
+
status
,
"&inqu_status-0-companyName="
+
companyName
+
"&inqu_status-0-planMaterialName="
+
planMaterialName
+
"&inqu_status-0-projName="
+
projName
,
title
:
"<div style='text-align: center;'>材料计划清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HG/SC/HGSC009.jsp
View file @
73e51cc1
...
...
@@ -11,7 +11,9 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="材料计划">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
...
...
@@ -56,5 +58,10 @@
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGSC009" path="sc"/>
</EF:EFRegion>
</EF:EFWindow>
</EF:EFPage>
src/main/webapp/HG/SC/HGSC009A.js
View file @
73e51cc1
...
...
@@ -51,6 +51,13 @@ $(function () {
});
}
}],
beforeEdit
:
function
(
e
)
{
var
status
=
$
(
"#inqu_status-0-status"
).
val
();
//如果提交了,则不能修改
if
(
status
&&
status
===
"1"
){
e
.
preventDefault
();
}
},
loadComplete
:
function
(
grid
)
{
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
...
...
@@ -110,6 +117,7 @@ $(window).load(function () {
$
(
".k-grid-cancel-changes"
).
hide
();
$
(
".k-grid-delete"
).
hide
();
}
});
/**
...
...
src/main/webapp/common/template/SC/HGSC009A_材料计划.xls
0 → 100644
View file @
73e51cc1
File added
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