Commit b46b768f authored by yff's avatar yff

提交返回检验结果接口

parent 5f69f236
...@@ -324,8 +324,12 @@ public class GpfkController extends BaseController { ...@@ -324,8 +324,12 @@ public class GpfkController extends BaseController {
setReturnMessage("参数错误"); setReturnMessage("参数错误");
return returnData(); return returnData();
} }
gpfkService.jyfk(fkid, hgsn); Gpfk gpfk =gpfkService.jyfk(fkid, hgsn);
return ThreadContext.getReturnData(); if(gpfk != null){
return buildReturnData(gpfk);
}else{
return ThreadContext.getReturnData();
}
} }
@RequestMapping(value = "/wxfk", method = RequestMethod.POST) @RequestMapping(value = "/wxfk", method = RequestMethod.POST)
...@@ -337,8 +341,12 @@ public class GpfkController extends BaseController { ...@@ -337,8 +341,12 @@ public class GpfkController extends BaseController {
setReturnMessage("参数错误"); setReturnMessage("参数错误");
return returnData(); return returnData();
} }
gpfkService.wxfk(fkid, hgsn); Gpfk gpfk =gpfkService.wxfk(fkid, hgsn);
return ThreadContext.getReturnData(); if(gpfk != null){
return buildReturnData(gpfk);
}else{
return ThreadContext.getReturnData();
}
} }
@RequestMapping(value = "/login", method = RequestMethod.POST) @RequestMapping(value = "/login", method = RequestMethod.POST)
......
...@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.SystemOperation; import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions; import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController; import com.gavel.common.base.controller.BaseController;
...@@ -45,7 +46,8 @@ public class GphyController extends BaseController { ...@@ -45,7 +46,8 @@ public class GphyController extends BaseController {
@RequestMapping(value = "/zpwl", method = RequestMethod.POST) @RequestMapping(value = "/zpwl", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public Object query(@RequestBody GphyCondition condition) { public Object query(@RequestBody JSONObject param) {
GphyCondition condition = JSONObject.toJavaObject(param, GphyCondition.class);
Integer code = gphyService.zpwl(condition); Integer code = gphyService.zpwl(condition);
if(code!=null&&code>0) { if(code!=null&&code>0) {
return buildReturnData(code); return buildReturnData(code);
......
...@@ -112,6 +112,7 @@ public class GphyDaoImpl extends BaseDaoImpl implements GphyDao { ...@@ -112,6 +112,7 @@ public class GphyDaoImpl extends BaseDaoImpl implements GphyDao {
sqlMap.append(" GPHY_WHR, GPHY_WHSJ, GPHY_CJRID, GPHY_CJR, GPHY_CJSJ, "); sqlMap.append(" GPHY_WHR, GPHY_WHSJ, GPHY_CJRID, GPHY_CJR, GPHY_CJSJ, ");
sqlMap.append(" GPHY_SYSVERSION, GPHY_WLID, GPHY_HYLX, GPHY_FKRID "); sqlMap.append(" GPHY_SYSVERSION, GPHY_WLID, GPHY_HYLX, GPHY_FKRID ");
sqlMap.append("from GPHY "); sqlMap.append("from GPHY ");
sqlMap.append("LEFT JOIN WLXX ON WLXX_ID = GPHY_WLID ");
sqlMap.append("where 1 = 1 "); sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){ if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPHY_ID", condition.getId())); sqlMap.append(" and " + SqlUtil.getWhereSql("GPHY_ID", condition.getId()));
......
...@@ -101,9 +101,9 @@ public interface GpfkService extends BaseEditService { ...@@ -101,9 +101,9 @@ public interface GpfkService extends BaseEditService {
public GpfkVO queryKwellWosnWithAddGpfk(String wosn,String bzlx); public GpfkVO queryKwellWosnWithAddGpfk(String wosn,String bzlx);
public void jyfk(String fkid,String hgsn); public Gpfk jyfk(String fkid,String hgsn);
public void wxfk(String fkid,String hgsn); public Gpfk wxfk(String fkid,String hgsn);
public BzgxVO login(String usersn,String bzgxid); public BzgxVO login(String usersn,String bzgxid);
......
...@@ -892,7 +892,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -892,7 +892,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
} }
@Override @Override
public void jyfk(String fkid, String hgsn) { public Gpfk jyfk(String fkid, String hgsn) {
GpfkCondition gpfkCondition = new GpfkCondition(); GpfkCondition gpfkCondition = new GpfkCondition();
gpfkCondition.setId(fkid); gpfkCondition.setId(fkid);
GpfkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition); GpfkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition);
...@@ -907,14 +907,17 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -907,14 +907,17 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
else { else {
throwReturnMessage(SmCodeEnum.ERROR_CODE); throwReturnMessage(SmCodeEnum.ERROR_CODE);
} }
update(gpfk); Gpfk gpfkR = (Gpfk) update(gpfk);
return gpfkR;
} }
@Override @Override
public void wxfk(String fkid, String hgsn) { public Gpfk wxfk(String fkid, String hgsn) {
GpfkCondition gpfkCondition = new GpfkCondition(); GpfkCondition gpfkCondition = new GpfkCondition();
gpfkCondition.setId(fkid); gpfkCondition.setId(fkid);
Gpfk gpfk = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition); GpfkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition);
Gpfk gpfk = new Gpfk();
EntityDataFactory.copyEntity(gpfkVo, gpfk);
if(SmCodeEnum.OKBZ.getId().equals(hgsn)) { if(SmCodeEnum.OKBZ.getId().equals(hgsn)) {
gpfk.setHgsl(1.0); gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0); gpfk.setBhgsl(0.0);
...@@ -926,7 +929,8 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -926,7 +929,8 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
else { else {
throwReturnMessage(SmCodeEnum.ERROR_CODE); throwReturnMessage(SmCodeEnum.ERROR_CODE);
} }
update(gpfk); Gpfk gpfkR = (Gpfk) update(gpfk);
return gpfkR;
} }
@Override @Override
......
...@@ -8,9 +8,9 @@ public enum SmCodeEnum { ...@@ -8,9 +8,9 @@ public enum SmCodeEnum {
LOGOUT("LOGOUT", "退出","LOGOUT",10), LOGOUT("LOGOUT", "退出","LOGOUT",10),
WOSNID("WOSNID","工单序列号","20",10), WOSNID("WOSNID","工单序列号","20",10),
WLID("WLID","物料编码","WLID",10), WLID("WLID","物料编码","D",10),
OKBZ("OKBZ","OK按钮","OKBZ",10), OKBZ("OKBZ","OK按钮","OK",10),
NGBZ("NGBZ","NG按钮","NGBZ",10); NGBZ("NGBZ","NG按钮","NG",10);
private String id; private String id;
private String name; private String name;
......
...@@ -22,7 +22,17 @@ public class GphyCondition extends BaseEntity { ...@@ -22,7 +22,17 @@ public class GphyCondition extends BaseEntity {
private String woid; private String woid;
private String snid; private String snid;
private String fkid;
public String getFkid() {
return fkid;
}
public void setFkid(String fkid) {
this.fkid = fkid;
}
public String getId() { public String getId() {
return id; return id;
} }
......
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