Commit aa76c4d8 authored by yff's avatar yff

修改BUG

parent 22cdbe92
......@@ -109,6 +109,8 @@ public class ShiroConfig {
filters.put("logout", new GavelCommonLogoutFilter());
shiroFilterFactoryBean.setFilters(filters);
Map<String, String> filterChainDefinitionMap = GavelAuthResource.init();
filterChainDefinitionMap.put("/kmes/gpfk/login", "anon");
filterChainDefinitionMap.put("/loginscan_view", "anon");
filterChainDefinitionMap.put("/logout", "logout");
filterChainDefinitionMap.put("/**", "permFilter");
shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
......
......@@ -320,6 +320,18 @@ public class GpfkController extends BaseController {
}
}
@RequestMapping(value = "/gzfk", method = RequestMethod.POST)
@ResponseBody
public Object gzfk(@RequestBody JSONObject param) {
FkCondition condition = JSONObject.toJavaObject(param, FkCondition.class);
FkVO gpfk =gpfkService.gzfk(condition);
if(gpfk != null){
return buildReturnData(gpfk);
}else{
return ThreadContext.getReturnData();
}
}
@RequestMapping(value = "/login", method = RequestMethod.POST)
@ResponseBody
public Object login(@RequestBody JSONObject param) {
......
......@@ -121,5 +121,7 @@ public interface GpfkService extends BaseEditService {
public GpfkVO queryDailyFkInfoUpgrade(GpfkCondition condition);
public FkVO gzfk(FkCondition fkCondition);
/** 科威尔mes工票反馈重写--end */
}
......@@ -1970,6 +1970,91 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return gpfkVO;
}
@Override
public FkVO gzfk(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;
}
/************ -------------------科威尔反馈升级--END--------- ******/
......
......@@ -14,7 +14,7 @@ public enum YymkFKEnum {
JY("JY","1901000400"),
WX("WX","1901000600"),
JG("JG","1901000800"),
GZ("JG","1901001000");
GZ("GZ","1901001000");
private String id;
private String name;
......
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