master
parent
6052d45185
commit
f508411a6c
File diff suppressed because one or more lines are too long
12
pom.xml
12
pom.xml
|
@ -129,6 +129,12 @@
|
|||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.ezmorph</groupId>
|
||||
<artifactId>ezmorph</artifactId>
|
||||
<version>1.0.6</version>
|
||||
</dependency>
|
||||
<!-- activation -->
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
|
@ -998,6 +1004,12 @@
|
|||
</dependency>
|
||||
<!-- redis cache end -->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
<version>6.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.zzjee.api;
|
||||
|
||||
import io.swagger.models.HttpMethod;
|
||||
import org.jeecgframework.core.common.model.json.AjaxJson;
|
||||
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.RestController;
|
||||
|
||||
/**
|
||||
* @Package com.zzjee.api
|
||||
* @date 2021/7/22 10:47
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/apitest")
|
||||
public class ApiController {
|
||||
|
||||
|
||||
@RequestMapping(value = "/getToken",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public AjaxJson test(){
|
||||
AjaxJson ajaxJson = new AjaxJson();
|
||||
ajaxJson.setSuccess(true);
|
||||
ajaxJson.setMsg("操作成功");
|
||||
return ajaxJson;
|
||||
}
|
||||
}
|
|
@ -11,6 +11,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||
import org.jeecgframework.core.common.controller.BaseController;
|
||||
|
@ -60,6 +62,7 @@ import com.zzjee.ba.service.BaCostConfServiceI;
|
|||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baCostConfController")
|
||||
@Api(tags = "dwq")
|
||||
public class BaCostConfController extends BaseController {
|
||||
/**
|
||||
* Logger for this class
|
||||
|
@ -95,6 +98,7 @@ public class BaCostConfController extends BaseController {
|
|||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
@ApiOperation("")
|
||||
public void datagrid(BaCostConfEntity baCostConf,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(BaCostConfEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
|
|
|
@ -45,6 +45,7 @@ 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.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
@ -571,4 +572,36 @@ public class MdBinController extends BaseController {
|
|||
public void delete(@PathVariable("id") String id) {
|
||||
mdBinService.deleteEntityById(MdBinEntity.class, id);
|
||||
}
|
||||
|
||||
@RequestMapping(params = "addMdBin")
|
||||
@ResponseBody
|
||||
public void addMdBin(){
|
||||
List<MdBinEntity> mdBinEntityList = new ArrayList<>();
|
||||
for (int i = 1; i <= 15; i++) {
|
||||
for (int j = 1; j <= 6; j++) {
|
||||
for (int k = 1; k <= 30; k++) {
|
||||
MdBinEntity mdBinEntity = new MdBinEntity();
|
||||
String kuweibianma = "A"+String.format("%02d",i)+"-"+String.format("%02d",j)+"-"+String.format("%02d",k);
|
||||
mdBinEntity.setKuWeiBianMa(kuweibianma);
|
||||
mdBinEntity.setKuWeiTiaoMa(kuweibianma);
|
||||
mdBinEntity.setKuWeiMingCheng("A1");
|
||||
mdBinEntity.setKuWeiLeiXing("收货储位");
|
||||
mdBinEntity.setKuWeiShuXing("常温");
|
||||
mdBinEntity.setShangJiaCiXu(String.format("%02d",i)+String.format("%02d",j)+String.format("%02d",k));
|
||||
mdBinEntity.setQuHuoCiXu(String.format("%02d",i)+String.format("%02d",j)+String.format("%02d",k));
|
||||
mdBinEntity.setTiJiDanWei("0");
|
||||
mdBinEntity.setZhongLiangDanWei("5");
|
||||
mdBinEntity.setZuiDaTuoPan("2");
|
||||
mdBinEntity.setTingYong("N");
|
||||
mdBinEntity.setBinStore("BJTZ7");
|
||||
mdBinEntity.setXnode(String.format("%02d",i));
|
||||
mdBinEntity.setYnode(String.format("%02d",j));
|
||||
mdBinEntity.setZnode(String.format("%02d",k));
|
||||
mdBinEntityList.add(mdBinEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
mdBinService.batchSave(mdBinEntityList);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,6 +145,7 @@ public class MdGoodsEntity implements java.io.Serializable {
|
|||
private java.lang.String shpMiaoShu;
|
||||
/**停用*/
|
||||
private java.lang.String zhuangTai;
|
||||
private java.lang.String minStock;
|
||||
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
|
@ -916,4 +917,14 @@ public class MdGoodsEntity implements java.io.Serializable {
|
|||
public void setPeisongdian(String peisongdian) {
|
||||
this.peisongdian = peisongdian;
|
||||
}
|
||||
|
||||
@Column(name ="min_stock",nullable=true,length=32)
|
||||
public String getMinStock() {
|
||||
return minStock;
|
||||
}
|
||||
|
||||
public MdGoodsEntity setMinStock(String minStock) {
|
||||
this.minStock = minStock;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,414 @@
|
|||
package com.zzjee.wm.controller;
|
||||
import com.zzjee.wm.entity.BaStoreAreaEntity;
|
||||
import com.zzjee.wm.service.BaStoreAreaServiceI;
|
||||
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: ba_store_area
|
||||
* @author onlineGenerator
|
||||
* @date 2021-07-13 09:34:52
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baStoreAreaController")
|
||||
public class BaStoreAreaController extends BaseController {
|
||||
/**
|
||||
* Logger for this class
|
||||
*/
|
||||
private static final Logger logger = Logger.getLogger(BaStoreAreaController.class);
|
||||
|
||||
@Autowired
|
||||
private BaStoreAreaServiceI baStoreAreaService;
|
||||
@Autowired
|
||||
private SystemService systemService;
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ba_store_area列表 页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "list")
|
||||
public ModelAndView list(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/wm/baStoreAreaList");
|
||||
}
|
||||
|
||||
/**
|
||||
* easyui AJAX请求数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
* @param user
|
||||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
public void datagrid(BaStoreAreaEntity baStoreArea,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(BaStoreAreaEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, baStoreArea, request.getParameterMap());
|
||||
try{
|
||||
//自定义追加查询条件
|
||||
String query_createDate_begin = request.getParameter("createDate_begin");
|
||||
String query_createDate_end = request.getParameter("createDate_end");
|
||||
if(StringUtil.isNotEmpty(query_createDate_begin)){
|
||||
cq.ge("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(query_createDate_begin));
|
||||
}
|
||||
if(StringUtil.isNotEmpty(query_createDate_end)){
|
||||
cq.le("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(query_createDate_end));
|
||||
}
|
||||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
cq.add();
|
||||
this.baStoreAreaService.getDataGridReturn(cq, true);
|
||||
TagUtil.datagrid(response, dataGrid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ba_store_area
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doDel(BaStoreAreaEntity baStoreArea, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
baStoreArea = systemService.getEntity(BaStoreAreaEntity.class, baStoreArea.getId());
|
||||
message = "ba_store_area删除成功";
|
||||
try{
|
||||
baStoreAreaService.delete(baStoreArea);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "ba_store_area删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除ba_store_area
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doBatchDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "ba_store_area删除成功";
|
||||
try{
|
||||
for(String id:ids.split(",")){
|
||||
BaStoreAreaEntity baStoreArea = systemService.getEntity(BaStoreAreaEntity.class,
|
||||
id
|
||||
);
|
||||
baStoreAreaService.delete(baStoreArea);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "ba_store_area删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加ba_store_area
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(BaStoreAreaEntity baStoreArea, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "ba_store_area添加成功";
|
||||
try{
|
||||
baStoreAreaService.save(baStoreArea);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "ba_store_area添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新ba_store_area
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doUpdate")
|
||||
@ResponseBody
|
||||
public AjaxJson doUpdate(BaStoreAreaEntity baStoreArea, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "ba_store_area更新成功";
|
||||
BaStoreAreaEntity t = baStoreAreaService.get(BaStoreAreaEntity.class, baStoreArea.getId());
|
||||
try {
|
||||
MyBeanUtils.copyBeanNotNull2Bean(baStoreArea, t);
|
||||
baStoreAreaService.saveOrUpdate(t);
|
||||
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "ba_store_area更新失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ba_store_area新增页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goAdd")
|
||||
public ModelAndView goAdd(BaStoreAreaEntity baStoreArea, HttpServletRequest req) {
|
||||
if (StringUtil.isNotEmpty(baStoreArea.getId())) {
|
||||
baStoreArea = baStoreAreaService.getEntity(BaStoreAreaEntity.class, baStoreArea.getId());
|
||||
req.setAttribute("baStoreAreaPage", baStoreArea);
|
||||
}
|
||||
return new ModelAndView("com/zzjee/wm/baStoreArea-add");
|
||||
}
|
||||
/**
|
||||
* ba_store_area编辑页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goUpdate")
|
||||
public ModelAndView goUpdate(BaStoreAreaEntity baStoreArea, HttpServletRequest req) {
|
||||
if (StringUtil.isNotEmpty(baStoreArea.getId())) {
|
||||
baStoreArea = baStoreAreaService.getEntity(BaStoreAreaEntity.class, baStoreArea.getId());
|
||||
req.setAttribute("baStoreAreaPage", baStoreArea);
|
||||
}
|
||||
return new ModelAndView("com/zzjee/wm/baStoreArea-update");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入功能跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "upload")
|
||||
public ModelAndView upload(HttpServletRequest req) {
|
||||
req.setAttribute("controller_name","baStoreAreaController");
|
||||
return new ModelAndView("common/upload/pub_excel_upload");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXls")
|
||||
public String exportXls(BaStoreAreaEntity baStoreArea,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
CriteriaQuery cq = new CriteriaQuery(BaStoreAreaEntity.class, dataGrid);
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, baStoreArea, request.getParameterMap());
|
||||
List<BaStoreAreaEntity> baStoreAreas = this.baStoreAreaService.getListByCriteriaQuery(cq,false);
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"ba_store_area");
|
||||
modelMap.put(NormalExcelConstants.CLASS,BaStoreAreaEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("ba_store_area列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
||||
"导出信息"));
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST,baStoreAreas);
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
/**
|
||||
* 导出excel 使模板
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXlsByT")
|
||||
public String exportXlsByT(BaStoreAreaEntity baStoreArea,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"ba_store_area");
|
||||
modelMap.put(NormalExcelConstants.CLASS,BaStoreAreaEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("ba_store_area列表", "导出人:"+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<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<BaStoreAreaEntity> listBaStoreAreaEntitys = ExcelImportUtil.importExcel(file.getInputStream(),BaStoreAreaEntity.class,params);
|
||||
for (BaStoreAreaEntity baStoreArea : listBaStoreAreaEntitys) {
|
||||
baStoreAreaService.save(baStoreArea);
|
||||
}
|
||||
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<BaStoreAreaEntity> list() {
|
||||
List<BaStoreAreaEntity> listBaStoreAreas=baStoreAreaService.getList(BaStoreAreaEntity.class);
|
||||
return listBaStoreAreas;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> get(@PathVariable("id") String id) {
|
||||
BaStoreAreaEntity task = baStoreAreaService.get(BaStoreAreaEntity.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 BaStoreAreaEntity baStoreArea, UriComponentsBuilder uriBuilder) {
|
||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||
Set<ConstraintViolation<BaStoreAreaEntity>> failures = validator.validate(baStoreArea);
|
||||
if (!failures.isEmpty()) {
|
||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
baStoreAreaService.save(baStoreArea);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
//按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
|
||||
String id = baStoreArea.getId();
|
||||
URI uri = uriBuilder.path("/rest/baStoreAreaController/" + 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 BaStoreAreaEntity baStoreArea) {
|
||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||
Set<ConstraintViolation<BaStoreAreaEntity>> failures = validator.validate(baStoreArea);
|
||||
if (!failures.isEmpty()) {
|
||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
baStoreAreaService.saveOrUpdate(baStoreArea);
|
||||
} 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) {
|
||||
baStoreAreaService.deleteEntityById(BaStoreAreaEntity.class, id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,415 @@
|
|||
package com.zzjee.wm.controller;
|
||||
import com.zzjee.wm.entity.BaTrayEntity;
|
||||
import com.zzjee.wm.service.BaTrayServiceI;
|
||||
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.data.redis.connection.jredis.JredisUtils;
|
||||
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: ba_tray
|
||||
* @author onlineGenerator
|
||||
* @date 2021-07-13 14:01:06
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baTrayController")
|
||||
public class BaTrayController extends BaseController {
|
||||
/**
|
||||
* Logger for this class
|
||||
*/
|
||||
private static final Logger logger = Logger.getLogger(BaTrayController.class);
|
||||
|
||||
@Autowired
|
||||
private BaTrayServiceI baTrayService;
|
||||
@Autowired
|
||||
private SystemService systemService;
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ba_tray列表 页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "list")
|
||||
public ModelAndView list(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/wm/baTrayList");
|
||||
}
|
||||
|
||||
/**
|
||||
* easyui AJAX请求数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
* @param user
|
||||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
public void datagrid(BaTrayEntity baTray,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(BaTrayEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, baTray, request.getParameterMap());
|
||||
try{
|
||||
//自定义追加查询条件
|
||||
String query_createDate_begin = request.getParameter("createDate_begin");
|
||||
String query_createDate_end = request.getParameter("createDate_end");
|
||||
if(StringUtil.isNotEmpty(query_createDate_begin)){
|
||||
cq.ge("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(query_createDate_begin));
|
||||
}
|
||||
if(StringUtil.isNotEmpty(query_createDate_end)){
|
||||
cq.le("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(query_createDate_end));
|
||||
}
|
||||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
cq.add();
|
||||
this.baTrayService.getDataGridReturn(cq, true);
|
||||
TagUtil.datagrid(response, dataGrid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ba_tray
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doDel(BaTrayEntity baTray, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
baTray = systemService.getEntity(BaTrayEntity.class, baTray.getId());
|
||||
message = "ba_tray删除成功";
|
||||
try{
|
||||
baTrayService.delete(baTray);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "ba_tray删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除ba_tray
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doBatchDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "ba_tray删除成功";
|
||||
try{
|
||||
for(String id:ids.split(",")){
|
||||
BaTrayEntity baTray = systemService.getEntity(BaTrayEntity.class,
|
||||
id
|
||||
);
|
||||
baTrayService.delete(baTray);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "ba_tray删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加ba_tray
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(BaTrayEntity baTray, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "ba_tray添加成功";
|
||||
try{
|
||||
baTrayService.save(baTray);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "ba_tray添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新ba_tray
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doUpdate")
|
||||
@ResponseBody
|
||||
public AjaxJson doUpdate(BaTrayEntity baTray, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "ba_tray更新成功";
|
||||
BaTrayEntity t = baTrayService.get(BaTrayEntity.class, baTray.getId());
|
||||
try {
|
||||
MyBeanUtils.copyBeanNotNull2Bean(baTray, t);
|
||||
baTrayService.saveOrUpdate(t);
|
||||
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "ba_tray更新失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ba_tray新增页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goAdd")
|
||||
public ModelAndView goAdd(BaTrayEntity baTray, HttpServletRequest req) {
|
||||
if (StringUtil.isNotEmpty(baTray.getId())) {
|
||||
baTray = baTrayService.getEntity(BaTrayEntity.class, baTray.getId());
|
||||
req.setAttribute("baTrayPage", baTray);
|
||||
}
|
||||
return new ModelAndView("com/zzjee/wm/baTray-add");
|
||||
}
|
||||
/**
|
||||
* ba_tray编辑页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goUpdate")
|
||||
public ModelAndView goUpdate(BaTrayEntity baTray, HttpServletRequest req) {
|
||||
if (StringUtil.isNotEmpty(baTray.getId())) {
|
||||
baTray = baTrayService.getEntity(BaTrayEntity.class, baTray.getId());
|
||||
req.setAttribute("baTrayPage", baTray);
|
||||
}
|
||||
return new ModelAndView("com/zzjee/wm/baTray-update");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入功能跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "upload")
|
||||
public ModelAndView upload(HttpServletRequest req) {
|
||||
req.setAttribute("controller_name","baTrayController");
|
||||
return new ModelAndView("common/upload/pub_excel_upload");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXls")
|
||||
public String exportXls(BaTrayEntity baTray,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
CriteriaQuery cq = new CriteriaQuery(BaTrayEntity.class, dataGrid);
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, baTray, request.getParameterMap());
|
||||
List<BaTrayEntity> baTrays = this.baTrayService.getListByCriteriaQuery(cq,false);
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"ba_tray");
|
||||
modelMap.put(NormalExcelConstants.CLASS,BaTrayEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("ba_tray列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
||||
"导出信息"));
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST,baTrays);
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
/**
|
||||
* 导出excel 使模板
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXlsByT")
|
||||
public String exportXlsByT(BaTrayEntity baTray,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"ba_tray");
|
||||
modelMap.put(NormalExcelConstants.CLASS,BaTrayEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("ba_tray列表", "导出人:"+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<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<BaTrayEntity> listBaTrayEntitys = ExcelImportUtil.importExcel(file.getInputStream(),BaTrayEntity.class,params);
|
||||
for (BaTrayEntity baTray : listBaTrayEntitys) {
|
||||
baTrayService.save(baTray);
|
||||
}
|
||||
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<BaTrayEntity> list() {
|
||||
List<BaTrayEntity> listBaTrays=baTrayService.getList(BaTrayEntity.class);
|
||||
return listBaTrays;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> get(@PathVariable("id") String id) {
|
||||
BaTrayEntity task = baTrayService.get(BaTrayEntity.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 BaTrayEntity baTray, UriComponentsBuilder uriBuilder) {
|
||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||
Set<ConstraintViolation<BaTrayEntity>> failures = validator.validate(baTray);
|
||||
if (!failures.isEmpty()) {
|
||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
baTrayService.save(baTray);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
//按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
|
||||
String id = baTray.getId();
|
||||
URI uri = uriBuilder.path("/rest/baTrayController/" + 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 BaTrayEntity baTray) {
|
||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||
Set<ConstraintViolation<BaTrayEntity>> failures = validator.validate(baTray);
|
||||
if (!failures.isEmpty()) {
|
||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
baTrayService.saveOrUpdate(baTray);
|
||||
} 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) {
|
||||
baTrayService.deleteEntityById(BaTrayEntity.class, id);
|
||||
}
|
||||
}
|
|
@ -11,6 +11,7 @@ import com.zzjee.wm.page.WmNoticeImpPage;
|
|||
import com.zzjee.wm.service.WmImNoticeHServiceI;
|
||||
import com.zzjee.wmutil.*;
|
||||
import net.sf.json.JSONArray;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.poi.hssf.usermodel.*;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
|
@ -1330,7 +1331,7 @@ public class WmImNoticeHController extends BaseController {
|
|||
cellHead5.setCellStyle(cs2);
|
||||
|
||||
Cell cellHead52 = rowHead5.createCell(3);
|
||||
cellHead52.setCellValue("月台: " +wmImNoticeH.getPlatformCode());
|
||||
cellHead52.setCellValue("月台: " +(StringUtils.isEmpty(wmImNoticeH.getPlatformCode())?"":wmImNoticeH.getPlatformCode()));
|
||||
cellHead52.setCellStyle(cs2);
|
||||
|
||||
Row rowHead6 = sheet.createRow((short) page*20+6); // 头部第二行
|
||||
|
@ -1801,7 +1802,7 @@ public class WmImNoticeHController extends BaseController {
|
|||
cellHead5.setCellStyle(cs2);
|
||||
|
||||
Cell cellHead52 = rowHead5.createCell(3);
|
||||
cellHead52.setCellValue("月台: " +wmImNoticeH.getPlatformCode());
|
||||
cellHead52.setCellValue("月台: " +(StringUtils.isEmpty(wmImNoticeH.getPlatformCode())?"":wmImNoticeH.getPlatformCode()));
|
||||
cellHead52.setCellStyle(cs2);
|
||||
|
||||
Row rowHead6 = sheet.createRow((short) page*20+6); // 头部第二行
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.zzjee.wm.entity.*;
|
|||
import com.zzjee.wm.page.confrowpage;
|
||||
import com.zzjee.wm.page.wminqmpage;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||
import org.jeecgframework.core.common.controller.BaseController;
|
||||
|
@ -287,7 +288,7 @@ public class WmInQmIController extends BaseController {
|
|||
System.out.println(wmInQmIEntity.getBinId()+"444444");
|
||||
|
||||
if (!wmUtil.checkbin(wmInQmIEntity.getBinId())) {
|
||||
return false;
|
||||
throw new RuntimeException("储位不存在!");
|
||||
}
|
||||
System.out.println(wmInQmIEntity.getBinId()+"555555");
|
||||
|
||||
|
@ -331,6 +332,7 @@ e.printStackTrace();
|
|||
//重复增加二次判断
|
||||
|
||||
systemService.save(wmToUpGoodsEntity);
|
||||
systemService.addLog("上架:"+wmInQmIEntity.getGoodsId(), Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -466,7 +468,9 @@ e.printStackTrace();
|
|||
try {
|
||||
//托盘占用判断
|
||||
if("yes".equals(ResourceUtil.getConfigByName("usetuopan"))){
|
||||
|
||||
if (StringUtils.isEmpty(wmInQmI.getTinId())) {
|
||||
throw new BusinessException("请填写托盘");
|
||||
}
|
||||
}else{
|
||||
if (StringUtil.isEmpty(wmInQmI.getTinId())){
|
||||
wmInQmI.setTinId(ResourceUtil.getConfigByName("tuopanma"));
|
||||
|
@ -563,7 +567,7 @@ e.printStackTrace();
|
|||
if("on".equals(ResourceUtil.getConfigByName("webonestepup"))&&StringUtil.isNotEmpty(wmInQmI.getBinId())){
|
||||
toup(id);
|
||||
}
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT,
|
||||
systemService.addLog("批量收货"+wmInQmI.getGoodsId(), Globals.Log_Type_INSERT,
|
||||
Globals.Log_Leavel_INFO);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -572,6 +576,7 @@ e.printStackTrace();
|
|||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
@ -953,6 +958,11 @@ for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* pda收货
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> get(@PathVariable("id") String id) {
|
||||
|
@ -1013,6 +1023,12 @@ for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
|
|||
wmInQmI.setBinSta("N");
|
||||
if("no".equals(ResourceUtil.getConfigByName("usetuopan"))){
|
||||
wmInQmI.setTinId(ResourceUtil.getConfigByName("tuopanma"));
|
||||
}else {
|
||||
if (StringUtils.isEmpty(wmInQmI.getTinId())) {
|
||||
D0.setErrorMsg("请填写托盘");
|
||||
D0.setOK(false);
|
||||
return new ResponseEntity( D0,HttpStatus.OK );
|
||||
}
|
||||
}
|
||||
if(flag.equals("n")){
|
||||
D0.setErrorMsg("不允许超收");
|
||||
|
|
|
@ -319,6 +319,31 @@ public class WmOmNoticeHController extends BaseController {
|
|||
}
|
||||
return new ModelAndView("com/zzjee/wm/print/jianhuorenwu-print");
|
||||
}
|
||||
|
||||
@RequestMapping(params = "doPrintOutStorage")
|
||||
public ModelAndView doPrintOutStorage(String id,HttpServletRequest request) {
|
||||
WmOmNoticeHEntity wmOmNoticeHEntity = wmOmNoticeHService.getEntity(WmOmNoticeHEntity.class, id);
|
||||
|
||||
List<Map<String,Object>> list = wmOmNoticeHService.findForJdbc("select id,goods_id ,goods_name ,base_goodscount,goods_unit from wm_to_down_goods where order_id = ? ",wmOmNoticeHEntity.getOmNoticeId());
|
||||
if (list != null && list.size() > 0) {
|
||||
List<WmToDownGoodsEntity> resultList = new ArrayList<>();
|
||||
for (Map<String, Object> map : list) {
|
||||
WmToDownGoodsEntity wmToDownGoodsEntity = new WmToDownGoodsEntity();
|
||||
wmToDownGoodsEntity.setId(map.get("id")== null ?null :map.get("id").toString() );
|
||||
wmToDownGoodsEntity.setGoodsId(map.get("goods_id") == null ?null :map.get("goods_id").toString() );
|
||||
wmToDownGoodsEntity.setGoodsName(map.get("goods_name")== null ?null :map.get("goods_name").toString() );
|
||||
wmToDownGoodsEntity.setBaseGoodscount(map.get("base_goodscount")== null ?null :map.get("base_goodscount").toString() );
|
||||
wmToDownGoodsEntity.setGoodsUnit(map.get("goods_unit")== null ?null :map.get("goods_unit").toString() );
|
||||
resultList.add(wmToDownGoodsEntity);
|
||||
}
|
||||
request.setAttribute("listitem",resultList);
|
||||
}
|
||||
request.setAttribute("id",id);
|
||||
|
||||
return new ModelAndView("com/zzjee/wm/print/selectGoodsOutStorage");
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(params = "doPrintzhuisu")
|
||||
public ModelAndView doPrintpzhuisu(String id,HttpServletRequest request) {
|
||||
WmOmNoticeHEntity wmOmNoticeHEntity = wmOmNoticeHService.getEntity(WmOmNoticeHEntity.class, id);
|
||||
|
@ -1850,6 +1875,141 @@ public class WmOmNoticeHController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
@RequestMapping(params = "doSelectPrintckd")
|
||||
public ModelAndView doSelectPrintckd(String itemId,String id ,HttpServletRequest request) {
|
||||
PrintHeader printHeader = new PrintHeader();
|
||||
WmOmNoticeHEntity wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class,
|
||||
id);//获取抬头
|
||||
|
||||
|
||||
printHeader.setHeader01(ResourceUtil.getConfigByName("comname")+"出库单");
|
||||
|
||||
printHeader.setHeader02("公司地址:"+ResourceUtil.getConfigByName("comaddr") );
|
||||
|
||||
printHeader.setHeader03("电话:"+ ResourceUtil.getConfigByName("comtel"));
|
||||
|
||||
printHeader.setHeader04("出库日期: " +DateUtils.date2Str(wmOmNoticeH.getDelvData(), DateUtils.date_sdf) );
|
||||
|
||||
|
||||
printHeader.setHeader05("出库单号: " +wmOmNoticeH.getOmNoticeId());
|
||||
|
||||
printHeader.setHeader06("客户单号: " +wmOmNoticeH.getImCusCode());
|
||||
|
||||
|
||||
printHeader.setHeader07("车号: " +wmOmNoticeH.getReCarno());
|
||||
|
||||
MdCusEntity md = systemService.findUniqueByProperty(MdCusEntity.class, "keHuBianMa", wmOmNoticeH.getCusCode());
|
||||
|
||||
printHeader.setHeader08("客户名称: " +wmOmNoticeH.getCusCode()+md.getZhongWenQch());
|
||||
|
||||
printHeader.setHeader09("收货人: "+wmOmNoticeH.getDelvMember()+" 电话:"+wmOmNoticeH.getDelvMobile() );
|
||||
|
||||
printHeader.setHeader10("收货地址: " +wmOmNoticeH.getDelvAddr());
|
||||
|
||||
printHeader.setHeader11("打印时间: "+DateUtils.date2Str(DateUtils.getDate(), DateUtils.datetimeFormat) );
|
||||
printHeader.setHeader14("备注: " +wmOmNoticeH.getOmBeizhu());
|
||||
|
||||
List<PrintItem> listitem = new ArrayList<>();
|
||||
|
||||
String tsql = "SELECT wq.goods_pro_data as pro_data,wq.base_unit, mg.goods_code, mg.goods_id,mg.shp_ming_cheng,cast(sum(wq.base_goodscount) as signed) as goods_count,mg.chl_shl,cast(mg.ti_ji_cm/mg.chl_shl as signed) tin_tj ,(mg.zhl_kg/mg.chl_shl ) as tin_zhl "
|
||||
+" FROM wm_to_down_goods wq,mv_goods mg where wq.id in (?) "
|
||||
+" and wq.goods_id = mg.goods_code group by wq.order_id, mg.goods_code,wq.goods_pro_data";
|
||||
|
||||
List<Map<String, Object>> result = systemService
|
||||
.findForJdbc(tsql, itemId);
|
||||
|
||||
|
||||
int size = result.size();
|
||||
if(size<1){
|
||||
tsql = "SELECT wq.pro_data,wq.base_unit, mg.goods_code, mg.goods_id,mg.shp_ming_cheng,cast(sum(wq.base_goodscount) as signed) as goods_count,mg.chl_shl,cast(mg.ti_ji_cm/mg.chl_shl as signed) tin_tj , (mg.zhl_kg/mg.chl_shl) as tin_zhl "
|
||||
+" FROM wm_om_qm_i wq,mv_goods mg where wq.om_notice_id = ? "
|
||||
+" and wq.goods_id = mg.goods_code group by wq.om_notice_id, mg.goods_code,wq.pro_data";
|
||||
result = systemService
|
||||
.findForJdbc(tsql, wmOmNoticeH.getOmNoticeId());
|
||||
size = result.size();
|
||||
}
|
||||
long sumxs=0;
|
||||
Double sum =0.00;
|
||||
Double sumzl = 0.00;
|
||||
int cerconNo=0;
|
||||
for (int i = 0; i < result.size(); i++) {
|
||||
PrintItem printItem = new PrintItem();
|
||||
|
||||
cerconNo++;
|
||||
printItem.setItem20(Integer.toString(cerconNo));
|
||||
printItem.setItem01(result.get(i).get("goods_id")
|
||||
.toString());
|
||||
printItem.setItem02(result.get(i).get("shp_ming_cheng")
|
||||
.toString());
|
||||
try {
|
||||
printItem.setItem03(result.get(i).get("pro_data")
|
||||
.toString());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}
|
||||
|
||||
|
||||
|
||||
try {
|
||||
|
||||
long xs = (long) Math.floor(Double.parseDouble(result.get(i).get("goods_count")
|
||||
.toString()) / Double.parseDouble(result.get(i).get("chl_shl")
|
||||
.toString()));
|
||||
sumxs = sumxs + xs;
|
||||
printItem.setItem05(Long.toString(xs));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}
|
||||
|
||||
try {
|
||||
sum = sum + Double.parseDouble(result.get(i).get("goods_count")
|
||||
.toString());
|
||||
printItem.setItem06(result.get(i).get("goods_count")
|
||||
.toString());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}
|
||||
try {
|
||||
|
||||
double zhl = Double.parseDouble(result.get(i).get("tin_zhl")
|
||||
.toString()) * Double.parseDouble(result.get(i).get("goods_count").toString());
|
||||
sumzl = sumzl + zhl;
|
||||
printItem.setItem07(Double.toString(zhl));
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}
|
||||
try {
|
||||
double tij = Double.parseDouble(result.get(i).get("tin_tj")
|
||||
.toString()) * Double.parseDouble(result.get(i).get("goods_count").toString());
|
||||
printItem.setItem08(Double.toString(tij));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
try{
|
||||
if("hr".equals(ResourceUtil.getConfigByName("wm.ckd"))) {
|
||||
printItem.setItem09(wmUtil.getstock(result.get(i).get("goods_id").toString()));
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}
|
||||
|
||||
|
||||
listitem.add(printItem);
|
||||
}
|
||||
|
||||
printHeader.setHeader12(sum.toString());
|
||||
printHeader.setHeader13(sumzl.toString());
|
||||
request.setAttribute("printHeader", printHeader);
|
||||
request.setAttribute("listitem", listitem);
|
||||
|
||||
return new ModelAndView("com/zzjee/wm/print/imnoticeckd-print");
|
||||
}
|
||||
|
||||
|
||||
//打印的接口改造开始 在线打印非EXCEL
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.zzjee.wm.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zzjee.wm.entity.*;
|
||||
import com.zzjee.wm.page.Delrowpage;
|
||||
import com.zzjee.wm.page.omqmpage;
|
||||
|
@ -15,6 +16,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jeecgframework.core.util.*;
|
||||
import org.jeecgframework.web.system.pojo.base.TSRole;
|
||||
import org.jeecgframework.web.system.sms.util.Constants;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -59,6 +61,7 @@ import org.springframework.http.HttpHeaders;
|
|||
import org.springframework.http.HttpStatus;
|
||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.validation.ConstraintViolation;
|
||||
|
@ -198,6 +201,15 @@ public class WmOmQmIController extends BaseController {
|
|||
message = "添加到下架任务清单成功";
|
||||
WmOmQmIEntity t = wmOmQmIService.get(WmOmQmIEntity.class, request
|
||||
.getParameter("id").toString());
|
||||
//查询所有拣货员
|
||||
List<String> usernameList = systemService.findListbySql("SELECT u.username FROM t_s_role_user ru LEFT JOIN t_s_role r ON ru.roleid=r.id LEFT JOIN t_s_base_user u ON ru.userid=u.id LEFT JOIN (\n" +
|
||||
"SELECT assign_to,count(1) num FROM wm_om_qm_i WHERE bin_sta='N' GROUP BY assign_to) i ON u.username=i.assign_to WHERE r.rolecode='jhy' ORDER BY num");
|
||||
if (usernameList != null && usernameList.size() > 0) {
|
||||
//查询正在进行操作的拣货员
|
||||
System.out.println(JSON.toJSONString(usernameList));
|
||||
wmOmQmI.setAssignTo(usernameList.get(0));
|
||||
}
|
||||
|
||||
if(!wmUtil.checkstcoka( t.getBinId(),t.getTinId(),t.getGoodsId(),t.getProData(),t.getBaseGoodscount())){
|
||||
message = "库存不足";
|
||||
j.setMsg(message);
|
||||
|
|
|
@ -0,0 +1,732 @@
|
|||
package com.zzjee.wm.controller;
|
||||
|
||||
import com.zzjee.md.entity.MdBinEntity;
|
||||
import com.zzjee.md.entity.MdCusEntity;
|
||||
import com.zzjee.md.entity.MdCusOtherEntity;
|
||||
import com.zzjee.md.entity.MdGoodsEntity;
|
||||
import com.zzjee.md.entity.MdSupEntity;
|
||||
import com.zzjee.md.entity.MvGoodsEntity;
|
||||
import com.zzjee.md.service.MdBinServiceI;
|
||||
import com.zzjee.md.service.MdCusServiceI;
|
||||
import com.zzjee.md.service.MdGoodsServiceI;
|
||||
import com.zzjee.wm.entity.WmImNoticeHEntity;
|
||||
import com.zzjee.wm.entity.WmImNoticeIEntity;
|
||||
import com.zzjee.wm.entity.WmOmNoticeHEntity;
|
||||
import com.zzjee.wm.entity.WmOmNoticeIEntity;
|
||||
import com.zzjee.wm.entity.WmPlatIoEntity;
|
||||
import com.zzjee.wm.page.WmImNoticeHPage;
|
||||
import com.zzjee.wm.page.WmOmNoticeHPage;
|
||||
import com.zzjee.wm.service.WmImNoticeHServiceI;
|
||||
import com.zzjee.wm.service.WmOmNoticeHServiceI;
|
||||
import com.zzjee.wmutil.wmUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jeecgframework.core.common.exception.BusinessException;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.common.model.json.AjaxJson;
|
||||
import org.jeecgframework.core.common.model.json.DataGrid;
|
||||
import org.jeecgframework.core.common.model.json.DataGridReturn;
|
||||
import org.jeecgframework.core.constant.Globals;
|
||||
import org.jeecgframework.core.util.ExceptionUtil;
|
||||
import org.jeecgframework.core.util.MyBeanUtils;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
import org.jeecgframework.core.util.StringUtil;
|
||||
import org.jeecgframework.jwt.util.JwtUtils;
|
||||
import org.jeecgframework.jwt.util.ResponseMessage;
|
||||
import org.jeecgframework.jwt.util.Result;
|
||||
import org.jeecgframework.web.system.pojo.base.TSRole;
|
||||
import org.jeecgframework.web.system.pojo.base.TSRoleUser;
|
||||
import org.jeecgframework.web.system.pojo.base.TSUser;
|
||||
import org.jeecgframework.web.system.service.SystemService;
|
||||
import org.jeecgframework.web.system.sms.util.Constants;
|
||||
import org.jeecgframework.web.system.sms.util.TuiSongMsgUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Package com.zzjee.wm.controller
|
||||
* @date 2021/7/22 13:39
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wmsApiController")
|
||||
public class WmsApiController {
|
||||
|
||||
/**
|
||||
* Logger for this class
|
||||
*/
|
||||
private static final Logger logger = Logger.getLogger(WmsApiController.class);
|
||||
|
||||
@Autowired
|
||||
private MdGoodsServiceI mdGoodsService;
|
||||
@Autowired
|
||||
private SystemService systemService;
|
||||
@Autowired
|
||||
private MdCusServiceI mdCusService;
|
||||
@Autowired
|
||||
private MdBinServiceI mdBinService;
|
||||
@Autowired
|
||||
private WmImNoticeHServiceI wmImNoticeHService;
|
||||
@Autowired
|
||||
private WmOmNoticeHServiceI wmOmNoticeHService;
|
||||
|
||||
@RequestMapping(params = "getToken")
|
||||
@ResponseBody
|
||||
public ResponseMessage test(HttpServletRequest request, HttpServletResponse response){
|
||||
|
||||
Map<String,Object> data = new HashMap<>();
|
||||
|
||||
data.put("token", JwtUtils.buildJWT("wmsAccount"));
|
||||
|
||||
return Result.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
*/
|
||||
|
||||
@RequestMapping(params = "goodsList")
|
||||
@ResponseBody
|
||||
public ResponseMessage<DataGridReturn> datagrid(MdGoodsEntity mdGoods, HttpServletRequest request,
|
||||
HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(MdGoodsEntity.class, dataGrid);
|
||||
// 查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq,
|
||||
mdGoods, request.getParameterMap());
|
||||
|
||||
if(StringUtil.isNotEmpty(wmUtil.getCusCode())){
|
||||
cq.eq("suoShuKeHu", wmUtil.getCusCode());
|
||||
}
|
||||
|
||||
|
||||
// if(mdGoods.getZhuangTai()==null){
|
||||
// cq.notEq("zhuangTai", "Y");
|
||||
// }
|
||||
cq.add();
|
||||
return Result.success(this.mdGoodsService.getDataGridReturn(cq, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goodsDoAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(MdGoodsEntity mdGoods, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "商品信息添加成功";
|
||||
try {
|
||||
MdGoodsEntity mdGoods1 = systemService.findUniqueByProperty(
|
||||
MdGoodsEntity.class, "shpBianMa", mdGoods.getShpBianMa());
|
||||
|
||||
if(mdGoods1 ==null ){
|
||||
if(StringUtil.isEmpty(mdGoods.getChlKongZhi()) ){
|
||||
mdGoods.setChlKongZhi("N");
|
||||
}
|
||||
if("N".equals(mdGoods.getChlKongZhi() )){
|
||||
mdGoods.setChlShl("1");
|
||||
mdGoods.setJshDanWei(mdGoods.getShlDanWei());
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
if(StringUtil.isEmpty(mdGoods.getZhlKgm())){
|
||||
if(!StringUtil.isEmpty(mdGoods.getBzhiQi())){
|
||||
int bzhiq = Integer.parseInt(mdGoods.getBzhiQi());
|
||||
mdGoods.setZhlKgm(Integer.toString(bzhiq));
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
mdGoodsService.save(mdGoods);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT,
|
||||
Globals.Log_Leavel_INFO);
|
||||
}else{
|
||||
message = "商品编码或者条码已经存在";
|
||||
j.setSuccess(false);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "商品信息添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goodsDoUpdate")
|
||||
@ResponseBody
|
||||
public AjaxJson doUpdate(MdGoodsEntity mdGoods, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "商品信息更新成功";
|
||||
MdGoodsEntity t = mdGoodsService.get(MdGoodsEntity.class,
|
||||
mdGoods.getId());
|
||||
try {
|
||||
MyBeanUtils.copyBeanNotNull2Bean(mdGoods, t);
|
||||
mdGoodsService.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;
|
||||
}
|
||||
|
||||
@RequestMapping(params = "cusList")
|
||||
@ResponseBody
|
||||
public ResponseMessage<DataGridReturn> datagrid(MdCusEntity mdCus, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(MdCusEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, mdCus, request.getParameterMap());
|
||||
try{
|
||||
//自定义追加查询条件
|
||||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("zhuJiMa", "desc");
|
||||
cq.setOrder(map1);
|
||||
cq.add();
|
||||
return Result.success(this.mdCusService.getDataGridReturn(cq, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加客户
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "cusDoAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(MdCusEntity mdCus, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "客户添加成功";
|
||||
try{
|
||||
MdCusEntity mdcus1 = systemService.findUniqueByProperty(MdCusEntity.class, "keHuBianMa", mdCus.getKeHuBianMa());
|
||||
if(mdcus1==null){
|
||||
mdCusService.save(mdCus);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||
}else{
|
||||
message = "客户编码已经存在";
|
||||
j.setSuccess(false);
|
||||
}
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "客户添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新客户
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "cusDoUpdate")
|
||||
@ResponseBody
|
||||
public AjaxJson doUpdate(MdCusEntity mdCus, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "客户更新成功";
|
||||
MdCusEntity t = mdCusService.get(MdCusEntity.class, mdCus.getId());
|
||||
try {
|
||||
MyBeanUtils.copyBeanNotNull2Bean(mdCus, t);
|
||||
mdCusService.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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取储位信息
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
*/
|
||||
|
||||
@RequestMapping(params = "binList")
|
||||
@ResponseBody
|
||||
public ResponseMessage<DataGridReturn> datagrid(MdBinEntity mdBin, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(MdBinEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, mdBin, request.getParameterMap());
|
||||
try{
|
||||
//自定义追加查询条件
|
||||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
cq.add();
|
||||
return Result.success(this.mdBinService.getDataGridReturn(cq, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加仓位定义
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "binDoAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(MdBinEntity mdBin, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "仓位定义添加成功";
|
||||
try{
|
||||
|
||||
MdBinEntity mdb = null;
|
||||
List<MdBinEntity> mdblist = systemService.findByProperty(MdBinEntity.class, "kuWeiBianMa", mdBin.getKuWeiBianMa());
|
||||
for (MdBinEntity t:mdblist){
|
||||
if(t.getBinStore().equals(mdBin.getBinStore())){
|
||||
mdb = t;
|
||||
}
|
||||
}
|
||||
|
||||
// MdBinEntity mdBin1 = systemService.findUniqueByProperty(MdBinEntity.class, "kuWeiBianMa", mdBin.getKuWeiBianMa());
|
||||
if(mdb ==null ){
|
||||
mdBinService.save(mdBin);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||
}else{
|
||||
message = "库位编码或者库位条码已经存在";
|
||||
j.setSuccess(false);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "仓位定义添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加进货通知抬头
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "imNoticeHDoAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(WmImNoticeHEntity wmImNoticeH,
|
||||
WmImNoticeHPage wmImNoticeHPage, HttpServletRequest request) {
|
||||
List<WmImNoticeIEntity> wmImNoticeIList = wmImNoticeHPage
|
||||
.getWmImNoticeIList();
|
||||
AjaxJson j = new AjaxJson();
|
||||
String message = "进货通知添加成功";
|
||||
try {
|
||||
|
||||
String noticeid = wmUtil.getNextNoticeid(wmImNoticeH.getOrderTypeCode()) ;
|
||||
wmImNoticeH.setNoticeId(noticeid);
|
||||
WmPlatIoEntity wmPlatIo = new WmPlatIoEntity();
|
||||
wmPlatIo.setCarno(wmImNoticeH.getImCarNo());
|
||||
wmPlatIo.setDocId(wmImNoticeH.getNoticeId());
|
||||
wmPlatIo.setPlanIndata(wmImNoticeH.getImData());
|
||||
wmPlatIo.setPlatId(wmImNoticeH.getPlatformCode());
|
||||
wmPlatIo.setPlatSta(Constants.wm_sta1);
|
||||
wmPlatIo.setPlatBeizhu("司机:" + wmImNoticeH.getImCarDri() + "电话:"
|
||||
+ wmImNoticeH.getImCarMobile());
|
||||
systemService.save(wmPlatIo);
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("id", wmImNoticeH.getNoticeId());
|
||||
TSUser user = ResourceUtil.getSessionUserName();
|
||||
String roles = "";
|
||||
if (user != null) {
|
||||
List<TSRoleUser> rUsers = systemService.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
|
||||
for (TSRoleUser ru : rUsers) {
|
||||
TSRole role = ru.getTSRole();
|
||||
roles += role.getRoleCode() + ",";
|
||||
}
|
||||
if (roles.length() > 0) {
|
||||
roles = roles.substring(0, roles.length() - 1);
|
||||
}
|
||||
if(roles.equals("CUS")){
|
||||
wmImNoticeH.setCusCode(user.getUserName());
|
||||
|
||||
}
|
||||
}
|
||||
if(roles.equals("CUS")){
|
||||
wmImNoticeH.setImSta(Constants.wm_sta0);
|
||||
}else{
|
||||
wmImNoticeH.setImSta(Constants.wm_sta1);
|
||||
}
|
||||
if(wmImNoticeH.getCusCode()==null){
|
||||
if(roles.equals("CUS")){
|
||||
wmImNoticeH.setCusCode(user.getUserName());
|
||||
}
|
||||
}
|
||||
//获取供应商
|
||||
if(StringUtil.isNotEmpty(wmImNoticeH.getSupCode())){
|
||||
try{
|
||||
MdSupEntity mdSupEntity = systemService.findUniqueByProperty(MdSupEntity.class,"gysBianMa",wmImNoticeH.getSupCode());
|
||||
wmImNoticeH.setSupName(mdSupEntity.getZhongWenQch());
|
||||
}catch (Exception e){
|
||||
}
|
||||
}
|
||||
//
|
||||
List<WmImNoticeIEntity> wmImNoticeIListnew = new ArrayList<WmImNoticeIEntity>();
|
||||
for (WmImNoticeIEntity wmImNoticeIEntity : wmImNoticeIList) {
|
||||
if(!StringUtil.isEmpty(wmImNoticeIEntity.getGoodsCode())){
|
||||
try {
|
||||
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class,"goodsName",wmImNoticeIEntity.getGoodsCode());
|
||||
// String date[]=wmImNoticeIEntity.getGoodsCode().split("-");
|
||||
|
||||
long hiti = 0;
|
||||
try {
|
||||
if(StringUtil.isEmpty(wmImNoticeIEntity.getBinPlan())){
|
||||
hiti = Long.parseLong(wmImNoticeIEntity.getGoodsCount())/ ( Long.parseLong(mvgoods.getMpCengGao()) * Long.parseLong(mvgoods.getMpDanCeng()) * Long.parseLong(mvgoods.getChlShl()));
|
||||
wmImNoticeIEntity.setBinPlan(Long.toString(hiti));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
wmImNoticeIEntity.setGoodsCode(mvgoods.getGoodsCode());
|
||||
wmImNoticeIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
wmImNoticeIListnew.add(wmImNoticeIEntity);
|
||||
}
|
||||
}
|
||||
wmImNoticeHService.addMain(wmImNoticeH, wmImNoticeIListnew);
|
||||
try {
|
||||
TuiSongMsgUtil.sendMessage("收货通知", Constants.SMS_SEND_TYPE_3,
|
||||
"RKYYTZ", map, "admin", ResourceUtil.getSessionUserName()
|
||||
.getUserName());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除进货通知抬头
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "imNoticeHDoDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doDel(WmImNoticeHEntity wmImNoticeH,
|
||||
HttpServletRequest request) {
|
||||
boolean deltrue = true;
|
||||
if(!"database".equals(ResourceUtil.getConfigByName("sys.del"))){
|
||||
deltrue=false;
|
||||
}
|
||||
AjaxJson j = new AjaxJson();
|
||||
wmImNoticeH = systemService.getEntity(WmImNoticeHEntity.class,
|
||||
wmImNoticeH.getId());
|
||||
String message = "进货通知删除成功";
|
||||
try {
|
||||
WmPlatIoEntity wmPlatIo = systemService.findUniqueByProperty(
|
||||
WmPlatIoEntity.class, "docId", wmImNoticeH.getNoticeId());// 删除月台计划
|
||||
if (wmPlatIo != null) {
|
||||
systemService.delete(wmPlatIo);
|
||||
}
|
||||
wmImNoticeH.setImSta(Constants.wm_sta3);
|
||||
if(deltrue){
|
||||
wmImNoticeHService.delete(wmImNoticeH);
|
||||
|
||||
}else{
|
||||
wmImNoticeHService.saveOrUpdate(wmImNoticeH);
|
||||
|
||||
}
|
||||
systemService.addLog(message, Globals.Log_Type_DEL,
|
||||
Globals.Log_Leavel_INFO);
|
||||
Object id0 = wmImNoticeH.getNoticeId();
|
||||
// ===================================================================================
|
||||
// 查询-进货通知明细
|
||||
|
||||
if(wmImNoticeH.getOrderTypeCode().equals("04")){
|
||||
String tsql = "delete from wm_in_qm_i where im_notice_id = ?";
|
||||
systemService.executeSql(tsql, wmImNoticeH.getNoticeId());
|
||||
}
|
||||
String hql0 = "from WmImNoticeIEntity where 1 = 1 AND iM_NOTICE_ID = ? ";
|
||||
try {
|
||||
List<WmImNoticeIEntity> wmImNoticeIEntityList = systemService
|
||||
.findHql(hql0, id0);
|
||||
for (WmImNoticeIEntity wmImNoticeIEntity : wmImNoticeIEntityList) {
|
||||
wmImNoticeIEntity.setBinPre("Y");
|
||||
if(deltrue){
|
||||
systemService.delete(wmImNoticeIEntity);
|
||||
|
||||
}else{
|
||||
systemService.updateEntitie(wmImNoticeIEntity);
|
||||
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "进货通知删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加出货通知
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "omNoticeHDoAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(WmOmNoticeHEntity wmOmNoticeH, WmOmNoticeHPage wmOmNoticeHPage, HttpServletRequest request) {
|
||||
List<WmOmNoticeIEntity> wmOmNoticeIList = wmOmNoticeHPage.getWmOmNoticeIList();
|
||||
AjaxJson j = new AjaxJson();
|
||||
String message = "添加成功";
|
||||
try{
|
||||
String noticeid = wmUtil.getNextomNoticeId(wmOmNoticeH.getOrderTypeCode());
|
||||
WmPlatIoEntity wmPlatIo = new WmPlatIoEntity();
|
||||
wmPlatIo.setCarno(wmOmNoticeH.getReCarno());
|
||||
wmPlatIo.setDocId(noticeid);
|
||||
wmPlatIo.setPlanIndata(wmOmNoticeH.getDelvData());
|
||||
wmPlatIo.setPlatId(wmOmNoticeH.getOmPlatNo());
|
||||
wmPlatIo.setPlatSta(Constants.wm_sta1);
|
||||
wmPlatIo.setPlatBeizhu("司机:" + wmOmNoticeH.getReMember() + "电话:"
|
||||
+ wmOmNoticeH.getReMobile());
|
||||
systemService.save(wmPlatIo);
|
||||
wmOmNoticeH.setOmNoticeId(noticeid);
|
||||
wmOmNoticeH.setOmSta(Constants.wm_sta1);
|
||||
if(wmOmNoticeH.getCusCode()==null){
|
||||
if(StringUtil.isNotEmpty(wmUtil.getCusCode())){
|
||||
wmOmNoticeH.setCusCode(wmUtil.getCusCode());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<WmOmNoticeIEntity> wmomNoticeIListnew = new ArrayList<WmOmNoticeIEntity>();
|
||||
for (WmOmNoticeIEntity wmomNoticeIEntity : wmOmNoticeIList) {
|
||||
if(!StringUtil.isEmpty(wmomNoticeIEntity.getGoodsId())){
|
||||
try {
|
||||
|
||||
|
||||
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class,"goodsName",wmomNoticeIEntity.getGoodsId());
|
||||
|
||||
// String date[]=wmImNoticeIEntity.getGoodsCode().split("-");
|
||||
// wmImNoticeIEntity.setGoodsCode(mvgoods.getGoodsCode());
|
||||
// wmImNoticeIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
||||
// String date[]=wmomNoticeIEntity.getGoodsId().split("-");
|
||||
wmomNoticeIEntity.setGoodsId(mvgoods.getGoodsCode());
|
||||
wmomNoticeIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}
|
||||
wmomNoticeIListnew.add(wmomNoticeIEntity);
|
||||
}
|
||||
}
|
||||
if(StringUtil.isNotEmpty( wmOmNoticeH.getOcusCode())){
|
||||
// String datecuso[]= wmOmNoticeH.getOcusCode().split("-");
|
||||
MdCusOtherEntity mdcusother = systemService.findUniqueByProperty(MdCusOtherEntity.class, "keHuBianMa",wmOmNoticeH.getOcusCode());
|
||||
if (mdcusother != null) {
|
||||
wmOmNoticeH.setOcusCode(wmOmNoticeH.getOcusCode());
|
||||
wmOmNoticeH.setOcusName(mdcusother.getZhongWenQch());
|
||||
}
|
||||
}
|
||||
wmOmNoticeHService.addMain(wmOmNoticeH, wmomNoticeIListnew);
|
||||
|
||||
|
||||
|
||||
Map<String ,Object> map = new HashMap<String ,Object>();
|
||||
map.put("id", wmOmNoticeH.getOmNoticeId());
|
||||
try {
|
||||
TuiSongMsgUtil.sendMessage("出货通知", Constants.SMS_SEND_TYPE_3, "CKYYTZ", map, "admin", ResourceUtil.getSessionUserName().getUserName());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除出货通知
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "omNoticeHDoDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doDel(WmOmNoticeHEntity wmOmNoticeH, HttpServletRequest request) {
|
||||
String deltype = ResourceUtil.getConfigByName("del.type");
|
||||
|
||||
AjaxJson j = new AjaxJson();
|
||||
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class, wmOmNoticeH.getId());
|
||||
String message = "出货通知删除成功";
|
||||
try{
|
||||
wmOmNoticeH.setOmSta("已删除");
|
||||
Object id0 = wmOmNoticeH.getOmNoticeId();
|
||||
//===================================================================================
|
||||
//1.查询出数据库的明细数据-出货商品明细
|
||||
String hql0 = "from WmOmNoticeIEntity where 1 = 1 AND oM_NOTICE_ID = ? ";
|
||||
List<WmOmNoticeIEntity> wmOmNoticeIOldList = systemService.findHql(hql0,id0);
|
||||
for (WmOmNoticeIEntity wmOmNoticeIEntity : wmOmNoticeIOldList) {
|
||||
wmOmNoticeIEntity.setOmSta("已删除");
|
||||
wmOmNoticeIEntity.setPlanSta("Y");
|
||||
if("database".equals(deltype)){
|
||||
systemService.delete(wmOmNoticeIEntity);
|
||||
|
||||
}else{
|
||||
systemService.saveOrUpdate(wmOmNoticeIEntity);
|
||||
|
||||
}
|
||||
}
|
||||
if("database".equals(deltype)){
|
||||
wmOmNoticeHService.delete(wmOmNoticeH);
|
||||
}else{
|
||||
wmOmNoticeHService.saveOrUpdate(wmOmNoticeH);
|
||||
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(params = "imNoticeHList")
|
||||
@ResponseBody
|
||||
public ResponseMessage<DataGridReturn> datagrid(WmImNoticeHEntity wmImNoticeH,
|
||||
HttpServletRequest request, HttpServletResponse response,
|
||||
DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(WmImNoticeHEntity.class, dataGrid);
|
||||
// 查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq,
|
||||
wmImNoticeH);
|
||||
try {
|
||||
// 自定义追加查询条件
|
||||
String query_imData_begin = request.getParameter("imData_begin1");
|
||||
String query_imData_end = request.getParameter("imData_end2");
|
||||
|
||||
if (StringUtil.isNotEmpty(query_imData_begin)) {
|
||||
cq.ge("imData", new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
|
||||
.parse(query_imData_begin));
|
||||
}
|
||||
if (StringUtil.isNotEmpty(query_imData_end)) {
|
||||
cq.le("imData", new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
|
||||
.parse(query_imData_end));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
if(StringUtil.isNotEmpty(wmUtil.getCusCode())){
|
||||
cq.eq("cusCode", wmUtil.getCusCode());
|
||||
}
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
cq.add();
|
||||
return Result.success(this.wmImNoticeHService.getDataGridReturn(cq, true));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(params = "omNoticeHList")
|
||||
@ResponseBody
|
||||
public ResponseMessage<DataGridReturn> datagrid(WmOmNoticeHEntity wmOmNoticeH, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(WmOmNoticeHEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmOmNoticeH);
|
||||
|
||||
try {
|
||||
// 自定义追加查询条件
|
||||
String query_imData_begin = request.getParameter("delvData_begin1");
|
||||
String query_imData_end = request.getParameter("delvData_end2");
|
||||
|
||||
if (StringUtil.isNotEmpty(query_imData_begin)) {
|
||||
cq.ge("delvData", new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
|
||||
.parse(query_imData_begin));
|
||||
}
|
||||
if (StringUtil.isNotEmpty(query_imData_end)) {
|
||||
cq.le("delvData", new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
|
||||
.parse(query_imData_end));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
|
||||
if(StringUtil.isNotEmpty(wmUtil.getCusCode())){
|
||||
cq.eq("cusCode", wmUtil.getCusCode());
|
||||
|
||||
}
|
||||
if (wmOmNoticeH.getOmSta() == null) {
|
||||
cq.notEq("omSta", Constants.wm_sta4);
|
||||
}
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
cq.add();
|
||||
return Result.success(this.wmOmNoticeHService.getDataGridReturn(cq, true));
|
||||
}
|
||||
|
||||
@RequestMapping(params = "getStock")
|
||||
@ResponseBody
|
||||
public ResponseMessage<List<Map<String, Object>>> getStock () {
|
||||
List<Map<String,Object>> data = systemService.findForJdbc("SELECT * from wv_stock where base_goodscount <> 0");
|
||||
|
||||
return Result.success(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,294 @@
|
|||
package com.zzjee.wm.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: ba_store_area
|
||||
* @author onlineGenerator
|
||||
* @date 2021-07-13 09:34:52
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "ba_store_area", schema = "")
|
||||
@SuppressWarnings("serial")
|
||||
public class BaStoreAreaEntity 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 areaCode;
|
||||
/**库区名称*/
|
||||
@Excel(name="库区名称")
|
||||
private String areaName;
|
||||
/**库区类型*/
|
||||
@Excel(name="库区类型")
|
||||
private String areaType;
|
||||
/**仓库编码*/
|
||||
@Excel(name="仓库编码")
|
||||
private String wareCode;
|
||||
/**仓库名称*/
|
||||
@Excel(name="仓库名称")
|
||||
private String wareName;
|
||||
|
||||
/**
|
||||
*方法: 取得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)
|
||||
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 ="AREA_CODE",nullable=true,length=50)
|
||||
public String getAreaCode(){
|
||||
return this.areaCode;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 库区编码
|
||||
*/
|
||||
public void setAreaCode(String areaCode){
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 库区名称
|
||||
*/
|
||||
@Column(name ="AREA_NAME",nullable=true,length=50)
|
||||
public String getAreaName(){
|
||||
return this.areaName;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 库区名称
|
||||
*/
|
||||
public void setAreaName(String areaName){
|
||||
this.areaName = areaName;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 库区类型
|
||||
*/
|
||||
@Column(name ="AREA_TYPE",nullable=true,length=50)
|
||||
public String getAreaType(){
|
||||
return this.areaType;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 库区类型
|
||||
*/
|
||||
public void setAreaType(String areaType){
|
||||
this.areaType = areaType;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 仓库编码
|
||||
*/
|
||||
@Column(name ="WARE_CODE",nullable=true,length=50)
|
||||
public String getWareCode(){
|
||||
return this.wareCode;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 仓库编码
|
||||
*/
|
||||
public void setWareCode(String wareCode){
|
||||
this.wareCode = wareCode;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 仓库名称
|
||||
*/
|
||||
@Column(name ="WARE_NAME",nullable=true,length=50)
|
||||
public String getWareName(){
|
||||
return this.wareName;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 仓库名称
|
||||
*/
|
||||
public void setWareName(String wareName){
|
||||
this.wareName = wareName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,327 @@
|
|||
package com.zzjee.wm.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: ba_tray
|
||||
* @author onlineGenerator
|
||||
* @date 2021-07-13 14:01:06
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "ba_tray", schema = "")
|
||||
@SuppressWarnings("serial")
|
||||
public class BaTrayEntity 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;
|
||||
/**托盘编码*/
|
||||
@Excel(name="托盘编码")
|
||||
private String trayCode;
|
||||
/**托盘名称*/
|
||||
@Excel(name="托盘名称")
|
||||
private String trayName;
|
||||
/**备用1*/
|
||||
private String attr1;
|
||||
/**备用2*/
|
||||
private String attr2;
|
||||
/**备用3*/
|
||||
private String attr3;
|
||||
/**备用4*/
|
||||
private String attr4;
|
||||
/**备用5*/
|
||||
private String attr5;
|
||||
|
||||
/**
|
||||
*方法: 取得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 ="TRAY_CODE",nullable=true,length=50)
|
||||
public String getTrayCode(){
|
||||
return this.trayCode;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 托盘编码
|
||||
*/
|
||||
public void setTrayCode(String trayCode){
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 托盘名称
|
||||
*/
|
||||
@Column(name ="TRAY_NAME",nullable=true,length=50)
|
||||
public String getTrayName(){
|
||||
return this.trayName;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 托盘名称
|
||||
*/
|
||||
public void setTrayName(String trayName){
|
||||
this.trayName = trayName;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 备用1
|
||||
*/
|
||||
@Column(name ="ATTR1",nullable=true,length=50)
|
||||
public String getAttr1(){
|
||||
return this.attr1;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 备用1
|
||||
*/
|
||||
public void setAttr1(String attr1){
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 备用2
|
||||
*/
|
||||
@Column(name ="ATTR2",nullable=true,length=50)
|
||||
public String getAttr2(){
|
||||
return this.attr2;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 备用2
|
||||
*/
|
||||
public void setAttr2(String attr2){
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 备用3
|
||||
*/
|
||||
@Column(name ="ATTR3",nullable=true,length=50)
|
||||
public String getAttr3(){
|
||||
return this.attr3;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 备用3
|
||||
*/
|
||||
public void setAttr3(String attr3){
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 备用4
|
||||
*/
|
||||
@Column(name ="ATTR4",nullable=true,length=50)
|
||||
public String getAttr4(){
|
||||
return this.attr4;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 备用4
|
||||
*/
|
||||
public void setAttr4(String attr4){
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 备用5
|
||||
*/
|
||||
@Column(name ="ATTR5",nullable=true,length=50)
|
||||
public String getAttr5(){
|
||||
return this.attr5;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 备用5
|
||||
*/
|
||||
public void setAttr5(String attr5){
|
||||
this.attr5 = attr5;
|
||||
}
|
||||
}
|
|
@ -93,6 +93,9 @@ public class WmImNoticeHEntity implements java.io.Serializable {
|
|||
/**进货通知单号*/
|
||||
@Excel(name="进货通知单号")
|
||||
private java.lang.String noticeId;
|
||||
|
||||
@Excel(name="预约库区")
|
||||
private java.lang.String areaCode;
|
||||
/**附件*/
|
||||
|
||||
private java.lang.String fuJian;
|
||||
|
@ -534,4 +537,15 @@ public class WmImNoticeHEntity implements java.io.Serializable {
|
|||
public void setPiMaster(String piMaster) {
|
||||
this.piMaster = piMaster;
|
||||
}
|
||||
|
||||
@Column(name ="area_code",nullable=true,length=32)
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public WmImNoticeHEntity setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -91,6 +91,8 @@ public class WmImNoticeHPage {
|
|||
private java.lang.String piClass;
|
||||
|
||||
private java.lang.String piMaster;
|
||||
|
||||
private java.lang.String areaCode;
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 主键
|
||||
|
@ -458,6 +460,14 @@ public class WmImNoticeHPage {
|
|||
this.piMaster = piMaster;
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public WmImNoticeHPage setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
private List<WmImNoticeIEntity> wmImNoticeIList = new ArrayList<WmImNoticeIEntity>();
|
||||
public List<WmImNoticeIEntity> getWmImNoticeIList() {
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.zzjee.wm.service;
|
||||
import com.zzjee.wm.entity.BaStoreAreaEntity;
|
||||
import org.jeecgframework.core.common.service.CommonService;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface BaStoreAreaServiceI extends CommonService{
|
||||
|
||||
public void delete(BaStoreAreaEntity entity) throws Exception;
|
||||
|
||||
public Serializable save(BaStoreAreaEntity entity) throws Exception;
|
||||
|
||||
public void saveOrUpdate(BaStoreAreaEntity entity) throws Exception;
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.zzjee.wm.service;
|
||||
import com.zzjee.wm.entity.BaTrayEntity;
|
||||
import org.jeecgframework.core.common.service.CommonService;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface BaTrayServiceI extends CommonService{
|
||||
|
||||
public void delete(BaTrayEntity entity) throws Exception;
|
||||
|
||||
public Serializable save(BaTrayEntity entity) throws Exception;
|
||||
|
||||
public void saveOrUpdate(BaTrayEntity entity) throws Exception;
|
||||
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
package com.zzjee.wm.service.impl;
|
||||
import com.zzjee.wm.service.BaStoreAreaServiceI;
|
||||
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
|
||||
import com.zzjee.wm.entity.BaStoreAreaEntity;
|
||||
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("baStoreAreaService")
|
||||
@Transactional
|
||||
public class BaStoreAreaServiceImpl extends CommonServiceImpl implements BaStoreAreaServiceI {
|
||||
|
||||
|
||||
public void delete(BaStoreAreaEntity entity) throws Exception{
|
||||
super.delete(entity);
|
||||
//执行删除操作增强业务
|
||||
this.doDelBus(entity);
|
||||
}
|
||||
|
||||
public Serializable save(BaStoreAreaEntity entity) throws Exception{
|
||||
Serializable t = super.save(entity);
|
||||
//执行新增操作增强业务
|
||||
this.doAddBus(entity);
|
||||
return t;
|
||||
}
|
||||
|
||||
public void saveOrUpdate(BaStoreAreaEntity entity) throws Exception{
|
||||
super.saveOrUpdate(entity);
|
||||
//执行更新操作增强业务
|
||||
this.doUpdateBus(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增操作增强业务
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
private void doAddBus(BaStoreAreaEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
/**
|
||||
* 更新操作增强业务
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
private void doUpdateBus(BaStoreAreaEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
/**
|
||||
* 删除操作增强业务
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private void doDelBus(BaStoreAreaEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
|
||||
private Map<String,Object> populationMap(BaStoreAreaEntity t){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
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("area_code", t.getAreaCode());
|
||||
map.put("area_name", t.getAreaName());
|
||||
map.put("area_type", t.getAreaType());
|
||||
map.put("ware_code", t.getWareCode());
|
||||
map.put("ware_name", t.getWareName());
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换sql中的变量
|
||||
* @param sql
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
public String replaceVal(String sql,BaStoreAreaEntity 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("#{area_code}",String.valueOf(t.getAreaCode()));
|
||||
sql = sql.replace("#{area_name}",String.valueOf(t.getAreaName()));
|
||||
sql = sql.replace("#{area_type}",String.valueOf(t.getAreaType()));
|
||||
sql = sql.replace("#{ware_code}",String.valueOf(t.getWareCode()));
|
||||
sql = sql.replace("#{ware_name}",String.valueOf(t.getWareName()));
|
||||
sql = sql.replace("#{UUID}",UUID.randomUUID().toString());
|
||||
return sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行JAVA增强
|
||||
*/
|
||||
private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map<String,Object> 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_area",data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Exception("执行JAVA增强出现异常!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.zzjee.wm.service.impl;
|
||||
import com.zzjee.wm.service.BaTrayServiceI;
|
||||
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
|
||||
import com.zzjee.wm.entity.BaTrayEntity;
|
||||
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("baTrayService")
|
||||
@Transactional
|
||||
public class BaTrayServiceImpl extends CommonServiceImpl implements BaTrayServiceI {
|
||||
|
||||
|
||||
public void delete(BaTrayEntity entity) throws Exception{
|
||||
super.delete(entity);
|
||||
//执行删除操作增强业务
|
||||
this.doDelBus(entity);
|
||||
}
|
||||
|
||||
public Serializable save(BaTrayEntity entity) throws Exception{
|
||||
Serializable t = super.save(entity);
|
||||
//执行新增操作增强业务
|
||||
this.doAddBus(entity);
|
||||
return t;
|
||||
}
|
||||
|
||||
public void saveOrUpdate(BaTrayEntity entity) throws Exception{
|
||||
super.saveOrUpdate(entity);
|
||||
//执行更新操作增强业务
|
||||
this.doUpdateBus(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增操作增强业务
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
private void doAddBus(BaTrayEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
/**
|
||||
* 更新操作增强业务
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
private void doUpdateBus(BaTrayEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
/**
|
||||
* 删除操作增强业务
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private void doDelBus(BaTrayEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
|
||||
private Map<String,Object> populationMap(BaTrayEntity t){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
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("tray_code", t.getTrayCode());
|
||||
map.put("tray_name", t.getTrayName());
|
||||
map.put("attr1", t.getAttr1());
|
||||
map.put("attr2", t.getAttr2());
|
||||
map.put("attr3", t.getAttr3());
|
||||
map.put("attr4", t.getAttr4());
|
||||
map.put("attr5", t.getAttr5());
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换sql中的变量
|
||||
* @param sql
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
public String replaceVal(String sql,BaTrayEntity 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("#{tray_code}",String.valueOf(t.getTrayCode()));
|
||||
sql = sql.replace("#{tray_name}",String.valueOf(t.getTrayName()));
|
||||
sql = sql.replace("#{attr1}",String.valueOf(t.getAttr1()));
|
||||
sql = sql.replace("#{attr2}",String.valueOf(t.getAttr2()));
|
||||
sql = sql.replace("#{attr3}",String.valueOf(t.getAttr3()));
|
||||
sql = sql.replace("#{attr4}",String.valueOf(t.getAttr4()));
|
||||
sql = sql.replace("#{attr5}",String.valueOf(t.getAttr5()));
|
||||
sql = sql.replace("#{UUID}",UUID.randomUUID().toString());
|
||||
return sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行JAVA增强
|
||||
*/
|
||||
private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map<String,Object> 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_tray",data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Exception("执行JAVA增强出现异常!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -298,7 +298,6 @@ public class wmUtil {
|
|||
}
|
||||
try{
|
||||
TSUser user = ResourceUtil.getSessionUserName();
|
||||
System.out.println("user.getId()========"+user.getId());
|
||||
String roles = "";
|
||||
if (user != null) {
|
||||
List<TSRoleUser> rUsers = systemService.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package org.jeecgframework.core.interceptors;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecgframework.core.common.exception.BusinessException;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
import org.jeecgframework.core.util.StringUtil;
|
||||
import org.jeecgframework.jwt.util.JwtUtils;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Package org.jeecgframework.core.interceptors
|
||||
* @date 2021/7/22 14:33
|
||||
* @description
|
||||
*/
|
||||
public class WmsApiInterceptor implements HandlerInterceptor {
|
||||
|
||||
private List<String> containUrls;
|
||||
|
||||
public List<String> getContainUrls() {
|
||||
return containUrls;
|
||||
}
|
||||
|
||||
public WmsApiInterceptor setContainUrls(List<String> containUrls) {
|
||||
this.containUrls = containUrls;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception {
|
||||
String requestPath = ResourceUtil.getRequestPath(request);
|
||||
if (containUrls.contains(requestPath)) {
|
||||
//检验token
|
||||
String token = request.getHeader("Authorization");
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
throw new BusinessException("need a token");
|
||||
}
|
||||
String account = JwtUtils.vaildToken(token);
|
||||
if ("wmsAccount".equals(account)) {
|
||||
return true;
|
||||
}else {
|
||||
throw new BusinessException("invalid token" );
|
||||
}
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object o, Exception e) throws Exception {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package org.jeecgframework.jwt.util;
|
||||
|
||||
import com.nimbusds.jose.JOSEException;
|
||||
import com.nimbusds.jose.JWSAlgorithm;
|
||||
import com.nimbusds.jose.JWSHeader;
|
||||
import com.nimbusds.jose.JWSVerifier;
|
||||
import com.nimbusds.jose.KeyLengthException;
|
||||
import com.nimbusds.jose.crypto.MACSigner;
|
||||
import com.nimbusds.jose.crypto.MACVerifier;
|
||||
import com.nimbusds.jwt.JWTClaimsSet;
|
||||
import com.nimbusds.jwt.SignedJWT;
|
||||
import org.jeecgframework.core.common.exception.BusinessException;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Package org.jeecgframework.jwt.util
|
||||
* @date 2021/7/22 14:04
|
||||
* @description
|
||||
*/
|
||||
public class JwtUtils {
|
||||
|
||||
/**
|
||||
* 创建秘钥
|
||||
*/
|
||||
private static final byte[] SECRET = "6MNSobBRCHGIO0fS6MNSobBRCHGIO0fS".getBytes();
|
||||
|
||||
/**
|
||||
* 过期时间7天
|
||||
*/
|
||||
private static final long EXPIRE_TIME = 1000 * 60 * 60 * 24 * 7;
|
||||
|
||||
|
||||
/**
|
||||
* 生成Token
|
||||
* @param account
|
||||
* @return
|
||||
*/
|
||||
public static String buildJWT(String account) {
|
||||
try {
|
||||
/**
|
||||
* 1.创建一个32-byte的密匙
|
||||
*/
|
||||
MACSigner macSigner = new MACSigner(SECRET);
|
||||
/**
|
||||
* 2. 建立payload 载体
|
||||
*/
|
||||
JWTClaimsSet claimsSet = new JWTClaimsSet.Builder()
|
||||
.subject("doi")
|
||||
.issuer("http://www.doiduoyi.com")
|
||||
.expirationTime(new Date(System.currentTimeMillis() + EXPIRE_TIME))
|
||||
.claim("ACCOUNT",account)
|
||||
.build();
|
||||
|
||||
/**
|
||||
* 3. 建立签名
|
||||
*/
|
||||
SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.HS256), claimsSet);
|
||||
signedJWT.sign(macSigner);
|
||||
|
||||
/**
|
||||
* 4. 生成token
|
||||
*/
|
||||
String token = signedJWT.serialize();
|
||||
return token;
|
||||
} catch (KeyLengthException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JOSEException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验token
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
public static String vaildToken(String token ) {
|
||||
try {
|
||||
SignedJWT jwt = SignedJWT.parse(token);
|
||||
JWSVerifier verifier = new MACVerifier(SECRET);
|
||||
//校验是否有效
|
||||
if (!jwt.verify(verifier)) {
|
||||
throw new BusinessException("Token 无效");
|
||||
}
|
||||
|
||||
//校验超时
|
||||
Date expirationTime = jwt.getJWTClaimsSet().getExpirationTime();
|
||||
if (new Date().after(expirationTime)) {
|
||||
throw new BusinessException("Token 已过期");
|
||||
}
|
||||
|
||||
//获取载体中的数据
|
||||
Object account = jwt.getJWTClaimsSet().getClaim("ACCOUNT");
|
||||
//是否有openUid
|
||||
if (Objects.isNull(account)){
|
||||
throw new BusinessException( "账号为空");
|
||||
}
|
||||
return account.toString();
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JOSEException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(JwtUtils.vaildToken(JwtUtils.buildJWT("张三")));
|
||||
}
|
||||
}
|
|
@ -107,7 +107,7 @@ public class CgReportController extends BaseController {
|
|||
|
||||
sb.append("<script type=\"text/javascript\" src=\"plug-in/layer/layer.js\"></script>");
|
||||
|
||||
sb.append(StringUtil.replace("<script type=\"text/javascript\" src=\"plug-in/tools/curdtools_{0}.js\"></script>", "{0}", lang));
|
||||
//sb.append(StringUtil.replace("<script type=\"text/javascript\" src=\"plug-in/tools/curdtools_{0}.js\"></script>", "{0}", lang));
|
||||
sb.append("<script type=\"text/javascript\" src=\"plug-in/tools/easyuiextend.js\"></script>");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ import org.hibernate.annotations.GenericGenerator;
|
|||
import org.jeecgframework.core.common.entity.IdEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 角色表
|
||||
* @author admin
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package org.jeecgframework.web.system.sms.util.task;
|
||||
|
||||
import com.zzjee.wm.entity.WvStockEntity;
|
||||
import org.jeecgframework.web.system.service.SystemService;
|
||||
import org.jeecgframework.web.system.sms.entity.TSSmsEntity;
|
||||
import org.jeecgframework.web.system.sms.entity.TSSmsSqlEntity;
|
||||
import org.jeecgframework.web.system.sms.service.TSSmsServiceI;
|
||||
import org.jeecgframework.web.system.sms.util.TuiSongMsgUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Package org.jeecgframework.web.system.sms.util.task
|
||||
* @date 2021/7/13 15:11
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class StockWarnTask {
|
||||
|
||||
@Autowired
|
||||
private SystemService systemService;
|
||||
@Autowired
|
||||
private TSSmsServiceI tsSmsServiceI;
|
||||
|
||||
@Scheduled(cron="0 0 8 * * ?")
|
||||
public void run() {
|
||||
//查询库存
|
||||
List<Map<String,String>> list= systemService.findListbySql("SELECT t.goods_id ,t.goods_name from (SELECT s.goods_id,s.shp_ming_cheng goods_name,SUM(base_goodscount) num , g.min_stock from wv_stock s left join md_goods g on s.goods_id = g.shp_bian_ma \n" +
|
||||
"GROUP BY s.goods_id) t where t.num <= t.min_stock");
|
||||
|
||||
//查询到所有低于最小库存的商品
|
||||
//给admin发型消息
|
||||
Date date = new Date();
|
||||
if (list.size() > 0) {
|
||||
List<TSSmsEntity> tsSmsEntityList = new ArrayList<>();
|
||||
for (Map<String, String> map : list) {
|
||||
TSSmsEntity tsSmsEntity = new TSSmsEntity();
|
||||
tsSmsEntity.setEsTitle("库存预警提醒");
|
||||
tsSmsEntity.setEsSender("system");
|
||||
tsSmsEntity.setEsReceiver("admin");
|
||||
tsSmsEntity.setEsType("3");
|
||||
tsSmsEntity.setEsStatus("1");
|
||||
tsSmsEntity.setEsContent(map.get("goods_id")+"货品库存已到达库存临界点,请及时补货");
|
||||
tsSmsEntity.setEsSendtime(date);
|
||||
tsSmsEntityList.add(tsSmsEntity);
|
||||
}
|
||||
tsSmsServiceI.batchSave(tsSmsEntityList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -185,11 +185,10 @@ jQuery(function() {
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'jformGraphreportHeadVMController.do?goImportExcel', "jformGraphreportHeadList");
|
||||
openwindow('Excel导入', 'jformGraphreportHeadVMController.do?goImportExcel', "jformGraphreportHeadList");
|
||||
}
|
||||
|
||||
//导出
|
||||
function ExportXls() {
|
||||
JeecgExcelExport("jformGraphreportHeadController.do?exportXls","jformGraphreportHeadList");
|
||||
}
|
||||
|
|
@ -18,10 +18,10 @@
|
|||
hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
||||
validationQuery.sqlserver=SELECT 1
|
||||
jdbc.url.jeecg=jdbc:mysql://127.0.0.1:3306/wms?useUnicode=true&characterEncoding=UTF-8
|
||||
#jdbc.url.jeecg=jdbc:mysql://112.74.182.205:3306/wms?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false
|
||||
|
||||
jdbc.username.jeecg=root
|
||||
jdbc.password.jeecg=Zzerp123
|
||||
#jdbc.password.jeecg=Qwer12345
|
||||
jdbc.password.jeecg=zx123456
|
||||
jdbc.dbType=mysql
|
||||
|
||||
#Oracle
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
openwindow('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
openwindow('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
openwindow('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
openwindow('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
openwindow('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
openwindow('Excel导入', '${entityName?uncap_first}Controller.do?upload', "${entityName?uncap_first}List");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
diver_name=com.mysql.jdbc.Driver
|
||||
url=jdbc:mysql://127.0.0.1:3306/wms?useUnicode=true&characterEncoding=UTF-8
|
||||
username=root
|
||||
password=Zzerp123
|
||||
password=zx123456
|
||||
|
||||
database_name=wms
|
||||
|
||||
#oracle
|
||||
|
|
|
@ -148,10 +148,33 @@
|
|||
<list>
|
||||
<value>systemController/showOrDownByurl.do</value>
|
||||
<value>wmOmNoticeHController.do</value>
|
||||
<value>wmsApiController.do</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
</mvc:interceptor>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/**"/>
|
||||
<bean class="org.jeecgframework.core.interceptors.WmsApiInterceptor">
|
||||
<property name="containUrls">
|
||||
<list>
|
||||
<value>wmsApiController.do?goodsList</value>
|
||||
<value>wmsApiController.do?goodsDoAdd</value>
|
||||
<value>wmsApiController.do?goodsDoUpdate</value>
|
||||
<value>wmsApiController.do?cusList</value>
|
||||
<value>wmsApiController.do?cusDoAdd</value>
|
||||
<value>wmsApiController.do?cusDoUpdate</value>
|
||||
<value>wmsApiController.do?binList</value>
|
||||
<value>wmsApiController.do?binDoAdd</value>
|
||||
<value>wmsApiController.do?imNoticeHDoAdd</value>
|
||||
<value>wmsApiController.do?imNoticeHDoDel</value>
|
||||
<value>wmsApiController.do?omNoticeHDoAdd</value>
|
||||
<value>wmsApiController.do?omNoticeHDoDel</value>
|
||||
<value>wmsApiController.do?imNoticeHList</value>
|
||||
<value>wmsApiController.do?omNoticeHList</value>
|
||||
<value>wmsApiController.do?getStock</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
|
||||
</bean>
|
||||
</mvc:interceptor>
|
||||
</mvc:interceptors>
|
||||
|
|
|
@ -7,8 +7,8 @@ templatepath=docTemp
|
|||
timerun=run
|
||||
uploadpath=upload
|
||||
|
||||
#webUploadpath=//mydata//upFiles
|
||||
webUploadpath=C://upFiles
|
||||
webUploadpath=/opt/wmsupload
|
||||
#webUploadpath=C://upFiles
|
||||
showAndDownUrl=systemController/showOrDownByurl.do?dbPath=
|
||||
|
||||
office_home=D://OpenOffice
|
||||
|
@ -139,11 +139,11 @@ exceltxt=yes
|
|||
|
||||
#beijing
|
||||
##\u663E\u793A\u6258\u76D8
|
||||
systuopan=no
|
||||
systuopan=yes
|
||||
#\u5BF9\u8D26\u5355\u663E\u793A\u660E\u7EC6
|
||||
sysdzd=yes
|
||||
#\u4ED3\u5E93\u4FE1\u606F
|
||||
comname=\u4ED3\u50A8\u7BA1\u7406\u7CFB\u7EDF
|
||||
comname=\u6865\u8def\u6613\u8d2d
|
||||
comaddr=\u5382\u5185
|
||||
comtel=\u8BE6\u8BE2\u5BA2\u670D
|
||||
#\u5BF9\u8D26\u4FE1\u606F
|
||||
|
@ -179,7 +179,7 @@ autocon=no
|
|||
giwq=yes
|
||||
|
||||
#\u662F\u5426\u542F\u7528\u6258\u76D8 yes \u542F\u7528 no \u4E0D\u542F\u7528
|
||||
usetuopan=no
|
||||
usetuopan=yes
|
||||
#\u56FA\u5B9A\u6258\u76D8\u7801
|
||||
tuopanma=A
|
||||
#\u662F\u5426\u542F\u7528\u751F\u4EA7\u65E5\u671F
|
||||
|
@ -214,8 +214,8 @@ wm.rkd=hr
|
|||
|
||||
#show.noticeurl=http://localhost:8081/jeewms/wmOmNoticeHController.do?showlist&id=
|
||||
#show.goodsurl=http://localhost:8081/jeewms/wmOmNoticeHController.do?showgoods&id=
|
||||
show.noticeurl=http://120.78.150.43/wmstest/wmOmNoticeHController.do?showlist&id=
|
||||
show.goodsurl=http://120.78.150.43/wmstest/wmOmNoticeHController.do?showgoods&id=
|
||||
show.noticeurl=http://120.92.53.114/jeewms/wmOmNoticeHController.do?showlist&id=
|
||||
show.goodsurl=http://120.92.53.114/jeewms/wmOmNoticeHController.do?showgoods&id=
|
||||
|
||||
wms.totms=no
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ function addWithbtn(title,addurl,gname,width,height){
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'jeecgListDemoController.do?upload', "jeecgDemoList");
|
||||
openwindow('Excel导入', 'jeecgListDemoController.do?upload', "jeecgDemoList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'jeecgListDemoController.do?upload', "jeecgDemoList");
|
||||
openwindow('Excel导入', 'jeecgListDemoController.do?upload', "jeecgDemoList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'baCostConfController.do?upload', "baCostConfList");
|
||||
openwindow('Excel导入', 'baCostConfController.do?upload', "baCostConfList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'baCostController.do?upload', "baCostList");
|
||||
openwindow('Excel导入', 'baCostController.do?upload', "baCostList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'baGoodsTypeController.do?upload', "baGoodsTypeList");
|
||||
openwindow('Excel导入', 'baGoodsTypeController.do?upload', "baGoodsTypeList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'baPlatformController.do?upload', "baPlatformList");
|
||||
openwindow('Excel导入', 'baPlatformController.do?upload', "baPlatformList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'baStoreController.do?upload', "baStoreList");
|
||||
openwindow('Excel导入', 'baStoreController.do?upload', "baStoreList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsYufeiConfController.do?upload', "tmsYufeiConfList");
|
||||
openwindow('Excel导入', 'tmsYufeiConfController.do?upload', "tmsYufeiConfList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wmsWaveConfController.do?upload', "wmsWaveConfList");
|
||||
openwindow('Excel导入', 'wmsWaveConfController.do?upload', "wmsWaveConfList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rpPeriodInOutController.do?upload', "rpPeriodInOutList");
|
||||
openwindow('Excel导入', 'rpPeriodInOutController.do?upload', "rpPeriodInOutList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
}
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mvCusCostController.do?upload', "mvCusCostList");
|
||||
openwindow('Excel导入', 'mvCusCostController.do?upload', "mvCusCostList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wvDayCostSumController.do?upload', "wvDayCostSumList");
|
||||
openwindow('Excel导入', 'wvDayCostSumController.do?upload', "wvDayCostSumList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wvDayCostSumController.do?upload', "wvDayCostSumList");
|
||||
openwindow('Excel导入', 'wvDayCostSumController.do?upload', "wvDayCostSumList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'fxjOtherLoginController.do?upload', "fxjOtherLoginList");
|
||||
openwindow('Excel导入', 'fxjOtherLoginController.do?upload', "fxjOtherLoginList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wxConfigController.do?upload', "wxConfigList");
|
||||
openwindow('Excel导入', 'wxConfigController.do?upload', "wxConfigList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mdBinController.do?upload', "mdBinList");
|
||||
openwindow('Excel导入', 'mdBinController.do?upload', "mdBinList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mdCusController.do?upload', "mdCusList");
|
||||
openwindow('Excel导入', 'mdCusController.do?upload', "mdCusList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mdCusOtherController.do?upload', "mdCusOtherList");
|
||||
openwindow('Excel导入', 'mdCusOtherController.do?upload', "mdCusOtherList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mdCusController.do?upload', "mdCusList");
|
||||
openwindow('Excel导入', 'mdCusController.do?upload', "mdCusList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -350,6 +350,17 @@ function counttiji(){
|
|||
<label class="Validform_label" style="display: none">拆零数量</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-center">
|
||||
<b >最小库存量</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="minStock" name="minStock" type="text" class="form-control"
|
||||
ignore="ignore" style="text-align:right" datatype="*" required="required"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">最小库存量</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -342,6 +342,7 @@
|
|||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">拆零单位</label>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 text-center">
|
||||
<b >拆零数量</b>
|
||||
</div>
|
||||
|
@ -352,7 +353,18 @@
|
|||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">拆零数量</label>
|
||||
</div>
|
||||
<div class="col-xs-3 text-center">
|
||||
<b >最小库存量</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="minStock" name="minStock" type="text" class="form-control"
|
||||
ignore="ignore" style="text-align:right" value="${mdGoodsPage.minStock}" datatype="*" required="required"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">最小库存量</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" id = "sub_tr" style="display: none;">
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
}
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mdGoodsController.do?upload', "mdGoodsList");
|
||||
openwindow('Excel导入', 'mdGoodsController.do?upload', "mdGoodsList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mdGoodsController.do?upload', "mdGoodsList");
|
||||
openwindow('Excel导入', 'mdGoodsController.do?upload', "mdGoodsList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
}
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mdSupController.do?upload', "mdSupList");
|
||||
openwindow('Excel导入', 'mdSupController.do?upload', "mdSupList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mvCusOtherController.do?upload', "mvCusOtherList");
|
||||
openwindow('Excel导入', 'mvCusOtherController.do?upload', "mvCusOtherList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mvGoodsController.do?upload', "mvGoodsList");
|
||||
openwindow('Excel导入', 'mvGoodsController.do?upload', "mvGoodsList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tMdBomHeadController.do?upload', "tMdBomHeadList");
|
||||
openwindow('Excel导入', 'tMdBomHeadController.do?upload', "tMdBomHeadList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'mvStockYjController.do?upload', "mvStockYjList");
|
||||
openwindow('Excel导入', 'mvStockYjController.do?upload', "mvStockYjList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'omsOederDetailController.do?upload', "omsOederDetailList");
|
||||
openwindow('Excel导入', 'omsOederDetailController.do?upload', "omsOederDetailList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rpWmHisStockKuController.do?upload', "rpWmHisStockKuList");
|
||||
openwindow('Excel导入', 'rpWmHisStockKuController.do?upload', "rpWmHisStockKuList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rpWmInQmController.do?upload', "rpWmInQmList");
|
||||
openwindow('Excel导入', 'rpWmInQmController.do?upload', "rpWmInQmList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rpWmToDownGoodsController.do?upload', "rpWmToDownGoodsList");
|
||||
openwindow('Excel导入', 'rpWmToDownGoodsController.do?upload', "rpWmToDownGoodsList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rpWmToUpGoodsController.do?upload', "rpWmToUpGoodsList");
|
||||
openwindow('Excel导入', 'rpWmToUpGoodsController.do?upload', "rpWmToUpGoodsList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rpWmUpAndDownController.do?upload', "rpWmUpAndDownList");
|
||||
openwindow('Excel导入', 'rpWmUpAndDownController.do?upload', "rpWmUpAndDownList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rfidBuseController.do?upload', "rfidBuseList");
|
||||
openwindow('Excel导入', 'rfidBuseController.do?upload', "rfidBuseList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'sysParaController.do?upload', "sysParaList");
|
||||
openwindow('Excel导入', 'sysParaController.do?upload', "sysParaList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsMdCheliangController.do?upload', "tmsMdCheliangList");
|
||||
openwindow('Excel导入', 'tmsMdCheliangController.do?upload', "tmsMdCheliangList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsMdDzController.do?upload', "tmsMdDzList");
|
||||
openwindow('Excel导入', 'tmsMdDzController.do?upload', "tmsMdDzList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsMdDzController.do?upload', "tmsMdDzList");
|
||||
openwindow('Excel导入', 'tmsMdDzController.do?upload', "tmsMdDzList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
openwindow('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -166,7 +166,7 @@ function reloadtable() {
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
openwindow('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
}
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
openwindow('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
openwindow('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
openwindow('Excel导入', 'tmsYwDingdanController.do?upload', "tmsYwDingdanList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'vYsddController.do?upload', "vYsddList");
|
||||
openwindow('Excel导入', 'vYsddController.do?upload', "vYsddList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'waveToDownController.do?upload', "waveToDownList");
|
||||
openwindow('Excel导入', 'waveToDownController.do?upload', "waveToDownList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'waveToFjController.do?upload', "waveToFjList");
|
||||
openwindow('Excel导入', 'waveToFjController.do?upload', "waveToFjList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ba_store_area</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="baStoreAreaController.do?doAdd" >
|
||||
<input id="id" name="id" type="hidden" value="${baStoreAreaPage.id }"/>
|
||||
<input id="createName" name="createName" type="hidden" value="${baStoreAreaPage.createName }"/>
|
||||
<input id="createBy" name="createBy" type="hidden" value="${baStoreAreaPage.createBy }"/>
|
||||
<input id="createDate" name="createDate" type="hidden" value="${baStoreAreaPage.createDate }"/>
|
||||
<input id="updateName" name="updateName" type="hidden" value="${baStoreAreaPage.updateName }"/>
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${baStoreAreaPage.updateBy }"/>
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${baStoreAreaPage.sysOrgCode }"/>
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${baStoreAreaPage.updateDate }"/>
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${baStoreAreaPage.sysCompanyCode }"/>
|
||||
<input id="wareName" name="wareName" type="hidden" value="${baStoreAreaPage.wareName }"/>
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
仓库编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<t:dictSelect field="wareCode" type="list"
|
||||
dictTable="ba_store" dictField="store_code" dictText="store_name" defaultVal="${baStoreAreaPage.wareCode}" hasLabel="false" title="仓库编码"
|
||||
></t:dictSelect>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">仓库编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
库区编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="areaCode" name="areaCode" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="checked"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">库区编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
库区名称:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="areaName" name="areaName" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="checked"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">库区名称</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
库区类型:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<t:dictSelect field="areaType" type="list"
|
||||
typeGroupCode="area_type" defaultVal="${baStoreAreaPage.areaType}" hasLabel="false" title="库区类型"
|
||||
></t:dictSelect>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">库区类型</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/wm/baStoreArea.js"></script>
|
|
@ -0,0 +1,84 @@
|
|||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ba_store_area</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="baStoreAreaController.do?doUpdate" >
|
||||
<input id="id" name="id" type="hidden" value="${baStoreAreaPage.id }">
|
||||
<input id="createName" name="createName" type="hidden" value="${baStoreAreaPage.createName }">
|
||||
<input id="createBy" name="createBy" type="hidden" value="${baStoreAreaPage.createBy }">
|
||||
<input id="createDate" name="createDate" type="hidden" value="${baStoreAreaPage.createDate }">
|
||||
<input id="updateName" name="updateName" type="hidden" value="${baStoreAreaPage.updateName }">
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${baStoreAreaPage.updateBy }">
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${baStoreAreaPage.sysOrgCode }">
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${baStoreAreaPage.updateDate }">
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${baStoreAreaPage.sysCompanyCode }">
|
||||
<input id="wareName" name="wareName" type="hidden" value="${baStoreAreaPage.wareName }">
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
仓库编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<t:dictSelect field="wareCode" type="list"
|
||||
dictTable="ba_store" dictField="store_code" dictText="store_name" defaultVal="${baStoreAreaPage.wareCode}" hasLabel="false" title="仓库编码"
|
||||
></t:dictSelect>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">仓库编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
库区编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="areaCode" name="areaCode" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="checked"
|
||||
value='${baStoreAreaPage.areaCode}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">库区编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
库区名称:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="areaName" name="areaName" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="checked"
|
||||
value='${baStoreAreaPage.areaName}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">库区名称</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
库区类型:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<t:dictSelect field="areaType" type="list"
|
||||
typeGroupCode="area_type" defaultVal="${baStoreAreaPage.areaType}" hasLabel="false" title="库区类型"
|
||||
></t:dictSelect>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">库区类型</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/wm/baStoreArea.js"></script>
|
|
@ -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));
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" style="padding:0px;border:0px">
|
||||
<t:datagrid name="baStoreAreaList" checkbox="true" pagination="true" fitColumns="false" title="ba_store_area" actionUrl="baStoreAreaController.do?datagrid" idField="id" fit="true" queryMode="group">
|
||||
<t:dgCol title="主键" field="id" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人登录名称" field="createBy" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" query="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="仓库编码" field="wareCode" query="true" queryMode="single" dictionary="ba_store,store_code,store_name" width="120"></t:dgCol>
|
||||
<t:dgCol title="库区编码" field="areaCode" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="库区名称" field="areaName" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="库区类型" field="areaType" query="true" queryMode="single" dictionary="area_type" width="120"></t:dgCol>
|
||||
<t:dgCol title="仓库名称" field="wareName" hidden="true" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
||||
<t:dgDelOpt title="删除" url="baStoreAreaController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
|
||||
<t:dgToolBar title="录入" icon="icon-add" url="baStoreAreaController.do?goAdd" funname="add"></t:dgToolBar>
|
||||
<t:dgToolBar title="编辑" icon="icon-edit" url="baStoreAreaController.do?goUpdate" funname="update"></t:dgToolBar>
|
||||
<t:dgToolBar title="批量删除" icon="icon-remove" url="baStoreAreaController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
|
||||
<t:dgToolBar title="查看" icon="icon-search" url="baStoreAreaController.do?goUpdate" funname="detail"></t:dgToolBar>
|
||||
<t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
|
||||
<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
|
||||
<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
|
||||
</t:datagrid>
|
||||
</div>
|
||||
</div>
|
||||
<script src = "webpage/com/zzjee/wm/baStoreAreaList.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
});
|
||||
|
||||
|
||||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openwindow('Excel导入', 'baStoreAreaController.do?upload', "baStoreAreaList");
|
||||
}
|
||||
|
||||
//导出
|
||||
function ExportXls() {
|
||||
JeecgExcelExport("baStoreAreaController.do?exportXls","baStoreAreaList");
|
||||
}
|
||||
|
||||
//模板下载
|
||||
function ExportXlsByT() {
|
||||
JeecgExcelExport("baStoreAreaController.do?exportXlsByT","baStoreAreaList");
|
||||
}
|
||||
|
||||
</script>
|
|
@ -0,0 +1,62 @@
|
|||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ba_tray</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="baTrayController.do?doAdd" >
|
||||
<input id="id" name="id" type="hidden" value="${baTrayPage.id }"/>
|
||||
<input id="createName" name="createName" type="hidden" value="${baTrayPage.createName }"/>
|
||||
<input id="createBy" name="createBy" type="hidden" value="${baTrayPage.createBy }"/>
|
||||
<input id="createDate" name="createDate" type="hidden" value="${baTrayPage.createDate }"/>
|
||||
<input id="updateName" name="updateName" type="hidden" value="${baTrayPage.updateName }"/>
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${baTrayPage.updateBy }"/>
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${baTrayPage.updateDate }"/>
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${baTrayPage.sysOrgCode }"/>
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${baTrayPage.sysCompanyCode }"/>
|
||||
<input id="attr1" name="attr1" type="hidden" value="${baTrayPage.attr1 }"/>
|
||||
<input id="attr2" name="attr2" type="hidden" value="${baTrayPage.attr2 }"/>
|
||||
<input id="attr3" name="attr3" type="hidden" value="${baTrayPage.attr3 }"/>
|
||||
<input id="attr4" name="attr4" type="hidden" value="${baTrayPage.attr4 }"/>
|
||||
<input id="attr5" name="attr5" type="hidden" value="${baTrayPage.attr5 }"/>
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
托盘编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="trayCode" name="trayCode" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="checked"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">托盘编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
托盘名称:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="trayName" name="trayName" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="checked"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">托盘名称</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/wm/baTray.js"></script>
|
|
@ -0,0 +1,60 @@
|
|||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ba_tray</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="baTrayController.do?doUpdate" >
|
||||
<input id="id" name="id" type="hidden" value="${baTrayPage.id }">
|
||||
<input id="createName" name="createName" type="hidden" value="${baTrayPage.createName }">
|
||||
<input id="createBy" name="createBy" type="hidden" value="${baTrayPage.createBy }">
|
||||
<input id="createDate" name="createDate" type="hidden" value="${baTrayPage.createDate }">
|
||||
<input id="updateName" name="updateName" type="hidden" value="${baTrayPage.updateName }">
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${baTrayPage.updateBy }">
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${baTrayPage.updateDate }">
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${baTrayPage.sysOrgCode }">
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${baTrayPage.sysCompanyCode }">
|
||||
<input id="attr1" name="attr1" type="hidden" value="${baTrayPage.attr1 }">
|
||||
<input id="attr2" name="attr2" type="hidden" value="${baTrayPage.attr2 }">
|
||||
<input id="attr3" name="attr3" type="hidden" value="${baTrayPage.attr3 }">
|
||||
<input id="attr4" name="attr4" type="hidden" value="${baTrayPage.attr4 }">
|
||||
<input id="attr5" name="attr5" type="hidden" value="${baTrayPage.attr5 }">
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
托盘编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="trayCode" name="trayCode" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="checked"
|
||||
value='${baTrayPage.trayCode}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">托盘编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
托盘名称:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="trayName" name="trayName" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="checked"
|
||||
value='${baTrayPage.trayName}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">托盘名称</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/wm/baTray.js"></script>
|
|
@ -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));
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" style="padding:0px;border:0px">
|
||||
<t:datagrid name="baTrayList" checkbox="true" pagination="true" fitColumns="false" title="ba_tray" actionUrl="baTrayController.do?datagrid" idField="id" fit="true" queryMode="group">
|
||||
<t:dgCol title="id" field="id" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人登录名称" field="createBy" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" query="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="托盘编码" field="trayCode" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="托盘名称" field="trayName" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用1" field="attr1" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用2" field="attr2" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用3" field="attr3" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用4" field="attr4" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用5" field="attr5" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
||||
<t:dgDelOpt title="删除" url="baTrayController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
|
||||
<t:dgToolBar title="录入" icon="icon-add" url="baTrayController.do?goAdd" funname="add"></t:dgToolBar>
|
||||
<t:dgToolBar title="编辑" icon="icon-edit" url="baTrayController.do?goUpdate" funname="update"></t:dgToolBar>
|
||||
<t:dgToolBar title="批量删除" icon="icon-remove" url="baTrayController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
|
||||
<t:dgToolBar title="查看" icon="icon-search" url="baTrayController.do?goUpdate" funname="detail"></t:dgToolBar>
|
||||
<t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
|
||||
<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
|
||||
<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
|
||||
</t:datagrid>
|
||||
</div>
|
||||
</div>
|
||||
<script src = "webpage/com/zzjee/wm/baTrayList.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
});
|
||||
|
||||
|
||||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openwindow('Excel导入', 'baTrayController.do?upload', "baTrayList");
|
||||
}
|
||||
|
||||
//导出
|
||||
function ExportXls() {
|
||||
JeecgExcelExport("baTrayController.do?exportXls","baTrayList");
|
||||
}
|
||||
|
||||
//模板下载
|
||||
function ExportXlsByT() {
|
||||
JeecgExcelExport("baTrayController.do?exportXlsByT","baTrayList");
|
||||
}
|
||||
|
||||
</script>
|
|
@ -48,7 +48,7 @@
|
|||
});
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wmImNoticeHController.do?upload', "wmImNoticeHList");
|
||||
openwindow('Excel导入', 'wmImNoticeHController.do?upload', "wmImNoticeHList");
|
||||
}
|
||||
|
||||
function print(id){
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
});
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wmImNoticeHController.do?upload', "wmImNoticeHList");
|
||||
openwindow('Excel导入', 'wmImNoticeHController.do?upload', "wmImNoticeHList");
|
||||
}
|
||||
|
||||
function print(id){
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wmOmNoticeHController.do?upload', "wmOmNoticeHList");
|
||||
openwindow('Excel导入', 'wmOmNoticeHController.do?upload', "wmOmNoticeHList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
|
|
@ -192,13 +192,27 @@
|
|||
</tr>
|
||||
|
||||
</c:forEach>
|
||||
<tr height=33 style='mso-height-source:userset;height:50px'>
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'>合计</td>
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center;word-break:break-all;'><span style='word-break:break-all;width: auto;font-size: 14pt'></span></td>
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'></td>
|
||||
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'></td>
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'></td>
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'>${printHeader.header12}</td>
|
||||
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'>${printHeader.header13}</td>
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'></td>
|
||||
|
||||
<td class=xl65 style='border:1.0pt solid black;text-align: center'></td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<tr height=20 style='height:25.0pt'>
|
||||
<td height=20 class=xl66 colspan=8 style='height:15.0pt;mso-ignore:colspan;text-align: justify'>制单人:<span
|
||||
<td height=20 class=xl66 colspan=8 style='height:15.0pt;mso-ignore:colspan;text-align: justify'>订单员:<span
|
||||
style='mso-spacerun:yes'>
|
||||
</span>合计重量: ${printHeader.header13}<span
|
||||
</span>库管:<span
|
||||
style='mso-spacerun:yes'>
|
||||
</span>合计数量:${printHeader.header12}<span
|
||||
</span>司机:<span
|
||||
style='mso-spacerun:yes'>
|
||||
</span>客户签字(盖章)<span
|
||||
<td></td>
|
||||
|
|
|
@ -20,7 +20,7 @@ function printview(){
|
|||
function make2DCode() {
|
||||
$("#qrcode").html("");//清空二维码
|
||||
var qrcode;
|
||||
var codesize = 80;
|
||||
var codesize = 100;
|
||||
console.log(codesize);
|
||||
qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
width : codesize,
|
||||
|
@ -177,7 +177,7 @@ function downloadqrcode() {
|
|||
</td>
|
||||
</tr>
|
||||
<tr height=40 style='mso-height-source:userset;height:30.0pt'>
|
||||
<td colspan=5 height=40 class=xl67 style='height:30.0pt'><span style="font-size: 18pt">拣货单</span></td>
|
||||
<td colspan=5 height=40 class=xl67 style='height:30.0pt'><span style="font-size: 18pt">追溯单</span></td>
|
||||
<td colspan=4 class=xl68 width=168 style='width:126pt'>单号:${noticeid}</td>
|
||||
<td colspan=1 style='mso-ignore:colspan'></td>
|
||||
</tr>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue