Commit 726ef411 authored by yff's avatar yff

装配反馈调整

parent b9391457
...@@ -12,8 +12,11 @@ import com.gavel.common.utils.DateUtils; ...@@ -12,8 +12,11 @@ import com.gavel.common.utils.DateUtils;
import com.gavel.common.utils.StringUtils; import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext; import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.GpfkService; import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.utils.SmCodeModel;
import com.gavel.kwell.vo.*; import com.gavel.kwell.vo.*;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.vo.WobomVO;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
...@@ -229,4 +232,82 @@ public class GpfkController extends BaseController { ...@@ -229,4 +232,82 @@ public class GpfkController extends BaseController {
GpfkVO gpfkVO = gpfkService.getLastGpfkHgdj(wosnid); GpfkVO gpfkVO = gpfkService.getLastGpfkHgdj(wosnid);
return buildReturnData(gpfkVO); return buildReturnData(gpfkVO);
} }
/** 科威尔工票反馈模块 **/
@ApiOperation(value = "扫描序列号,返回序列号类型")
@RequestMapping(value = "/querySmlx", method = RequestMethod.POST)
@ResponseBody
public Object getSmlx(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
SmCodeModel smCodeModel = gpfkService.querySml(wosnid);
if(smCodeModel != null){
return buildReturnData(smCodeModel);
}else{
return ThreadContext.getReturnData();
}
}
@ApiOperation(value = "扫描生产主产品条码,{\"wosnid\":111}传入条码,返回任务单信息")
@RequestMapping(value = "/queryKwellWoinfo", method = RequestMethod.POST)
@ResponseBody
public Object getKwellSninfo(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
HzWoVO woVO = gpfkService.queryKwellWoBySnid(wosnid);
if(woVO != null){
return buildReturnData(woVO);
}else{
return ThreadContext.getReturnData();
}
}
@ApiOperation(value = "扫码得到wobom,{\"woid\":111}传入条码,返回任务单信息")
@RequestMapping(value = "/queryWoBomByWoid", method = RequestMethod.POST)
@ResponseBody
public Object getWoBomByWoid(@RequestBody JSONObject param) {
String woid = param.getString("woid");
if(StringUtils.isEmpty(woid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
List<WobomVO> wobomVOs= gpfkService.queryWobomByWo(woid);
if(wobomVOs != null){
return buildReturnData(wobomVOs);
}else{
return ThreadContext.getReturnData();
}
}
@ApiOperation(value = "扫码直接进行反馈")
@RequestMapping(value = "/doKwellGpfk", method = RequestMethod.POST)
@ResponseBody
public Object doKwellGpfk(@RequestBody GpbhgfkCondition gpbhgfkCondition){
GpfkVO gpfkInfo = gpbhgfkCondition.getGpfkVO();
if(gpfkInfo == null || StringUtils.isEmpty(gpfkInfo.getWosnid())){
setReturnMessage("条码信息不允许为空,请检查!");
return null;
}
/**
* 合格的不启动事务
*/
if(BooleanEnum.equalsYes(gpfkInfo.getHgbz())){
GpResVO gpResVO = gpfkService.doHgGpfk(gpbhgfkCondition);
return buildReturnData(gpResVO);
}else{
GpResVO gpResVO = gpfkService.doBhgGpfk(gpbhgfkCondition);
return buildReturnData(gpResVO);
}
}
} }
...@@ -18,6 +18,7 @@ import com.gavel.kwell.vo.GpfkVO; ...@@ -18,6 +18,7 @@ import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.GpwxmxVO; import com.gavel.kwell.vo.GpwxmxVO;
import com.gavel.kwell.vo.HzWoVO; import com.gavel.kwell.vo.HzWoVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.vo.WobomVO;
import com.gavel.wo.vo.WogylxVO; import com.gavel.wo.vo.WogylxVO;
...@@ -107,4 +108,12 @@ public interface GpfkDao extends BaseDao { ...@@ -107,4 +108,12 @@ public interface GpfkDao extends BaseDao {
public List<BzgxVO> queryGylxBzgxByWlid(String wlid); public List<BzgxVO> queryGylxBzgxByWlid(String wlid);
/**科威尔工票反馈sql */
public HzWoVO queryKwellWoBySnid(String snid);
public List<WobomVO> queryWobomByWo(String snid);
} }
...@@ -28,6 +28,7 @@ import com.gavel.kwell.vo.HzWoVO; ...@@ -28,6 +28,7 @@ import com.gavel.kwell.vo.HzWoVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap; import com.gavel.persistence.sql.SqlMap;
import com.gavel.persistence.sql.SqlUtil; import com.gavel.persistence.sql.SqlUtil;
import com.gavel.wo.vo.WobomVO;
import com.gavel.wo.vo.WogylxVO; import com.gavel.wo.vo.WogylxVO;
...@@ -1199,5 +1200,57 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -1199,5 +1200,57 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
return sqlMap.queryEntity(GpfkVO.class); return sqlMap.queryEntity(GpfkVO.class);
} }
@Override
public HzWoVO queryKwellWoBySnid(String snid){
SqlMap sqlMap = new SqlMap();
sqlMap.append("select WO_ID, WO_DJID, WO_GCID, WO_YWRQ, WO_WLID, WO_XQSL, ");
sqlMap.append(" WO_JHKGRQ, WO_JHWGRQ, WO_BMID, WO_SCXID, WO_DJLY, ");
sqlMap.append(" WO_ZT, WO_QRR, WO_QRSJ, WO_GBR, WO_GBSJ, ");
sqlMap.append(" WO_GBYY, WO_BOMID, WO_GYLXID, WO_PCYXJ, WO_LYDJID, ");
sqlMap.append(" WO_WGSL, WO_SJKGRQ, WO_SJWGRQ, WO_SNNUM, WO_SJSL, ");
sqlMap.append(" WO_HGSL, WO_BZ, WO_WHRID, WO_WHR, WO_WHSJ, ");
sqlMap.append(" WO_CJRID, WO_CJR, WO_CJSJ, WO_SYSVERSION, BM_CODE, ");
sqlMap.append(" BM_NAME, GC_CODE, GC_NAME, SCX_CODE, SCX_NAME,");
sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG, JLDW_NAME, ");
sqlMap.append(" WOSN_CODE, WO_WLID, ");
sqlMap.append(" GCXM_CODE, GCXM_NAME, KH_CODE, KH_NAME, WOSN_ID ");
sqlMap.append("from WO ");
sqlMap.append(" left join GC on GC_ID = WO_GCID");
sqlMap.append(" left join BM on BM_ID = WO_BMID");
sqlMap.append(" left join SCX on SCX_ID = WO_SCXID");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID");
sqlMap.append(" left join JLDW on JLDW_ID = WLXX_JLDW");
sqlMap.append(" left join WOSN on WOSN_WOID = WO_ID ");
sqlMap.append(" left join GCXM on GCXM_ID = WO_XMID ");
sqlMap.append(" left join KH on KH_ID = GCXM_KHID ");
sqlMap.append("where 1 = 1 ");
sqlMap.append(" and WOSN_CODE = :pSNID ");
sqlMap.setParamValue("pSNID",snid);
return sqlMap.queryEntity(HzWoVO.class);
}
@Override
public List<WobomVO> queryWobomByWo(String snid) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select WOBOM_ID, WOBOM_XH, WOBOM_WOID, WOBOM_WLID, WOBOM_FFGX,");
sqlMap.append(" WOBOM_DWYL, WOBOM_XQSL, WOBOM_XQRQ, WOBOM_SHL, WOBOM_SHZ, WOBOM_FFYZ,");
sqlMap.append(" WOBOM_LLSL, WOBOM_CKSL, WOBOM_BZ, WOBOM_WHRID, WOBOM_WHR,");
sqlMap.append(" WOBOM_WHSJ, WOBOM_CJRID, WOBOM_CJR, WOBOM_CJSJ, WOBOM_SYSVERSION,");
sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG, WOBOM_GJWL, WOBOM_ZT, WOBOM_DJLY,");
sqlMap.append(" WOGYLX_XH, WOGYLX_NAME, WOBOM_WLPH ");
sqlMap.append(" WOGYLX_XH, WOGYLX_NAME, WOBOM_WLPH ");
sqlMap.append("from WOBOM");
sqlMap.append(" left join WLXX on WLXX_ID = WOBOM_WLID");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = WOBOM_FFGX ");
sqlMap.append("where 1=1");
if (StringUtils.isNotEmpty(snid)){
sqlMap.append(" and " + SqlUtil.getWhereSql("WOBOM_WOID", snid));
sqlMap.setParamValue("WOBOM_WOID", snid);
}
sqlMap.append("order by WOBOM_XH, WLXX_CODE");
return sqlMap.query(WobomVO.class);
}
} }
...@@ -4,9 +4,11 @@ import java.util.Date; ...@@ -4,9 +4,11 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.gavel.common.base.service.BaseEditService; import com.gavel.common.base.service.BaseEditService;
import com.gavel.gygl.persistent.Gylx;
import com.gavel.gygl.vo.BzgxCondition; import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO; import com.gavel.gygl.vo.BzgxVO;
import com.gavel.kwell.persistent.Gpfk; import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.utils.SmCodeModel;
import com.gavel.kwell.vo.GpResVO; import com.gavel.kwell.vo.GpResVO;
import com.gavel.kwell.vo.GpWoCondition; import com.gavel.kwell.vo.GpWoCondition;
import com.gavel.kwell.vo.GpbhgfkCondition; import com.gavel.kwell.vo.GpbhgfkCondition;
...@@ -15,10 +17,11 @@ import com.gavel.kwell.vo.GpfkCondition; ...@@ -15,10 +17,11 @@ import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO; import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.HzWoVO; import com.gavel.kwell.vo.HzWoVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.vo.WobomVO;
public interface GpfkService extends BaseEditService { public interface GpfkService extends BaseEditService {
public RecordSet<GpfkVO> query(GpfkCondition condition); public RecordSet<GpfkVO> query(GpfkCondition condition);
public RecordSet<GpfkVO> queryZyjhGpfk(GpfkCondition condition); public RecordSet<GpfkVO> queryZyjhGpfk(GpfkCondition condition);
...@@ -82,4 +85,15 @@ public interface GpfkService extends BaseEditService { ...@@ -82,4 +85,15 @@ public interface GpfkService extends BaseEditService {
public GpfkVO getLastGpfkHgdj(String wosnid); public GpfkVO getLastGpfkHgdj(String wosnid);
/** 科威尔mes工票反馈重写--begin */
public HzWoVO queryKwellWoBySnid(String snid);
public SmCodeModel querySml(String snid);
public List<WobomVO> queryWobomByWo(String snid);
public Gylx queryKwellWoStandGylx(String djid);
/** 科威尔mes工票反馈重写--end */
} }
...@@ -22,6 +22,7 @@ import com.gavel.common.utils.StringUtils; ...@@ -22,6 +22,7 @@ import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext; import com.gavel.common.utils.ThreadContext;
import com.gavel.common.utils.UserInfoUtil; import com.gavel.common.utils.UserInfoUtil;
import com.gavel.gygl.persistent.Bzgx; import com.gavel.gygl.persistent.Bzgx;
import com.gavel.gygl.persistent.Gylx;
import com.gavel.gygl.utils.GyglParamEnum; import com.gavel.gygl.utils.GyglParamEnum;
import com.gavel.gygl.vo.BzgxCondition; import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO; import com.gavel.gygl.vo.BzgxVO;
...@@ -34,6 +35,8 @@ import com.gavel.kwell.service.GpfkService; ...@@ -34,6 +35,8 @@ import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.utils.GpfkFklxEnum; import com.gavel.kwell.utils.GpfkFklxEnum;
import com.gavel.kwell.utils.HzGylxEnum; import com.gavel.kwell.utils.HzGylxEnum;
import com.gavel.kwell.utils.KwellParamEnum; import com.gavel.kwell.utils.KwellParamEnum;
import com.gavel.kwell.utils.SmCodeEnum;
import com.gavel.kwell.utils.SmCodeModel;
import com.gavel.kwell.vo.GpResVO; import com.gavel.kwell.vo.GpResVO;
import com.gavel.kwell.vo.GpWoCondition; import com.gavel.kwell.vo.GpWoCondition;
import com.gavel.kwell.vo.GpbhgfkCondition; import com.gavel.kwell.vo.GpbhgfkCondition;
...@@ -42,6 +45,7 @@ import com.gavel.kwell.vo.GpfkCondition; ...@@ -42,6 +45,7 @@ import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO; import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.HzWoVO; import com.gavel.kwell.vo.HzWoVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.vo.WobomVO;
@Service("gpfkService") @Service("gpfkService")
...@@ -782,4 +786,33 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -782,4 +786,33 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return gpfkVO; return gpfkVO;
} }
@Override
public HzWoVO queryKwellWoBySnid(String snid) {
return gpfkDao.queryKwellWoBySnid(snid);
}
@Override
public Gylx queryKwellWoStandGylx(String djid) {
return null;
}
@Override
public SmCodeModel querySml(String snid) {
List<SmCodeModel> smCodeModels =SmCodeEnum.toList();
if(smCodeModels!=null&&smCodeModels.size()>0) {
for(SmCodeModel smCodeModel:smCodeModels) {
if(snid.toUpperCase().contains(smCodeModel.getPrefix())) {
return smCodeModel;
}
}
}
return null;
}
@Override
public List<WobomVO> queryWobomByWo(String snid) {
return gpfkDao.queryWobomByWo(snid);
}
} }
package com.gavel.kwell.utils;
import java.util.ArrayList;
import java.util.List;
import com.gavel.common.module.ModuleParams;
import com.gavel.jcsj.utils.SnGzflEnum;
public enum SmCodeEnum {
LOGOUT("LOGOUT", "退出","LOGOUT",10),
WOSNID("WOSNID","工单序列号","SNID",10),
WLID("WLID","物料编码","WLID",10),
OKBZ("OKBZ","OK按钮","OKBZ",10),
NGBZ("NGBZ","NG按钮","NGBZ",10);
private String id;
private String name;
private String prefix;
private Integer len;
SmCodeEnum(String id, String name,String prefix,Integer len){
this.id = id;
this.name = name;
this.prefix = prefix;
this.len = len;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Integer getLen() {
return len;
}
public void setLen(Integer len) {
this.len = len;
}
public static List<SmCodeModel> toList(){
List<SmCodeModel> list = new ArrayList<>();
for (SmCodeEnum e : SmCodeEnum.values()) {
SmCodeModel moduleParams = new SmCodeModel();
moduleParams.setId(e.getId());
moduleParams.setLen(e.getLen());
moduleParams.setName(e.getName());
moduleParams.setPrefix(e.getPrefix());
list.add(moduleParams);
}
return list;
}
}
package com.gavel.kwell.utils;
public class SmCodeModel {
private String id;
private String name;
private String prefix;
private Integer len;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Integer getLen() {
return len;
}
public void setLen(Integer len) {
this.len = len;
}
}
...@@ -209,133 +209,16 @@ ...@@ -209,133 +209,16 @@
}, },
data: function() { data: function() {
return { return {
pdfurl:"", pdfurl:"kmes/gpfk/queryPdfByWoidAndZpgx",
addtop:0, addtop:0,
xlh:"", xlh:"",
gxid:"",
gx:"", gx:"",
gd:"", gd:"",
cpsn:"", cpsn:"",
ph:"", ph:"",
systime: "", systime: "",
tabdata: [{ tabdata: [
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
},
{
ph: 10,
pm: "GT-RBZ6",
ggxh: "RBG-AK",
sl: 13,
zpsl: 12
}
], ],
sivtimer: null, //时间计数器 sivtimer: null, //时间计数器
sivpdf: null, sivpdf: null,
...@@ -345,22 +228,30 @@ ...@@ -345,22 +228,30 @@
methods: { methods: {
// 扫码接口 // 扫码接口
apiscanxlh(){ apiscanxlh(){
debugger;
let that=this let that=this
gas.post('test1',{}, function(res){ gas.post('kmes/gpfk/queryKwellWoinfo',{"wosnid":this.xlh}, function(res){
if(res.data&&res.data.records){ if(res.data&&res.data.records){
/* 赋值操作 */ /* 赋值操作 */
that.gd = res.data.records.djid;
that.cpsn = res.data.records.wosnCode;
that.ph = res.data.records.wlxxCode;
let woid = res.data.records.woid;
/** wobom查询 **/
gas.post('kmes/gpfk/queryWoBomByWoid',{"woid":woid}, function(res){
if(res.data&&res.data.records){
that.tabdata = res.data.records;
}
});
/* 日志操作 */ /* 日志操作 */
/* pdf地址 */ /* pdf地址 */
let gx=res.data.records.gx
let nowpdfurl="test2"
nowpdfurl=nowpdfurl+"?gx="+gx
if(nowpdfurl!=that.pdfurl) if(nowpdfurl!=that.pdfurl)
{ that.pdfurl=nowpdfurl { that.pdfurl=nowpdfurl
/* 清除计时器 */ /* 清除计时器 */
if(that.sivpdf){ if(that.sivpdf){
clearInterval(that.sivpdf) clearInterval(that.sivpdf)
} }
pdfshow(that.pdfurl, "gphy", 20000).then(e => { pdfshow(that.pdfurl+"?woid="+woid+"&&"+"gxid="+that.gxid, "gphy", 20000).then(e => {
this.sivpdf = e this.sivpdf = e
}) })
} }
...@@ -399,22 +290,22 @@ ...@@ -399,22 +290,22 @@
}, },
columns: [ columns: [
[{ [{
field: 'ph', field: 'wlxxCode',
title: '品号', title: '品号',
width: '20%', width: '20%',
}, },
{ {
field: 'pm', field: 'wlxxName',
title: '品名', title: '品名',
width: '23%', width: '23%',
}, },
{ {
field: 'ggxh', field: 'wlxxGg',
title: '规格型号', title: '规格型号',
width: '20%', width: '20%',
}, },
{ {
field: 'sl', field: 'xqsl',
title: '数量', title: '数量',
width: '20%', width: '20%',
}, },
......
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