code format

master
erzhongxmu 2024-02-23 18:27:41 +08:00
parent e3c411950e
commit 1c7e96d951
1 changed files with 28 additions and 39 deletions

View File

@ -65,14 +65,7 @@ import java.net.URI;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder;
/**
* @Title: Controller
* @Description: ba_store_area
* @author onlineGenerator
* @date 2021-07-13 09:34:52
* @version V1.0
*
*/
@Controller @Controller
@RequestMapping("/baStoreAreaController") @RequestMapping("/baStoreAreaController")
public class BaStoreAreaController extends BaseController { public class BaStoreAreaController extends BaseController {
@ -87,12 +80,12 @@ public class BaStoreAreaController extends BaseController {
private SystemService systemService; private SystemService systemService;
@Autowired @Autowired
private Validator validator; private Validator validator;
/** /**
* ba_store_area * ba_store_area
* *
* @return * @return
*/ */
@RequestMapping(params = "list") @RequestMapping(params = "list")
@ -102,7 +95,7 @@ public class BaStoreAreaController extends BaseController {
/** /**
* easyui AJAX * easyui AJAX
* *
* @param request * @param request
* @param response * @param response
* @param dataGrid * @param dataGrid
@ -131,10 +124,10 @@ public class BaStoreAreaController extends BaseController {
this.baStoreAreaService.getDataGridReturn(cq, true); this.baStoreAreaService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid); TagUtil.datagrid(response, dataGrid);
} }
/** /**
* ba_store_area * ba_store_area
* *
* @return * @return
*/ */
@RequestMapping(params = "doDel") @RequestMapping(params = "doDel")
@ -149,16 +142,15 @@ public class BaStoreAreaController extends BaseController {
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
message = "ba_store_area删除失败"; throw new BusinessException(e.getMessage());
throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
/** /**
* ba_store_area * ba_store_area
* *
* @return * @return
*/ */
@RequestMapping(params = "doBatchDel") @RequestMapping(params = "doBatchDel")
@ -169,7 +161,7 @@ public class BaStoreAreaController extends BaseController {
message = "ba_store_area删除成功"; message = "ba_store_area删除成功";
try{ try{
for(String id:ids.split(",")){ for(String id:ids.split(",")){
BaStoreAreaEntity baStoreArea = systemService.getEntity(BaStoreAreaEntity.class, BaStoreAreaEntity baStoreArea = systemService.getEntity(BaStoreAreaEntity.class,
id id
); );
baStoreAreaService.delete(baStoreArea); baStoreAreaService.delete(baStoreArea);
@ -177,8 +169,7 @@ public class BaStoreAreaController extends BaseController {
} }
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
message = "ba_store_area删除失败"; throw new BusinessException(e.getMessage());
throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
@ -187,7 +178,7 @@ public class BaStoreAreaController extends BaseController {
/** /**
* ba_store_area * ba_store_area
* *
* @param ids * @param ids
* @return * @return
*/ */
@ -202,16 +193,15 @@ public class BaStoreAreaController extends BaseController {
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
message = "ba_store_area添加失败"; throw new BusinessException(e.getMessage());
throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
/** /**
* ba_store_area * ba_store_area
* *
* @param ids * @param ids
* @return * @return
*/ */
@ -228,17 +218,16 @@ public class BaStoreAreaController extends BaseController {
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
message = "ba_store_area更新失败"; throw new BusinessException(e.getMessage());
throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
/** /**
* ba_store_area * ba_store_area
* *
* @return * @return
*/ */
@RequestMapping(params = "goAdd") @RequestMapping(params = "goAdd")
@ -251,7 +240,7 @@ public class BaStoreAreaController extends BaseController {
} }
/** /**
* ba_store_area * ba_store_area
* *
* @return * @return
*/ */
@RequestMapping(params = "goUpdate") @RequestMapping(params = "goUpdate")
@ -262,10 +251,10 @@ public class BaStoreAreaController extends BaseController {
} }
return new ModelAndView("com/zzjee/wm/baStoreArea-update"); return new ModelAndView("com/zzjee/wm/baStoreArea-update");
} }
/** /**
* *
* *
* @return * @return
*/ */
@RequestMapping(params = "upload") @RequestMapping(params = "upload")
@ -273,10 +262,10 @@ public class BaStoreAreaController extends BaseController {
req.setAttribute("controller_name","baStoreAreaController"); req.setAttribute("controller_name","baStoreAreaController");
return new ModelAndView("common/upload/pub_excel_upload"); return new ModelAndView("common/upload/pub_excel_upload");
} }
/** /**
* excel * excel
* *
* @param request * @param request
* @param response * @param response
*/ */
@ -295,7 +284,7 @@ public class BaStoreAreaController extends BaseController {
} }
/** /**
* excel 使 * excel 使
* *
* @param request * @param request
* @param response * @param response
*/ */
@ -309,13 +298,13 @@ public class BaStoreAreaController extends BaseController {
modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
return NormalExcelConstants.JEECG_EXCEL_VIEW; return NormalExcelConstants.JEECG_EXCEL_VIEW;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@RequestMapping(params = "importExcel", method = RequestMethod.POST) @RequestMapping(params = "importExcel", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
AjaxJson j = new AjaxJson(); AjaxJson j = new AjaxJson();
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
@ -343,14 +332,14 @@ public class BaStoreAreaController extends BaseController {
} }
return j; return j;
} }
@RequestMapping(method = RequestMethod.GET) @RequestMapping(method = RequestMethod.GET)
@ResponseBody @ResponseBody
public List<BaStoreAreaEntity> list() { public List<BaStoreAreaEntity> list() {
List<BaStoreAreaEntity> listBaStoreAreas=baStoreAreaService.getList(BaStoreAreaEntity.class); List<BaStoreAreaEntity> listBaStoreAreas=baStoreAreaService.getList(BaStoreAreaEntity.class);
return listBaStoreAreas; return listBaStoreAreas;
} }
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public ResponseEntity<?> get(@PathVariable("id") String id) { public ResponseEntity<?> get(@PathVariable("id") String id) {