|
@@ -251,9 +251,13 @@ public class PoTetherController extends BaseController
|
|
}
|
|
}
|
|
|
|
|
|
TetherVo tetherVo = poTetherService.selectPoTetherByTetherIdWithCollection(tetherId);
|
|
TetherVo tetherVo = poTetherService.selectPoTetherByTetherIdWithCollection(tetherId);
|
|
- if (tetherVo.getCochain() == 0){
|
|
|
|
|
|
+ if (tetherVo.getCochain() == 0 && cochain == 0){
|
|
return error("禁止重复上链");
|
|
return error("禁止重复上链");
|
|
}
|
|
}
|
|
|
|
+ if (tetherVo.getCochain() == 1 && cochain == 1){
|
|
|
|
+ return error("禁止重复下链");
|
|
|
|
+ }
|
|
|
|
+
|
|
return toAjax(poTetherService.updatePoTetherIsCochain(cochain,tetherId));
|
|
return toAjax(poTetherService.updatePoTetherIsCochain(cochain,tetherId));
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -269,13 +273,16 @@ public class PoTetherController extends BaseController
|
|
}
|
|
}
|
|
TetherVo tetherVo = poTetherService.selectPoTetherByTetherIdWithCollection(tetherId);
|
|
TetherVo tetherVo = poTetherService.selectPoTetherByTetherIdWithCollection(tetherId);
|
|
|
|
|
|
- if (tetherVo.getCochain() == 0 ){
|
|
|
|
|
|
+ if (tetherVo.getCochain() == 0){
|
|
|
|
|
|
return error("此套系为上链状态禁止上架");
|
|
return error("此套系为上链状态禁止上架");
|
|
}
|
|
}
|
|
- if (tetherVo.getGrounding() == 0){
|
|
|
|
|
|
+ if (tetherVo.getGrounding() == 0 && grounding == 0 ){
|
|
return error("禁止重复上架");
|
|
return error("禁止重复上架");
|
|
}
|
|
}
|
|
|
|
+ if (tetherVo.getGrounding() == 1 && grounding == 1 ){
|
|
|
|
+ return error("禁止重复下架");
|
|
|
|
+ }
|
|
return toAjax(poTetherService.updatePoTetherIsGrounding(grounding,tetherId));
|
|
return toAjax(poTetherService.updatePoTetherIsGrounding(grounding,tetherId));
|
|
}
|
|
}
|
|
|
|
|