code formate

master
erzhongxmu 2024-03-14 20:57:00 +08:00
parent 035be23c99
commit 3b2bb0962d
1 changed files with 28 additions and 33 deletions

View File

@ -78,12 +78,12 @@ 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 * @Title: Controller
* @Description: * @Description:
* @author erzhongxmu * @author erzhongxmu
* @date 2017-11-20 22:48:23 * @date 2017-11-20 22:48:23
* @version V1.0 * @version V1.0
* *
*/ */
@Controller @Controller
@ -100,12 +100,12 @@ public class WvStockSttBinController extends BaseController {
private SystemService systemService; private SystemService systemService;
@Autowired @Autowired
private Validator validator; private Validator validator;
/** /**
* *
* *
* @return * @return
*/ */
@RequestMapping(params = "list") @RequestMapping(params = "list")
@ -115,7 +115,7 @@ public class WvStockSttBinController extends BaseController {
/** /**
* easyui AJAX * easyui AJAX
* *
* @param request * @param request
* @param response * @param response
* @param dataGrid * @param dataGrid
@ -136,10 +136,10 @@ public class WvStockSttBinController extends BaseController {
this.wvStockSttBinService.getDataGridReturn(cq, true); this.wvStockSttBinService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid); TagUtil.datagrid(response, dataGrid);
} }
/** /**
* *
* *
* @return * @return
*/ */
@RequestMapping(params = "doDel") @RequestMapping(params = "doDel")
@ -154,16 +154,15 @@ public class WvStockSttBinController 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 = "储位盘点删除失败";
throw new BusinessException(e.getMessage()); throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
/** /**
* *
* *
* @return * @return
*/ */
@RequestMapping(params = "doBatchDel") @RequestMapping(params = "doBatchDel")
@ -174,7 +173,7 @@ public class WvStockSttBinController extends BaseController {
message = "储位盘点删除成功"; message = "储位盘点删除成功";
try{ try{
for(String id:ids.split(",")){ for(String id:ids.split(",")){
WvStockSttBinEntity wvStockSttBin = systemService.getEntity(WvStockSttBinEntity.class, WvStockSttBinEntity wvStockSttBin = systemService.getEntity(WvStockSttBinEntity.class,
id id
); );
wvStockSttBinService.delete(wvStockSttBin); wvStockSttBinService.delete(wvStockSttBin);
@ -182,7 +181,6 @@ public class WvStockSttBinController extends BaseController {
} }
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
message = "储位盘点删除失败";
throw new BusinessException(e.getMessage()); throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
@ -192,7 +190,7 @@ public class WvStockSttBinController extends BaseController {
/** /**
* *
* *
* @param ids * @param ids
* @return * @return
*/ */
@ -215,16 +213,15 @@ public class WvStockSttBinController 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 = "储位盘点添加失败";
throw new BusinessException(e.getMessage()); throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
/** /**
* *
* *
* @param ids * @param ids
* @return * @return
*/ */
@ -241,14 +238,13 @@ public class WvStockSttBinController 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 = "储位盘点更新失败";
throw new BusinessException(e.getMessage()); throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
@RequestMapping(params = "dostt") @RequestMapping(params = "dostt")
@ResponseBody @ResponseBody
public AjaxJson doStt(WvStockSttBinEntity wvStock, HttpServletRequest request) { public AjaxJson doStt(WvStockSttBinEntity wvStock, HttpServletRequest request) {
@ -288,17 +284,16 @@ public class WvStockSttBinController extends BaseController {
Globals.Log_Leavel_INFO); Globals.Log_Leavel_INFO);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
message = "生成盘点单失败";
throw new BusinessException(e.getMessage()); throw new BusinessException(e.getMessage());
} }
j.setMsg(message); j.setMsg(message);
return j; return j;
} }
/** /**
* *
* *
* @return * @return
*/ */
@RequestMapping(params = "goAdd") @RequestMapping(params = "goAdd")
@ -311,7 +306,7 @@ public class WvStockSttBinController extends BaseController {
} }
/** /**
* *
* *
* @return * @return
*/ */
@RequestMapping(params = "goUpdate") @RequestMapping(params = "goUpdate")
@ -322,10 +317,10 @@ public class WvStockSttBinController extends BaseController {
} }
return new ModelAndView("com/zzjee/wm/wvStockSttBin-update"); return new ModelAndView("com/zzjee/wm/wvStockSttBin-update");
} }
/** /**
* *
* *
* @return * @return
*/ */
@RequestMapping(params = "upload") @RequestMapping(params = "upload")
@ -333,10 +328,10 @@ public class WvStockSttBinController extends BaseController {
req.setAttribute("controller_name","wvStockSttBinController"); req.setAttribute("controller_name","wvStockSttBinController");
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
*/ */
@ -355,7 +350,7 @@ public class WvStockSttBinController extends BaseController {
} }
/** /**
* excel 使 * excel 使
* *
* @param request * @param request
* @param response * @param response
*/ */
@ -369,13 +364,13 @@ public class WvStockSttBinController 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()) {
@ -403,14 +398,14 @@ public class WvStockSttBinController extends BaseController {
} }
return j; return j;
} }
@RequestMapping(method = RequestMethod.GET) @RequestMapping(method = RequestMethod.GET)
@ResponseBody @ResponseBody
public List<WvStockSttBinEntity> list() { public List<WvStockSttBinEntity> list() {
List<WvStockSttBinEntity> listWvStockSttBins=wvStockSttBinService.getList(WvStockSttBinEntity.class); List<WvStockSttBinEntity> listWvStockSttBins=wvStockSttBinService.getList(WvStockSttBinEntity.class);
return listWvStockSttBins; return listWvStockSttBins;
} }
@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) {