From fbd44f3fe390b1bab186d1c3cdc4a0e8911b1bc7 Mon Sep 17 00:00:00 2001 From: e Date: Wed, 11 Dec 2019 09:10:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=B4=B9=E5=92=8C=E6=B3=A2=E6=AC=A1?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ba/controller/BaStoreController.java | 406 ++++++++++++++++++ .../ba/controller/WmsWaveConfController.java | 406 ++++++++++++++++++ .../com/zzjee/ba/entity/BaStoreEntity.java | 256 +++++++++++ .../zzjee/ba/entity/WmsWaveConfEntity.java | 312 ++++++++++++++ .../com/zzjee/ba/service/BaStoreServiceI.java | 15 + .../zzjee/ba/service/WmsWaveConfServiceI.java | 15 + .../ba/service/impl/BaStoreServiceImpl.java | 140 ++++++ .../service/impl/WmsWaveConfServiceImpl.java | 146 +++++++ .../controller/TmsYufeiConfController.java | 406 ++++++++++++++++++ .../zzjee/tms/entity/TmsYufeiConfEntity.java | 350 +++++++++++++++ .../tms/service/TmsYufeiConfServiceI.java | 15 + .../service/impl/TmsYufeiConfServiceImpl.java | 150 +++++++ .../resources/jeecg/jeecg_database.properties | 6 +- .../webpage/com/zzjee/ba/baStore-add.jsp | 71 +++ .../webpage/com/zzjee/ba/baStore-update.jsp | 69 +++ .../webapp/webpage/com/zzjee/ba/baStore.js | 32 ++ .../webpage/com/zzjee/ba/baStoreList.js | 0 .../webpage/com/zzjee/ba/baStoreList.jsp | 53 +++ .../webpage/com/zzjee/ba/wmsWaveConf-add.jsp | 103 +++++ .../com/zzjee/ba/wmsWaveConf-update.jsp | 98 +++++ .../webpage/com/zzjee/ba/wmsWaveConf.js | 32 ++ .../webpage/com/zzjee/ba/wmsWaveConfList.js | 0 .../webpage/com/zzjee/ba/wmsWaveConfList.jsp | 56 +++ .../com/zzjee/tms/tmsYufeiConf-add.jsp | 133 ++++++ .../com/zzjee/tms/tmsYufeiConf-update.jsp | 126 ++++++ .../webpage/com/zzjee/tms/tmsYufeiConf.js | 32 ++ .../webpage/com/zzjee/tms/tmsYufeiConfList.js | 0 .../com/zzjee/tms/tmsYufeiConfList.jsp | 58 +++ 28 files changed, 3485 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/zzjee/ba/controller/BaStoreController.java create mode 100644 src/main/java/com/zzjee/ba/controller/WmsWaveConfController.java create mode 100644 src/main/java/com/zzjee/ba/entity/BaStoreEntity.java create mode 100644 src/main/java/com/zzjee/ba/entity/WmsWaveConfEntity.java create mode 100644 src/main/java/com/zzjee/ba/service/BaStoreServiceI.java create mode 100644 src/main/java/com/zzjee/ba/service/WmsWaveConfServiceI.java create mode 100644 src/main/java/com/zzjee/ba/service/impl/BaStoreServiceImpl.java create mode 100644 src/main/java/com/zzjee/ba/service/impl/WmsWaveConfServiceImpl.java create mode 100644 src/main/java/com/zzjee/tms/controller/TmsYufeiConfController.java create mode 100644 src/main/java/com/zzjee/tms/entity/TmsYufeiConfEntity.java create mode 100644 src/main/java/com/zzjee/tms/service/TmsYufeiConfServiceI.java create mode 100644 src/main/java/com/zzjee/tms/service/impl/TmsYufeiConfServiceImpl.java create mode 100644 src/main/webapp/webpage/com/zzjee/ba/baStore-add.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/ba/baStore-update.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/ba/baStore.js create mode 100644 src/main/webapp/webpage/com/zzjee/ba/baStoreList.js create mode 100644 src/main/webapp/webpage/com/zzjee/ba/baStoreList.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-add.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-update.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf.js create mode 100644 src/main/webapp/webpage/com/zzjee/ba/wmsWaveConfList.js create mode 100644 src/main/webapp/webpage/com/zzjee/ba/wmsWaveConfList.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-add.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-update.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf.js create mode 100644 src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConfList.js create mode 100644 src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConfList.jsp diff --git a/src/main/java/com/zzjee/ba/controller/BaStoreController.java b/src/main/java/com/zzjee/ba/controller/BaStoreController.java new file mode 100644 index 00000000..027ec1d6 --- /dev/null +++ b/src/main/java/com/zzjee/ba/controller/BaStoreController.java @@ -0,0 +1,406 @@ +package com.zzjee.ba.controller; +import com.zzjee.ba.entity.BaStoreEntity; +import com.zzjee.ba.service.BaStoreServiceI; +import java.util.ArrayList; +import java.util.List; +import java.text.SimpleDateFormat; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import org.jeecgframework.core.common.controller.BaseController; +import org.jeecgframework.core.common.exception.BusinessException; +import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery; +import org.jeecgframework.core.common.model.common.TreeChildCount; +import org.jeecgframework.core.common.model.json.AjaxJson; +import org.jeecgframework.core.common.model.json.DataGrid; +import org.jeecgframework.core.constant.Globals; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.pojo.base.TSDepart; +import org.jeecgframework.web.system.service.SystemService; +import org.jeecgframework.core.util.MyBeanUtils; + +import java.io.OutputStream; +import org.jeecgframework.core.util.BrowserUtils; +import org.jeecgframework.poi.excel.ExcelExportUtil; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.entity.TemplateExportParams; +import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.jeecgframework.core.util.ResourceUtil; +import java.io.IOException; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import java.util.Map; +import java.util.HashMap; +import org.jeecgframework.core.util.ExceptionUtil; + +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.jeecgframework.core.beanvalidator.BeanValidators; +import java.util.Set; +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import java.net.URI; +import org.springframework.http.MediaType; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * @Title: Controller + * @Description: 仓库 + * @author onlineGenerator + * @date 2019-12-11 09:08:39 + * @version V1.0 + * + */ +@Controller +@RequestMapping("/baStoreController") +public class BaStoreController extends BaseController { + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(BaStoreController.class); + + @Autowired + private BaStoreServiceI baStoreService; + @Autowired + private SystemService systemService; + @Autowired + private Validator validator; + + + + /** + * 仓库列表 页面跳转 + * + * @return + */ + @RequestMapping(params = "list") + public ModelAndView list(HttpServletRequest request) { + return new ModelAndView("com/zzjee/ba/baStoreList"); + } + + /** + * easyui AJAX请求数据 + * + * @param request + * @param response + * @param dataGrid + * @param user + */ + + @RequestMapping(params = "datagrid") + public void datagrid(BaStoreEntity baStore,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { + CriteriaQuery cq = new CriteriaQuery(BaStoreEntity.class, dataGrid); + //查询条件组装器 + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, baStore, request.getParameterMap()); + try{ + //自定义追加查询条件 + }catch (Exception e) { + throw new BusinessException(e.getMessage()); + } + cq.add(); + this.baStoreService.getDataGridReturn(cq, true); + TagUtil.datagrid(response, dataGrid); + } + + /** + * 删除仓库 + * + * @return + */ + @RequestMapping(params = "doDel") + @ResponseBody + public AjaxJson doDel(BaStoreEntity baStore, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + baStore = systemService.getEntity(BaStoreEntity.class, baStore.getId()); + message = "仓库删除成功"; + try{ + baStoreService.delete(baStore); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "仓库删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 批量删除仓库 + * + * @return + */ + @RequestMapping(params = "doBatchDel") + @ResponseBody + public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + String message = null; + AjaxJson j = new AjaxJson(); + message = "仓库删除成功"; + try{ + for(String id:ids.split(",")){ + BaStoreEntity baStore = systemService.getEntity(BaStoreEntity.class, + id + ); + baStoreService.delete(baStore); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + } + }catch(Exception e){ + e.printStackTrace(); + message = "仓库删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 添加仓库 + * + * @param ids + * @return + */ + @RequestMapping(params = "doAdd") + @ResponseBody + public AjaxJson doAdd(BaStoreEntity baStore, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "仓库添加成功"; + try{ + baStoreService.save(baStore); + systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "仓库添加失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 更新仓库 + * + * @param ids + * @return + */ + @RequestMapping(params = "doUpdate") + @ResponseBody + public AjaxJson doUpdate(BaStoreEntity baStore, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "仓库更新成功"; + BaStoreEntity t = baStoreService.get(BaStoreEntity.class, baStore.getId()); + try { + MyBeanUtils.copyBeanNotNull2Bean(baStore, t); + baStoreService.saveOrUpdate(t); + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "仓库更新失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 仓库新增页面跳转 + * + * @return + */ + @RequestMapping(params = "goAdd") + public ModelAndView goAdd(BaStoreEntity baStore, HttpServletRequest req) { + if (StringUtil.isNotEmpty(baStore.getId())) { + baStore = baStoreService.getEntity(BaStoreEntity.class, baStore.getId()); + req.setAttribute("baStorePage", baStore); + } + return new ModelAndView("com/zzjee/ba/baStore-add"); + } + /** + * 仓库编辑页面跳转 + * + * @return + */ + @RequestMapping(params = "goUpdate") + public ModelAndView goUpdate(BaStoreEntity baStore, HttpServletRequest req) { + if (StringUtil.isNotEmpty(baStore.getId())) { + baStore = baStoreService.getEntity(BaStoreEntity.class, baStore.getId()); + req.setAttribute("baStorePage", baStore); + } + return new ModelAndView("com/zzjee/ba/baStore-update"); + } + + /** + * 导入功能跳转 + * + * @return + */ + @RequestMapping(params = "upload") + public ModelAndView upload(HttpServletRequest req) { + req.setAttribute("controller_name","baStoreController"); + return new ModelAndView("common/upload/pub_excel_upload"); + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXls") + public String exportXls(BaStoreEntity baStore,HttpServletRequest request,HttpServletResponse response + , DataGrid dataGrid,ModelMap modelMap) { + CriteriaQuery cq = new CriteriaQuery(BaStoreEntity.class, dataGrid); + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, baStore, request.getParameterMap()); + List baStores = this.baStoreService.getListByCriteriaQuery(cq,false); + modelMap.put(NormalExcelConstants.FILE_NAME,"仓库"); + modelMap.put(NormalExcelConstants.CLASS,BaStoreEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓库列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,baStores); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + /** + * 导出excel 使模板 + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXlsByT") + public String exportXlsByT(BaStoreEntity baStore,HttpServletRequest request,HttpServletResponse response + , DataGrid dataGrid,ModelMap modelMap) { + modelMap.put(NormalExcelConstants.FILE_NAME,"仓库"); + modelMap.put(NormalExcelConstants.CLASS,BaStoreEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓库列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + + @SuppressWarnings("unchecked") + @RequestMapping(params = "importExcel", method = RequestMethod.POST) + @ResponseBody + public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { + AjaxJson j = new AjaxJson(); + + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List listBaStoreEntitys = ExcelImportUtil.importExcel(file.getInputStream(),BaStoreEntity.class,params); + for (BaStoreEntity baStore : listBaStoreEntitys) { + baStoreService.save(baStore); + } + j.setMsg("文件导入成功!"); + } catch (Exception e) { + j.setMsg("文件导入失败!"); + logger.error(ExceptionUtil.getExceptionMessage(e)); + }finally{ + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return j; + } + + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public List list() { + List listBaStores=baStoreService.getList(BaStoreEntity.class); + return listBaStores; + } + + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + public ResponseEntity get(@PathVariable("id") String id) { + BaStoreEntity task = baStoreService.get(BaStoreEntity.class, id); + if (task == null) { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + return new ResponseEntity(task, HttpStatus.OK); + } + + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public ResponseEntity create(@RequestBody BaStoreEntity baStore, UriComponentsBuilder uriBuilder) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(baStore); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + baStoreService.save(baStore); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + //按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象. + String id = baStore.getId(); + URI uri = uriBuilder.path("/rest/baStoreController/" + id).build().toUri(); + HttpHeaders headers = new HttpHeaders(); + headers.setLocation(uri); + + return new ResponseEntity(headers, HttpStatus.CREATED); + } + + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity update(@RequestBody BaStoreEntity baStore) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(baStore); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + baStoreService.saveOrUpdate(baStore); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + + //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码. + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseStatus(HttpStatus.NO_CONTENT) + public void delete(@PathVariable("id") String id) { + baStoreService.deleteEntityById(BaStoreEntity.class, id); + } +} diff --git a/src/main/java/com/zzjee/ba/controller/WmsWaveConfController.java b/src/main/java/com/zzjee/ba/controller/WmsWaveConfController.java new file mode 100644 index 00000000..e9eb53f1 --- /dev/null +++ b/src/main/java/com/zzjee/ba/controller/WmsWaveConfController.java @@ -0,0 +1,406 @@ +package com.zzjee.ba.controller; +import com.zzjee.ba.entity.WmsWaveConfEntity; +import com.zzjee.ba.service.WmsWaveConfServiceI; +import java.util.ArrayList; +import java.util.List; +import java.text.SimpleDateFormat; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import org.jeecgframework.core.common.controller.BaseController; +import org.jeecgframework.core.common.exception.BusinessException; +import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery; +import org.jeecgframework.core.common.model.common.TreeChildCount; +import org.jeecgframework.core.common.model.json.AjaxJson; +import org.jeecgframework.core.common.model.json.DataGrid; +import org.jeecgframework.core.constant.Globals; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.pojo.base.TSDepart; +import org.jeecgframework.web.system.service.SystemService; +import org.jeecgframework.core.util.MyBeanUtils; + +import java.io.OutputStream; +import org.jeecgframework.core.util.BrowserUtils; +import org.jeecgframework.poi.excel.ExcelExportUtil; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.entity.TemplateExportParams; +import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.jeecgframework.core.util.ResourceUtil; +import java.io.IOException; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import java.util.Map; +import java.util.HashMap; +import org.jeecgframework.core.util.ExceptionUtil; + +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.jeecgframework.core.beanvalidator.BeanValidators; +import java.util.Set; +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import java.net.URI; +import org.springframework.http.MediaType; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * @Title: Controller + * @Description: 波次配置 + * @author onlineGenerator + * @date 2019-12-11 09:08:25 + * @version V1.0 + * + */ +@Controller +@RequestMapping("/wmsWaveConfController") +public class WmsWaveConfController extends BaseController { + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(WmsWaveConfController.class); + + @Autowired + private WmsWaveConfServiceI wmsWaveConfService; + @Autowired + private SystemService systemService; + @Autowired + private Validator validator; + + + + /** + * 波次配置列表 页面跳转 + * + * @return + */ + @RequestMapping(params = "list") + public ModelAndView list(HttpServletRequest request) { + return new ModelAndView("com/zzjee/ba/wmsWaveConfList"); + } + + /** + * easyui AJAX请求数据 + * + * @param request + * @param response + * @param dataGrid + * @param user + */ + + @RequestMapping(params = "datagrid") + public void datagrid(WmsWaveConfEntity wmsWaveConf,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { + CriteriaQuery cq = new CriteriaQuery(WmsWaveConfEntity.class, dataGrid); + //查询条件组装器 + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmsWaveConf, request.getParameterMap()); + try{ + //自定义追加查询条件 + }catch (Exception e) { + throw new BusinessException(e.getMessage()); + } + cq.add(); + this.wmsWaveConfService.getDataGridReturn(cq, true); + TagUtil.datagrid(response, dataGrid); + } + + /** + * 删除波次配置 + * + * @return + */ + @RequestMapping(params = "doDel") + @ResponseBody + public AjaxJson doDel(WmsWaveConfEntity wmsWaveConf, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + wmsWaveConf = systemService.getEntity(WmsWaveConfEntity.class, wmsWaveConf.getId()); + message = "波次配置删除成功"; + try{ + wmsWaveConfService.delete(wmsWaveConf); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "波次配置删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 批量删除波次配置 + * + * @return + */ + @RequestMapping(params = "doBatchDel") + @ResponseBody + public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + String message = null; + AjaxJson j = new AjaxJson(); + message = "波次配置删除成功"; + try{ + for(String id:ids.split(",")){ + WmsWaveConfEntity wmsWaveConf = systemService.getEntity(WmsWaveConfEntity.class, + id + ); + wmsWaveConfService.delete(wmsWaveConf); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + } + }catch(Exception e){ + e.printStackTrace(); + message = "波次配置删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 添加波次配置 + * + * @param ids + * @return + */ + @RequestMapping(params = "doAdd") + @ResponseBody + public AjaxJson doAdd(WmsWaveConfEntity wmsWaveConf, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "波次配置添加成功"; + try{ + wmsWaveConfService.save(wmsWaveConf); + systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "波次配置添加失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 更新波次配置 + * + * @param ids + * @return + */ + @RequestMapping(params = "doUpdate") + @ResponseBody + public AjaxJson doUpdate(WmsWaveConfEntity wmsWaveConf, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "波次配置更新成功"; + WmsWaveConfEntity t = wmsWaveConfService.get(WmsWaveConfEntity.class, wmsWaveConf.getId()); + try { + MyBeanUtils.copyBeanNotNull2Bean(wmsWaveConf, t); + wmsWaveConfService.saveOrUpdate(t); + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "波次配置更新失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 波次配置新增页面跳转 + * + * @return + */ + @RequestMapping(params = "goAdd") + public ModelAndView goAdd(WmsWaveConfEntity wmsWaveConf, HttpServletRequest req) { + if (StringUtil.isNotEmpty(wmsWaveConf.getId())) { + wmsWaveConf = wmsWaveConfService.getEntity(WmsWaveConfEntity.class, wmsWaveConf.getId()); + req.setAttribute("wmsWaveConfPage", wmsWaveConf); + } + return new ModelAndView("com/zzjee/ba/wmsWaveConf-add"); + } + /** + * 波次配置编辑页面跳转 + * + * @return + */ + @RequestMapping(params = "goUpdate") + public ModelAndView goUpdate(WmsWaveConfEntity wmsWaveConf, HttpServletRequest req) { + if (StringUtil.isNotEmpty(wmsWaveConf.getId())) { + wmsWaveConf = wmsWaveConfService.getEntity(WmsWaveConfEntity.class, wmsWaveConf.getId()); + req.setAttribute("wmsWaveConfPage", wmsWaveConf); + } + return new ModelAndView("com/zzjee/ba/wmsWaveConf-update"); + } + + /** + * 导入功能跳转 + * + * @return + */ + @RequestMapping(params = "upload") + public ModelAndView upload(HttpServletRequest req) { + req.setAttribute("controller_name","wmsWaveConfController"); + return new ModelAndView("common/upload/pub_excel_upload"); + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXls") + public String exportXls(WmsWaveConfEntity wmsWaveConf,HttpServletRequest request,HttpServletResponse response + , DataGrid dataGrid,ModelMap modelMap) { + CriteriaQuery cq = new CriteriaQuery(WmsWaveConfEntity.class, dataGrid); + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmsWaveConf, request.getParameterMap()); + List wmsWaveConfs = this.wmsWaveConfService.getListByCriteriaQuery(cq,false); + modelMap.put(NormalExcelConstants.FILE_NAME,"波次配置"); + modelMap.put(NormalExcelConstants.CLASS,WmsWaveConfEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("波次配置列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,wmsWaveConfs); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + /** + * 导出excel 使模板 + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXlsByT") + public String exportXlsByT(WmsWaveConfEntity wmsWaveConf,HttpServletRequest request,HttpServletResponse response + , DataGrid dataGrid,ModelMap modelMap) { + modelMap.put(NormalExcelConstants.FILE_NAME,"波次配置"); + modelMap.put(NormalExcelConstants.CLASS,WmsWaveConfEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("波次配置列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + + @SuppressWarnings("unchecked") + @RequestMapping(params = "importExcel", method = RequestMethod.POST) + @ResponseBody + public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { + AjaxJson j = new AjaxJson(); + + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List listWmsWaveConfEntitys = ExcelImportUtil.importExcel(file.getInputStream(),WmsWaveConfEntity.class,params); + for (WmsWaveConfEntity wmsWaveConf : listWmsWaveConfEntitys) { + wmsWaveConfService.save(wmsWaveConf); + } + j.setMsg("文件导入成功!"); + } catch (Exception e) { + j.setMsg("文件导入失败!"); + logger.error(ExceptionUtil.getExceptionMessage(e)); + }finally{ + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return j; + } + + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public List list() { + List listWmsWaveConfs=wmsWaveConfService.getList(WmsWaveConfEntity.class); + return listWmsWaveConfs; + } + + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + public ResponseEntity get(@PathVariable("id") String id) { + WmsWaveConfEntity task = wmsWaveConfService.get(WmsWaveConfEntity.class, id); + if (task == null) { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + return new ResponseEntity(task, HttpStatus.OK); + } + + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public ResponseEntity create(@RequestBody WmsWaveConfEntity wmsWaveConf, UriComponentsBuilder uriBuilder) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(wmsWaveConf); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + wmsWaveConfService.save(wmsWaveConf); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + //按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象. + String id = wmsWaveConf.getId(); + URI uri = uriBuilder.path("/rest/wmsWaveConfController/" + id).build().toUri(); + HttpHeaders headers = new HttpHeaders(); + headers.setLocation(uri); + + return new ResponseEntity(headers, HttpStatus.CREATED); + } + + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity update(@RequestBody WmsWaveConfEntity wmsWaveConf) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(wmsWaveConf); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + wmsWaveConfService.saveOrUpdate(wmsWaveConf); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + + //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码. + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseStatus(HttpStatus.NO_CONTENT) + public void delete(@PathVariable("id") String id) { + wmsWaveConfService.deleteEntityById(WmsWaveConfEntity.class, id); + } +} diff --git a/src/main/java/com/zzjee/ba/entity/BaStoreEntity.java b/src/main/java/com/zzjee/ba/entity/BaStoreEntity.java new file mode 100644 index 00000000..4c6c4e57 --- /dev/null +++ b/src/main/java/com/zzjee/ba/entity/BaStoreEntity.java @@ -0,0 +1,256 @@ +package com.zzjee.ba.entity; + +import java.math.BigDecimal; +import java.util.Date; +import java.lang.String; +import java.lang.Double; +import java.lang.Integer; +import java.math.BigDecimal; +import javax.xml.soap.Text; +import java.sql.Blob; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; +import javax.persistence.SequenceGenerator; +import org.jeecgframework.poi.excel.annotation.Excel; + +/** + * @Title: Entity + * @Description: 仓库 + * @author onlineGenerator + * @date 2019-12-11 09:08:39 + * @version V1.0 + * + */ +@Entity +@Table(name = "ba_store", schema = "") +@SuppressWarnings("serial") +public class BaStoreEntity implements java.io.Serializable { + /**主键*/ + private String id; + /**创建人名称*/ + private String createName; + /**创建人登录名称*/ + private String createBy; + /**创建日期*/ + private Date createDate; + /**更新人名称*/ + private String updateName; + /**更新人登录名称*/ + private String updateBy; + /**更新日期*/ + private Date updateDate; + /**所属部门*/ + private String sysOrgCode; + /**所属公司*/ + private String sysCompanyCode; + /**仓库代码*/ + @Excel(name="仓库代码") + private String storeCode; + /**仓库名称*/ + @Excel(name="仓库名称") + private String storeName; + /**仓库属性*/ + @Excel(name="仓库属性") + private String storeText; + + /** + *方法: 取得java.lang.String + *@return: java.lang.String 主键 + */ + @Id + @GeneratedValue(generator = "paymentableGenerator") + @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") + @Column(name ="ID",nullable=false,length=36) + public String getId(){ + return this.id; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 主键 + */ + public void setId(String id){ + this.id = id; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人名称 + */ + @Column(name ="CREATE_NAME",nullable=true,length=50) + public String getCreateName(){ + return this.createName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人名称 + */ + public void setCreateName(String createName){ + this.createName = createName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人登录名称 + */ + @Column(name ="CREATE_BY",nullable=true,length=50) + public String getCreateBy(){ + return this.createBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人登录名称 + */ + public void setCreateBy(String createBy){ + this.createBy = createBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 创建日期 + */ + @Column(name ="CREATE_DATE",nullable=true,length=20) + public Date getCreateDate(){ + return this.createDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 创建日期 + */ + public void setCreateDate(Date createDate){ + this.createDate = createDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人名称 + */ + @Column(name ="UPDATE_NAME",nullable=true,length=50) + public String getUpdateName(){ + return this.updateName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人名称 + */ + public void setUpdateName(String updateName){ + this.updateName = updateName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人登录名称 + */ + @Column(name ="UPDATE_BY",nullable=true,length=50) + public String getUpdateBy(){ + return this.updateBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人登录名称 + */ + public void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 更新日期 + */ + @Column(name ="UPDATE_DATE",nullable=true,length=20) + public Date getUpdateDate(){ + return this.updateDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 更新日期 + */ + public void setUpdateDate(Date updateDate){ + this.updateDate = updateDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属部门 + */ + @Column(name ="SYS_ORG_CODE",nullable=true,length=50) + public String getSysOrgCode(){ + return this.sysOrgCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属部门 + */ + public void setSysOrgCode(String sysOrgCode){ + this.sysOrgCode = sysOrgCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属公司 + */ + @Column(name ="SYS_COMPANY_CODE",nullable=true,length=50) + public String getSysCompanyCode(){ + return this.sysCompanyCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属公司 + */ + public void setSysCompanyCode(String sysCompanyCode){ + this.sysCompanyCode = sysCompanyCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 仓库代码 + */ + @Column(name ="STORE_CODE",nullable=true,length=32) + public String getStoreCode(){ + return this.storeCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 仓库代码 + */ + public void setStoreCode(String storeCode){ + this.storeCode = storeCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 仓库名称 + */ + @Column(name ="STORE_NAME",nullable=true,length=32) + public String getStoreName(){ + return this.storeName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 仓库名称 + */ + public void setStoreName(String storeName){ + this.storeName = storeName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 仓库属性 + */ + @Column(name ="STORE_TEXT",nullable=true,length=256) + public String getStoreText(){ + return this.storeText; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 仓库属性 + */ + public void setStoreText(String storeText){ + this.storeText = storeText; + } +} diff --git a/src/main/java/com/zzjee/ba/entity/WmsWaveConfEntity.java b/src/main/java/com/zzjee/ba/entity/WmsWaveConfEntity.java new file mode 100644 index 00000000..bafb73ef --- /dev/null +++ b/src/main/java/com/zzjee/ba/entity/WmsWaveConfEntity.java @@ -0,0 +1,312 @@ +package com.zzjee.ba.entity; + +import java.math.BigDecimal; +import java.util.Date; +import java.lang.String; +import java.lang.Double; +import java.lang.Integer; +import java.math.BigDecimal; +import javax.xml.soap.Text; +import java.sql.Blob; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; +import javax.persistence.SequenceGenerator; +import org.jeecgframework.poi.excel.annotation.Excel; + +/** + * @Title: Entity + * @Description: 波次配置 + * @author onlineGenerator + * @date 2019-12-11 09:08:25 + * @version V1.0 + * + */ +@Entity +@Table(name = "wms_wave_conf", schema = "") +@SuppressWarnings("serial") +public class WmsWaveConfEntity implements java.io.Serializable { + /**主键*/ + private String id; + /**创建人名称*/ + private String createName; + /**创建人登录名称*/ + private String createBy; + /**创建日期*/ + private Date createDate; + /**更新人名称*/ + private String updateName; + /**更新人登录名称*/ + private String updateBy; + /**更新日期*/ + private Date updateDate; + /**所属部门*/ + private String sysOrgCode; + /**所属公司*/ + private String sysCompanyCode; + /**流程状态*/ + private String bpmStatus; + /**配送点*/ + @Excel(name="配送点") + private String peisondian; + /**波次类型*/ + @Excel(name="波次类型") + private String waveType; + /**备用1*/ + @Excel(name="备用1") + private String wvBy1; + /**备用2*/ + @Excel(name="备用2") + private String wvBy2; + /**备用3*/ + @Excel(name="备用3") + private String wvBy3; + + /** + *方法: 取得java.lang.String + *@return: java.lang.String 主键 + */ + @Id + @GeneratedValue(generator = "paymentableGenerator") + @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") + @Column(name ="ID",nullable=false,length=36) + public String getId(){ + return this.id; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 主键 + */ + public void setId(String id){ + this.id = id; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人名称 + */ + @Column(name ="CREATE_NAME",nullable=true,length=50) + public String getCreateName(){ + return this.createName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人名称 + */ + public void setCreateName(String createName){ + this.createName = createName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人登录名称 + */ + @Column(name ="CREATE_BY",nullable=true,length=50) + public String getCreateBy(){ + return this.createBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人登录名称 + */ + public void setCreateBy(String createBy){ + this.createBy = createBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 创建日期 + */ + @Column(name ="CREATE_DATE",nullable=true,length=20) + public Date getCreateDate(){ + return this.createDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 创建日期 + */ + public void setCreateDate(Date createDate){ + this.createDate = createDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人名称 + */ + @Column(name ="UPDATE_NAME",nullable=true,length=50) + public String getUpdateName(){ + return this.updateName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人名称 + */ + public void setUpdateName(String updateName){ + this.updateName = updateName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人登录名称 + */ + @Column(name ="UPDATE_BY",nullable=true,length=50) + public String getUpdateBy(){ + return this.updateBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人登录名称 + */ + public void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 更新日期 + */ + @Column(name ="UPDATE_DATE",nullable=true,length=20) + public Date getUpdateDate(){ + return this.updateDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 更新日期 + */ + public void setUpdateDate(Date updateDate){ + this.updateDate = updateDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属部门 + */ + @Column(name ="SYS_ORG_CODE",nullable=true,length=50) + public String getSysOrgCode(){ + return this.sysOrgCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属部门 + */ + public void setSysOrgCode(String sysOrgCode){ + this.sysOrgCode = sysOrgCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属公司 + */ + @Column(name ="SYS_COMPANY_CODE",nullable=true,length=50) + public String getSysCompanyCode(){ + return this.sysCompanyCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属公司 + */ + public void setSysCompanyCode(String sysCompanyCode){ + this.sysCompanyCode = sysCompanyCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 流程状态 + */ + @Column(name ="BPM_STATUS",nullable=true,length=32) + public String getBpmStatus(){ + return this.bpmStatus; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 流程状态 + */ + public void setBpmStatus(String bpmStatus){ + this.bpmStatus = bpmStatus; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 配送点 + */ + @Column(name ="PEISONDIAN",nullable=true,length=32) + public String getPeisondian(){ + return this.peisondian; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 配送点 + */ + public void setPeisondian(String peisondian){ + this.peisondian = peisondian; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 波次类型 + */ + @Column(name ="WAVE_TYPE",nullable=true,length=32) + public String getWaveType(){ + return this.waveType; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 波次类型 + */ + public void setWaveType(String waveType){ + this.waveType = waveType; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 备用1 + */ + @Column(name ="WV_BY1",nullable=true,length=32) + public String getWvBy1(){ + return this.wvBy1; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 备用1 + */ + public void setWvBy1(String wvBy1){ + this.wvBy1 = wvBy1; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 备用2 + */ + @Column(name ="WV_BY2",nullable=true,length=32) + public String getWvBy2(){ + return this.wvBy2; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 备用2 + */ + public void setWvBy2(String wvBy2){ + this.wvBy2 = wvBy2; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 备用3 + */ + @Column(name ="WV_BY3",nullable=true,length=32) + public String getWvBy3(){ + return this.wvBy3; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 备用3 + */ + public void setWvBy3(String wvBy3){ + this.wvBy3 = wvBy3; + } +} diff --git a/src/main/java/com/zzjee/ba/service/BaStoreServiceI.java b/src/main/java/com/zzjee/ba/service/BaStoreServiceI.java new file mode 100644 index 00000000..7a541fa2 --- /dev/null +++ b/src/main/java/com/zzjee/ba/service/BaStoreServiceI.java @@ -0,0 +1,15 @@ +package com.zzjee.ba.service; +import com.zzjee.ba.entity.BaStoreEntity; +import org.jeecgframework.core.common.service.CommonService; + +import java.io.Serializable; + +public interface BaStoreServiceI extends CommonService{ + + public void delete(BaStoreEntity entity) throws Exception; + + public Serializable save(BaStoreEntity entity) throws Exception; + + public void saveOrUpdate(BaStoreEntity entity) throws Exception; + +} diff --git a/src/main/java/com/zzjee/ba/service/WmsWaveConfServiceI.java b/src/main/java/com/zzjee/ba/service/WmsWaveConfServiceI.java new file mode 100644 index 00000000..73b003f7 --- /dev/null +++ b/src/main/java/com/zzjee/ba/service/WmsWaveConfServiceI.java @@ -0,0 +1,15 @@ +package com.zzjee.ba.service; +import com.zzjee.ba.entity.WmsWaveConfEntity; +import org.jeecgframework.core.common.service.CommonService; + +import java.io.Serializable; + +public interface WmsWaveConfServiceI extends CommonService{ + + public void delete(WmsWaveConfEntity entity) throws Exception; + + public Serializable save(WmsWaveConfEntity entity) throws Exception; + + public void saveOrUpdate(WmsWaveConfEntity entity) throws Exception; + +} diff --git a/src/main/java/com/zzjee/ba/service/impl/BaStoreServiceImpl.java b/src/main/java/com/zzjee/ba/service/impl/BaStoreServiceImpl.java new file mode 100644 index 00000000..1b23d51e --- /dev/null +++ b/src/main/java/com/zzjee/ba/service/impl/BaStoreServiceImpl.java @@ -0,0 +1,140 @@ +package com.zzjee.ba.service.impl; +import com.zzjee.ba.service.BaStoreServiceI; +import org.jeecgframework.core.common.service.impl.CommonServiceImpl; +import com.zzjee.ba.entity.BaStoreEntity; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.io.Serializable; +import org.jeecgframework.core.util.ApplicationContextUtil; +import org.jeecgframework.core.util.MyClassLoader; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter; + +@Service("baStoreService") +@Transactional +public class BaStoreServiceImpl extends CommonServiceImpl implements BaStoreServiceI { + + + public void delete(BaStoreEntity entity) throws Exception{ + super.delete(entity); + //执行删除操作增强业务 + this.doDelBus(entity); + } + + public Serializable save(BaStoreEntity entity) throws Exception{ + Serializable t = super.save(entity); + //执行新增操作增强业务 + this.doAddBus(entity); + return t; + } + + public void saveOrUpdate(BaStoreEntity entity) throws Exception{ + super.saveOrUpdate(entity); + //执行更新操作增强业务 + this.doUpdateBus(entity); + } + + /** + * 新增操作增强业务 + * @param t + * @return + */ + private void doAddBus(BaStoreEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 更新操作增强业务 + * @param t + * @return + */ + private void doUpdateBus(BaStoreEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 删除操作增强业务 + * @param id + * @return + */ + private void doDelBus(BaStoreEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + + private Map populationMap(BaStoreEntity t){ + Map map = new HashMap(); + map.put("id", t.getId()); + map.put("create_name", t.getCreateName()); + map.put("create_by", t.getCreateBy()); + map.put("create_date", t.getCreateDate()); + map.put("update_name", t.getUpdateName()); + map.put("update_by", t.getUpdateBy()); + map.put("update_date", t.getUpdateDate()); + map.put("sys_org_code", t.getSysOrgCode()); + map.put("sys_company_code", t.getSysCompanyCode()); + map.put("store_code", t.getStoreCode()); + map.put("store_name", t.getStoreName()); + map.put("store_text", t.getStoreText()); + return map; + } + + /** + * 替换sql中的变量 + * @param sql + * @param t + * @return + */ + public String replaceVal(String sql,BaStoreEntity t){ + sql = sql.replace("#{id}",String.valueOf(t.getId())); + sql = sql.replace("#{create_name}",String.valueOf(t.getCreateName())); + sql = sql.replace("#{create_by}",String.valueOf(t.getCreateBy())); + sql = sql.replace("#{create_date}",String.valueOf(t.getCreateDate())); + sql = sql.replace("#{update_name}",String.valueOf(t.getUpdateName())); + sql = sql.replace("#{update_by}",String.valueOf(t.getUpdateBy())); + sql = sql.replace("#{update_date}",String.valueOf(t.getUpdateDate())); + sql = sql.replace("#{sys_org_code}",String.valueOf(t.getSysOrgCode())); + sql = sql.replace("#{sys_company_code}",String.valueOf(t.getSysCompanyCode())); + sql = sql.replace("#{store_code}",String.valueOf(t.getStoreCode())); + sql = sql.replace("#{store_name}",String.valueOf(t.getStoreName())); + sql = sql.replace("#{store_text}",String.valueOf(t.getStoreText())); + sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); + return sql; + } + + /** + * 执行JAVA增强 + */ + private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map data) throws Exception { + if(StringUtil.isNotEmpty(cgJavaValue)){ + Object obj = null; + try { + if("class".equals(cgJavaType)){ + //因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断 + obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance(); + }else if("spring".equals(cgJavaType)){ + obj = ApplicationContextUtil.getContext().getBean(cgJavaValue); + } + if(obj instanceof CgformEnhanceJavaInter){ + CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj; + javaInter.execute("ba_store",data); + } + } catch (Exception e) { + e.printStackTrace(); + throw new Exception("执行JAVA增强出现异常!"); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/zzjee/ba/service/impl/WmsWaveConfServiceImpl.java b/src/main/java/com/zzjee/ba/service/impl/WmsWaveConfServiceImpl.java new file mode 100644 index 00000000..135c759c --- /dev/null +++ b/src/main/java/com/zzjee/ba/service/impl/WmsWaveConfServiceImpl.java @@ -0,0 +1,146 @@ +package com.zzjee.ba.service.impl; +import com.zzjee.ba.service.WmsWaveConfServiceI; +import org.jeecgframework.core.common.service.impl.CommonServiceImpl; +import com.zzjee.ba.entity.WmsWaveConfEntity; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.io.Serializable; +import org.jeecgframework.core.util.ApplicationContextUtil; +import org.jeecgframework.core.util.MyClassLoader; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter; + +@Service("wmsWaveConfService") +@Transactional +public class WmsWaveConfServiceImpl extends CommonServiceImpl implements WmsWaveConfServiceI { + + + public void delete(WmsWaveConfEntity entity) throws Exception{ + super.delete(entity); + //执行删除操作增强业务 + this.doDelBus(entity); + } + + public Serializable save(WmsWaveConfEntity entity) throws Exception{ + Serializable t = super.save(entity); + //执行新增操作增强业务 + this.doAddBus(entity); + return t; + } + + public void saveOrUpdate(WmsWaveConfEntity entity) throws Exception{ + super.saveOrUpdate(entity); + //执行更新操作增强业务 + this.doUpdateBus(entity); + } + + /** + * 新增操作增强业务 + * @param t + * @return + */ + private void doAddBus(WmsWaveConfEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 更新操作增强业务 + * @param t + * @return + */ + private void doUpdateBus(WmsWaveConfEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 删除操作增强业务 + * @param id + * @return + */ + private void doDelBus(WmsWaveConfEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + + private Map populationMap(WmsWaveConfEntity t){ + Map map = new HashMap(); + map.put("id", t.getId()); + map.put("create_name", t.getCreateName()); + map.put("create_by", t.getCreateBy()); + map.put("create_date", t.getCreateDate()); + map.put("update_name", t.getUpdateName()); + map.put("update_by", t.getUpdateBy()); + map.put("update_date", t.getUpdateDate()); + map.put("sys_org_code", t.getSysOrgCode()); + map.put("sys_company_code", t.getSysCompanyCode()); + map.put("bpm_status", t.getBpmStatus()); + map.put("peisondian", t.getPeisondian()); + map.put("wave_type", t.getWaveType()); + map.put("wv_by1", t.getWvBy1()); + map.put("wv_by2", t.getWvBy2()); + map.put("wv_by3", t.getWvBy3()); + return map; + } + + /** + * 替换sql中的变量 + * @param sql + * @param t + * @return + */ + public String replaceVal(String sql,WmsWaveConfEntity t){ + sql = sql.replace("#{id}",String.valueOf(t.getId())); + sql = sql.replace("#{create_name}",String.valueOf(t.getCreateName())); + sql = sql.replace("#{create_by}",String.valueOf(t.getCreateBy())); + sql = sql.replace("#{create_date}",String.valueOf(t.getCreateDate())); + sql = sql.replace("#{update_name}",String.valueOf(t.getUpdateName())); + sql = sql.replace("#{update_by}",String.valueOf(t.getUpdateBy())); + sql = sql.replace("#{update_date}",String.valueOf(t.getUpdateDate())); + sql = sql.replace("#{sys_org_code}",String.valueOf(t.getSysOrgCode())); + sql = sql.replace("#{sys_company_code}",String.valueOf(t.getSysCompanyCode())); + sql = sql.replace("#{bpm_status}",String.valueOf(t.getBpmStatus())); + sql = sql.replace("#{peisondian}",String.valueOf(t.getPeisondian())); + sql = sql.replace("#{wave_type}",String.valueOf(t.getWaveType())); + sql = sql.replace("#{wv_by1}",String.valueOf(t.getWvBy1())); + sql = sql.replace("#{wv_by2}",String.valueOf(t.getWvBy2())); + sql = sql.replace("#{wv_by3}",String.valueOf(t.getWvBy3())); + sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); + return sql; + } + + /** + * 执行JAVA增强 + */ + private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map data) throws Exception { + if(StringUtil.isNotEmpty(cgJavaValue)){ + Object obj = null; + try { + if("class".equals(cgJavaType)){ + //因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断 + obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance(); + }else if("spring".equals(cgJavaType)){ + obj = ApplicationContextUtil.getContext().getBean(cgJavaValue); + } + if(obj instanceof CgformEnhanceJavaInter){ + CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj; + javaInter.execute("wms_wave_conf",data); + } + } catch (Exception e) { + e.printStackTrace(); + throw new Exception("执行JAVA增强出现异常!"); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/zzjee/tms/controller/TmsYufeiConfController.java b/src/main/java/com/zzjee/tms/controller/TmsYufeiConfController.java new file mode 100644 index 00000000..49a1d6d8 --- /dev/null +++ b/src/main/java/com/zzjee/tms/controller/TmsYufeiConfController.java @@ -0,0 +1,406 @@ +package com.zzjee.tms.controller; +import com.zzjee.tms.entity.TmsYufeiConfEntity; +import com.zzjee.tms.service.TmsYufeiConfServiceI; +import java.util.ArrayList; +import java.util.List; +import java.text.SimpleDateFormat; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import org.jeecgframework.core.common.controller.BaseController; +import org.jeecgframework.core.common.exception.BusinessException; +import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery; +import org.jeecgframework.core.common.model.common.TreeChildCount; +import org.jeecgframework.core.common.model.json.AjaxJson; +import org.jeecgframework.core.common.model.json.DataGrid; +import org.jeecgframework.core.constant.Globals; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.pojo.base.TSDepart; +import org.jeecgframework.web.system.service.SystemService; +import org.jeecgframework.core.util.MyBeanUtils; + +import java.io.OutputStream; +import org.jeecgframework.core.util.BrowserUtils; +import org.jeecgframework.poi.excel.ExcelExportUtil; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.entity.TemplateExportParams; +import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.jeecgframework.core.util.ResourceUtil; +import java.io.IOException; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import java.util.Map; +import java.util.HashMap; +import org.jeecgframework.core.util.ExceptionUtil; + +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.jeecgframework.core.beanvalidator.BeanValidators; +import java.util.Set; +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import java.net.URI; +import org.springframework.http.MediaType; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * @Title: Controller + * @Description: 运费配置 + * @author onlineGenerator + * @date 2019-12-11 09:08:11 + * @version V1.0 + * + */ +@Controller +@RequestMapping("/tmsYufeiConfController") +public class TmsYufeiConfController extends BaseController { + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(TmsYufeiConfController.class); + + @Autowired + private TmsYufeiConfServiceI tmsYufeiConfService; + @Autowired + private SystemService systemService; + @Autowired + private Validator validator; + + + + /** + * 运费配置列表 页面跳转 + * + * @return + */ + @RequestMapping(params = "list") + public ModelAndView list(HttpServletRequest request) { + return new ModelAndView("com/zzjee/tms/tmsYufeiConfList"); + } + + /** + * easyui AJAX请求数据 + * + * @param request + * @param response + * @param dataGrid + * @param user + */ + + @RequestMapping(params = "datagrid") + public void datagrid(TmsYufeiConfEntity tmsYufeiConf,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { + CriteriaQuery cq = new CriteriaQuery(TmsYufeiConfEntity.class, dataGrid); + //查询条件组装器 + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tmsYufeiConf, request.getParameterMap()); + try{ + //自定义追加查询条件 + }catch (Exception e) { + throw new BusinessException(e.getMessage()); + } + cq.add(); + this.tmsYufeiConfService.getDataGridReturn(cq, true); + TagUtil.datagrid(response, dataGrid); + } + + /** + * 删除运费配置 + * + * @return + */ + @RequestMapping(params = "doDel") + @ResponseBody + public AjaxJson doDel(TmsYufeiConfEntity tmsYufeiConf, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + tmsYufeiConf = systemService.getEntity(TmsYufeiConfEntity.class, tmsYufeiConf.getId()); + message = "运费配置删除成功"; + try{ + tmsYufeiConfService.delete(tmsYufeiConf); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "运费配置删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 批量删除运费配置 + * + * @return + */ + @RequestMapping(params = "doBatchDel") + @ResponseBody + public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + String message = null; + AjaxJson j = new AjaxJson(); + message = "运费配置删除成功"; + try{ + for(String id:ids.split(",")){ + TmsYufeiConfEntity tmsYufeiConf = systemService.getEntity(TmsYufeiConfEntity.class, + id + ); + tmsYufeiConfService.delete(tmsYufeiConf); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + } + }catch(Exception e){ + e.printStackTrace(); + message = "运费配置删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 添加运费配置 + * + * @param ids + * @return + */ + @RequestMapping(params = "doAdd") + @ResponseBody + public AjaxJson doAdd(TmsYufeiConfEntity tmsYufeiConf, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "运费配置添加成功"; + try{ + tmsYufeiConfService.save(tmsYufeiConf); + systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "运费配置添加失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 更新运费配置 + * + * @param ids + * @return + */ + @RequestMapping(params = "doUpdate") + @ResponseBody + public AjaxJson doUpdate(TmsYufeiConfEntity tmsYufeiConf, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "运费配置更新成功"; + TmsYufeiConfEntity t = tmsYufeiConfService.get(TmsYufeiConfEntity.class, tmsYufeiConf.getId()); + try { + MyBeanUtils.copyBeanNotNull2Bean(tmsYufeiConf, t); + tmsYufeiConfService.saveOrUpdate(t); + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "运费配置更新失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 运费配置新增页面跳转 + * + * @return + */ + @RequestMapping(params = "goAdd") + public ModelAndView goAdd(TmsYufeiConfEntity tmsYufeiConf, HttpServletRequest req) { + if (StringUtil.isNotEmpty(tmsYufeiConf.getId())) { + tmsYufeiConf = tmsYufeiConfService.getEntity(TmsYufeiConfEntity.class, tmsYufeiConf.getId()); + req.setAttribute("tmsYufeiConfPage", tmsYufeiConf); + } + return new ModelAndView("com/zzjee/tms/tmsYufeiConf-add"); + } + /** + * 运费配置编辑页面跳转 + * + * @return + */ + @RequestMapping(params = "goUpdate") + public ModelAndView goUpdate(TmsYufeiConfEntity tmsYufeiConf, HttpServletRequest req) { + if (StringUtil.isNotEmpty(tmsYufeiConf.getId())) { + tmsYufeiConf = tmsYufeiConfService.getEntity(TmsYufeiConfEntity.class, tmsYufeiConf.getId()); + req.setAttribute("tmsYufeiConfPage", tmsYufeiConf); + } + return new ModelAndView("com/zzjee/tms/tmsYufeiConf-update"); + } + + /** + * 导入功能跳转 + * + * @return + */ + @RequestMapping(params = "upload") + public ModelAndView upload(HttpServletRequest req) { + req.setAttribute("controller_name","tmsYufeiConfController"); + return new ModelAndView("common/upload/pub_excel_upload"); + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXls") + public String exportXls(TmsYufeiConfEntity tmsYufeiConf,HttpServletRequest request,HttpServletResponse response + , DataGrid dataGrid,ModelMap modelMap) { + CriteriaQuery cq = new CriteriaQuery(TmsYufeiConfEntity.class, dataGrid); + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tmsYufeiConf, request.getParameterMap()); + List tmsYufeiConfs = this.tmsYufeiConfService.getListByCriteriaQuery(cq,false); + modelMap.put(NormalExcelConstants.FILE_NAME,"运费配置"); + modelMap.put(NormalExcelConstants.CLASS,TmsYufeiConfEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("运费配置列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,tmsYufeiConfs); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + /** + * 导出excel 使模板 + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXlsByT") + public String exportXlsByT(TmsYufeiConfEntity tmsYufeiConf,HttpServletRequest request,HttpServletResponse response + , DataGrid dataGrid,ModelMap modelMap) { + modelMap.put(NormalExcelConstants.FILE_NAME,"运费配置"); + modelMap.put(NormalExcelConstants.CLASS,TmsYufeiConfEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("运费配置列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + + @SuppressWarnings("unchecked") + @RequestMapping(params = "importExcel", method = RequestMethod.POST) + @ResponseBody + public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { + AjaxJson j = new AjaxJson(); + + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List listTmsYufeiConfEntitys = ExcelImportUtil.importExcel(file.getInputStream(),TmsYufeiConfEntity.class,params); + for (TmsYufeiConfEntity tmsYufeiConf : listTmsYufeiConfEntitys) { + tmsYufeiConfService.save(tmsYufeiConf); + } + j.setMsg("文件导入成功!"); + } catch (Exception e) { + j.setMsg("文件导入失败!"); + logger.error(ExceptionUtil.getExceptionMessage(e)); + }finally{ + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return j; + } + + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public List list() { + List listTmsYufeiConfs=tmsYufeiConfService.getList(TmsYufeiConfEntity.class); + return listTmsYufeiConfs; + } + + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + public ResponseEntity get(@PathVariable("id") String id) { + TmsYufeiConfEntity task = tmsYufeiConfService.get(TmsYufeiConfEntity.class, id); + if (task == null) { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + return new ResponseEntity(task, HttpStatus.OK); + } + + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public ResponseEntity create(@RequestBody TmsYufeiConfEntity tmsYufeiConf, UriComponentsBuilder uriBuilder) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(tmsYufeiConf); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + tmsYufeiConfService.save(tmsYufeiConf); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + //按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象. + String id = tmsYufeiConf.getId(); + URI uri = uriBuilder.path("/rest/tmsYufeiConfController/" + id).build().toUri(); + HttpHeaders headers = new HttpHeaders(); + headers.setLocation(uri); + + return new ResponseEntity(headers, HttpStatus.CREATED); + } + + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity update(@RequestBody TmsYufeiConfEntity tmsYufeiConf) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(tmsYufeiConf); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + tmsYufeiConfService.saveOrUpdate(tmsYufeiConf); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + + //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码. + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseStatus(HttpStatus.NO_CONTENT) + public void delete(@PathVariable("id") String id) { + tmsYufeiConfService.deleteEntityById(TmsYufeiConfEntity.class, id); + } +} diff --git a/src/main/java/com/zzjee/tms/entity/TmsYufeiConfEntity.java b/src/main/java/com/zzjee/tms/entity/TmsYufeiConfEntity.java new file mode 100644 index 00000000..dd67277e --- /dev/null +++ b/src/main/java/com/zzjee/tms/entity/TmsYufeiConfEntity.java @@ -0,0 +1,350 @@ +package com.zzjee.tms.entity; + +import java.math.BigDecimal; +import java.util.Date; +import java.lang.String; +import java.lang.Double; +import java.lang.Integer; +import java.math.BigDecimal; +import javax.xml.soap.Text; +import java.sql.Blob; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; +import javax.persistence.SequenceGenerator; +import org.jeecgframework.poi.excel.annotation.Excel; + +/** + * @Title: Entity + * @Description: 运费配置 + * @author onlineGenerator + * @date 2019-12-11 09:08:11 + * @version V1.0 + * + */ +@Entity +@Table(name = "tms_yufei_conf", schema = "") +@SuppressWarnings("serial") +public class TmsYufeiConfEntity implements java.io.Serializable { + /**id*/ + private String id; + /**创建人名称*/ + private String createName; + /**创建人登录名称*/ + private String createBy; + /**创建日期*/ + private Date createDate; + /**更新人名称*/ + private String updateName; + /**更新人登录名称*/ + private String updateBy; + /**更新日期*/ + private Date updateDate; + /**所属部门*/ + private String sysOrgCode; + /**所属公司*/ + private String sysCompanyCode; + /**流程状态*/ + private String bpmStatus; + /**配送点*/ + @Excel(name="配送点") + private String peisondian; + /**运费类型*/ + @Excel(name="运费类型") + private String yfType; + /**运费名称*/ + @Excel(name="运费名称") + private String yfTypeName; + /**运费单价*/ + @Excel(name="运费单价") + private String yfPrice; + /**备注1*/ + @Excel(name="备注1") + private String yfBz1; + /**备注2*/ + @Excel(name="备注2") + private String yfBz2; + /**备注3*/ + @Excel(name="备注3") + private String yfBz3; + + /** + *方法: 取得java.lang.String + *@return: java.lang.String id + */ + @Id + @GeneratedValue(generator = "paymentableGenerator") + @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") + @Column(name ="ID",nullable=false,length=36) + public String getId(){ + return this.id; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String id + */ + public void setId(String id){ + this.id = id; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人名称 + */ + @Column(name ="CREATE_NAME",nullable=true,length=50) + public String getCreateName(){ + return this.createName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人名称 + */ + public void setCreateName(String createName){ + this.createName = createName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人登录名称 + */ + @Column(name ="CREATE_BY",nullable=true,length=50) + public String getCreateBy(){ + return this.createBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人登录名称 + */ + public void setCreateBy(String createBy){ + this.createBy = createBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 创建日期 + */ + @Column(name ="CREATE_DATE",nullable=true) + public Date getCreateDate(){ + return this.createDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 创建日期 + */ + public void setCreateDate(Date createDate){ + this.createDate = createDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人名称 + */ + @Column(name ="UPDATE_NAME",nullable=true,length=50) + public String getUpdateName(){ + return this.updateName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人名称 + */ + public void setUpdateName(String updateName){ + this.updateName = updateName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人登录名称 + */ + @Column(name ="UPDATE_BY",nullable=true,length=50) + public String getUpdateBy(){ + return this.updateBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人登录名称 + */ + public void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 更新日期 + */ + @Column(name ="UPDATE_DATE",nullable=true) + public Date getUpdateDate(){ + return this.updateDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 更新日期 + */ + public void setUpdateDate(Date updateDate){ + this.updateDate = updateDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属部门 + */ + @Column(name ="SYS_ORG_CODE",nullable=true,length=50) + public String getSysOrgCode(){ + return this.sysOrgCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属部门 + */ + public void setSysOrgCode(String sysOrgCode){ + this.sysOrgCode = sysOrgCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属公司 + */ + @Column(name ="SYS_COMPANY_CODE",nullable=true,length=50) + public String getSysCompanyCode(){ + return this.sysCompanyCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属公司 + */ + public void setSysCompanyCode(String sysCompanyCode){ + this.sysCompanyCode = sysCompanyCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 流程状态 + */ + @Column(name ="BPM_STATUS",nullable=true,length=32) + public String getBpmStatus(){ + return this.bpmStatus; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 流程状态 + */ + public void setBpmStatus(String bpmStatus){ + this.bpmStatus = bpmStatus; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 配送点 + */ + @Column(name ="PEISONDIAN",nullable=true,length=32) + public String getPeisondian(){ + return this.peisondian; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 配送点 + */ + public void setPeisondian(String peisondian){ + this.peisondian = peisondian; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 运费类型 + */ + @Column(name ="YF_TYPE",nullable=true,length=32) + public String getYfType(){ + return this.yfType; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 运费类型 + */ + public void setYfType(String yfType){ + this.yfType = yfType; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 运费名称 + */ + @Column(name ="YF_TYPE_NAME",nullable=true,length=32) + public String getYfTypeName(){ + return this.yfTypeName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 运费名称 + */ + public void setYfTypeName(String yfTypeName){ + this.yfTypeName = yfTypeName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 运费单价 + */ + @Column(name ="YF_PRICE",nullable=true,length=32) + public String getYfPrice(){ + return this.yfPrice; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 运费单价 + */ + public void setYfPrice(String yfPrice){ + this.yfPrice = yfPrice; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 备注1 + */ + @Column(name ="YF_BZ1",nullable=true,length=32) + public String getYfBz1(){ + return this.yfBz1; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 备注1 + */ + public void setYfBz1(String yfBz1){ + this.yfBz1 = yfBz1; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 备注2 + */ + @Column(name ="YF_BZ2",nullable=true,length=32) + public String getYfBz2(){ + return this.yfBz2; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 备注2 + */ + public void setYfBz2(String yfBz2){ + this.yfBz2 = yfBz2; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 备注3 + */ + @Column(name ="YF_BZ3",nullable=true,length=32) + public String getYfBz3(){ + return this.yfBz3; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 备注3 + */ + public void setYfBz3(String yfBz3){ + this.yfBz3 = yfBz3; + } +} diff --git a/src/main/java/com/zzjee/tms/service/TmsYufeiConfServiceI.java b/src/main/java/com/zzjee/tms/service/TmsYufeiConfServiceI.java new file mode 100644 index 00000000..9623dfbf --- /dev/null +++ b/src/main/java/com/zzjee/tms/service/TmsYufeiConfServiceI.java @@ -0,0 +1,15 @@ +package com.zzjee.tms.service; +import com.zzjee.tms.entity.TmsYufeiConfEntity; +import org.jeecgframework.core.common.service.CommonService; + +import java.io.Serializable; + +public interface TmsYufeiConfServiceI extends CommonService{ + + public void delete(TmsYufeiConfEntity entity) throws Exception; + + public Serializable save(TmsYufeiConfEntity entity) throws Exception; + + public void saveOrUpdate(TmsYufeiConfEntity entity) throws Exception; + +} diff --git a/src/main/java/com/zzjee/tms/service/impl/TmsYufeiConfServiceImpl.java b/src/main/java/com/zzjee/tms/service/impl/TmsYufeiConfServiceImpl.java new file mode 100644 index 00000000..bef0e613 --- /dev/null +++ b/src/main/java/com/zzjee/tms/service/impl/TmsYufeiConfServiceImpl.java @@ -0,0 +1,150 @@ +package com.zzjee.tms.service.impl; +import com.zzjee.tms.service.TmsYufeiConfServiceI; +import org.jeecgframework.core.common.service.impl.CommonServiceImpl; +import com.zzjee.tms.entity.TmsYufeiConfEntity; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.io.Serializable; +import org.jeecgframework.core.util.ApplicationContextUtil; +import org.jeecgframework.core.util.MyClassLoader; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter; + +@Service("tmsYufeiConfService") +@Transactional +public class TmsYufeiConfServiceImpl extends CommonServiceImpl implements TmsYufeiConfServiceI { + + + public void delete(TmsYufeiConfEntity entity) throws Exception{ + super.delete(entity); + //执行删除操作增强业务 + this.doDelBus(entity); + } + + public Serializable save(TmsYufeiConfEntity entity) throws Exception{ + Serializable t = super.save(entity); + //执行新增操作增强业务 + this.doAddBus(entity); + return t; + } + + public void saveOrUpdate(TmsYufeiConfEntity entity) throws Exception{ + super.saveOrUpdate(entity); + //执行更新操作增强业务 + this.doUpdateBus(entity); + } + + /** + * 新增操作增强业务 + * @param t + * @return + */ + private void doAddBus(TmsYufeiConfEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 更新操作增强业务 + * @param t + * @return + */ + private void doUpdateBus(TmsYufeiConfEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 删除操作增强业务 + * @param id + * @return + */ + private void doDelBus(TmsYufeiConfEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + + private Map populationMap(TmsYufeiConfEntity t){ + Map map = new HashMap(); + map.put("id", t.getId()); + map.put("create_name", t.getCreateName()); + map.put("create_by", t.getCreateBy()); + map.put("create_date", t.getCreateDate()); + map.put("update_name", t.getUpdateName()); + map.put("update_by", t.getUpdateBy()); + map.put("update_date", t.getUpdateDate()); + map.put("sys_org_code", t.getSysOrgCode()); + map.put("sys_company_code", t.getSysCompanyCode()); + map.put("bpm_status", t.getBpmStatus()); + map.put("peisondian", t.getPeisondian()); + map.put("yf_type", t.getYfType()); + map.put("yf_type_name", t.getYfTypeName()); + map.put("yf_price", t.getYfPrice()); + map.put("yf_bz1", t.getYfBz1()); + map.put("yf_bz2", t.getYfBz2()); + map.put("yf_bz3", t.getYfBz3()); + return map; + } + + /** + * 替换sql中的变量 + * @param sql + * @param t + * @return + */ + public String replaceVal(String sql,TmsYufeiConfEntity t){ + sql = sql.replace("#{id}",String.valueOf(t.getId())); + sql = sql.replace("#{create_name}",String.valueOf(t.getCreateName())); + sql = sql.replace("#{create_by}",String.valueOf(t.getCreateBy())); + sql = sql.replace("#{create_date}",String.valueOf(t.getCreateDate())); + sql = sql.replace("#{update_name}",String.valueOf(t.getUpdateName())); + sql = sql.replace("#{update_by}",String.valueOf(t.getUpdateBy())); + sql = sql.replace("#{update_date}",String.valueOf(t.getUpdateDate())); + sql = sql.replace("#{sys_org_code}",String.valueOf(t.getSysOrgCode())); + sql = sql.replace("#{sys_company_code}",String.valueOf(t.getSysCompanyCode())); + sql = sql.replace("#{bpm_status}",String.valueOf(t.getBpmStatus())); + sql = sql.replace("#{peisondian}",String.valueOf(t.getPeisondian())); + sql = sql.replace("#{yf_type}",String.valueOf(t.getYfType())); + sql = sql.replace("#{yf_type_name}",String.valueOf(t.getYfTypeName())); + sql = sql.replace("#{yf_price}",String.valueOf(t.getYfPrice())); + sql = sql.replace("#{yf_bz1}",String.valueOf(t.getYfBz1())); + sql = sql.replace("#{yf_bz2}",String.valueOf(t.getYfBz2())); + sql = sql.replace("#{yf_bz3}",String.valueOf(t.getYfBz3())); + sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); + return sql; + } + + /** + * 执行JAVA增强 + */ + private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map data) throws Exception { + if(StringUtil.isNotEmpty(cgJavaValue)){ + Object obj = null; + try { + if("class".equals(cgJavaType)){ + //因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断 + obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance(); + }else if("spring".equals(cgJavaType)){ + obj = ApplicationContextUtil.getContext().getBean(cgJavaValue); + } + if(obj instanceof CgformEnhanceJavaInter){ + CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj; + javaInter.execute("tms_yufei_conf",data); + } + } catch (Exception e) { + e.printStackTrace(); + throw new Exception("执行JAVA增强出现异常!"); + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/jeecg/jeecg_database.properties b/src/main/resources/jeecg/jeecg_database.properties index 2e0e9d91..a2b6cf46 100644 --- a/src/main/resources/jeecg/jeecg_database.properties +++ b/src/main/resources/jeecg/jeecg_database.properties @@ -1,9 +1,13 @@ #mysql diver_name=com.mysql.jdbc.Driver -#url=jdbc:mysql://120.78.150.43:3306/wms?useUnicode=true&characterEncoding=UTF-8 +#url=jdbc:mysql://122.152.215.195:3306/wms?useUnicode=true&characterEncoding=UTF-8 +#jdbc.username.jeecg=sap +#jdbc.password.jeecg=saperp@19 + url=jdbc:mysql://localhost:3306/wms?useUnicode=true&characterEncoding=UTF-8 username=root password=Zzerp123 + database_name=wms #oracle diff --git a/src/main/webapp/webpage/com/zzjee/ba/baStore-add.jsp b/src/main/webapp/webpage/com/zzjee/ba/baStore-add.jsp new file mode 100644 index 00000000..a492cd5c --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/baStore-add.jsp @@ -0,0 +1,71 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + 仓库 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + diff --git a/src/main/webapp/webpage/com/zzjee/ba/baStore-update.jsp b/src/main/webapp/webpage/com/zzjee/ba/baStore-update.jsp new file mode 100644 index 00000000..754abc40 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/baStore-update.jsp @@ -0,0 +1,69 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + 仓库 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + diff --git a/src/main/webapp/webpage/com/zzjee/ba/baStore.js b/src/main/webapp/webpage/com/zzjee/ba/baStore.js new file mode 100644 index 00000000..5ec72b64 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/baStore.js @@ -0,0 +1,32 @@ + + +//通用弹出式文件上传 +function commonUpload(callback){ + $.dialog({ + content: "url:systemController.do?commonUpload", + lock : true, + title:"文件上传", + zIndex:2100, + width:700, + height: 200, + parent:windowapi, + cache:false, + ok: function(){ + var iframe = this.iframe.contentWindow; + iframe.uploadCallback(callback); + return true; + }, + cancelVal: '关闭', + cancel: function(){ + } + }); +} +function browseImages(inputId, Img) {// 图片管理器,可多个上传共用 +} +function browseFiles(inputId, file) {// 文件管理器,可多个上传共用 +} +function decode(value, id) {//value传入值,id接受值 + var last = value.lastIndexOf("/"); + var filename = value.substring(last + 1, value.length); + $("#" + id).text(decodeURIComponent(filename)); +} \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/ba/baStoreList.js b/src/main/webapp/webpage/com/zzjee/ba/baStoreList.js new file mode 100644 index 00000000..e69de29b diff --git a/src/main/webapp/webpage/com/zzjee/ba/baStoreList.jsp b/src/main/webapp/webpage/com/zzjee/ba/baStoreList.jsp new file mode 100644 index 00000000..ee62e6c8 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/baStoreList.jsp @@ -0,0 +1,53 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + +
+
+ + + + + + + + + + + + + + + + + + <%----%> + + + + + +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-add.jsp b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-add.jsp new file mode 100644 index 00000000..b4131c2e --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-add.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + 波次配置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + diff --git a/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-update.jsp b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-update.jsp new file mode 100644 index 00000000..dbc40259 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf-update.jsp @@ -0,0 +1,98 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + 波次配置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + diff --git a/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf.js b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf.js new file mode 100644 index 00000000..5ec72b64 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConf.js @@ -0,0 +1,32 @@ + + +//通用弹出式文件上传 +function commonUpload(callback){ + $.dialog({ + content: "url:systemController.do?commonUpload", + lock : true, + title:"文件上传", + zIndex:2100, + width:700, + height: 200, + parent:windowapi, + cache:false, + ok: function(){ + var iframe = this.iframe.contentWindow; + iframe.uploadCallback(callback); + return true; + }, + cancelVal: '关闭', + cancel: function(){ + } + }); +} +function browseImages(inputId, Img) {// 图片管理器,可多个上传共用 +} +function browseFiles(inputId, file) {// 文件管理器,可多个上传共用 +} +function decode(value, id) {//value传入值,id接受值 + var last = value.lastIndexOf("/"); + var filename = value.substring(last + 1, value.length); + $("#" + id).text(decodeURIComponent(filename)); +} \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConfList.js b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConfList.js new file mode 100644 index 00000000..e69de29b diff --git a/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConfList.jsp b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConfList.jsp new file mode 100644 index 00000000..02a75020 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/ba/wmsWaveConfList.jsp @@ -0,0 +1,56 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + +
+
+ + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-add.jsp b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-add.jsp new file mode 100644 index 00000000..6d4900df --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-add.jsp @@ -0,0 +1,133 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + 运费配置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + diff --git a/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-update.jsp b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-update.jsp new file mode 100644 index 00000000..deb7a590 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf-update.jsp @@ -0,0 +1,126 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + 运费配置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + diff --git a/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf.js b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf.js new file mode 100644 index 00000000..5ec72b64 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConf.js @@ -0,0 +1,32 @@ + + +//通用弹出式文件上传 +function commonUpload(callback){ + $.dialog({ + content: "url:systemController.do?commonUpload", + lock : true, + title:"文件上传", + zIndex:2100, + width:700, + height: 200, + parent:windowapi, + cache:false, + ok: function(){ + var iframe = this.iframe.contentWindow; + iframe.uploadCallback(callback); + return true; + }, + cancelVal: '关闭', + cancel: function(){ + } + }); +} +function browseImages(inputId, Img) {// 图片管理器,可多个上传共用 +} +function browseFiles(inputId, file) {// 文件管理器,可多个上传共用 +} +function decode(value, id) {//value传入值,id接受值 + var last = value.lastIndexOf("/"); + var filename = value.substring(last + 1, value.length); + $("#" + id).text(decodeURIComponent(filename)); +} \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConfList.js b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConfList.js new file mode 100644 index 00000000..e69de29b diff --git a/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConfList.jsp b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConfList.jsp new file mode 100644 index 00000000..3279decb --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/tms/tmsYufeiConfList.jsp @@ -0,0 +1,58 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + +
+
+ + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + +
+
+ + \ No newline at end of file