Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
Project
Project
Details
Activity
Releases
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
gavelinfo
kwell-mes
Commits
15d40a16
Commit
15d40a16
authored
Mar 09, 2022
by
zhoumaotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装配反馈pc端
parent
55f703fb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
367 additions
and
9 deletions
+367
-9
GphyController.java
.../main/java/com/gavel/kwell/controller/GphyController.java
+82
-0
GpfkDaoImpl.java
...l/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
+7
-6
config.properties
gavel/src/main/resources/config.properties
+3
-2
module.xml
gavel/src/main/resources/module.xml
+1
-1
gx.html
gavel/src/main/resources/templates/views/kmes/gphy/gx.html
+57
-0
zpindex.html
...src/main/resources/templates/views/kmes/gphy/zpindex.html
+217
-0
No files found.
gavel/src/main/java/com/gavel/kwell/controller/GphyController.java
View file @
15d40a16
package
com
.
gavel
.
kwell
.
controller
;
import
com.gavel.common.BaseURL
;
import
com.gavel.common.base.BaseEditJSON
;
import
com.gavel.common.converter.DataConvert
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.kwell.service.GpfkService
;
import
com.gavel.kwell.vo.GpfkCondition
;
import
com.gavel.kwell.vo.GpfkVO
;
import
com.gavel.persistence.sql.RecordSet
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -15,6 +24,9 @@ import com.gavel.common.utils.ThreadContext;
import
com.gavel.kwell.service.GphyService
;
import
com.gavel.kwell.vo.GphyCondition
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
@Controller
@RequestMapping
(
"kmes/gphy"
)
...
...
@@ -24,6 +36,14 @@ public class GphyController extends BaseController {
@Autowired
private
GphyService
gphyService
;
@Autowired
private
GpfkService
gpfkService
;
@ResourcePermissions
()
@RequestMapping
(
"/zpindex"
)
public
String
zpindex
()
{
return
"kmes/gphy/zpindex"
;
}
@ResourcePermissions
()
@RequestMapping
(
"/index"
)
...
...
@@ -43,6 +63,11 @@ public class GphyController extends BaseController {
return
"kmes/gphy/edit"
;
}
@RequestMapping
(
"/gx"
)
public
String
gx
()
{
return
"kmes/gphy/gx"
;
}
@RequestMapping
(
value
=
"/zpwl"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
...
...
@@ -55,4 +80,61 @@ public class GphyController extends BaseController {
return
ThreadContext
.
getReturnData
();
}
@RequestMapping
(
value
=
BaseURL
.
QUERY
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
query
(
@RequestBody
GpfkCondition
condition
)
{
RecordSet
<
GpfkVO
>
records
=
gpfkService
.
query
(
condition
);
return
buildReturnData
(
records
,
GpfkVO
.
class
);
}
@ResourcePermissions
(
SystemOperation
.
BottonResource
.
ADD
)
@RequestMapping
(
value
=
BaseURL
.
ADD
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
insert
(
@RequestBody
JSONObject
param
)
{
BaseEditJSON
editJson
=
BaseEditJSON
.
parseJSON
(
param
);
gphyService
.
insert
(
editJson
);
return
ThreadContext
.
getReturnData
();
}
@ResourcePermissions
(
SystemOperation
.
BottonResource
.
EDIT
)
@RequestMapping
(
value
=
BaseURL
.
UPDATE
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
update
(
@RequestBody
JSONObject
param
)
{
BaseEditJSON
editJson
=
BaseEditJSON
.
parseJSON
(
param
);
gphyService
.
update
(
editJson
);
return
ThreadContext
.
getReturnData
();
}
@ResourcePermissions
(
SystemOperation
.
BottonResource
.
DELETE
)
@RequestMapping
(
value
=
BaseURL
.
DELETE
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
delete
(
@RequestBody
JSONObject
param
)
{
BaseEditJSON
editJson
=
BaseEditJSON
.
parseJSON
(
param
);
gphyService
.
delete
(
editJson
);
return
ThreadContext
.
getReturnData
();
}
@ResourcePermissions
(
SystemOperation
.
BottonResource
.
EXPORT
)
@RequestMapping
(
value
=
BaseURL
.
EXPORT
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
void
export
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestBody
JSONObject
param
)
throws
Exception
{
GpfkCondition
condition
=
DataConvert
.
getCondition
(
param
.
getJSONObject
(
"condition"
),
GpfkCondition
.
class
);
RecordSet
<
GpfkVO
>
records
=
gpfkService
.
query
(
condition
);
doExport
(
request
,
response
,
param
,
records
.
getRecords
());
}
@ResourcePermissions
({
"21"
})
@RequestMapping
(
value
=
"/delGpzp"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
delGpzp
(
@RequestBody
JSONObject
param
)
{
String
gpfkid
=
param
.
getString
(
"gpfkid"
);
if
(
StringUtils
.
isEmpty
(
gpfkid
)){
setReturnMessage
(
"请选择一条工票信息进行操作!"
);
return
returnData
();
}
gpfkService
.
delGpzpById
(
gpfkid
);
return
ThreadContext
.
getReturnData
();
}
}
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
View file @
15d40a16
...
...
@@ -41,14 +41,15 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap
.
setTranslate
(
false
);
sqlMap
.
setPageNo
(
condition
.
getPageNo
());
sqlMap
.
setRowCount
(
condition
.
getPageSize
());
sqlMap
.
append
(
"select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKSJ, GPFK_HGBZ, GPFK_FKSL, "
);
sqlMap
.
append
(
" GPFK_HGSL, GPFK_BHGSL, GPFK_FKR, GPFK_FKGX, GPFK_BZ, "
);
sqlMap
.
append
(
" GPFK_WHRID, GPFK_WHR, GPFK_WHSJ, GPFK_CJRID, GPFK_CJR, "
);
sqlMap
.
append
(
" GPFK_CJSJ, GPFK_SYSVERSION, GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ, "
);
sqlMap
.
append
(
"select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKSJ, GPFK_HGBZ, "
);
sqlMap
.
append
(
" GPFK_FKSL,GPFK_HGSL, GPFK_BHGSL, GPFK_FKR, GPFK_FKGX, GPFK_BZ, "
);
sqlMap
.
append
(
" GPFK_WHRID, GPFK_WHR, GPFK_WHSJ, GPFK_CJRID, GPFK_CJR,GPFK_CJSJ, "
);
sqlMap
.
append
(
" GPFK_SYSVERSION, GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ, GPFK_GFSL, "
);
sqlMap
.
append
(
" GPFK_LFSL,GPFK_FXSL, GPFK_FGSL, GPFK_YWRQ, GPFK_HGDJ,WOSN_KHCODE, "
);
sqlMap
.
append
(
" BX_CODE, BX_NAME, BZGX_CODE, BZGX_NAME, "
);
sqlMap
.
append
(
" WLXX_CODE, WLXX_NAME, WLXX_GG,WO_DJID, "
);
sqlMap
.
append
(
"
DATEDIFF(mi,GPFK_FKSJ,GPFK_FKJSSJ) as gxhs,
"
);
sqlMap
.
append
(
" GPFK_GFSL, GPFK_LFSL, GPFK_FXSL, GPFK_FGSL, GPFK_YWRQ, GPFK_HGDJ, WOSN_KHCODE"
);
sqlMap
.
append
(
"
TIMESTAMPDIFF(MINUTE, GPFK_FKSJ, GPFK_FKJSSJ)as GXHS
"
);
sqlMap
.
append
(
"from GPFK "
);
sqlMap
.
append
(
" left join BX on BX_ID = GPFK_FKBX "
);
sqlMap
.
append
(
" left join WOSN on WOSN_CODE = GPFK_WOSNID "
);
...
...
gavel/src/main/resources/config.properties
View file @
15d40a16
timer.enable
=
false
server.isEnableSwagger
=
fals
e
server.isEnableSwagger
=
tru
e
spring.session.store-type
=
none
reg.mode
=
dev
\ No newline at end of file
gavel/src/main/resources/module.xml
View file @
15d40a16
...
...
@@ -6,7 +6,7 @@
<version>
1.0
</version>
<menu
mkid=
"901000000"
mkmc =
"科威尔MES"
>
<menu
mkid=
"901000200"
mkmc=
"装配反馈"
url=
"kmes/gphy/index"
>
<menu
mkid=
"901000200"
mkmc=
"装配反馈"
url=
"kmes/gphy/
zp
index"
>
<print
entity=
"com.gavel.kwell.vo.GpfkVO"
/>
<mkcz
czid =
"21"
czmc =
"取消装配"
value=
"Y"
/>
</menu>
...
...
gavel/src/main/resources/templates/views/kmes/gphy/gx.html
0 → 100644
View file @
15d40a16
<div
class=
"e-dialog-container"
data-options=
"width:480,height:260"
id=
"gphyGx"
>
<div
class=
"gui-fluid editTable"
>
<input
type=
"hidden"
name=
"gxName"
>
<input
type=
"hidden"
name=
"gzzxid"
>
<input
type=
"hidden"
name=
"gzzxname"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
工序:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gxid"
data-toggle=
"gui-combobox"
>
</div>
</div>
</div>
<!--<div class="gui-row">
<div class="gui-col-sm12">
<label class="gui-form-label">班型:</label>
<div class="gui-input-block">
<input type="text" name="bxid" style="width: 100%;" data-options="required:true">
</div>
</div>
</div>-->
</div>
</div>
<script>
$
(
function
()
{
var
$dialog
=
$
(
"#gphyGx"
);
var
$inputGxid
=
$dialog
.
find
(
"input[name='gxid']"
);
var
$inputBx
=
$dialog
.
find
(
"input[name='bxid']"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
$inputGxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
required
:
true
,
allowEdit
:
false
,
url
:
'gygl/bzgx/queryZpBzgx'
,
onSelect
:
function
(
a
)
{
$dialog
.
find
(
"input[name='gxName']"
).
val
(
a
.
name
);
$dialog
.
find
(
"input[name='gzzxid']"
).
val
(
a
.
gzzxid
||
''
);
$dialog
.
find
(
"input[name='gzzxname']"
).
val
(
a
.
gzzxname
||
''
)
},
loadFilter
:
function
(
a
)
{
var
datas
=
a
[
"data"
][
"records"
];
$
.
each
(
datas
,
function
(
i
,
item
)
{
item
[
"name"
]
=
item
[
"gzzxname"
]
+
"-"
+
item
[
"name"
]
});
return
datas
}
});
/*$inputBx.iCombobox({valueField: "id", textField: "name", allowNull:false, allowEdit:false, url: 'hzmes/bx/query',onSelect:function (a) {
}});*/
}
gas
.
load
(
paramInit
,
pageInit
);
})
</script>
\ No newline at end of file
gavel/src/main/resources/templates/views/kmes/gphy/zpindex.html
0 → 100644
View file @
15d40a16
<div
id=
"kmesGphyindex"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'kmesGphyindexTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"kmesGphyindexTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'kmesGphyindexTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<!--<a class="toolbar-add toolbar" href="javascript:void(0)"></a>-->
<a
class=
"toolbar-cancelzp toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
加工日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"start"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"end"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
生产工单:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wodjid"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
产品条码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wosnid"
style=
"width: 100%"
></div>
</div>
<!--<input type="hidden" name="bxid"/>-->
<input
type=
"hidden"
name=
"fkrid"
/>
<input
type=
"hidden"
name=
"gxid"
/>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search1"
style=
"color:white;"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#kmesGphyindex'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$datStart
=
$div
.
find
(
"input[name='start']"
);
var
$datEnd
=
$div
.
find
(
"input[name='end']"
);
var
$txtScgd
=
$div
.
find
(
'input[name="wodjid"]'
);
var
$txtWosnid
=
$div
.
find
(
'input[name="wosnid"]'
);
var
jzcs
=
0
;
var
gxName
=
''
;
var
gzzxid
=
""
;
var
gzzxname
=
""
;
var
fkrName
=
""
;
function
paramsInit
()
{
}
function
pageInit
()
{
$datStart
.
iDatebox
();
$datEnd
.
iDatebox
();
$txtScgd
.
iTextbox
();
$txtWosnid
.
iTextbox
();
var
options
=
{
url
:
'kmes/gphy'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"序列号"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
160
},
//{title: "工序编码", field: "bzgxCode", fieldType: "ftString",width:100},
{
title
:
"标准工序"
,
field
:
"bzgxName"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"反馈工序"
,
field
:
"fkgx"
,
fieldType
:
"ftString"
,
width
:
100
,
hidden
:
true
},
//{title: "规格型号", field: "wlxxGg", fieldType: "ftString",width:200},
{
title
:
"合格"
,
field
:
"hgbz"
,
align
:
"center"
,
fieldType
:
"ftString"
,
width
:
100
,
formatter
:
function
(
value
,
index
,
row
){
var
map
=
{
Y
:
"合格"
,
N
:
"不合格"
};
if
(
value
==
"Y"
){
return
"<span style='color: #216d4c'>"
+
map
[
value
]
+
"</span>"
;
}
else
if
(
value
==
"N"
){
return
"<span style='color: indianred'>"
+
map
[
value
]
+
"</span>"
;
}
else
{
return
''
}
}},
{
title
:
"合格数量"
,
field
:
"hgsl"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"不合格数量"
,
field
:
"bhgsl"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"反馈数量"
,
field
:
"fksl"
,
fieldType
:
"int"
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"生产工单"
,
field
:
"woDjid"
,
fieldType
:
"ftString"
,
width
:
140
}
]],
dialog
:
{
footerIn
:
true
,
href
:
'kmes/gphy/edit'
,
maximized
:
true
,
width
:
1080
,
height
:
640
,
modal
:
true
,
draggable
:
false
,
onSaveCallback
:
function
()
{
},
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
queryParams
=
$
.
extend
({},
DataBind
.
collectData
(
$div
),{
gxName
:
gxName
,
gzzxid
:
gzzxid
,
gzzxname
:
gzzxname
,
fkrName
:
fkrName
})
},
messager
:
function
()
{
var
flag
=
true
;
if
(
$div
.
find
(
"input[name='gxid']"
).
val
()
==
""
){
gas
.
confirm
(
"您尚未选择工序,无法进行反馈操作。是否重新选择工序?"
,
function
()
{
run
();
flag
=
false
;
},
function
()
{
flag
=
true
});
}
else
{
flag
=
false
}
return
flag
},
onDestroy
:
function
()
{
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
}
};
$div
.
Holder
(
options
);
$
(
"#kmesGphyindexTable-toolbar"
).
find
(
".toolbar-cancelzp"
).
iMenubutton
({
event
:
'doAjax'
,
text
:
'取消装配'
,
onClick
:
function
()
{
var
selectedRow
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
'getSelected'
);
if
(
selectedRow
==
null
){
$
.
messager
.
alert
(
'提示'
,
'请选中一条数据进行操作'
);
return
false
;
}
gas
.
confirm
(
"是否执行该操作"
,
function
()
{
var
index
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
"getRowIndex"
,
selectedRow
);
HTTP
.
post
(
'kmes/gphy/delGpzp'
,{
gpfkid
:
selectedRow
.
id
},
function
(
result
)
{
if
(
result
[
'success'
]){
$div
.
find
(
'.toolbar-table'
).
datagrid
(
"deleteRow"
,
index
);
$
.
messager
.
alert
(
'提示'
,
'取消装配成功!'
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'取消装配失败,请重新操作!'
);
}
})
})
}
});
$
(
"#kmesGphyindexTable-toolbar"
).
find
(
".toolbar-search1"
).
iMenubutton
({
text
:
'搜索'
,
iconCls
:
"fa fa-search"
,
btnCls
:
""
,
onClick
:
function
()
{
if
(
$div
.
find
(
"input[name='gxid']"
).
val
()
==
""
){
gas
.
confirm
(
"您尚未选择工序,是否重新选择工序?"
,
function
()
{
run
();
});
}
else
{
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
}
});
}
/*数据初始化*/
function
dataInit
(
obj
){
}
/*用户操作*/
function
run
(
res
){
gas
.
Dialog
({
title
:
"选择工序"
,
width
:
480
,
height
:
280
,
minimizable
:
false
,
maximizable
:
false
,
href
:
"kmes/gphy/gx"
,
onInit
:
function
(
element
)
{
},
regResultHandler
:
function
(
element
)
{
if
(
!
element
.
form
(
"validate"
)){
return
false
}
var
data
=
DataBind
.
collectData
(
element
);
$div
.
find
(
"input[name='bxid']"
).
val
(
data
.
bxid
||
""
);
$div
.
find
(
"input[name='gxid']"
).
val
(
data
.
gxid
||
""
);
$div
.
find
(
"input[name='fkrid']"
).
val
(
window
.
sessionStorage
.
getItem
(
'userId'
));
fkrName
=
window
.
sessionStorage
.
getItem
(
'userName'
);
gxName
=
data
.
gxName
||
""
;
gzzxid
=
data
.
gzzxid
||
''
;
gzzxname
=
data
.
gzzxname
||
""
;
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/gphy/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
))
}
})
}
gas
.
load
(
paramsInit
,
pageInit
,
dataInit
,
run
);
})
</script>
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