Commit e72f5211 authored by 李苏's avatar 李苏 💬

Merge remote-tracking branch 'origin/master'

parents 8f56a166 aa3103a7
...@@ -3,6 +3,7 @@ package com.gavel.kwell.controller; ...@@ -3,6 +3,7 @@ package com.gavel.kwell.controller;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.gavel.kwell.service.GphyService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -30,12 +31,21 @@ public class GpwxController extends BaseController { ...@@ -30,12 +31,21 @@ public class GpwxController extends BaseController {
@Autowired @Autowired
private GpfkService gpfkService; private GpfkService gpfkService;
@Autowired
private GphyService gphyService;
@ResourcePermissions() @ResourcePermissions()
@RequestMapping("/index") @RequestMapping("/index")
public String index() { public String index() {
return "kmes/gpwx/index"; return "kmes/gpwx/index";
} }
@ResourcePermissions()
@RequestMapping("/wxindex")
public String wxindex() {
return "kmes/gpwx/wxindex";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD}) @ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add") @RequestMapping("/add")
public String add() { public String add() {
...@@ -48,6 +58,11 @@ public class GpwxController extends BaseController { ...@@ -48,6 +58,11 @@ public class GpwxController extends BaseController {
return "kmes/gpwx/edit"; return "kmes/gpwx/edit";
} }
@RequestMapping("/gx")
public String gx() {
return "kmes/gpwx/gx";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST) @RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody @ResponseBody
......
...@@ -2,6 +2,7 @@ package com.gavel.kwell.controller; ...@@ -2,6 +2,7 @@ package com.gavel.kwell.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gavel.common.base.controller.BaseController; import com.gavel.common.base.controller.BaseController;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.KmesBoardService; import com.gavel.kwell.service.KmesBoardService;
import com.gavel.kwell.vo.GpfkHgVO; import com.gavel.kwell.vo.GpfkHgVO;
import com.gavel.kwell.vo.PcslVO; import com.gavel.kwell.vo.PcslVO;
...@@ -123,4 +124,28 @@ public class KmesBoardController extends BaseController { ...@@ -123,4 +124,28 @@ public class KmesBoardController extends BaseController {
UWoVO uWoVO = kmesBoardService.queryWorkingWO(); UWoVO uWoVO = kmesBoardService.queryWorkingWO();
return buildReturnData(uWoVO); return buildReturnData(uWoVO);
} }
/**
* 视频路径api
*/
@RequestMapping(value ="getPdf", method = RequestMethod.POST)
@ResponseBody
public Object getPdf(@RequestBody JSONObject param) {
returnData().add("pdf", kmesBoardService.getPdf());
return ThreadContext.getReturnData();
}
/**
* 视频路径api
*/
@RequestMapping(value ="getVideo", method = RequestMethod.POST)
@ResponseBody
public Object getVideo(@RequestBody JSONObject param) {
returnData().add("video", kmesBoardService.getVideo());
return ThreadContext.getReturnData();
}
} }
...@@ -25,4 +25,8 @@ public interface KmesBoardService extends BaseEditService { ...@@ -25,4 +25,8 @@ public interface KmesBoardService extends BaseEditService {
public UWoVO queryWorkingWO(); public UWoVO queryWorkingWO();
public List<GpfkHgVO> queryGpfkHgl(); public List<GpfkHgVO> queryGpfkHgl();
public String getPdf();
public String getVideo();
} }
package com.gavel.kwell.service.impl; package com.gavel.kwell.service.impl;
import com.gavel.common.base.service.impl.BaseEditServiceImpl; import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.common.business.service.CommonService;
import com.gavel.common.utils.DateUtils; import com.gavel.common.utils.DateUtils;
import com.gavel.common.utils.NumberUtils; import com.gavel.common.utils.NumberUtils;
import com.gavel.kwell.dao.GpfkcxDao; import com.gavel.kwell.dao.GpfkcxDao;
...@@ -8,6 +9,7 @@ import com.gavel.kwell.dao.KmesBoardDao; ...@@ -8,6 +9,7 @@ import com.gavel.kwell.dao.KmesBoardDao;
import com.gavel.kwell.persistent.Gpfk; import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.service.KmesBoardService; import com.gavel.kwell.service.KmesBoardService;
import com.gavel.kwell.utils.DateCalculateUtil; import com.gavel.kwell.utils.DateCalculateUtil;
import com.gavel.kwell.utils.KwellParamEnum;
import com.gavel.kwell.vo.GpfkHgVO; import com.gavel.kwell.vo.GpfkHgVO;
import com.gavel.kwell.vo.PcslVO; import com.gavel.kwell.vo.PcslVO;
import com.gavel.kwell.vo.SdclVO; import com.gavel.kwell.vo.SdclVO;
...@@ -33,6 +35,9 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -33,6 +35,9 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
@Autowired @Autowired
private GpfkcxDao gpfkcxDao; private GpfkcxDao gpfkcxDao;
@Autowired
private CommonService commonService;
@Override @Override
public void initService(){ public void initService(){
} }
...@@ -131,4 +136,14 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -131,4 +136,14 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
} }
return gpfkHgVOList; return gpfkHgVOList;
} }
@Override
public String getPdf() {
return commonService.getStringOptionValue(KwellParamEnum.DASHBORAD_PDF.getId());
}
@Override
public String getVideo() {
return commonService.getStringOptionValue(KwellParamEnum.DASHBORAD_VIDEO.getId());
}
} }
<div class="e-dialog-container" data-options="width:480,height:260" id="gpwxGx">
<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=$("#gpwxGx");
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/queryWxBzgx',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) {
}});
}
/*数据初始化*/
function dataInit(obj){
}
function run(res){
}
gas.load(paramInit,pageInit,dataInit,run);
})
</script>
\ No newline at end of file
<div id="kmesGpwxindex" class="gui-div">
<table class="toolbar-table" data-options="id: 'kmesGpwxindexTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 -->
<div id="kmesGpwxindexTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'kmesGpwxindexTable'}">
<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-reload toolbar" href="javascript:void(0)"></a>
<a class="toolbar-cancelwx toolbar" href="javascript:void(0)"></a>
<!-- <a class="toolbar-reviewBhg 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-sm3">
<label class="gui-form-label">产品条码:</label>
<div class="gui-input-block">
<input type="text" name="wosnid" style="width: 100%" ></div>
</div>
<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>
<!-- <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>
/*js初始化*/
$(function () {
var $div=$('#kmesGpwxindex');
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 gxName='';var gzzxid="";
var gzzxname="";var fkrName="";
function paramsInit() {
}
function pageInit() {
$datStart.iDatetimebox();
$datEnd.iDatetimebox();
$txtScgd.iTextbox();
$txtWosnid.iTextbox();
var options = {
url: 'kmes/gpwx',
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",width:100},
{title: "反馈人", field: "fkr", fieldType: "ftString"},
{title: "反馈时间", field: "fksj", fieldType: "ftDateTime"},
{title: "生产工单", field: "woDjid", fieldType: "ftString",width:140},
{title: "物料编码", field: "wlxxCode", fieldType: "ftString",width:120},
{title: "物料名称", field: "wlxxName", fieldType: "ftString",width:160}
]],
dialog: {
footerIn: true,
maximized:true,
modal: true,
width:960,height:640,
href: 'kmes/gpwx/edit',
draggable:false,
onSaveCallback: function (opt, data) {
},
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);
/*取消维修*/
$("#kmesGpwxindexTable-toolbar").find(".toolbar-cancelwx").iMenubutton({
event:'doAjax',
text:'取消维修',
onClick:function () {
var selectedRow=$div.find('.toolbar-table').datagrid('getSelected');
if(selectedRow==null){
$.messager.alert('提示','请选中一条数据进行操作');
return false;
}
gas.confirm("是否执行该操作",function () {
HTTP.post('kmes/gpwx/delGpwx',{gpfkid:selectedRow.id},function (result) {
if(result['success']){
var index=$div.find('.toolbar-table').datagrid("getRowIndex",selectedRow);
$div.find('.toolbar-table').datagrid("deleteRow",index);
$.messager.alert('提示','取消维修成功!');
}else{
$.messager.alert('提示',result['message']||'取消维修失败,请重新操作!');
}
})})
}
});
$("#kmesGpwxindexTable-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 dataInit(obj){
}
/*用户操作*/
function run(res){
gas.Dialog({
title:"选择工序",
width:480,
height:280,
minimizable:false,
maximizable:false,
href:"kmes/gpwx/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/gpfk/query";
$datagrid.datagrid("load",DataBind.collectData($div));
}
})
}
gas.load(paramsInit,pageInit,dataInit,run);
});
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment