Commit 9124ea7f authored by yff's avatar yff

增加测试反馈相关

parent 1a6eef94
...@@ -308,6 +308,18 @@ public class GpfkController extends BaseController { ...@@ -308,6 +308,18 @@ public class GpfkController extends BaseController {
} }
} }
@RequestMapping(value = "/csfk", method = RequestMethod.POST)
@ResponseBody
public Object csfk(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk =gpfkService.csfk(condition);
if(gpfk != null){
return buildReturnData(gpfk);
}else{
return ThreadContext.getReturnData();
}
}
@RequestMapping(value = "/wxfk", method = RequestMethod.POST) @RequestMapping(value = "/wxfk", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public Object wxfk(@RequestBody JSONObject param) { public Object wxfk(@RequestBody JSONObject param) {
...@@ -368,4 +380,17 @@ public class GpfkController extends BaseController { ...@@ -368,4 +380,17 @@ public class GpfkController extends BaseController {
return "loginscan_view"; return "loginscan_view";
} }
@RequestMapping(value = "/testFeedBack", method = RequestMethod.POST)
@ResponseBody
public Object testFeedBack(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk =gpfkService.testfeedback(condition);
if(gpfk != null){
return buildReturnData(gpfk);
}else{
return ThreadContext.getReturnData();
}
}
} }
...@@ -123,6 +123,10 @@ public interface GpfkService extends BaseEditService { ...@@ -123,6 +123,10 @@ public interface GpfkService extends BaseEditService {
public FkVO gzfk(FkCondition fkCondition); public FkVO gzfk(FkCondition fkCondition);
public FkVO csfk(FkCondition fkCondition);
public FkVO testfeedback(FkCondition fkCondition);
/** 科威尔mes工票反馈重写--end */ /** 科威尔mes工票反馈重写--end */
} }
...@@ -2063,6 +2063,163 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -2063,6 +2063,163 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return null; return null;
} }
@Override
public FkVO csfk(FkCondition fkCondition) {
/*
* 基础判断 1.条码是否为空 2.前端是否传入标准工序 3.条码是否为已知类型条码
*/
if(StringUtils.isEmpty(fkCondition.getSncode())) {
throwReturnMessage("未扫描到条码,请重新确认!");
}
if(StringUtils.isEmpty(fkCondition.getBzgxid())) {
throwReturnMessage("扫描工序出错,请重新确认!");
}
String snType = checkSnType(fkCondition.getSncode());
if(StringUtils.isEmpty(snType)) {
throwReturnMessage("该条码为未知条码,请重新确认!");
}
FkVO fkVO = null;
if(snType.equals(SmCodeEnum.LOGOUT.getId())) {
fkVO = new FkVO();
fkVO.setSntype(snType);
}
else if(snType.equals(SmCodeEnum.WOSNID.getId())) {
GpfkCondition gpfkCondition = new GpfkCondition();
gpfkCondition.setWosnid(fkCondition.getSncode());
gpfkCondition.setBzgxid(fkCondition.getBzgxid());
FkVO curFkVo = gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getSncode(), fkCondition.getBzgxid());
if (curFkVo == null) {
curFkVo = gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getSncode());
}
curFkVo.setSntype(snType);
return curFkVo;
}
else if(snType.equals(SmCodeEnum.OKBZ.getId())) {
if(StringUtils.isEmpty(fkCondition.getWosncode())) {
throwReturnMessage("该订单序列号未输入,请重新确认!");
}
Gpfk gpfk = new Gpfk();
FkVO curFkVo =gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getWosncode());
gpfk.setWosnid(curFkVo.getWosnCode());
gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(curFkVo.getWlid());
gpfk.setYwrq(DateUtils.getDate());
gpfk.setHgbz(HGBZ);
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), HGBZ);
newFkVo.setSntype(snType);
return newFkVo;
}
else if(snType.equals(SmCodeEnum.NGBZ.getId())) {
if(StringUtils.isEmpty(fkCondition.getWosncode())) {
throwReturnMessage("该订单序列号未输入,请重新确认!");
}
Gpfk gpfk = new Gpfk();
FkVO curFkVo =gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getWosncode());
gpfk.setWosnid(curFkVo.getWosnCode());
gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(curFkVo.getWlid());
gpfk.setYwrq(DateUtils.getDate());
gpfk.setHgbz(BHGBZ);
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), BHGBZ);
newFkVo.setSntype(snType);
return newFkVo;
}
else {
throwReturnMessage("序列号类型错误,请重新确认!");
}
return null;
}
@Override
public FkVO testfeedback(FkCondition fkCondition) {
/*
* 基础判断 1.条码是否为空 2.前端是否传入标准工序 3.条码是否为已知类型条码
*/
if(StringUtils.isEmpty(fkCondition.getSncode())||StringUtils.isEmpty(fkCondition.getWosncode())||StringUtils.isEmpty(fkCondition.getBzgx())) {
throwReturnMessage("参数错误!");
}
String snType = checkSnType(fkCondition.getSncode());
if(StringUtils.isEmpty(snType)) {
throwReturnMessage("该条码为未知条码,请重新确认!");
}
BzgxCondition condition = new BzgxCondition();
condition.setCondition(fkCondition.getBzgx());
List<BzgxVO> bzgxVOs= bzgxService.query(condition).getRecords();
if(bzgxVOs==null||bzgxVOs.size()<1) {
throwReturnMessage("标准工序序列号异常");
}
if(!bzgxVOs.get(0).getGxlx().equals(HzGylxEnum.CS.getId())) {
throwReturnMessage("标准工序非测试工序");
}
fkCondition.setBzgxid(bzgxVOs.get(0).getId());
FkVO curFkVo =gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getWosncode());
if(curFkVo==null) {
throwReturnMessage("产品序列号异常");
}
if(fkCondition.getSncode().equals(SmCodeEnum.OKBZ.getId())) {
Gpfk gpfk = new Gpfk();
gpfk.setWosnid(curFkVo.getWosnCode());
gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(curFkVo.getWlid());
gpfk.setYwrq(DateUtils.getDate());
gpfk.setHgbz(HGBZ);
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), HGBZ);
newFkVo.setSntype(snType);
return newFkVo;
}
else if(fkCondition.getSncode().equals(SmCodeEnum.NGBZ.getId())) {
Gpfk gpfk = new Gpfk();
gpfk.setWosnid(curFkVo.getWosnCode());
gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(curFkVo.getWlid());
gpfk.setYwrq(DateUtils.getDate());
gpfk.setHgbz(BHGBZ);
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), BHGBZ);
newFkVo.setSntype(snType);
return newFkVo;
}
else {
throwReturnMessage("序列号类型错误,请重新确认!");
}
return null;
}
/************ -------------------科威尔反馈升级--END--------- ******/ /************ -------------------科威尔反馈升级--END--------- ******/
......
...@@ -13,6 +13,7 @@ public enum HzGylxEnum { ...@@ -13,6 +13,7 @@ public enum HzGylxEnum {
ZP("装配", "ZP"), ZP("装配", "ZP"),
JY("检验", "JY"), JY("检验", "JY"),
WX("维修", "WX"), WX("维修", "WX"),
CS("测试", "CS"),
LH("老化","LH"), LH("老化","LH"),
ZX("装箱","ZX"), ZX("装箱","ZX"),
ZT("装托","ZT"), ZT("装托","ZT"),
......
...@@ -14,7 +14,8 @@ public enum YymkFKEnum { ...@@ -14,7 +14,8 @@ public enum YymkFKEnum {
JY("JY","1901000400"), JY("JY","1901000400"),
WX("WX","1901000600"), WX("WX","1901000600"),
JG("JG","1901000800"), JG("JG","1901000800"),
GZ("GZ","1901001000"); GZ("GZ","1901001000"),
CS("CS","1901001200");
private String id; private String id;
private String name; private String name;
......
...@@ -12,9 +12,14 @@ public class FkCondition extends BaseEntity { ...@@ -12,9 +12,14 @@ public class FkCondition extends BaseEntity {
private String wosncode; private String wosncode;
private String wogylx; private String wogylx;
private String wlid; private String wlid;
private String bzgx;
public String getBzgx() {
return bzgx;
}
public void setBzgx(String bzgx) {
this.bzgx = bzgx;
}
public String getWlid() { public String getWlid() {
return wlid; return wlid;
} }
......
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
<print entity="com.gavel.kwell.vo.GpfkVO"/> <print entity="com.gavel.kwell.vo.GpfkVO"/>
<mkcz czid = "21" czmc = "取消改制" value="Y"/> <mkcz czid = "21" czmc = "取消改制" value="Y"/>
</menu> </menu>
<menu mkid="901002000" mkmc="测试反馈" url="kmes/csfk/zpindex">
<print entity="com.gavel.kwell.vo.GpfkVO"/>
</menu>
<menu mkid="901000200" mkmc="装配反馈" url="kmes/gphy/zpindex"> <menu mkid="901000200" mkmc="装配反馈" url="kmes/gphy/zpindex">
<print entity="com.gavel.kwell.vo.GpfkVO"/> <print entity="com.gavel.kwell.vo.GpfkVO"/>
<mkcz czid = "21" czmc = "取消装配" value="Y"/> <mkcz czid = "21" czmc = "取消装配" value="Y"/>
...@@ -54,6 +57,8 @@ ...@@ -54,6 +57,8 @@
</menu> </menu>
<menu mkid="1901001000" mkmc="改制反馈" url="kmes/gzfk/index" gnlx="M"> <menu mkid="1901001000" mkmc="改制反馈" url="kmes/gzfk/index" gnlx="M">
</menu> </menu>
<menu mkid="1901001200" mkmc="测试反馈" url="kmes/csfk/index" gnlx="M">
</menu>
</menu> </menu>
<menu fmkid="510020000" mkid="510020300" mkmc="排产计划维护" url="kmes/pcjhk/index"> <menu fmkid="510020000" mkid="510020300" mkmc="排产计划维护" url="kmes/pcjhk/index">
<print entity="com.gavel.kwell.vo.PcjhkVO" type="M"/> <print entity="com.gavel.kwell.vo.PcjhkVO" type="M"/>
......
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