去除外键之仓库表jsh_depot相关修改

This commit is contained in:
qiankunpingtai
2019-04-10 17:54:35 +08:00
parent bb1f9b7e97
commit 9fa082f25c
7 changed files with 162 additions and 10 deletions

View File

@@ -185,9 +185,20 @@ public class DepotController {
* @return java.lang.Object
*/
@RequestMapping(value = "/batchDeleteDepotByIds")
public Object batchDeleteDepotByIds(@RequestParam("ids") String ids) throws Exception {
public Object batchDeleteDepotByIds(@RequestParam("ids") String ids,@RequestParam(value="deleteType",
required =false,defaultValue=BusinessConstants.DELETE_TYPE_NORMAL)String deleteType) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
int i= depotService.batchDeleteDepotByIds(ids);
int i=0;
if(BusinessConstants.DELETE_TYPE_NORMAL.equals(deleteType)){
i= depotService.batchDeleteDepotByIdsNormal(ids);
}else if(BusinessConstants.DELETE_TYPE_FORCE.equals(deleteType)){
i= depotService.batchDeleteDepotByIds(ids);
}else{
logger.error("异常码[{}],异常提示[{}],参数,ids[{}],deleteType[{}]",
ExceptionConstants.DELETE_REFUSED_CODE,ExceptionConstants.DELETE_REFUSED_MSG,ids,deleteType);
throw new BusinessRunTimeException(ExceptionConstants.DELETE_REFUSED_CODE,
ExceptionConstants.DELETE_REFUSED_MSG);
}
if(i<1){
logger.error("异常码[{}],异常提示[{}],参数,ids[{}]",
ExceptionConstants.DEPOT_DELETE_FAILED_CODE,ExceptionConstants.DEPOT_DELETE_FAILED_MSG,ids);