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
36fb83f6
Commit
36fb83f6
authored
Jul 25, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-25
1、蓝图清单详情里的附件上传改在列表的操作增加附加上传 2、蓝图清单删除并删除附件
parent
cf7e08e9
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
7 deletions
+51
-7
ServiceHGSC003.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC003.java
+10
-0
HGSC099.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC099.xml
+3
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+14
-0
HGSC003.js
src/main/webapp/HG/SC/HGSC003.js
+19
-2
HGSC003.jsp
src/main/webapp/HG/SC/HGSC003.jsp
+1
-1
HGSC003A.js
src/main/webapp/HG/SC/HGSC003A.js
+2
-2
HGSC003A.jsp
src/main/webapp/HG/SC/HGSC003A.jsp
+1
-1
HGSC003B.js
src/main/webapp/HG/SC/HGSC003B.js
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC003.java
View file @
36fb83f6
...
@@ -6,6 +6,8 @@ import com.baosight.hggp.core.security.UserSessionUtils;
...
@@ -6,6 +6,8 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
...
@@ -57,6 +59,14 @@ public class ServiceHGSC003 extends ServiceBase {
...
@@ -57,6 +59,14 @@ public class ServiceHGSC003 extends ServiceBase {
// 蓝图ids
// 蓝图ids
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC003
.
FIELD_id
);
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC003
.
FIELD_id
);
DaoUtils
.
update
(
HGSC003
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
DaoUtils
.
update
(
HGSC003
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
// 删除附件明细
List
<
HGSC099
>
hgsc099List
=
HGSCTools
.
THGSC099
.
listByMatIds
(
ids
,
Arrays
.
asList
(
"DWT"
,
"SYT"
));
for
(
HGSC099
hgsc099:
hgsc099List
)
{
DaoUtils
.
update
(
HGSC099
.
DELETE
,
hgsc099
);
if
(!
hgsc099
.
getDocId
().
isEmpty
())
{
HGSCTools
.
THGSC099
.
delectDoc
(
hgsc099
.
getDocId
());
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC099.xml
View file @
36fb83f6
...
@@ -72,6 +72,9 @@
...
@@ -72,6 +72,9 @@
<isNotEmpty
prepend=
" AND "
property=
"matId"
>
<isNotEmpty
prepend=
" AND "
property=
"matId"
>
A.MAT_ID = #matId#
A.MAT_ID = #matId#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"matIds"
>
A.MAT_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"matIds"
>
#matIds[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"bizTypes"
>
<isNotEmpty
prepend=
" AND "
property=
"bizTypes"
>
A.BIZ_TYPE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"bizTypes"
>
#bizTypes[]#
</iterate>
A.BIZ_TYPE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"bizTypes"
>
#bizTypes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
36fb83f6
...
@@ -1130,6 +1130,20 @@ public class HGSCTools {
...
@@ -1130,6 +1130,20 @@ public class HGSCTools {
}
}
}
}
public
static
List
<
HGSC099
>
listByMatIds
(
List
<
Long
>
matIds
,
List
<
String
>
bizTypes
)
{
AssertUtils
.
isEmpty
(
matIds
,
"物料ID不能为空!"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"matIds"
,
matIds
);
queryMap
.
put
(
"bizTypes"
,
bizTypes
);
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
return
DaoBase
.
getInstance
().
query
(
"HGSC099.queryRun"
,
queryMap
);
}
else
{
return
DaoBase
.
getInstance
().
query
(
"HGSC099.queryDev"
,
queryMap
);
}
}
public
static
void
deleteByMatId
(
Long
matId
,
String
bizType
){
public
static
void
deleteByMatId
(
Long
matId
,
String
bizType
){
List
<
HGSC099
>
hgsc099List
=
listByMatId
(
matId
,
bizType
);
List
<
HGSC099
>
hgsc099List
=
listByMatId
(
matId
,
bizType
);
for
(
int
i
=
0
;
i
<
hgsc099List
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
hgsc099List
.
size
();
i
++)
{
...
...
src/main/webapp/HG/SC/HGSC003.js
View file @
36fb83f6
...
@@ -38,6 +38,8 @@ $(function (){
...
@@ -38,6 +38,8 @@ $(function (){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateBlueprintStatus('
+
item
.
id
+
',0)" >停用</a>'
;
'onclick="updateBlueprintStatus('
+
item
.
id
+
',0)" >停用</a>'
;
}
}
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件详情</a>'
;
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
// 'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
// 'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
}
}
...
@@ -240,14 +242,14 @@ function showDetail(id,blueprintCode,blueprintName,companyName) {
...
@@ -240,14 +242,14 @@ function showDetail(id,blueprintCode,blueprintName,companyName) {
*
*
* @param id
* @param id
*/
*/
function
showUploadFile
(
id
)
{
/*
function showUploadFile(id) {
JSColorbox.open({
JSColorbox.open({
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=LTQD&inqu_status-0-matId=" + id,
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=LTQD&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
title: "<div style='text-align: center;'>附件详情</div>",
width: "85%",
width: "85%",
height: "80%",
height: "80%",
});
});
}
}
*/
function
loadChange
(
grid
,
e
,
field
)
{
function
loadChange
(
grid
,
e
,
field
)
{
var
cell_label
=
field
,
that
=
grid
;
var
cell_label
=
field
,
that
=
grid
;
...
@@ -270,3 +272,17 @@ function loadChange(grid,e,field) {
...
@@ -270,3 +272,17 @@ function loadChange(grid,e,field) {
// 触发 td.click 事件,
// 触发 td.click 事件,
td
.
trigger
(
"click"
);
td
.
trigger
(
"click"
);
}
}
/**
* 显示附件清单
*
* @param id
*/
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HGSC003B?methodName=initLoad&inqu_status-0-matId="
+
id
,
title
:
"<div style='text-align: center;'>附件详情</div>"
,
width
:
"80%"
,
height
:
"80%"
,
});
}
\ No newline at end of file
src/main/webapp/HG/SC/HGSC003.jsp
View file @
36fb83f6
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"1
2
0"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"1
7
0"
align=
"center"
/>
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
textField=
"textField"
valueField=
"valueField"
...
...
src/main/webapp/HG/SC/HGSC003A.js
View file @
36fb83f6
...
@@ -18,7 +18,7 @@ $(function (){
...
@@ -18,7 +18,7 @@ $(function (){
pageSizes
:
[
10
,
20
,
50
,
100
],
pageSizes
:
[
10
,
20
,
50
,
100
],
},
},
columns
:
[
columns
:
[
{
/*
{
field: "operator",
field: "operator",
title: "操作",
title: "操作",
template: function (item) {
template: function (item) {
...
@@ -29,7 +29,7 @@ $(function (){
...
@@ -29,7 +29,7 @@ $(function (){
}
}
return template;
return template;
}
}
},
},
*/
{
{
field
:
"companyName"
,
field
:
"companyName"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
...
...
src/main/webapp/HG/SC/HGSC003A.jsp
View file @
36fb83f6
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<
EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"120"
align=
"center"
/
>
<
%
--
<
EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"120"
align=
"center"
/>
--%
>
<EF:EFColumn
ename=
"blueprintId"
cname=
"蓝图id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"blueprintId"
cname=
"蓝图id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"blueprintCode"
cname=
"蓝图编码"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"blueprintCode"
cname=
"蓝图编码"
enable=
"false"
width=
"120"
align=
"center"
/>
...
...
src/main/webapp/HG/SC/HGSC003B.js
View file @
36fb83f6
...
@@ -54,7 +54,7 @@ function uploadFile(id) {
...
@@ -54,7 +54,7 @@ function uploadFile(id) {
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGSC003C?methodName=initLoad&inqu_status-0-matId="
+
$
(
"#inqu_status-0-matId"
).
val
(),
href
:
"HGSC003C?methodName=initLoad&inqu_status-0-matId="
+
$
(
"#inqu_status-0-matId"
).
val
(),
title
:
"<div style='text-align: center;'>附件上传</div>"
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
width
:
"
9
0%"
,
width
:
"
8
0%"
,
height
:
"80%"
,
height
:
"80%"
,
callbackName
:
uploadFileCallback
callbackName
:
uploadFileCallback
});
});
...
...
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