From 1e99ae91ca32ee3071fd4f8e309afd59cb1c98e4 Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Sun, 26 Apr 2020 04:09:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=B5=84=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E7=89=A9=E8=B5=84=E4=B8=9A=E5=8A=A1=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/zzjee/wmutil/erpUtil.java | 81 + .../wz/controller/TWzLocationController.java | 149 +- .../wz/controller/TWzMaterialController.java | 178 +- .../wz/controller/TWzSpConfController.java | 152 +- .../zzjee/wz/entity/TWzLocationEntity.java | 25 +- .../zzjee/wz/entity/TWzMaterialEntity.java | 66 +- .../com/zzjee/wz/entity/TWzSpConfEntity.java | 25 +- .../zzjee/wz/service/TWzLocationServiceI.java | 10 +- .../zzjee/wz/service/TWzMaterialServiceI.java | 10 +- .../zzjee/wz/service/TWzSpConfServiceI.java | 10 +- .../service/impl/TWzMaterialServiceImpl.java | 26 +- .../wzpo/controller/VWzPoWqController.java | 184 +- .../com/zzjee/wzpo/entity/VWzPoWqEntity.java | 111 +- .../zzjee/wzpo/service/VWzPoWqServiceI.java | 10 +- .../wzpo/service/impl/VWzPoWqServiceImpl.java | 40 +- .../controller/TWzRepairController.java | 385 +++++ .../wzrepair/entity/TWzRepairEntity.java | 474 +++++ .../wzrepair/service/TWzRepairServiceI.java | 15 + .../service/impl/TWzRepairServiceImpl.java | 166 ++ .../com/zzjee/wzrepair/util/constant.java | 10 + .../wzyw/controller/TWzCkHeadController.java | 300 ++-- .../wzyw/controller/TWzPoHeadController.java | 1525 +++++++++-------- .../wzyw/controller/TWzRkHeadController.java | 175 +- .../zzjee/wzyw/entity/TWzCkHeadEntity.java | 125 +- .../zzjee/wzyw/entity/TWzCkItemEntity.java | 125 +- .../zzjee/wzyw/entity/TWzPoHeadEntity.java | 98 +- .../zzjee/wzyw/entity/TWzPoItemEntity.java | 121 +- .../zzjee/wzyw/entity/TWzRkHeadEntity.java | 106 +- .../zzjee/wzyw/entity/TWzRkItemEntity.java | 130 +- .../com/zzjee/wzyw/page/TWzCkHeadPage.java | 26 +- .../com/zzjee/wzyw/page/TWzPoHeadPage.java | 26 +- .../com/zzjee/wzyw/page/TWzRkHeadPage.java | 26 +- .../zzjee/wzyw/service/TWzCkHeadServiceI.java | 14 +- .../zzjee/wzyw/service/TWzPoHeadServiceI.java | 14 +- .../zzjee/wzyw/service/TWzRkHeadServiceI.java | 14 +- .../service/impl/TWzCkHeadServiceImpl.java | 41 +- .../service/impl/TWzPoHeadServiceImpl.java | 34 +- .../service/impl/TWzRkHeadServiceImpl.java | 40 +- .../webpage/com/zzjee/wz/tWzLocationList.jsp | 2 +- .../webpage/com/zzjee/wz/tWzMaterial-add.jsp | 155 +- .../com/zzjee/wz/tWzMaterial-update.jsp | 161 +- .../webpage/com/zzjee/wz/tWzMaterialList.jsp | 25 +- .../webpage/com/zzjee/wz/tWzSpConfList.jsp | 2 +- .../webpage/com/zzjee/wzpo/vWzPoWqList.jsp | 6 +- .../com/zzjee/wzrepair/tWzRepair-add.jsp | 332 ++++ .../com/zzjee/wzrepair/tWzRepair-update.jsp | 332 ++++ .../webpage/com/zzjee/wzrepair/tWzRepair.js | 28 + .../com/zzjee/wzrepair/tWzRepairList.js | 0 .../com/zzjee/wzrepair/tWzRepairList.jsp | 66 + .../webpage/com/zzjee/wzyw/tWzCkHead-add.jsp | 80 +- .../com/zzjee/wzyw/tWzCkHead-update.jsp | 298 ++-- .../webpage/com/zzjee/wzyw/tWzCkHeadList.jsp | 8 +- .../com/zzjee/wzyw/tWzCkHeadspList.jsp | 6 +- .../webpage/com/zzjee/wzyw/tWzCkItemList.jsp | 102 +- .../com/zzjee/wzyw/tWzCkItemListUnEdit.jsp | 18 +- .../webpage/com/zzjee/wzyw/tWzPoHead-add.jsp | 14 +- .../com/zzjee/wzyw/tWzPoHead-update.jsp | 17 +- .../webpage/com/zzjee/wzyw/tWzPoHeadList.jsp | 13 +- .../com/zzjee/wzyw/tWzPoHeadspList.jsp | 6 +- .../com/zzjee/wzyw/tWzRkHead-update.jsp | 2 +- .../webpage/com/zzjee/wzyw/tWzRkHeadList.jsp | 10 +- 61 files changed, 4484 insertions(+), 2266 deletions(-) create mode 100644 src/main/java/com/zzjee/wmutil/erpUtil.java create mode 100644 src/main/java/com/zzjee/wzrepair/controller/TWzRepairController.java create mode 100644 src/main/java/com/zzjee/wzrepair/entity/TWzRepairEntity.java create mode 100644 src/main/java/com/zzjee/wzrepair/service/TWzRepairServiceI.java create mode 100644 src/main/java/com/zzjee/wzrepair/service/impl/TWzRepairServiceImpl.java create mode 100644 src/main/java/com/zzjee/wzrepair/util/constant.java create mode 100644 src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-add.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-update.jsp create mode 100644 src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair.js create mode 100644 src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepairList.js create mode 100644 src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepairList.jsp diff --git a/src/main/java/com/zzjee/wmutil/erpUtil.java b/src/main/java/com/zzjee/wmutil/erpUtil.java new file mode 100644 index 00000000..2a844769 --- /dev/null +++ b/src/main/java/com/zzjee/wmutil/erpUtil.java @@ -0,0 +1,81 @@ +package com.zzjee.wmutil; + +import org.jeecgframework.core.util.ApplicationContextUtil; +import org.jeecgframework.web.system.service.SystemService; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * User: caoez + * Date: 13-7-26 + * Time: 下午2:07 + */ + + +public class erpUtil { + + public static List removeDuplicate(List list) { + for ( int i = 0 ; i < list.size() - 1 ; i ++ ) { + for ( int j = list.size() - 1 ; j > i; j -- ) { + if (list.get(j).equals(list.get(i))) { + list.remove(j); + } + } + } + return list; + } + + + +//通过客户商品编码,或者WMS商品编码和单位找到WMS编码 + public static String geterpys(String poitemid,String matcode,String bcsl){ + Map resultmap = new HashMap<>(); + String yssl= "0.00"; + String ddsl= "0.00"; + String res = ""; + SystemService systemService = ApplicationContextUtil.getContext().getBean(SystemService.class); + String tsql = "SELECT sum(mat_qty) as sumqty FROM t_wz_rk_item where by1 = ? and mat_code = ?" ; + List> result= systemService.findForJdbc(tsql, poitemid,matcode); + if(result.size() > 0) { + try{ + for(int i = 0; i < result.size(); i++){ + yssl = result.get(i).get("sumqty").toString(); + } + }catch (Exception e){ + + } + } + Double yssld = 0.00; + + Double bcsld = 0.00; + tsql = "SELECT sum(mat_qty) as sumqty FROM t_wz_po_item where id = ? and mat_code = ?"; + + result= systemService.findForJdbc(tsql, poitemid,matcode); + if(result.size() > 0) { + try{ + for(int i = 0; i < result.size(); i++){ + ddsl = result.get(i).get("sumqty").toString(); + } + }catch (Exception e){ + + } + } + Double ddsld = 0.00; + try{ + yssld = Double.parseDouble(yssl); + bcsld = Double.parseDouble(bcsl); + ddsld = Double.parseDouble(ddsl);; + + }catch (Exception e){ + + }; + if(ddsld<(yssld+bcsld)){ + res = "收货数量超过订单数量"; + } + return res; + } + + +} diff --git a/src/main/java/com/zzjee/wz/controller/TWzLocationController.java b/src/main/java/com/zzjee/wz/controller/TWzLocationController.java index 378cc410..aad2c834 100644 --- a/src/main/java/com/zzjee/wz/controller/TWzLocationController.java +++ b/src/main/java/com/zzjee/wz/controller/TWzLocationController.java @@ -1,84 +1,59 @@ package com.zzjee.wz.controller; + +import com.alibaba.fastjson.JSONArray; import com.zzjee.wz.entity.TWzLocationEntity; import com.zzjee.wz.service.TWzLocationServiceI; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; 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.beanvalidator.BeanValidators; 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.ExceptionUtil; 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.core.util.ResourceUtil; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.jwt.util.ResponseMessage; +import org.jeecgframework.jwt.util.Result; 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.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; 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.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; -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.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -import org.apache.commons.lang3.StringUtils; -import org.jeecgframework.jwt.util.ResponseMessage; -import org.jeecgframework.jwt.util.Result; -import com.alibaba.fastjson.JSONArray; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; -/** - * @Title: Controller +/** + * @Title: Controller * @Description: 仓库 * @author onlineGenerator * @date 2018-05-20 21:41:04 - * @version V1.0 + * @version V1.0 * */ @Api(value="TWzLocation",description="库存地点",tags="tWzLocationController") @@ -96,12 +71,12 @@ public class TWzLocationController extends BaseController { private SystemService systemService; @Autowired private Validator validator; - + /** * 仓库列表 页面跳转 - * + * * @return */ @RequestMapping(params = "list") @@ -111,7 +86,7 @@ public class TWzLocationController extends BaseController { /** * easyui AJAX请求数据 - * + * * @param request * @param response * @param dataGrid @@ -132,10 +107,10 @@ public class TWzLocationController extends BaseController { this.tWzLocationService.getDataGridReturn(cq, true); TagUtil.datagrid(response, dataGrid); } - + /** * 删除仓库 - * + * * @return */ @RequestMapping(params = "doDel") @@ -156,21 +131,21 @@ public class TWzLocationController extends BaseController { j.setMsg(message); return j; } - + /** * 批量删除仓库 - * + * * @return */ @RequestMapping(params = "doBatchDel") @ResponseBody - public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + public AjaxJson doBatchDel(String ids, HttpServletRequest request){ String message = null; AjaxJson j = new AjaxJson(); message = "仓库删除成功"; try{ for(String id:ids.split(",")){ - TWzLocationEntity tWzLocation = systemService.getEntity(TWzLocationEntity.class, + TWzLocationEntity tWzLocation = systemService.getEntity(TWzLocationEntity.class, Integer.parseInt(id) ); tWzLocationService.delete(tWzLocation); @@ -188,7 +163,7 @@ public class TWzLocationController extends BaseController { /** * 添加仓库 - * + * * @return */ @RequestMapping(params = "doAdd") @@ -208,10 +183,10 @@ public class TWzLocationController extends BaseController { j.setMsg(message); return j; } - + /** * 更新仓库 - * + * * @return */ @RequestMapping(params = "doUpdate") @@ -233,11 +208,11 @@ public class TWzLocationController extends BaseController { j.setMsg(message); return j; } - + /** * 仓库新增页面跳转 - * + * * @return */ @RequestMapping(params = "goAdd") @@ -250,7 +225,7 @@ public class TWzLocationController extends BaseController { } /** * 仓库编辑页面跳转 - * + * * @return */ @RequestMapping(params = "goUpdate") @@ -261,10 +236,10 @@ public class TWzLocationController extends BaseController { } return new ModelAndView("com/zzjee/wz/tWzLocation-update"); } - + /** * 导入功能跳转 - * + * * @return */ @RequestMapping(params = "upload") @@ -272,49 +247,49 @@ public class TWzLocationController extends BaseController { req.setAttribute("controller_name","tWzLocationController"); return new ModelAndView("common/upload/pub_excel_upload"); } - + /** * 导出excel - * + * * @param request * @param response */ @RequestMapping(params = "exportXls") - public String exportXls(TWzLocationEntity tWzLocation,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXls(TWzLocationEntity tWzLocation, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(TWzLocationEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzLocation, request.getParameterMap()); List tWzLocations = this.tWzLocationService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"仓库"); modelMap.put(NormalExcelConstants.CLASS,TWzLocationEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓库列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓库列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tWzLocations); return NormalExcelConstants.JEECG_EXCEL_VIEW; } /** * 导出excel 使模板 - * + * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") - public String exportXlsByT(TWzLocationEntity tWzLocation,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXlsByT(TWzLocationEntity tWzLocation, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"仓库"); modelMap.put(NormalExcelConstants.CLASS,TWzLocationEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓库列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓库列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; } - + @SuppressWarnings("unchecked") @RequestMapping(params = "importExcel", method = RequestMethod.POST) @ResponseBody public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { AjaxJson j = new AjaxJson(); - + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); for (Map.Entry entity : fileMap.entrySet()) { @@ -342,7 +317,7 @@ public class TWzLocationController extends BaseController { } return j; } - + @RequestMapping(method = RequestMethod.GET) @ResponseBody @ApiOperation(value="仓库列表信息",produces="application/json",httpMethod="GET") @@ -350,7 +325,7 @@ public class TWzLocationController extends BaseController { List listTWzLocations=tWzLocationService.getList(TWzLocationEntity.class); return Result.success(listTWzLocations); } - + @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody @ApiOperation(value="根据ID获取仓库信息",notes="根据ID获取仓库信息",httpMethod="GET",produces="application/json") diff --git a/src/main/java/com/zzjee/wz/controller/TWzMaterialController.java b/src/main/java/com/zzjee/wz/controller/TWzMaterialController.java index 28f70dc6..c1aad653 100644 --- a/src/main/java/com/zzjee/wz/controller/TWzMaterialController.java +++ b/src/main/java/com/zzjee/wz/controller/TWzMaterialController.java @@ -1,85 +1,61 @@ package com.zzjee.wz.controller; + +import com.alibaba.fastjson.JSONArray; +import com.zzjee.md.entity.MdGoodsEntity; +import com.zzjee.md.service.MdGoodsServiceI; import com.zzjee.wz.entity.TWzMaterialEntity; import com.zzjee.wz.service.TWzMaterialServiceI; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; 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.beanvalidator.BeanValidators; 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.ExceptionUtil; 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.core.util.ResourceUtil; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.jwt.util.ResponseMessage; +import org.jeecgframework.jwt.util.Result; 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.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; 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.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; -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.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -import org.apache.commons.lang3.StringUtils; -import org.jeecgframework.jwt.util.GsonUtil; -import org.jeecgframework.jwt.util.ResponseMessage; -import org.jeecgframework.jwt.util.Result; -import com.alibaba.fastjson.JSONArray; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; -/** - * @Title: Controller +/** + * @Title: Controller * @Description: 物料 * @author onlineGenerator * @date 2018-05-20 21:40:03 - * @version V1.0 + * @version V1.0 * */ @Api(value="TWzMaterial",description="物料",tags="tWzMaterialController") @@ -97,12 +73,13 @@ public class TWzMaterialController extends BaseController { private SystemService systemService; @Autowired private Validator validator; - + @Autowired + private MdGoodsServiceI mdGoodsService; /** * 物料列表 页面跳转 - * + * * @return */ @RequestMapping(params = "list") @@ -112,7 +89,7 @@ public class TWzMaterialController extends BaseController { /** * easyui AJAX请求数据 - * + * * @param request * @param response * @param dataGrid @@ -133,10 +110,10 @@ public class TWzMaterialController extends BaseController { this.tWzMaterialService.getDataGridReturn(cq, true); TagUtil.datagrid(response, dataGrid); } - + /** * 删除物料 - * + * * @return */ @RequestMapping(params = "doDel") @@ -157,21 +134,21 @@ public class TWzMaterialController extends BaseController { j.setMsg(message); return j; } - + /** * 批量删除物料 - * + * * @return */ @RequestMapping(params = "doBatchDel") @ResponseBody - public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + public AjaxJson doBatchDel(String ids, HttpServletRequest request){ String message = null; AjaxJson j = new AjaxJson(); message = "物料删除成功"; try{ for(String id:ids.split(",")){ - TWzMaterialEntity tWzMaterial = systemService.getEntity(TWzMaterialEntity.class, + TWzMaterialEntity tWzMaterial = systemService.getEntity(TWzMaterialEntity.class, Integer.parseInt(id) ); tWzMaterialService.delete(tWzMaterial); @@ -189,7 +166,7 @@ public class TWzMaterialController extends BaseController { /** * 添加物料 - * + * * @return */ @RequestMapping(params = "doAdd") @@ -200,6 +177,31 @@ public class TWzMaterialController extends BaseController { message = "物料添加成功"; try{ tWzMaterialService.save(tWzMaterial); + + MdGoodsEntity mdn = mdGoodsService.findUniqueByProperty(MdGoodsEntity.class,"shpBianMa",tWzMaterial.getMatCode()); + if(mdn==null){ + mdn = new MdGoodsEntity(); + mdn.setShpBianMa(tWzMaterial.getMatCode()); + mdn.setSuoShuKeHu(ResourceUtil.getConfigByName("default.cuscode")); + mdn.setChlShl("1"); + mdn.setShpMingCheng(tWzMaterial.getMatName()); + mdn.setBzhiQi("999"); + mdn.setChpShuXing(tWzMaterial.getBy3()); + mdn.setJshDanWei(tWzMaterial.getMatUnit()); + mdn.setShlDanWei(tWzMaterial.getMatUnit()); + mdn.setShpTiaoMa(tWzMaterial.getBy1()); + mdn.setCfWenCeng(tWzMaterial.getBy2()); + mdn.setJiZhunwendu("1"); + mdn.setTiJiCm("1"); + mdn.setZhlKg("1"); + mdn.setChlKongZhi("N"); + mdn.setJfShpLei("10"); + mdn.setMpCengGao("99"); + mdn.setMpDanCeng("99"); + + mdGoodsService.save(mdn); + } + systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); }catch(Exception e){ e.printStackTrace(); @@ -209,10 +211,10 @@ public class TWzMaterialController extends BaseController { j.setMsg(message); return j; } - + /** * 更新物料 - * + * * @return */ @RequestMapping(params = "doUpdate") @@ -234,11 +236,11 @@ public class TWzMaterialController extends BaseController { j.setMsg(message); return j; } - + /** * 物料新增页面跳转 - * + * * @return */ @RequestMapping(params = "goAdd") @@ -251,7 +253,7 @@ public class TWzMaterialController extends BaseController { } /** * 物料编辑页面跳转 - * + * * @return */ @RequestMapping(params = "goUpdate") @@ -262,10 +264,10 @@ public class TWzMaterialController extends BaseController { } return new ModelAndView("com/zzjee/wz/tWzMaterial-update"); } - + /** * 导入功能跳转 - * + * * @return */ @RequestMapping(params = "upload") @@ -273,49 +275,49 @@ public class TWzMaterialController extends BaseController { req.setAttribute("controller_name","tWzMaterialController"); return new ModelAndView("common/upload/pub_excel_upload"); } - + /** * 导出excel - * + * * @param request * @param response */ @RequestMapping(params = "exportXls") - public String exportXls(TWzMaterialEntity tWzMaterial,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXls(TWzMaterialEntity tWzMaterial, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(TWzMaterialEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzMaterial, request.getParameterMap()); List tWzMaterials = this.tWzMaterialService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"物料"); modelMap.put(NormalExcelConstants.CLASS,TWzMaterialEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("物料列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("物料列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tWzMaterials); return NormalExcelConstants.JEECG_EXCEL_VIEW; } /** * 导出excel 使模板 - * + * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") - public String exportXlsByT(TWzMaterialEntity tWzMaterial,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXlsByT(TWzMaterialEntity tWzMaterial, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"物料"); modelMap.put(NormalExcelConstants.CLASS,TWzMaterialEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("物料列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("物料列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; } - + @SuppressWarnings("unchecked") @RequestMapping(params = "importExcel", method = RequestMethod.POST) @ResponseBody public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { AjaxJson j = new AjaxJson(); - + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); for (Map.Entry entity : fileMap.entrySet()) { @@ -350,7 +352,7 @@ public class TWzMaterialController extends BaseController { } return j; } - + @RequestMapping(method = RequestMethod.GET) @ResponseBody @ApiOperation(value="物料列表信息",produces="application/json",httpMethod="GET") @@ -358,7 +360,7 @@ public class TWzMaterialController extends BaseController { List listTWzMaterials=tWzMaterialService.getList(TWzMaterialEntity.class); return Result.success(listTWzMaterials); } - + @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody @ApiOperation(value="根据ID获取物料信息",notes="根据ID获取物料信息",httpMethod="GET",produces="application/json") diff --git a/src/main/java/com/zzjee/wz/controller/TWzSpConfController.java b/src/main/java/com/zzjee/wz/controller/TWzSpConfController.java index dce1a3a4..ca5fd1f0 100644 --- a/src/main/java/com/zzjee/wz/controller/TWzSpConfController.java +++ b/src/main/java/com/zzjee/wz/controller/TWzSpConfController.java @@ -1,86 +1,60 @@ package com.zzjee.wz.controller; + +import com.alibaba.fastjson.JSONArray; import com.zzjee.wz.entity.TWzSpConfEntity; import com.zzjee.wz.service.TWzSpConfServiceI; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; -import org.jeecgframework.web.system.pojo.base.TSUser; -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.beanvalidator.BeanValidators; 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.ExceptionUtil; 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.core.util.ResourceUtil; +import org.jeecgframework.core.util.StringUtil; +import org.jeecgframework.jwt.util.ResponseMessage; +import org.jeecgframework.jwt.util.Result; 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.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.pojo.base.TSUser; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; 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.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; -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.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -import org.apache.commons.lang3.StringUtils; -import org.jeecgframework.jwt.util.GsonUtil; -import org.jeecgframework.jwt.util.ResponseMessage; -import org.jeecgframework.jwt.util.Result; -import com.alibaba.fastjson.JSONArray; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; -/** - * @Title: Controller +/** + * @Title: Controller * @Description: 审批配置 * @author onlineGenerator * @date 2018-05-20 21:40:51 - * @version V1.0 + * @version V1.0 * */ @Api(value="TWzSpConf",description="审批配置",tags="tWzSpConfController") @@ -98,12 +72,12 @@ public class TWzSpConfController extends BaseController { private SystemService systemService; @Autowired private Validator validator; - + /** * 审批配置列表 页面跳转 - * + * * @return */ @RequestMapping(params = "list") @@ -113,7 +87,7 @@ public class TWzSpConfController extends BaseController { /** * easyui AJAX请求数据 - * + * * @param request * @param response * @param dataGrid @@ -134,10 +108,10 @@ public class TWzSpConfController extends BaseController { this.tWzSpConfService.getDataGridReturn(cq, true); TagUtil.datagrid(response, dataGrid); } - + /** * 删除审批配置 - * + * * @return */ @RequestMapping(params = "doDel") @@ -158,21 +132,21 @@ public class TWzSpConfController extends BaseController { j.setMsg(message); return j; } - + /** * 批量删除审批配置 - * + * * @return */ @RequestMapping(params = "doBatchDel") @ResponseBody - public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + public AjaxJson doBatchDel(String ids, HttpServletRequest request){ String message = null; AjaxJson j = new AjaxJson(); message = "审批配置删除成功"; try{ for(String id:ids.split(",")){ - TWzSpConfEntity tWzSpConf = systemService.getEntity(TWzSpConfEntity.class, + TWzSpConfEntity tWzSpConf = systemService.getEntity(TWzSpConfEntity.class, Integer.parseInt(id) ); tWzSpConfService.delete(tWzSpConf); @@ -190,7 +164,7 @@ public class TWzSpConfController extends BaseController { /** * 添加审批配置 - * + * * @param ids * @return */ @@ -220,10 +194,10 @@ public class TWzSpConfController extends BaseController { j.setMsg(message); return j; } - + /** * 更新审批配置 - * + * * @param ids * @return */ @@ -256,11 +230,11 @@ public class TWzSpConfController extends BaseController { j.setMsg(message); return j; } - + /** * 审批配置新增页面跳转 - * + * * @return */ @RequestMapping(params = "goAdd") @@ -273,7 +247,7 @@ public class TWzSpConfController extends BaseController { } /** * 审批配置编辑页面跳转 - * + * * @return */ @RequestMapping(params = "goUpdate") @@ -284,10 +258,10 @@ public class TWzSpConfController extends BaseController { } return new ModelAndView("com/zzjee/wz/tWzSpConf-update"); } - + /** * 导入功能跳转 - * + * * @return */ @RequestMapping(params = "upload") @@ -295,49 +269,49 @@ public class TWzSpConfController extends BaseController { req.setAttribute("controller_name","tWzSpConfController"); return new ModelAndView("common/upload/pub_excel_upload"); } - + /** * 导出excel - * + * * @param request * @param response */ @RequestMapping(params = "exportXls") - public String exportXls(TWzSpConfEntity tWzSpConf,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXls(TWzSpConfEntity tWzSpConf, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(TWzSpConfEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzSpConf, request.getParameterMap()); List tWzSpConfs = this.tWzSpConfService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"审批配置"); modelMap.put(NormalExcelConstants.CLASS,TWzSpConfEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("审批配置列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("审批配置列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tWzSpConfs); return NormalExcelConstants.JEECG_EXCEL_VIEW; } /** * 导出excel 使模板 - * + * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") - public String exportXlsByT(TWzSpConfEntity tWzSpConf,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXlsByT(TWzSpConfEntity tWzSpConf, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"审批配置"); modelMap.put(NormalExcelConstants.CLASS,TWzSpConfEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("审批配置列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("审批配置列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; } - + @SuppressWarnings("unchecked") @RequestMapping(params = "importExcel", method = RequestMethod.POST) @ResponseBody public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { AjaxJson j = new AjaxJson(); - + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); for (Map.Entry entity : fileMap.entrySet()) { @@ -365,7 +339,7 @@ public class TWzSpConfController extends BaseController { } return j; } - + @RequestMapping(method = RequestMethod.GET) @ResponseBody @ApiOperation(value="审批配置列表信息",produces="application/json",httpMethod="GET") @@ -373,7 +347,7 @@ public class TWzSpConfController extends BaseController { List listTWzSpConfs=tWzSpConfService.getList(TWzSpConfEntity.class); return Result.success(listTWzSpConfs); } - + @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody @ApiOperation(value="根据ID获取审批配置信息",notes="根据ID获取审批配置信息",httpMethod="GET",produces="application/json") diff --git a/src/main/java/com/zzjee/wz/entity/TWzLocationEntity.java b/src/main/java/com/zzjee/wz/entity/TWzLocationEntity.java index c0c3859d..a21dee83 100644 --- a/src/main/java/com/zzjee/wz/entity/TWzLocationEntity.java +++ b/src/main/java/com/zzjee/wz/entity/TWzLocationEntity.java @@ -1,29 +1,16 @@ package com.zzjee.wz.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 仓库 * @author onlineGenerator * @date 2018-05-20 21:41:04 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -53,7 +40,7 @@ public class TWzLocationEntity implements java.io.Serializable { /**仓库*/ @Excel(name="仓库",width=15) private String matLocation; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 diff --git a/src/main/java/com/zzjee/wz/entity/TWzMaterialEntity.java b/src/main/java/com/zzjee/wz/entity/TWzMaterialEntity.java index 8f0a3683..049715c7 100644 --- a/src/main/java/com/zzjee/wz/entity/TWzMaterialEntity.java +++ b/src/main/java/com/zzjee/wz/entity/TWzMaterialEntity.java @@ -1,29 +1,17 @@ package com.zzjee.wz.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; -/** +import javax.persistence.*; +import java.math.BigDecimal; +import java.util.Date; + +/** * @Title: Entity * @Description: 物料 * @author onlineGenerator * @date 2018-05-20 21:40:03 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -84,7 +72,11 @@ public class TWzMaterialEntity implements java.io.Serializable { private String by4; /**备用5*/ private String by5; - + private String by6; + private String by7; + private String by8; + private String by9; + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 @@ -478,4 +470,40 @@ public class TWzMaterialEntity implements java.io.Serializable { public void setBy5(String by5){ this.by5 = by5; } + + @Column(name ="BY6",nullable=true,length=32) + public String getBy6() { + return by6; + } + + public void setBy6(String by6) { + this.by6 = by6; + } + + @Column(name ="BY7",nullable=true,length=32) + public String getBy7() { + return by7; + } + + public void setBy7(String by7) { + this.by7 = by7; + } + + @Column(name ="BY8",nullable=true,length=32) + public String getBy8() { + return by8; + } + + public void setBy8(String by8) { + this.by8 = by8; + } + + @Column(name ="BY9",nullable=true,length=32) + public String getBy9() { + return by9; + } + + public void setBy9(String by9) { + this.by9 = by9; + } } diff --git a/src/main/java/com/zzjee/wz/entity/TWzSpConfEntity.java b/src/main/java/com/zzjee/wz/entity/TWzSpConfEntity.java index 65aa4180..a96a38d5 100644 --- a/src/main/java/com/zzjee/wz/entity/TWzSpConfEntity.java +++ b/src/main/java/com/zzjee/wz/entity/TWzSpConfEntity.java @@ -1,29 +1,16 @@ package com.zzjee.wz.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 审批配置 * @author onlineGenerator * @date 2018-05-20 21:40:51 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -62,7 +49,7 @@ public class TWzSpConfEntity implements java.io.Serializable { /**备注*/ @Excel(name="备注",width=15) private String spRemark; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 diff --git a/src/main/java/com/zzjee/wz/service/TWzLocationServiceI.java b/src/main/java/com/zzjee/wz/service/TWzLocationServiceI.java index 5984d385..55538005 100644 --- a/src/main/java/com/zzjee/wz/service/TWzLocationServiceI.java +++ b/src/main/java/com/zzjee/wz/service/TWzLocationServiceI.java @@ -4,12 +4,12 @@ import org.jeecgframework.core.common.service.CommonService; import java.io.Serializable; -public interface TWzLocationServiceI extends CommonService{ - +public interface TWzLocationServiceI extends CommonService { + public void delete(TWzLocationEntity entity) throws Exception; - + public Serializable save(TWzLocationEntity entity) throws Exception; - + public void saveOrUpdate(TWzLocationEntity entity) throws Exception; - + } diff --git a/src/main/java/com/zzjee/wz/service/TWzMaterialServiceI.java b/src/main/java/com/zzjee/wz/service/TWzMaterialServiceI.java index 2b7c8ec4..2a57f091 100644 --- a/src/main/java/com/zzjee/wz/service/TWzMaterialServiceI.java +++ b/src/main/java/com/zzjee/wz/service/TWzMaterialServiceI.java @@ -4,12 +4,12 @@ import org.jeecgframework.core.common.service.CommonService; import java.io.Serializable; -public interface TWzMaterialServiceI extends CommonService{ - +public interface TWzMaterialServiceI extends CommonService { + public void delete(TWzMaterialEntity entity) throws Exception; - + public Serializable save(TWzMaterialEntity entity) throws Exception; - + public void saveOrUpdate(TWzMaterialEntity entity) throws Exception; - + } diff --git a/src/main/java/com/zzjee/wz/service/TWzSpConfServiceI.java b/src/main/java/com/zzjee/wz/service/TWzSpConfServiceI.java index 7631ae94..b56e5581 100644 --- a/src/main/java/com/zzjee/wz/service/TWzSpConfServiceI.java +++ b/src/main/java/com/zzjee/wz/service/TWzSpConfServiceI.java @@ -4,12 +4,12 @@ import org.jeecgframework.core.common.service.CommonService; import java.io.Serializable; -public interface TWzSpConfServiceI extends CommonService{ - +public interface TWzSpConfServiceI extends CommonService { + public void delete(TWzSpConfEntity entity) throws Exception; - + public Serializable save(TWzSpConfEntity entity) throws Exception; - + public void saveOrUpdate(TWzSpConfEntity entity) throws Exception; - + } diff --git a/src/main/java/com/zzjee/wz/service/impl/TWzMaterialServiceImpl.java b/src/main/java/com/zzjee/wz/service/impl/TWzMaterialServiceImpl.java index 8246b2de..6b8df4f5 100644 --- a/src/main/java/com/zzjee/wz/service/impl/TWzMaterialServiceImpl.java +++ b/src/main/java/com/zzjee/wz/service/impl/TWzMaterialServiceImpl.java @@ -20,26 +20,26 @@ import java.util.UUID; @Transactional public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMaterialServiceI { - + public void delete(TWzMaterialEntity entity) throws Exception{ super.delete(entity); //执行删除操作增强业务 this.doDelBus(entity); } - + public Serializable save(TWzMaterialEntity entity) throws Exception{ Serializable t = super.save(entity); //执行新增操作增强业务 this.doAddBus(entity); return t; } - + public void saveOrUpdate(TWzMaterialEntity entity) throws Exception{ super.saveOrUpdate(entity); //执行更新操作增强业务 this.doUpdateBus(entity); } - + /** * 新增操作增强业务 * @param t @@ -48,7 +48,7 @@ public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMate private void doAddBus(TWzMaterialEntity t) throws Exception{ //-----------------sql增强 start---------------------------- //-----------------sql增强 end------------------------------ - + //-----------------java增强 start--------------------------- //-----------------java增强 end----------------------------- } @@ -60,7 +60,7 @@ public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMate private void doUpdateBus(TWzMaterialEntity t) throws Exception{ //-----------------sql增强 start---------------------------- //-----------------sql增强 end------------------------------ - + //-----------------java增强 start--------------------------- //-----------------java增强 end----------------------------- } @@ -72,11 +72,11 @@ public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMate private void doDelBus(TWzMaterialEntity t) throws Exception{ //-----------------sql增强 start---------------------------- //-----------------sql增强 end------------------------------ - + //-----------------java增强 start--------------------------- //-----------------java增强 end----------------------------- } - + private Map populationMap(TWzMaterialEntity t){ Map map = new HashMap(); map.put("id", t.getId()); @@ -104,14 +104,14 @@ public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMate map.put("by5", t.getBy5()); return map; } - + /** * 替换sql中的变量 * @param sql * @param t * @return */ - public String replaceVal(String sql,TWzMaterialEntity t){ + public String replaceVal(String sql, TWzMaterialEntity 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())); @@ -138,7 +138,7 @@ public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMate sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); return sql; } - + /** * 执行JAVA增强 */ @@ -159,7 +159,7 @@ public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMate } catch (Exception e) { e.printStackTrace(); throw new Exception("执行JAVA增强出现异常!"); - } + } } } -} \ No newline at end of file +} diff --git a/src/main/java/com/zzjee/wzpo/controller/VWzPoWqController.java b/src/main/java/com/zzjee/wzpo/controller/VWzPoWqController.java index 0bc3515b..eda950f9 100644 --- a/src/main/java/com/zzjee/wzpo/controller/VWzPoWqController.java +++ b/src/main/java/com/zzjee/wzpo/controller/VWzPoWqController.java @@ -1,91 +1,59 @@ package com.zzjee.wzpo.controller; - import com.zzjee.wzpo.entity.PowzPage; +import com.alibaba.fastjson.JSONArray; +import com.zzjee.wmutil.erpUtil; +import com.zzjee.wzpo.entity.PowzPage; import com.zzjee.wzpo.entity.VWzPoWqEntity; import com.zzjee.wzpo.service.VWzPoWqServiceI; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import com.zzjee.wzyw.entity.TWzRkHeadEntity; import com.zzjee.wzyw.entity.TWzRkItemEntity; import com.zzjee.wzyw.service.TWzRkHeadServiceI; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; -import org.jeecgframework.core.util.*; -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.beanvalidator.BeanValidators; 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.tag.core.easyui.TagUtil; -import org.jeecgframework.web.system.pojo.base.TSDepart; -import org.jeecgframework.web.system.service.SystemService; - -import java.io.OutputStream; - -import org.jeecgframework.poi.excel.ExcelExportUtil; +import org.jeecgframework.core.util.*; +import org.jeecgframework.jwt.util.ResponseMessage; +import org.jeecgframework.jwt.util.Result; 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 java.io.IOException; -import org.springframework.web.bind.annotation.RequestMethod; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; -import java.util.Map; -import java.util.HashMap; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; -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.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -import org.apache.commons.lang3.StringUtils; -import org.jeecgframework.jwt.util.GsonUtil; -import org.jeecgframework.jwt.util.ResponseMessage; -import org.jeecgframework.jwt.util.Result; -import com.alibaba.fastjson.JSONArray; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import java.io.IOException; +import java.util.*; -/** - * @Title: Controller +/** + * @Title: Controller * @Description: v_wz_po_wq * @author onlineGenerator * @date 2018-05-21 15:57:04 - * @version V1.0 + * @version V1.0 * */ @Api(value="VWzPoWq",description="v_wz_po_wq",tags="vWzPoWqController") @@ -109,7 +77,7 @@ public class VWzPoWqController extends BaseController { /** * v_wz_po_wq列表 页面跳转 - * + * * @return */ @RequestMapping(params = "list") @@ -119,14 +87,14 @@ public class VWzPoWqController extends BaseController { /** * easyui AJAX请求数据 - * + * * @param request * @param response * @param dataGrid */ @RequestMapping(params = "datagrid") - public void datagrid(VWzPoWqEntity vWzPoWq,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { + public void datagrid(VWzPoWqEntity vWzPoWq, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { CriteriaQuery cq = new CriteriaQuery(VWzPoWqEntity.class, dataGrid); //查询条件组装器 org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, vWzPoWq, request.getParameterMap()); @@ -157,15 +125,33 @@ public class VWzPoWqController extends BaseController { if(CollectionUtils.isNotEmpty(demos)){ TWzRkHeadEntity tWzRkHead = new TWzRkHeadEntity(); List tWzRkItemList = new ArrayList() ; + + Map mapvendor = new HashMap<>(); + + for(VWzPoWqEntity jeecgDemo:demos) { + if (StringUtil.isNotEmpty(jeecgDemo.getId())) { + VWzPoWqEntity t = vWzPoWqService.get(VWzPoWqEntity.class, jeecgDemo.getId()); + try { + mapvendor.put(t.getVendorCode(),t.getVendorName()); + } catch (Exception e) { + } + } + } + if(mapvendor.size()>1){ + j.setMsg("不同供应商不允许入库到同一个订单"); + j.setSuccess(false); + return j; + + } for(VWzPoWqEntity jeecgDemo:demos){ if (StringUtil.isNotEmpty(jeecgDemo.getId())) { VWzPoWqEntity t =vWzPoWqService.get(VWzPoWqEntity.class, jeecgDemo.getId()); try { MyBeanUtils.copyBeanNotNull2Bean(demos, t); tWzRkHead.setDocDate(DateUtils.getDate()); - tWzRkHead.setRkRemark("批量入库"); - tWzRkHead.setVendorCode("批量入库"); - tWzRkHead.setVendorName("批量入库"); + tWzRkHead.setRkRemark("采购订单入库:"+t.getPoRemark()); + tWzRkHead.setVendorCode(t.getVendorCode()); + tWzRkHead.setVendorName(t.getVendorName()); } catch (Exception e) { e.printStackTrace(); } @@ -179,6 +165,14 @@ public class VWzPoWqController extends BaseController { pogri.setMatQty(jeecgDemo.getMatQtyWq().toString()); pogri.setMatBatch(jeecgDemo.getMatBatch()); pogri.setMatUnit(jeecgDemo.getMatUnit()); + String res = erpUtil.geterpys(pogri.getBy1(),pogri.getMatCode(),pogri.getMatQty()); + if(StringUtil.isNotEmpty(res)){ + j.setMsg(res); + j.setSuccess(false); + return j; + + } + tWzRkItemList.add(pogri); } catch (Exception e) { @@ -201,7 +195,7 @@ public class VWzPoWqController extends BaseController { /** * 删除v_wz_po_wq - * + * * @return */ @RequestMapping(params = "doDel") @@ -222,21 +216,21 @@ public class VWzPoWqController extends BaseController { j.setMsg(message); return j; } - + /** * 批量删除v_wz_po_wq - * + * * @return */ @RequestMapping(params = "doBatchDel") @ResponseBody - public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + public AjaxJson doBatchDel(String ids, HttpServletRequest request){ String message = null; AjaxJson j = new AjaxJson(); message = "v_wz_po_wq删除成功"; try{ for(String id:ids.split(",")){ - VWzPoWqEntity vWzPoWq = systemService.getEntity(VWzPoWqEntity.class, + VWzPoWqEntity vWzPoWq = systemService.getEntity(VWzPoWqEntity.class, id ); vWzPoWqService.delete(vWzPoWq); @@ -254,7 +248,7 @@ public class VWzPoWqController extends BaseController { /** * 添加v_wz_po_wq - * + * * @return */ @RequestMapping(params = "doAdd") @@ -274,10 +268,10 @@ public class VWzPoWqController extends BaseController { j.setMsg(message); return j; } - + /** * 更新v_wz_po_wq - * + * * @return */ @RequestMapping(params = "doUpdate") @@ -299,11 +293,11 @@ public class VWzPoWqController extends BaseController { j.setMsg(message); return j; } - + /** * v_wz_po_wq新增页面跳转 - * + * * @return */ @RequestMapping(params = "goAdd") @@ -316,7 +310,7 @@ public class VWzPoWqController extends BaseController { } /** * v_wz_po_wq编辑页面跳转 - * + * * @return */ @RequestMapping(params = "goUpdate") @@ -327,10 +321,10 @@ public class VWzPoWqController extends BaseController { } return new ModelAndView("com/zzjee/wzpo/vWzPoWq-update"); } - + /** * 导入功能跳转 - * + * * @return */ @RequestMapping(params = "upload") @@ -338,49 +332,49 @@ public class VWzPoWqController extends BaseController { req.setAttribute("controller_name","vWzPoWqController"); return new ModelAndView("common/upload/pub_excel_upload"); } - + /** * 导出excel - * + * * @param request * @param response */ @RequestMapping(params = "exportXls") - public String exportXls(VWzPoWqEntity vWzPoWq,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXls(VWzPoWqEntity vWzPoWq, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(VWzPoWqEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, vWzPoWq, request.getParameterMap()); List vWzPoWqs = this.vWzPoWqService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"v_wz_po_wq"); - modelMap.put(NormalExcelConstants.CLASS,VWzPoWqEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("v_wz_po_wq列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.CLASS, VWzPoWqEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("v_wz_po_wq列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,vWzPoWqs); return NormalExcelConstants.JEECG_EXCEL_VIEW; } /** * 导出excel 使模板 - * + * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") - public String exportXlsByT(VWzPoWqEntity vWzPoWq,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { + public String exportXlsByT(VWzPoWqEntity vWzPoWq, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"v_wz_po_wq"); - modelMap.put(NormalExcelConstants.CLASS,VWzPoWqEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("v_wz_po_wq列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + modelMap.put(NormalExcelConstants.CLASS, VWzPoWqEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("v_wz_po_wq列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; } - + @SuppressWarnings("unchecked") @RequestMapping(params = "importExcel", method = RequestMethod.POST) @ResponseBody public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { AjaxJson j = new AjaxJson(); - + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); for (Map.Entry entity : fileMap.entrySet()) { @@ -390,7 +384,7 @@ public class VWzPoWqController extends BaseController { params.setHeadRows(1); params.setNeedSave(true); try { - List listVWzPoWqEntitys = ExcelImportUtil.importExcel(file.getInputStream(),VWzPoWqEntity.class,params); + List listVWzPoWqEntitys = ExcelImportUtil.importExcel(file.getInputStream(), VWzPoWqEntity.class,params); for (VWzPoWqEntity vWzPoWq : listVWzPoWqEntitys) { vWzPoWqService.save(vWzPoWq); } @@ -408,7 +402,7 @@ public class VWzPoWqController extends BaseController { } return j; } - + @RequestMapping(method = RequestMethod.GET) @ResponseBody @ApiOperation(value="v_wz_po_wq列表信息",produces="application/json",httpMethod="GET") @@ -416,7 +410,7 @@ public class VWzPoWqController extends BaseController { List listVWzPoWqs=vWzPoWqService.getList(VWzPoWqEntity.class); return Result.success(listVWzPoWqs); } - + @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody @ApiOperation(value="根据ID获取v_wz_po_wq信息",notes="根据ID获取v_wz_po_wq信息",httpMethod="GET",produces="application/json") diff --git a/src/main/java/com/zzjee/wzpo/entity/VWzPoWqEntity.java b/src/main/java/com/zzjee/wzpo/entity/VWzPoWqEntity.java index b2b54050..8e15acb3 100644 --- a/src/main/java/com/zzjee/wzpo/entity/VWzPoWqEntity.java +++ b/src/main/java/com/zzjee/wzpo/entity/VWzPoWqEntity.java @@ -1,29 +1,17 @@ package com.zzjee.wzpo.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: v_wz_po_wq * @author onlineGenerator * @date 2018-05-21 15:57:04 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -32,6 +20,18 @@ import org.jeecgframework.poi.excel.annotation.Excel; public class VWzPoWqEntity implements java.io.Serializable { /**id*/ private String id; + /**供应商编码*/ + @Excel(name="供应商编码",width=15) + private String vendorCode; + /**供应商名称*/ + @Excel(name="供应商名称",width=15) + private String vendorName; + /**采购订单日期*/ + @Excel(name="采购订单日期",width=15,format = "yyyy-MM-dd") + private Date docDate; + /**采购订单备注*/ + @Excel(name="采购订单备注",width=15) + private String poRemark; /**物料编码*/ @Excel(name="物料编码",width=15) private String matCode; @@ -228,4 +228,81 @@ public class VWzPoWqEntity implements java.io.Serializable { this.matQtyWq1 = matQtyWq1; } + + /** + *方法: 取得java.lang.String + *@return: java.lang.String 供应商编码 + */ + + @Column(name ="VENDOR_CODE",nullable=true,length=32) + public String getVendorCode(){ + return this.vendorCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 供应商编码 + */ + public void setVendorCode(String vendorCode){ + this.vendorCode = vendorCode; + } + + /** + *方法: 取得java.lang.String + *@return: java.lang.String 供应商名称 + */ + + @Column(name ="VENDOR_NAME",nullable=true,length=32) + public String getVendorName(){ + return this.vendorName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 供应商名称 + */ + public void setVendorName(String vendorName){ + this.vendorName = vendorName; + } + + /** + *方法: 取得java.util.Date + *@return: java.util.Date 采购订单日期 + */ + + @Column(name ="DOC_DATE",nullable=true,length=32) + public Date getDocDate(){ + return this.docDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 采购订单日期 + */ + public void setDocDate(Date docDate){ + this.docDate = docDate; + } + + /** + *方法: 取得java.lang.String + *@return: java.lang.String 采购订单备注 + */ + + @Column(name ="PO_REMARK",nullable=true,length=232) + public String getPoRemark(){ + return this.poRemark; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 采购订单备注 + */ + public void setPoRemark(String poRemark){ + this.poRemark = poRemark; + } + + /** + *方法: 取得java.lang.String + *@return: java.lang.String 备用1 + */ } diff --git a/src/main/java/com/zzjee/wzpo/service/VWzPoWqServiceI.java b/src/main/java/com/zzjee/wzpo/service/VWzPoWqServiceI.java index 13d4e259..819f1e8e 100644 --- a/src/main/java/com/zzjee/wzpo/service/VWzPoWqServiceI.java +++ b/src/main/java/com/zzjee/wzpo/service/VWzPoWqServiceI.java @@ -4,12 +4,12 @@ import org.jeecgframework.core.common.service.CommonService; import java.io.Serializable; -public interface VWzPoWqServiceI extends CommonService{ - +public interface VWzPoWqServiceI extends CommonService { + public void delete(VWzPoWqEntity entity) throws Exception; - + public Serializable save(VWzPoWqEntity entity) throws Exception; - + public void saveOrUpdate(VWzPoWqEntity entity) throws Exception; - + } diff --git a/src/main/java/com/zzjee/wzpo/service/impl/VWzPoWqServiceImpl.java b/src/main/java/com/zzjee/wzpo/service/impl/VWzPoWqServiceImpl.java index 527f4e5a..9678df5e 100644 --- a/src/main/java/com/zzjee/wzpo/service/impl/VWzPoWqServiceImpl.java +++ b/src/main/java/com/zzjee/wzpo/service/impl/VWzPoWqServiceImpl.java @@ -1,42 +1,44 @@ package com.zzjee.wzpo.service.impl; + +import com.zzjee.wzpo.entity.VWzPoWqEntity; import com.zzjee.wzpo.service.VWzPoWqServiceI; import org.jeecgframework.core.common.service.impl.CommonServiceImpl; -import com.zzjee.wzpo.entity.VWzPoWqEntity; -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; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; @Service("vWzPoWqService") @Transactional public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServiceI { - + public void delete(VWzPoWqEntity entity) throws Exception{ super.delete(entity); //执行删除操作增强业务 this.doDelBus(entity); } - + public Serializable save(VWzPoWqEntity entity) throws Exception{ Serializable t = super.save(entity); //执行新增操作增强业务 this.doAddBus(entity); return t; } - + public void saveOrUpdate(VWzPoWqEntity entity) throws Exception{ super.saveOrUpdate(entity); //执行更新操作增强业务 this.doUpdateBus(entity); } - + /** * 新增操作增强业务 * @param t @@ -45,7 +47,7 @@ public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServ private void doAddBus(VWzPoWqEntity t) throws Exception{ //-----------------sql增强 start---------------------------- //-----------------sql增强 end------------------------------ - + //-----------------java增强 start--------------------------- //-----------------java增强 end----------------------------- } @@ -57,7 +59,7 @@ public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServ private void doUpdateBus(VWzPoWqEntity t) throws Exception{ //-----------------sql增强 start---------------------------- //-----------------sql增强 end------------------------------ - + //-----------------java增强 start--------------------------- //-----------------java增强 end----------------------------- } @@ -69,11 +71,11 @@ public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServ private void doDelBus(VWzPoWqEntity t) throws Exception{ //-----------------sql增强 start---------------------------- //-----------------sql增强 end------------------------------ - + //-----------------java增强 start--------------------------- //-----------------java增强 end----------------------------- } - + private Map populationMap(VWzPoWqEntity t){ Map map = new HashMap(); map.put("id", t.getId()); @@ -87,7 +89,7 @@ public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServ map.put("mat_qty_wq", t.getMatQtyWq()); return map; } - + /** * 替换sql中的变量 * @param sql @@ -107,7 +109,7 @@ public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServ sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); return sql; } - + /** * 执行JAVA增强 */ @@ -128,7 +130,7 @@ public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServ } catch (Exception e) { e.printStackTrace(); throw new Exception("执行JAVA增强出现异常!"); - } + } } } -} \ No newline at end of file +} diff --git a/src/main/java/com/zzjee/wzrepair/controller/TWzRepairController.java b/src/main/java/com/zzjee/wzrepair/controller/TWzRepairController.java new file mode 100644 index 00000000..0d8391b6 --- /dev/null +++ b/src/main/java/com/zzjee/wzrepair/controller/TWzRepairController.java @@ -0,0 +1,385 @@ +package com.zzjee.wzrepair.controller; + +import com.zzjee.wzrepair.entity.TWzRepairEntity; +import com.zzjee.wzrepair.service.TWzRepairServiceI; +import org.apache.log4j.Logger; +import org.jeecgframework.core.beanvalidator.BeanValidators; +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.json.AjaxJson; +import org.jeecgframework.core.common.model.json.DataGrid; +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.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * @Title: Controller + * @Description: 交旧领新登记表 + * @author onlineGenerator + * @date 2020-02-24 11:36:29 + * @version V1.0 + * + */ +@Controller +@RequestMapping("/tWzRepairController") +public class TWzRepairController extends BaseController { + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(com.zzjee.wzrepair.controller.TWzRepairController.class); + + @Autowired + private TWzRepairServiceI tWzRepairService; + @Autowired + private SystemService systemService; + @Autowired + private Validator validator; + + + + /** + * 交旧领新登记表列表 页面跳转 + * + * @return + */ + @RequestMapping(params = "list") + public ModelAndView list(HttpServletRequest request) { + return new ModelAndView("com/zzjee/wzrepair/tWzRepairList"); + } + + /** + * easyui AJAX请求数据 + * + * @param request + * @param response + * @param dataGrid + * @param user + */ + + @RequestMapping(params = "datagrid") + public void datagrid(TWzRepairEntity tWzRepair,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { + CriteriaQuery cq = new CriteriaQuery(TWzRepairEntity.class, dataGrid); + //查询条件组装器 + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzRepair, request.getParameterMap()); + try{ + //自定义追加查询条件 + }catch (Exception e) { + throw new BusinessException(e.getMessage()); + } + cq.add(); + this.tWzRepairService.getDataGridReturn(cq, true); + TagUtil.datagrid(response, dataGrid); + } + + /** + * 删除交旧领新登记表 + * + * @return + */ + @RequestMapping(params = "doDel") + @ResponseBody + public AjaxJson doDel(TWzRepairEntity tWzRepair, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + tWzRepair = systemService.getEntity(TWzRepairEntity.class, tWzRepair.getId()); + message = "交旧领新登记表删除成功"; + try{ + tWzRepairService.delete(tWzRepair); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "交旧领新登记表删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 批量删除交旧领新登记表 + * + * @return + */ + @RequestMapping(params = "doBatchDel") + @ResponseBody + public AjaxJson doBatchDel(String ids, HttpServletRequest request){ + String message = null; + AjaxJson j = new AjaxJson(); + message = "交旧领新登记表删除成功"; + try{ + for(String id:ids.split(",")){ + TWzRepairEntity tWzRepair = systemService.getEntity(TWzRepairEntity.class, + id + ); + tWzRepairService.delete(tWzRepair); + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + } + }catch(Exception e){ + e.printStackTrace(); + message = "交旧领新登记表删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 添加交旧领新登记表 + * + * @param ids + * @return + */ + @RequestMapping(params = "doAdd") + @ResponseBody + public AjaxJson doAdd(TWzRepairEntity tWzRepair, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "交旧领新登记表添加成功"; + try{ + tWzRepairService.save(tWzRepair); + systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); + }catch(Exception e){ + e.printStackTrace(); + message = "交旧领新登记表添加失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 更新交旧领新登记表 + * + * @param ids + * @return + */ + @RequestMapping(params = "doUpdate") + @ResponseBody + public AjaxJson doUpdate(TWzRepairEntity tWzRepair, HttpServletRequest request) { + String message = null; + AjaxJson j = new AjaxJson(); + message = "交旧领新登记表更新成功"; + TWzRepairEntity t = tWzRepairService.get(TWzRepairEntity.class, tWzRepair.getId()); + try { + MyBeanUtils.copyBeanNotNull2Bean(tWzRepair, t); + tWzRepairService.saveOrUpdate(t); + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "交旧领新登记表更新失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 交旧领新登记表新增页面跳转 + * + * @return + */ + @RequestMapping(params = "goAdd") + public ModelAndView goAdd(TWzRepairEntity tWzRepair, HttpServletRequest req) { + if (StringUtil.isNotEmpty(tWzRepair.getId())) { + tWzRepair = tWzRepairService.getEntity(TWzRepairEntity.class, tWzRepair.getId()); + req.setAttribute("tWzRepairPage", tWzRepair); + } + return new ModelAndView("com/zzjee/wzrepair/tWzRepair-add"); + } + /** + * 交旧领新登记表编辑页面跳转 + * + * @return + */ + @RequestMapping(params = "goUpdate") + public ModelAndView goUpdate(TWzRepairEntity tWzRepair, HttpServletRequest req) { + if (StringUtil.isNotEmpty(tWzRepair.getId())) { + tWzRepair = tWzRepairService.getEntity(TWzRepairEntity.class, tWzRepair.getId()); + req.setAttribute("tWzRepairPage", tWzRepair); + } + return new ModelAndView("com/zzjee/wzrepair/tWzRepair-update"); + } + + /** + * 导入功能跳转 + * + * @return + */ + @RequestMapping(params = "upload") + public ModelAndView upload(HttpServletRequest req) { + req.setAttribute("controller_name","tWzRepairController"); + return new ModelAndView("common/upload/pub_excel_upload"); + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXls") + public String exportXls(TWzRepairEntity tWzRepair, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { + CriteriaQuery cq = new CriteriaQuery(TWzRepairEntity.class, dataGrid); + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzRepair, request.getParameterMap()); + List tWzRepairs = this.tWzRepairService.getListByCriteriaQuery(cq,false); + modelMap.put(NormalExcelConstants.FILE_NAME,"交旧领新登记表"); + modelMap.put(NormalExcelConstants.CLASS,TWzRepairEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("交旧领新登记表列表", "导出人:"+ ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,tWzRepairs); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + /** + * 导出excel 使模板 + * + * @param request + * @param response + */ + @RequestMapping(params = "exportXlsByT") + public String exportXlsByT(TWzRepairEntity tWzRepair, HttpServletRequest request, HttpServletResponse response + , DataGrid dataGrid, ModelMap modelMap) { + modelMap.put(NormalExcelConstants.FILE_NAME,"交旧领新登记表"); + modelMap.put(NormalExcelConstants.CLASS,TWzRepairEntity.class); + modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("交旧领新登记表列表", "导出人:"+ ResourceUtil.getSessionUserName().getRealName(), + "导出信息")); + modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + + @SuppressWarnings("unchecked") + @RequestMapping(params = "importExcel", method = RequestMethod.POST) + @ResponseBody + public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { + AjaxJson j = new AjaxJson(); + + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List listTWzRepairEntitys = ExcelImportUtil.importExcel(file.getInputStream(),TWzRepairEntity.class,params); + for (TWzRepairEntity tWzRepair : listTWzRepairEntitys) { + tWzRepairService.save(tWzRepair); + } + j.setMsg("文件导入成功!"); + } catch (Exception e) { + j.setMsg("文件导入失败!"); + logger.error(ExceptionUtil.getExceptionMessage(e)); + }finally{ + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return j; + } + + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public List list() { + List listTWzRepairs=tWzRepairService.getList(TWzRepairEntity.class); + return listTWzRepairs; + } + + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + public ResponseEntity get(@PathVariable("id") String id) { + TWzRepairEntity task = tWzRepairService.get(TWzRepairEntity.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 TWzRepairEntity tWzRepair, UriComponentsBuilder uriBuilder) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(tWzRepair); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + tWzRepairService.save(tWzRepair); + } catch (Exception e) { + e.printStackTrace(); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + //按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象. + String id = tWzRepair.getId(); + URI uri = uriBuilder.path("/rest/tWzRepairController/" + 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 TWzRepairEntity tWzRepair) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(tWzRepair); + if (!failures.isEmpty()) { + return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST); + } + + //保存 + try{ + tWzRepairService.saveOrUpdate(tWzRepair); + } 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) { + tWzRepairService.deleteEntityById(TWzRepairEntity.class, id); + } +} diff --git a/src/main/java/com/zzjee/wzrepair/entity/TWzRepairEntity.java b/src/main/java/com/zzjee/wzrepair/entity/TWzRepairEntity.java new file mode 100644 index 00000000..644206c7 --- /dev/null +++ b/src/main/java/com/zzjee/wzrepair/entity/TWzRepairEntity.java @@ -0,0 +1,474 @@ +package com.zzjee.wzrepair.entity; + +import org.hibernate.annotations.GenericGenerator; +import org.jeecgframework.poi.excel.annotation.Excel; + +import javax.persistence.*; +import java.util.Date; + +/** + * @Title: Entity + * @Description: 交旧领新登记表 + * @author onlineGenerator + * @date 2020-02-24 11:36:29 + * @version V1.0 + * + */ +@Entity +@Table(name = "t_wz_repair", schema = "") +@SuppressWarnings("serial") +public class TWzRepairEntity implements java.io.Serializable { + /**主键*/ + private String id; + /**创建人名称*/ + @Excel(name="创建人名称") + private String createName; + /**创建人登录名称*/ + @Excel(name="创建人登录名称") + private String createBy; + /**创建日期*/ + @Excel(name="创建日期",format = "yyyy-MM-dd") + private Date createDate; + /**更新人名称*/ + private String updateName; + /**更新人登录名称*/ + private String updateBy; + /**更新日期*/ + private Date updateDate; + /**所属部门*/ + private String sysOrgCode; + /**所属公司*/ + private String sysCompanyCode; + /**流程状态*/ + private String bpmStatus; + /**物料编码*/ + @Excel(name="物料编码") + private String matCode; + /**物料名称*/ + @Excel(name="物料名称") + private String matName; + /**库存地点*/ + @Excel(name="库存地点") + private String matLocation; + /**数量*/ + @Excel(name="数量") + private String matQty; + /**规格*/ + @Excel(name="规格") + private String matGuige; + /**单位*/ + @Excel(name="单位") + private String matUnit; + /**原价值*/ + @Excel(name="原价值") + private String matOriamount; + /**现价值*/ + @Excel(name="现价值") + private String matNowamount; + /**修复时间*/ + @Excel(name="修复时间") + private String repairDate; + /**修复人*/ + @Excel(name="修复人") + private String repairUser; + /**验收人*/ + @Excel(name="验收人") + private String qmUser; + /**修复备注*/ + @Excel(name="修复备注") + private String repairRemark; + /**出库单号*/ + @Excel(name="出库单号") + private String ckId; + /**出库项目*/ + @Excel(name="出库项目") + private String ckItmeId; + + /** + *方法: 取得java.lang.String + *@return: java.lang.String 主键 + */ + @Id + @GeneratedValue(generator = "paymentableGenerator") + @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") + @Column(name ="ID",nullable=false,length=36) + public String getId(){ + return this.id; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 主键 + */ + public void setId(String id){ + this.id = id; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人名称 + */ + @Column(name ="CREATE_NAME",nullable=true,length=50) + public String getCreateName(){ + return this.createName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人名称 + */ + public void setCreateName(String createName){ + this.createName = createName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 创建人登录名称 + */ + @Column(name ="CREATE_BY",nullable=true,length=50) + public String getCreateBy(){ + return this.createBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 创建人登录名称 + */ + public void setCreateBy(String createBy){ + this.createBy = createBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 创建日期 + */ + @Column(name ="CREATE_DATE",nullable=true,length=20) + public Date getCreateDate(){ + return this.createDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 创建日期 + */ + public void setCreateDate(Date createDate){ + this.createDate = createDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人名称 + */ + @Column(name ="UPDATE_NAME",nullable=true,length=50) + public String getUpdateName(){ + return this.updateName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人名称 + */ + public void setUpdateName(String updateName){ + this.updateName = updateName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 更新人登录名称 + */ + @Column(name ="UPDATE_BY",nullable=true,length=50) + public String getUpdateBy(){ + return this.updateBy; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 更新人登录名称 + */ + public void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + /** + *方法: 取得java.util.Date + *@return: java.util.Date 更新日期 + */ + @Column(name ="UPDATE_DATE",nullable=true,length=20) + public Date getUpdateDate(){ + return this.updateDate; + } + + /** + *方法: 设置java.util.Date + *@param: java.util.Date 更新日期 + */ + public void setUpdateDate(Date updateDate){ + this.updateDate = updateDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属部门 + */ + @Column(name ="SYS_ORG_CODE",nullable=true,length=50) + public String getSysOrgCode(){ + return this.sysOrgCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属部门 + */ + public void setSysOrgCode(String sysOrgCode){ + this.sysOrgCode = sysOrgCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 所属公司 + */ + @Column(name ="SYS_COMPANY_CODE",nullable=true,length=50) + public String getSysCompanyCode(){ + return this.sysCompanyCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 所属公司 + */ + public void setSysCompanyCode(String sysCompanyCode){ + this.sysCompanyCode = sysCompanyCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 流程状态 + */ + @Column(name ="BPM_STATUS",nullable=true,length=32) + public String getBpmStatus(){ + return this.bpmStatus; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 流程状态 + */ + public void setBpmStatus(String bpmStatus){ + this.bpmStatus = bpmStatus; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 物料编码 + */ + @Column(name ="MAT_CODE",nullable=true,length=32) + public String getMatCode(){ + return this.matCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 物料编码 + */ + public void setMatCode(String matCode){ + this.matCode = matCode; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 物料名称 + */ + @Column(name ="MAT_NAME",nullable=true,length=64) + public String getMatName(){ + return this.matName; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 物料名称 + */ + public void setMatName(String matName){ + this.matName = matName; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 库存地点 + */ + @Column(name ="MAT_LOCATION",nullable=true,length=32) + public String getMatLocation(){ + return this.matLocation; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 库存地点 + */ + public void setMatLocation(String matLocation){ + this.matLocation = matLocation; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 数量 + */ + @Column(name ="MAT_QTY",nullable=true,length=32) + public String getMatQty(){ + return this.matQty; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 数量 + */ + public void setMatQty(String matQty){ + this.matQty = matQty; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 规格 + */ + @Column(name ="MAT_GUIGE",nullable=true,length=32) + public String getMatGuige(){ + return this.matGuige; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 规格 + */ + public void setMatGuige(String matGuige){ + this.matGuige = matGuige; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 单位 + */ + @Column(name ="MAT_UNIT",nullable=true,length=32) + public String getMatUnit(){ + return this.matUnit; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 单位 + */ + public void setMatUnit(String matUnit){ + this.matUnit = matUnit; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 原价值 + */ + @Column(name ="MAT_ORIAMOUNT",nullable=true,length=32) + public String getMatOriamount(){ + return this.matOriamount; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 原价值 + */ + public void setMatOriamount(String matOriamount){ + this.matOriamount = matOriamount; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 现价值 + */ + @Column(name ="MAT_NOWAMOUNT",nullable=true,length=32) + public String getMatNowamount(){ + return this.matNowamount; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 现价值 + */ + public void setMatNowamount(String matNowamount){ + this.matNowamount = matNowamount; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 修复时间 + */ + @Column(name ="REPAIR_DATE",nullable=true,length=32) + public String getRepairDate(){ + return this.repairDate; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 修复时间 + */ + public void setRepairDate(String repairDate){ + this.repairDate = repairDate; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 修复人 + */ + @Column(name ="REPAIR_USER",nullable=true,length=32) + public String getRepairUser(){ + return this.repairUser; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 修复人 + */ + public void setRepairUser(String repairUser){ + this.repairUser = repairUser; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 验收人 + */ + @Column(name ="QM_USER",nullable=true,length=32) + public String getQmUser(){ + return this.qmUser; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 验收人 + */ + public void setQmUser(String qmUser){ + this.qmUser = qmUser; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 修复备注 + */ + @Column(name ="REPAIR_REMARK",nullable=true,length=320) + public String getRepairRemark(){ + return this.repairRemark; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 修复备注 + */ + public void setRepairRemark(String repairRemark){ + this.repairRemark = repairRemark; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 出库单号 + */ + @Column(name ="CK_ID",nullable=true,length=32) + public String getCkId(){ + return this.ckId; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 出库单号 + */ + public void setCkId(String ckId){ + this.ckId = ckId; + } + /** + *方法: 取得java.lang.String + *@return: java.lang.String 出库项目 + */ + @Column(name ="CK_ITME_ID",nullable=true,length=32) + public String getCkItmeId(){ + return this.ckItmeId; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 出库项目 + */ + public void setCkItmeId(String ckItmeId){ + this.ckItmeId = ckItmeId; + } +} diff --git a/src/main/java/com/zzjee/wzrepair/service/TWzRepairServiceI.java b/src/main/java/com/zzjee/wzrepair/service/TWzRepairServiceI.java new file mode 100644 index 00000000..51736461 --- /dev/null +++ b/src/main/java/com/zzjee/wzrepair/service/TWzRepairServiceI.java @@ -0,0 +1,15 @@ +package com.zzjee.wzrepair.service; +import com.zzjee.wzrepair.entity.TWzRepairEntity; +import org.jeecgframework.core.common.service.CommonService; + +import java.io.Serializable; + +public interface TWzRepairServiceI extends CommonService { + + public void delete(TWzRepairEntity entity) throws Exception; + + public Serializable save(TWzRepairEntity entity) throws Exception; + + public void saveOrUpdate(TWzRepairEntity entity) throws Exception; + +} diff --git a/src/main/java/com/zzjee/wzrepair/service/impl/TWzRepairServiceImpl.java b/src/main/java/com/zzjee/wzrepair/service/impl/TWzRepairServiceImpl.java new file mode 100644 index 00000000..5980becb --- /dev/null +++ b/src/main/java/com/zzjee/wzrepair/service/impl/TWzRepairServiceImpl.java @@ -0,0 +1,166 @@ +package com.zzjee.wzrepair.service.impl; + +import com.zzjee.wzrepair.entity.TWzRepairEntity; +import com.zzjee.wzrepair.service.TWzRepairServiceI; +import org.jeecgframework.core.common.service.impl.CommonServiceImpl; +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; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +@Service("tWzRepairService") +@Transactional +public class TWzRepairServiceImpl extends CommonServiceImpl implements TWzRepairServiceI { + + + public void delete(TWzRepairEntity entity) throws Exception{ + super.delete(entity); + //执行删除操作增强业务 + this.doDelBus(entity); + } + + public Serializable save(TWzRepairEntity entity) throws Exception{ + Serializable t = super.save(entity); + //执行新增操作增强业务 + this.doAddBus(entity); + return t; + } + + public void saveOrUpdate(TWzRepairEntity entity) throws Exception{ + super.saveOrUpdate(entity); + //执行更新操作增强业务 + this.doUpdateBus(entity); + } + + /** + * 新增操作增强业务 + * @param t + * @return + */ + private void doAddBus(TWzRepairEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 更新操作增强业务 + * @param t + * @return + */ + private void doUpdateBus(TWzRepairEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + /** + * 删除操作增强业务 + * @param id + * @return + */ + private void doDelBus(TWzRepairEntity t) throws Exception{ + //-----------------sql增强 start---------------------------- + //-----------------sql增强 end------------------------------ + + //-----------------java增强 start--------------------------- + //-----------------java增强 end----------------------------- + } + + private Map populationMap(TWzRepairEntity t){ + Map map = new HashMap(); + map.put("id", t.getId()); + map.put("create_name", t.getCreateName()); + map.put("create_by", t.getCreateBy()); + map.put("create_date", t.getCreateDate()); + map.put("update_name", t.getUpdateName()); + map.put("update_by", t.getUpdateBy()); + map.put("update_date", t.getUpdateDate()); + map.put("sys_org_code", t.getSysOrgCode()); + map.put("sys_company_code", t.getSysCompanyCode()); + map.put("bpm_status", t.getBpmStatus()); + map.put("mat_code", t.getMatCode()); + map.put("mat_name", t.getMatName()); + map.put("mat_location", t.getMatLocation()); + map.put("mat_qty", t.getMatQty()); + map.put("mat_guige", t.getMatGuige()); + map.put("mat_unit", t.getMatUnit()); + map.put("mat_oriamount", t.getMatOriamount()); + map.put("mat_nowamount", t.getMatNowamount()); + map.put("repair_date", t.getRepairDate()); + map.put("repair_user", t.getRepairUser()); + map.put("qm_user", t.getQmUser()); + map.put("repair_remark", t.getRepairRemark()); + map.put("ck_id", t.getCkId()); + map.put("ck_itme_id", t.getCkItmeId()); + return map; + } + + /** + * 替换sql中的变量 + * @param sql + * @param t + * @return + */ + public String replaceVal(String sql,TWzRepairEntity t){ + sql = sql.replace("#{id}",String.valueOf(t.getId())); + sql = sql.replace("#{create_name}",String.valueOf(t.getCreateName())); + sql = sql.replace("#{create_by}",String.valueOf(t.getCreateBy())); + sql = sql.replace("#{create_date}",String.valueOf(t.getCreateDate())); + sql = sql.replace("#{update_name}",String.valueOf(t.getUpdateName())); + sql = sql.replace("#{update_by}",String.valueOf(t.getUpdateBy())); + sql = sql.replace("#{update_date}",String.valueOf(t.getUpdateDate())); + sql = sql.replace("#{sys_org_code}",String.valueOf(t.getSysOrgCode())); + sql = sql.replace("#{sys_company_code}",String.valueOf(t.getSysCompanyCode())); + sql = sql.replace("#{bpm_status}",String.valueOf(t.getBpmStatus())); + sql = sql.replace("#{mat_code}",String.valueOf(t.getMatCode())); + sql = sql.replace("#{mat_name}",String.valueOf(t.getMatName())); + sql = sql.replace("#{mat_location}",String.valueOf(t.getMatLocation())); + sql = sql.replace("#{mat_qty}",String.valueOf(t.getMatQty())); + sql = sql.replace("#{mat_guige}",String.valueOf(t.getMatGuige())); + sql = sql.replace("#{mat_unit}",String.valueOf(t.getMatUnit())); + sql = sql.replace("#{mat_oriamount}",String.valueOf(t.getMatOriamount())); + sql = sql.replace("#{mat_nowamount}",String.valueOf(t.getMatNowamount())); + sql = sql.replace("#{repair_date}",String.valueOf(t.getRepairDate())); + sql = sql.replace("#{repair_user}",String.valueOf(t.getRepairUser())); + sql = sql.replace("#{qm_user}",String.valueOf(t.getQmUser())); + sql = sql.replace("#{repair_remark}",String.valueOf(t.getRepairRemark())); + sql = sql.replace("#{ck_id}",String.valueOf(t.getCkId())); + sql = sql.replace("#{ck_itme_id}",String.valueOf(t.getCkItmeId())); + sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); + return sql; + } + + /** + * 执行JAVA增强 + */ + private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map data) throws Exception { + if(StringUtil.isNotEmpty(cgJavaValue)){ + Object obj = null; + try { + if("class".equals(cgJavaType)){ + //因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断 + obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance(); + }else if("spring".equals(cgJavaType)){ + obj = ApplicationContextUtil.getContext().getBean(cgJavaValue); + } + if(obj instanceof CgformEnhanceJavaInter){ + CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj; + javaInter.execute("t_wz_repair",data); + } + } catch (Exception e) { + e.printStackTrace(); + throw new Exception("执行JAVA增强出现异常!"); + } + } + } +} diff --git a/src/main/java/com/zzjee/wzrepair/util/constant.java b/src/main/java/com/zzjee/wzrepair/util/constant.java new file mode 100644 index 00000000..ccd0c671 --- /dev/null +++ b/src/main/java/com/zzjee/wzrepair/util/constant.java @@ -0,0 +1,10 @@ +package com.zzjee.wzrepair.util; + +public class constant { + public static final String WZ_YWLX_JJLX="交旧领新"; +// 再利用程度 wz_zlycd +// 业务类型 wz_ywlx +// 出库类别 wz_cklb + + +} diff --git a/src/main/java/com/zzjee/wzyw/controller/TWzCkHeadController.java b/src/main/java/com/zzjee/wzyw/controller/TWzCkHeadController.java index f73c404c..b7e0a5d6 100644 --- a/src/main/java/com/zzjee/wzyw/controller/TWzCkHeadController.java +++ b/src/main/java/com/zzjee/wzyw/controller/TWzCkHeadController.java @@ -1,86 +1,80 @@ package com.zzjee.wzyw.controller; + +import com.alibaba.fastjson.JSONArray; +import com.zzjee.md.entity.MvGoodsEntity; import com.zzjee.util.ReportUtils; -import com.zzjee.wzyw.entity.*; -import com.zzjee.wzyw.service.TWzCkHeadServiceI; +import com.zzjee.wm.entity.WmOmNoticeHEntity; +import com.zzjee.wm.entity.WmOmNoticeIEntity; +import com.zzjee.wm.service.WmOmNoticeHServiceI; +import com.zzjee.wmutil.wmUtil; +import com.zzjee.wz.entity.TWzMaterialEntity; +import com.zzjee.wzrepair.entity.TWzRepairEntity; +import com.zzjee.wzrepair.service.TWzRepairServiceI; +import com.zzjee.wzyw.entity.TWzCkHeadEntity; +import com.zzjee.wzyw.entity.TWzCkItemDto; +import com.zzjee.wzyw.entity.TWzCkItemEntity; import com.zzjee.wzyw.page.TWzCkHeadPage; - -import java.awt.image.BufferedImage; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.imageio.ImageIO; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import com.zzjee.wzyw.service.TWzCkHeadServiceI; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; -import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFPrintSetup; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; -import org.jeecgframework.core.common.dao.jdbc.JdbcDao; -import org.jeecgframework.core.util.*; -import org.jeecgframework.web.system.pojo.base.TSUser; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -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.servlet.ModelAndView; - +import org.jeecgframework.core.beanvalidator.BeanValidators; import org.jeecgframework.core.common.controller.BaseController; +import org.jeecgframework.core.common.dao.jdbc.JdbcDao; 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.constant.Globals; -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.*; +import org.jeecgframework.jwt.util.ResponseMessage; +import org.jeecgframework.jwt.util.Result; 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.vo.NormalExcelConstants; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.pojo.base.TSUser; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; -import java.io.IOException; -import java.util.Map; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; -import org.apache.commons.lang3.StringUtils; -import org.jeecgframework.jwt.util.GsonUtil; -import org.jeecgframework.jwt.util.ResponseMessage; -import org.jeecgframework.jwt.util.Result; -import com.alibaba.fastjson.JSONArray; -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.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; -/** +/** * @Title: Controller * @Description: 物料出库 * @author onlineGenerator * @date 2018-05-20 21:43:29 - * @version V1.0 + * @version V1.0 * */ @Api(value="TWzCkHead",description="物料出库",tags="tWzCkHeadController") @@ -100,11 +94,14 @@ public class TWzCkHeadController extends BaseController { private Validator validator; @Autowired - JdbcDao jdbcDao; - + JdbcDao jdbcDao; + @Autowired + private WmOmNoticeHServiceI wmOmNoticeHService; + @Autowired + private TWzRepairServiceI tWzRepairService; /** * 物料出库列表 页面跳转 - * + * * @return */ @RequestMapping(params = "list") @@ -117,7 +114,7 @@ public class TWzCkHeadController extends BaseController { } /** * easyui AJAX请求数据 - * + * * @param request * @param response * @param dataGrid @@ -161,7 +158,10 @@ public class TWzCkHeadController extends BaseController { if(StringUtil.isNotEmpty(query_docDate_end)){ cq.le("docDate", Integer.parseInt(query_docDate_end)); } - cq.eq("bpmStatus","2"); + String[] ina = new String[2]; + ina[0]="2"; + ina[1]="3"; + cq.in("bpmStatus",ina); // cq.eq("updateBy",ResourceUtil.getSessionUser().getUserName()); }catch (Exception e) { throw new BusinessException(e.getMessage()); @@ -175,7 +175,7 @@ public class TWzCkHeadController extends BaseController { /** * 删除物料出库 - * + * * @return */ @RequestMapping(params = "doDel") @@ -198,12 +198,12 @@ public class TWzCkHeadController extends BaseController { /** * 批量删除物料出库 - * + * * @return */ @RequestMapping(params = "doBatchDel") @ResponseBody - public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + public AjaxJson doBatchDel(String ids, HttpServletRequest request){ AjaxJson j = new AjaxJson(); String message = "物料出库删除成功"; try{ @@ -211,6 +211,8 @@ public class TWzCkHeadController extends BaseController { TWzCkHeadEntity tWzCkHead = systemService.getEntity(TWzCkHeadEntity.class, Integer.parseInt(id) ); +// tWzCkHead.setBpmStatus("已删除"); +// systemService.updateEntitie(tWzCkHead); tWzCkHeadService.delMain(tWzCkHead); systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); } @@ -231,7 +233,7 @@ public class TWzCkHeadController extends BaseController { */ @RequestMapping(params = "doAddcheck") @ResponseBody - public AjaxJson doAddcheck(String mat_code ,String mat_location,String mat_qty, HttpServletRequest request) { + public AjaxJson doAddcheck(String mat_code , String mat_location, String mat_qty, HttpServletRequest request) { AjaxJson j = new AjaxJson(); String message = "库存充足"; try{ @@ -264,12 +266,12 @@ public class TWzCkHeadController extends BaseController { /** * 添加物料出库 - * + * * @return */ @RequestMapping(params = "doAdd") @ResponseBody - public AjaxJson doAdd(TWzCkHeadEntity tWzCkHead,TWzCkHeadPage tWzCkHeadPage, HttpServletRequest request) { + public AjaxJson doAdd(TWzCkHeadEntity tWzCkHead, TWzCkHeadPage tWzCkHeadPage, HttpServletRequest request) { List tWzCkItemList = tWzCkHeadPage.getTWzCkItemList(); AjaxJson j = new AjaxJson(); String message = "添加成功"; @@ -281,10 +283,10 @@ public class TWzCkHeadController extends BaseController { } try{ - String[] strs = tWzCkHead.getCkUsername() .split(","); +// String[] strs = tWzCkHead.getCkUsername() .split(","); //第一个分号之前的字符串自然就是数组里的第一个 - String userid = strs[0]; - TSUser user = systemService.get(TSUser.class,userid); + String username = tWzCkHead.getCkUsername(); + TSUser user = systemService.findUniqueByProperty(TSUser.class,"userName",username); tWzCkHead.setCkName(user.getRealName()); tWzCkHead.setCkUsername(user.getUserName()); tWzCkHead.setOrgCode(user.getUserOrgList().get(0).getTsDepart().getOrgCode()); @@ -319,7 +321,7 @@ public class TWzCkHeadController extends BaseController { String hql0 = "from TWzCkItemEntity where 1 = 1 AND wZCK_HID = ? "; String sql = "select c.mat_code,c.mat_name,c.mat_location,h.ck_name,c.mat_qty,c.mat_unit,c.mat_price,(c.mat_qty*c.mat_price) as mat_amount,c.create_date\n" + " from t_wz_ck_item c LEFT JOIN t_wz_ck_head h ON c.wzck_hid = h.id where c.wzck_hid = " + id; - List tWzCkItemOldList = jdbcDao.find(sql,TWzCkItemDto.class,null); + List tWzCkItemOldList = jdbcDao.find(sql, TWzCkItemDto.class,null); try { StringBuffer sber = new StringBuffer(); @@ -337,14 +339,14 @@ public class TWzCkHeadController extends BaseController { sheet.setMargin(HSSFSheet.LeftMargin,0.8);// 页边距(左) sheet.setMargin(HSSFSheet.RightMargin,0.0);// 页边距(右 sheet.setColumnWidth(0, 5 * 256); - sheet.setColumnWidth(1, 8 * 256); - sheet.setColumnWidth(2, 8 * 200); + sheet.setColumnWidth(1, 10 * 256); + sheet.setColumnWidth(2, 15 * 200); sheet.setColumnWidth(3, 10 * 256); sheet.setColumnWidth(4, 10 * 256); sheet.setColumnWidth(5, 10 * 256); - sheet.setColumnWidth(6, 10 * 256); - sheet.setColumnWidth(7, 10 * 256); - sheet.setColumnWidth(8, 15 * 256); + sheet.setColumnWidth(6, 5 * 256); + sheet.setColumnWidth(7, 5 * 256); + sheet.setColumnWidth(8, 10 * 256); //{ "序号", "物料编码", "物料名称", "仓库", "领用人", "数量", "单位", "单价","金额" } // sheet.setColumnWidth(7, 8 * 256); // sheet.setColumnWidth(8, 8 * 256); @@ -420,19 +422,19 @@ public class TWzCkHeadController extends BaseController { Row rowHead1 = sheet.createRow((short) 2); // 头部第一行 rowHead1.setHeight((short) 500); Cell cellHead11 = rowHead1.createCell(0); - cellHead11.setCellValue("出库单号:" + id); + cellHead11.setCellValue("出库单号:" + id+" 类型:" + tWzCkHead.getBy2()); cellHead11.setCellStyle(cs2); - Cell cellHead12 = rowHead1.createCell(4); + Cell cellHead12 = rowHead1.createCell(6); - cellHead12.setCellValue("出库日期:" + DateUtils.date2Str(tWzCkHead.getCreateDate(),DateUtils.date_sdf)); + cellHead12.setCellValue("出库日期:" + DateUtils.date2Str(tWzCkHead.getCreateDate(), DateUtils.date_sdf)); cellHead12.setCellStyle(cs2); // 合并单元格 CellRangeAddress c = new CellRangeAddress(0, 0, 0, 8); // 第一行空白 CellRangeAddress c0 = new CellRangeAddress(1, 1, 0, 8);// 第二行标题 - CellRangeAddress c11 = new CellRangeAddress(2, 2, 0, 3);// 第三行供应商 - CellRangeAddress c12 = new CellRangeAddress(2, 2, 4, 8);// 第三行单据日期 + CellRangeAddress c11 = new CellRangeAddress(2, 2, 0, 5);// 第三行供应商 + CellRangeAddress c12 = new CellRangeAddress(2, 2, 6, 8);// 第三行单据日期 sheet.addMergedRegion(c); sheet.addMergedRegion(c0); @@ -446,7 +448,7 @@ public class TWzCkHeadController extends BaseController { "金额" }; Double totalAmount = 0d; - Integer totalNumber = 0; + Double totalNumber = 0d; for (int i = 0; i < columnNames.length; i++) { Cell cell = rowColumnName.createCell(i); @@ -497,9 +499,9 @@ public class TWzCkHeadController extends BaseController { Cell cell6 = rowColumnValue.createCell(5); - cell6.setCellValue(entity.getMatQty()); + cell6.setCellValue(StringUtil.moneyToString(entity.getMatQty(),"#.0000")); cell6.setCellStyle(cs3); - totalNumber = totalNumber + Integer.parseInt(entity.getMatQty()); + totalNumber = totalNumber + Double.parseDouble(entity.getMatQty()); }catch (Exception e){ } @@ -512,14 +514,14 @@ public class TWzCkHeadController extends BaseController { } try { Cell cell8 = rowColumnValue.createCell(7); - cell8.setCellValue(entity.getMatPrice()); + cell8.setCellValue(StringUtil.moneyToString(entity.getMatPrice(),"#.00")); cell8.setCellStyle(cs3); }catch (Exception e){ } try { Cell cell9 = rowColumnValue.createCell(8); - cell9.setCellValue(entity.getMatAmount()); + cell9.setCellValue(StringUtil.moneyToString(entity.getMatAmount(),"#.00")); cell9.setCellStyle(cs3); totalAmount = totalAmount + Double.parseDouble(entity.getMatAmount()); }catch (Exception e){ @@ -534,7 +536,7 @@ public class TWzCkHeadController extends BaseController { cellrow.setCellValue("合计"); cellrow.setCellStyle(cs4); Cell cellTotatl2 = rowColumnInfo.createCell(5); - cellTotatl2.setCellValue(totalNumber); + cellTotatl2.setCellValue(StringUtil.moneyToString(totalNumber,"#.0000")); cellTotatl2.setCellStyle(cs3); Cell cellTotatl3 = rowColumnInfo.createCell(6); cellTotatl3.setCellValue(""); @@ -543,7 +545,7 @@ public class TWzCkHeadController extends BaseController { cellTotatl4.setCellValue(""); cellTotatl4.setCellStyle(cs3); Cell cellTotatl5 = rowColumnInfo.createCell(8); - cellTotatl5.setCellValue(totalAmount); + cellTotatl5.setCellValue(StringUtil.moneyToString(totalAmount,"#.00")); cellTotatl5.setCellStyle(cs3); //合并单元格 CellRangeAddress cellTotal = new CellRangeAddress(1 + cellsNum, 1 + cellsNum, 0, 4); @@ -553,7 +555,7 @@ public class TWzCkHeadController extends BaseController { //底部合计金额大写转为汉字 Row rowColumnInfo2 = sheet.createRow((short) 2 + cellsNum); // 列名 Cell cellrow2 = rowColumnInfo2.createCell(0); - cellrow2.setCellValue("合计金额大写:" + ReportUtils.number2CNMontrayUnit(new BigDecimal(totalAmount))); + cellrow2.setCellValue("合计金额大写:" + ReportUtils.number2CNMontrayUnit(new BigDecimal(StringUtil.moneyToString(totalAmount,"#.00")))); cellrow2.setCellStyle(cs4); //合并单元格 CellRangeAddress cellAmount = new CellRangeAddress(2 + cellsNum, 2 + cellsNum, 0, 8); @@ -601,13 +603,91 @@ public class TWzCkHeadController extends BaseController { String message = "审批成功"; try{ TWzCkHeadEntity tWzCkHead = systemService.get(TWzCkHeadEntity.class,Integer.parseInt(id)); - tWzCkHead.setBpmStatus("1");String hql0 = "from TWzCkItemEntity where 1 = 1 AND wzck_hid = ? "; + tWzCkHead.setBpmStatus("1"); + String hql0 = "from TWzCkItemEntity where 1 = 1 AND wzck_hid = ? "; List tWzCkItemList = systemService.findHql(hql0,id); for (TWzCkItemEntity tWzCkItemEntity : tWzCkItemList) { tWzCkItemEntity.setBpmStatus("1"); systemService.saveOrUpdate(tWzCkItemEntity); + TWzRepairEntity tWzRepairEntity = new TWzRepairEntity(); + tWzRepairEntity.setCkId(tWzCkHead.getId().toString()); + tWzRepairEntity.setCkItmeId(tWzCkItemEntity.getId()); + tWzRepairEntity.setMatCode(tWzCkItemEntity.getMatCode()); + tWzRepairEntity.setMatName(tWzCkItemEntity.getMatName()); + tWzRepairEntity.setMatLocation(tWzCkItemEntity.getMatLocation()); + tWzRepairEntity.setMatQty(tWzCkItemEntity.getMatQty()); + TWzMaterialEntity wz = systemService.findUniqueByProperty(TWzMaterialEntity.class, "matCode", tWzCkItemEntity.getMatCode()); + tWzRepairEntity.setMatGuige(wz.getMatGuige()); + tWzRepairService.save(tWzRepairEntity); } systemService.saveOrUpdate(tWzCkHead); + String cuscosde = ""; + String ckid = tWzCkHead.getId().toString(); + List wmomh = systemService.findByProperty(WmOmNoticeHEntity.class, "imCusCode", ckid); + if(wmomh!=null&&wmomh.size()>0){ + message="出库通知已生成"; + j.setMsg(message); + return j; + } + + List wmomNoticeIListnew = new ArrayList(); + for (TWzCkItemEntity page : tWzCkItemList) { + WmOmNoticeIEntity wmi = new WmOmNoticeIEntity(); + wmi.setGoodsId(page.getMatCode()); + MvGoodsEntity mvgoods = systemService.findUniqueByProperty( + MvGoodsEntity.class, "goodsCode", wmi.getGoodsId()); + if (mvgoods != null) { + wmi.setGoodsName(mvgoods.getGoodsName()); + wmi.setGoodsUnit(mvgoods.getShlDanWei()); + } + try{ + wmi.setGoodsQua(page.getMatQty()); + String[] args=page.getMatQty().split("\\."); + wmi.setGoodsQua(args[0]); + }catch (Exception e){ + + } + +// wmi.setGoodsPrdData(billResult.getData().get(s).getDetail().get(k).getPdProdmadedate2User()); + wmi.setOtherId(page.getId()); +// wmi.setBinId(page.getBinId()); +// wmi.setBinOm(page.getBinOm()); + if(StringUtil.isNotEmpty(page.getMatBatch())){ + try{ + wmi.setGoodsProData(DateUtils.str2Date(page.getMatBatch(), DateUtils.date_sdf)); + + }catch (Exception e){ + + } + } + wmomNoticeIListnew.add(wmi); + } + WmOmNoticeHEntity wmOmNoticeH = new WmOmNoticeHEntity(); +// wmOmNoticeH.setReMember(pageheader.getReMember()); +// wmOmNoticeH.setReCarno(pageheader.getReCarno()); +// wmOmNoticeH.setDelvMember(pageheader.getDelvMember()); +// wmOmNoticeH.setDelvMobile(pageheader.getDelvMobile()); +// wmOmNoticeH.setDelvData(DateUtils.date2Str()tWzCkHead.getDocDate()); + wmOmNoticeH.setOrderTypeCode("11"); + wmOmNoticeH.setCusCode(cuscosde); + String noticeid = wmUtil.getNextomNoticeId(wmOmNoticeH.getOrderTypeCode()); + wmOmNoticeH.setOmNoticeId(noticeid); + wmOmNoticeH.setOmBeizhu(tWzCkHead.getCkRemark()); + + wmOmNoticeH.setImCusCode(ckid); + wmOmNoticeHService.addMain(wmOmNoticeH, wmomNoticeIListnew); + + + + + + + + + + + + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); }catch(Exception e){ e.printStackTrace(); @@ -622,12 +702,12 @@ public class TWzCkHeadController extends BaseController { /** * 更新物料出库 - * + * * @return */ @RequestMapping(params = "doUpdate") @ResponseBody - public AjaxJson doUpdate(TWzCkHeadEntity tWzCkHead,TWzCkHeadPage tWzCkHeadPage, HttpServletRequest request) { + public AjaxJson doUpdate(TWzCkHeadEntity tWzCkHead, TWzCkHeadPage tWzCkHeadPage, HttpServletRequest request) { List tWzCkItemList = tWzCkHeadPage.getTWzCkItemList(); AjaxJson j = new AjaxJson(); String message = "更新成功"; @@ -658,7 +738,7 @@ public class TWzCkHeadController extends BaseController { /** * 物料出库新增页面跳转 - * + * * @return */ @RequestMapping(params = "goAdd") @@ -667,12 +747,16 @@ public class TWzCkHeadController extends BaseController { tWzCkHead = tWzCkHeadService.getEntity(TWzCkHeadEntity.class, tWzCkHead.getId()); req.setAttribute("tWzCkHeadPage", tWzCkHead); } + + req.setAttribute("username", ResourceUtil.getSessionUser().getUserName()); + req.setAttribute("usernametext", ResourceUtil.getSessionUser().getRealName()); + return new ModelAndView("com/zzjee/wzyw/tWzCkHead-add"); } - + /** * 物料出库编辑页面跳转 - * + * * @return */ @RequestMapping(params = "goUpdate") @@ -683,16 +767,16 @@ public class TWzCkHeadController extends BaseController { } return new ModelAndView("com/zzjee/wzyw/tWzCkHead-update"); } - - + + /** * 加载明细列表[出库商品] - * + * * @return */ @RequestMapping(params = "tWzCkItemList") public ModelAndView tWzCkItemList(TWzCkHeadEntity tWzCkHead, HttpServletRequest req) { - + //=================================================================================== //获取参数 Object id0 = tWzCkHead.getId(); @@ -738,7 +822,7 @@ public class TWzCkHeadController extends BaseController { * @param response */ @RequestMapping(params = "exportXls") - public String exportXls(TWzCkHeadEntity tWzCkHead,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid,ModelMap map) { + public String exportXls(TWzCkHeadEntity tWzCkHead, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid, ModelMap map) { CriteriaQuery cq = new CriteriaQuery(TWzCkHeadEntity.class, dataGrid); //查询条件组装器 org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzCkHead); @@ -767,7 +851,7 @@ public class TWzCkHeadController extends BaseController { } map.put(NormalExcelConstants.FILE_NAME,"物料出库"); map.put(NormalExcelConstants.CLASS,TWzCkHeadPage.class); - map.put(NormalExcelConstants.PARAMS,new ExportParams("物料出库列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + map.put(NormalExcelConstants.PARAMS,new ExportParams("物料出库列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); map.put(NormalExcelConstants.DATA_LIST,pageList); return NormalExcelConstants.JEECG_EXCEL_VIEW; @@ -836,7 +920,7 @@ public class TWzCkHeadController extends BaseController { return new ModelAndView("common/upload/pub_excel_upload"); } - + @RequestMapping(method = RequestMethod.GET) @ResponseBody @ApiOperation(value="物料出库列表信息",produces="application/json",httpMethod="GET") @@ -860,7 +944,7 @@ public class TWzCkHeadController extends BaseController { } return Result.success(pageList); } - + @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody @ApiOperation(value="根据ID获取物料出库信息",notes="根据ID获取物料出库信息",httpMethod="GET",produces="application/json") @@ -881,7 +965,7 @@ public class TWzCkHeadController extends BaseController { } return Result.success(page); } - + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody @ApiOperation(value="创建物料出库") @@ -894,7 +978,7 @@ public class TWzCkHeadController extends BaseController { //保存 List tWzCkItemList = tWzCkHeadPage.getTWzCkItemList(); - + TWzCkHeadEntity tWzCkHead = new TWzCkHeadEntity(); try{ MyBeanUtils.copyBeanNotNull2Bean(tWzCkHeadPage,tWzCkHead); @@ -906,7 +990,7 @@ public class TWzCkHeadController extends BaseController { return Result.success(tWzCkHead); } - + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody @ApiOperation(value="更新物料出库",notes="更新物料出库") @@ -919,7 +1003,7 @@ public class TWzCkHeadController extends BaseController { //保存 List tWzCkItemList = tWzCkHeadPage.getTWzCkItemList(); - + TWzCkHeadEntity tWzCkHead = new TWzCkHeadEntity(); try{ MyBeanUtils.copyBeanNotNull2Bean(tWzCkHeadPage,tWzCkHead); @@ -932,7 +1016,7 @@ public class TWzCkHeadController extends BaseController { //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码. return Result.success(); } - + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) @ApiOperation(value="删除物料出库") diff --git a/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java b/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java index 878dff5e..b58582b8 100644 --- a/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java +++ b/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java @@ -1,22 +1,21 @@ package com.zzjee.wzyw.controller; + +import com.alibaba.fastjson.JSONArray; +import com.zzjee.md.entity.MdSupEntity; +import com.zzjee.md.entity.MvGoodsEntity; +import com.zzjee.wm.entity.WmImNoticeHEntity; +import com.zzjee.wm.entity.WmImNoticeIEntity; +import com.zzjee.wm.service.WmImNoticeHServiceI; +import com.zzjee.wmutil.wmUtil; import com.zzjee.wz.entity.TWzMaterialEntity; -import com.zzjee.wzyw.entity.TWzCkHeadEntity; -import com.zzjee.wzyw.entity.TWzCkItemEntity; import com.zzjee.wzyw.entity.TWzPoHeadEntity; -import com.zzjee.wzyw.service.TWzPoHeadServiceI; -import com.zzjee.wzyw.page.TWzPoHeadPage; import com.zzjee.wzyw.entity.TWzPoItemEntity; - -import java.awt.image.BufferedImage; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import com.zzjee.wzyw.page.TWzPoHeadPage; +import com.zzjee.wzyw.service.TWzPoHeadServiceI; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFPrintSetup; @@ -24,820 +23,870 @@ import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; -import org.jeecgframework.core.util.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -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.servlet.ModelAndView; - +import org.jeecgframework.core.beanvalidator.BeanValidators; 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.json.AjaxJson; import org.jeecgframework.core.common.model.json.DataGrid; import org.jeecgframework.core.constant.Globals; -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.*; +import org.jeecgframework.jwt.util.ResponseMessage; +import org.jeecgframework.jwt.util.Result; 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.vo.NormalExcelConstants; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; -import java.io.IOException; -import java.util.Map; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; -import org.apache.commons.lang3.StringUtils; -import org.jeecgframework.jwt.util.GsonUtil; -import org.jeecgframework.jwt.util.ResponseMessage; -import org.jeecgframework.jwt.util.Result; -import com.alibaba.fastjson.JSONArray; -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.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; -/** +/** + * @author onlineGenerator + * @version V1.0 * @Title: Controller * @Description: 物料采购订单 - * @author onlineGenerator * @date 2018-05-21 13:23:13 - * @version V1.0 - * */ -@Api(value="TWzPoHead",description="物料采购订单",tags="tWzPoHeadController") +@Api(value = "TWzPoHead", description = "物料采购订单", tags = "tWzPoHeadController") @Controller @RequestMapping("/tWzPoHeadController") public class TWzPoHeadController extends BaseController { - /** - * Logger for this class - */ - private static final Logger logger = Logger.getLogger(TWzPoHeadController.class); + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(TWzPoHeadController.class); - @Autowired - private TWzPoHeadServiceI tWzPoHeadService; - @Autowired - private SystemService systemService; - @Autowired - private Validator validator; + @Autowired + private TWzPoHeadServiceI tWzPoHeadService; + @Autowired + private SystemService systemService; + @Autowired + private Validator validator; + @Autowired + private WmImNoticeHServiceI wmImNoticeHService; - /** - * 物料采购订单列表 页面跳转 - * - * @return - */ - @RequestMapping(params = "list") - public ModelAndView list(HttpServletRequest request) { - return new ModelAndView("com/zzjee/wzyw/tWzPoHeadList"); - } - @RequestMapping(params = "listsp") - public ModelAndView listsp(HttpServletRequest request) { - return new ModelAndView("com/zzjee/wzyw/tWzPoHeadspList"); - } - /** - * easyui AJAX请求数据 - * - * @param request - * @param response - * @param dataGrid - */ + /** + * 物料采购订单列表 页面跳转 + * + * @return + */ + @RequestMapping(params = "list") + public ModelAndView list(HttpServletRequest request) { + return new ModelAndView("com/zzjee/wzyw/tWzPoHeadList"); + } - @RequestMapping(params = "datagrid") - public void datagrid(TWzPoHeadEntity tWzPoHead,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { - CriteriaQuery cq = new CriteriaQuery(TWzPoHeadEntity.class, dataGrid); - //查询条件组装器 - org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzPoHead); - try{ - //自定义追加查询条件 - }catch (Exception e) { - throw new BusinessException(e.getMessage()); - } - cq.add(); - this.tWzPoHeadService.getDataGridReturn(cq, true); - TagUtil.datagrid(response, dataGrid); - } + @RequestMapping(params = "listsp") + public ModelAndView listsp(HttpServletRequest request) { + return new ModelAndView("com/zzjee/wzyw/tWzPoHeadspList"); + } - @RequestMapping(params = "datagridsp") - public void datagridsp(TWzPoHeadEntity tWzPoHead,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { - CriteriaQuery cq = new CriteriaQuery(TWzPoHeadEntity.class, dataGrid); - //查询条件组装器 - org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzPoHead); - try{ - //自定义追加查询条件 - cq.eq("bpmStatus","1"); - }catch (Exception e) { - throw new BusinessException(e.getMessage()); - } - cq.add(); - this.tWzPoHeadService.getDataGridReturn(cq, true); - TagUtil.datagrid(response, dataGrid); - } - /** - * 删除物料采购订单 - * - * @return - */ - @RequestMapping(params = "doDel") - @ResponseBody - public AjaxJson doDel(TWzPoHeadEntity tWzPoHead, HttpServletRequest request) { - AjaxJson j = new AjaxJson(); - tWzPoHead = systemService.getEntity(TWzPoHeadEntity.class, tWzPoHead.getId()); - String message = "物料采购订单删除成功"; - try{ + /** + * easyui AJAX请求数据 + * + * @param request + * @param response + * @param dataGrid + */ + + @RequestMapping(params = "datagrid") + public void datagrid(TWzPoHeadEntity tWzPoHead, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { + CriteriaQuery cq = new CriteriaQuery(TWzPoHeadEntity.class, dataGrid); + //查询条件组装器 + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzPoHead); + try { + //自定义追加查询条件 + } catch (Exception e) { + throw new BusinessException(e.getMessage()); + } + cq.add(); + this.tWzPoHeadService.getDataGridReturn(cq, true); + TagUtil.datagrid(response, dataGrid); + } + + @RequestMapping(params = "datagridsp") + public void datagridsp(TWzPoHeadEntity tWzPoHead, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { + CriteriaQuery cq = new CriteriaQuery(TWzPoHeadEntity.class, dataGrid); + //查询条件组装器 + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzPoHead); + try { + //自定义追加查询条件 + cq.eq("bpmStatus", "1"); + } catch (Exception e) { + throw new BusinessException(e.getMessage()); + } + cq.add(); + this.tWzPoHeadService.getDataGridReturn(cq, true); + TagUtil.datagrid(response, dataGrid); + } + + /** + * 删除物料采购订单 + * + * @return + */ + @RequestMapping(params = "doDel") + @ResponseBody + public AjaxJson doDel(TWzPoHeadEntity tWzPoHead, HttpServletRequest request) { + AjaxJson j = new AjaxJson(); + tWzPoHead = systemService.getEntity(TWzPoHeadEntity.class, tWzPoHead.getId()); + String message = "物料采购订单删除成功"; + try { tWzPoHead.setBpmStatus("9"); systemService.saveOrUpdate(tWzPoHead); // tWzPoHeadService.delMain(tWzPoHead); - 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; - } + systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "物料采购订单删除失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } - /** - * 批量删除物料采购订单 - * - * @return - */ - @RequestMapping(params = "doBatchDel") - @ResponseBody - public AjaxJson doBatchDel(String ids,HttpServletRequest request){ - AjaxJson j = new AjaxJson(); - String message = "物料采购订单删除成功"; - try{ - for(String id:ids.split(",")){ - TWzPoHeadEntity tWzPoHead = systemService.getEntity(TWzPoHeadEntity.class, - Integer.parseInt(id) - ); - tWzPoHeadService.delMain(tWzPoHead); - systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); - } - }catch(Exception e){ - e.printStackTrace(); - message = "物料采购订单删除失败"; - throw new BusinessException(e.getMessage()); - } - j.setMsg(message); - return j; - } + /** + * 批量删除物料采购订单 + * + * @return + */ + @RequestMapping(params = "doBatchDel") + @ResponseBody + public AjaxJson doBatchDel(String ids, HttpServletRequest request) { + AjaxJson j = new AjaxJson(); + String message = "物料采购订单删除成功"; + try { + for (String id : ids.split(",")) { + TWzPoHeadEntity tWzPoHead = systemService.getEntity(TWzPoHeadEntity.class, + Integer.parseInt(id) + ); + tWzPoHeadService.delMain(tWzPoHead); + 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 = "doPrint") + @ResponseBody + public void downReceiveExcel(String id, + HttpServletRequest request, HttpServletResponse response) { + OutputStream fileOut = null; + BufferedImage bufferImg = null; + String codedFileName = null; + TWzPoHeadEntity tWzPoHead = systemService.getEntity(TWzPoHeadEntity.class, + Integer.parseInt(id));// 获取抬头 + String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; + List tWzPoItemEntityList = systemService.findHql(hql0, id); + try { + StringBuffer sber = new StringBuffer(); - @RequestMapping(params = "doPrint") - @ResponseBody - public void downReceiveExcel(String id, - HttpServletRequest request, HttpServletResponse response) { - OutputStream fileOut = null; - BufferedImage bufferImg = null; - String codedFileName = null; - TWzPoHeadEntity tWzPoHead = systemService.getEntity(TWzPoHeadEntity.class, - Integer.parseInt(id));// 获取抬头 - String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; - List tWzPoItemEntityList = systemService.findHql(hql0,id); - try { - StringBuffer sber = new StringBuffer(); + ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream(); - ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream(); + // 进行转码,使其支持中文文件名 + codedFileName = java.net.URLEncoder.encode("中文", "UTF-8"); + response.setHeader("content-disposition", "attachment;filename=" + + id + ".xls"); - // 进行转码,使其支持中文文件名 - codedFileName = java.net.URLEncoder.encode("中文", "UTF-8"); - response.setHeader("content-disposition", "attachment;filename=" - + id + ".xls"); + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("采购单"); + sheet.setMargin(HSSFSheet.TopMargin, 0.2);// 页边距(上) + sheet.setMargin(HSSFSheet.BottomMargin, 0.1);// 页边距(下) + sheet.setMargin(HSSFSheet.LeftMargin, 0.8);// 页边距(左) + sheet.setMargin(HSSFSheet.RightMargin, 0.0);// 页边距(右 + sheet.setColumnWidth(0, 10 * 256); + sheet.setColumnWidth(1, 35 * 256); + sheet.setColumnWidth(2, 35 * 200); + sheet.setColumnWidth(3, 35 * 256); + sheet.setColumnWidth(4, 10 * 256); + sheet.setColumnWidth(5, 10 * 256); + // sheet.setColumnWidth(6, 8 * 256); + // sheet.setColumnWidth(7, 8 * 256); + // sheet.setColumnWidth(8, 8 * 256); + // 创建第一行 + Row row = sheet.createRow((short) 0); // 第一行空白 - HSSFWorkbook wb = new HSSFWorkbook(); - HSSFSheet sheet = wb.createSheet("采购单"); - sheet.setMargin(HSSFSheet.TopMargin,0.2);// 页边距(上) - sheet.setMargin(HSSFSheet.BottomMargin,0.1);// 页边距(下) - sheet.setMargin(HSSFSheet.LeftMargin,0.8);// 页边距(左) - sheet.setMargin(HSSFSheet.RightMargin,0.0);// 页边距(右 - sheet.setColumnWidth(0, 10 * 256); - sheet.setColumnWidth(1, 20 * 256); - sheet.setColumnWidth(2, 35 * 200); - sheet.setColumnWidth(3, 10 * 256); - sheet.setColumnWidth(4, 10 * 256); - sheet.setColumnWidth(5, 10 * 256); - // sheet.setColumnWidth(6, 8 * 256); - // sheet.setColumnWidth(7, 8 * 256); - // sheet.setColumnWidth(8, 8 * 256); - // 创建第一行 - Row row = sheet.createRow((short) 0); // 第一行空白 + // 创建两种单元格格式 + CellStyle cs = wb.createCellStyle(); + CellStyle cs2 = wb.createCellStyle(); + CellStyle cs3 = wb.createCellStyle(); + CellStyle cs4 = wb.createCellStyle(); + CellStyle cs5 = wb.createCellStyle(); + // 创建两种字体 + Font f = wb.createFont(); + Font f2 = wb.createFont(); - // 创建两种单元格格式 - CellStyle cs = wb.createCellStyle(); - CellStyle cs2 = wb.createCellStyle(); - CellStyle cs3 = wb.createCellStyle(); - CellStyle cs4 = wb.createCellStyle(); - CellStyle cs5 = wb.createCellStyle(); - // 创建两种字体 - Font f = wb.createFont(); - Font f2 = wb.createFont(); + // 创建第一种字体样式(用于列名) + f.setFontHeightInPoints((short) 22); + f.setColor(IndexedColors.BLACK.getIndex()); + f.setBoldweight(Font.BOLDWEIGHT_BOLD); - // 创建第一种字体样式(用于列名) - f.setFontHeightInPoints((short) 22); - f.setColor(IndexedColors.BLACK.getIndex()); - f.setBoldweight(Font.BOLDWEIGHT_BOLD); + // 创建第二种字体样式(用于值) + f2.setFontHeightInPoints((short) 16); + f2.setColor(IndexedColors.BLACK.getIndex()); - // 创建第二种字体样式(用于值) - f2.setFontHeightInPoints((short) 16); - f2.setColor(IndexedColors.BLACK.getIndex()); + // Font f3=wb.createFont(); + // f3.setFontHeightInPoints((short) 10); + // f3.setColor(IndexedColors.RED.getIndex()); - // Font f3=wb.createFont(); - // f3.setFontHeightInPoints((short) 10); - // f3.setColor(IndexedColors.RED.getIndex()); + // 设置第一种单元格的样式(用于列名) + cs.setFont(f); + cs.setBorderLeft(CellStyle.BORDER_NONE); + cs.setBorderRight(CellStyle.BORDER_NONE); + cs.setBorderTop(CellStyle.BORDER_NONE); + cs.setBorderBottom(CellStyle.BORDER_NONE); + cs.setAlignment(HSSFCellStyle.ALIGN_CENTER); + // 设置第二种单元格的样式(用于值) + cs2.setFont(f2); + cs2.setBorderLeft(CellStyle.BORDER_NONE); + cs2.setBorderRight(CellStyle.BORDER_NONE); + cs2.setBorderTop(CellStyle.BORDER_NONE); + cs2.setBorderBottom(CellStyle.BORDER_NONE); + cs2.setWrapText(true); - // 设置第一种单元格的样式(用于列名) - cs.setFont(f); - cs.setBorderLeft(CellStyle.BORDER_NONE); - cs.setBorderRight(CellStyle.BORDER_NONE); - cs.setBorderTop(CellStyle.BORDER_NONE); - cs.setBorderBottom(CellStyle.BORDER_NONE); - cs.setAlignment(HSSFCellStyle.ALIGN_CENTER); - // 设置第二种单元格的样式(用于值) - cs2.setFont(f2); - cs2.setBorderLeft(CellStyle.BORDER_NONE); - cs2.setBorderRight(CellStyle.BORDER_NONE); - cs2.setBorderTop(CellStyle.BORDER_NONE); - cs2.setBorderBottom(CellStyle.BORDER_NONE); - cs2.setWrapText(true); + // cs2.setAlignment(CellStyle.BORDER_NONE); - // cs2.setAlignment(CellStyle.BORDER_NONE); + cs3.setFont(f2); + cs3.setBorderLeft(CellStyle.BORDER_MEDIUM); + cs3.setBorderRight(CellStyle.BORDER_MEDIUM); + cs3.setBorderTop(CellStyle.BORDER_MEDIUM); + cs3.setBorderBottom(CellStyle.BORDER_MEDIUM); + // cs3.setAlignment(CellStyle.BORDER_HAIR); + cs4.setFont(f2); + cs4.setBorderTop(CellStyle.BORDER_MEDIUM); + cs4.setBorderBottom(CellStyle.BORDER_MEDIUM); - cs3.setFont(f2); - cs3.setBorderLeft(CellStyle.BORDER_MEDIUM); - cs3.setBorderRight(CellStyle.BORDER_MEDIUM); - cs3.setBorderTop(CellStyle.BORDER_MEDIUM); - cs3.setBorderBottom(CellStyle.BORDER_MEDIUM); - // cs3.setAlignment(CellStyle.BORDER_HAIR); - cs4.setFont(f2); - cs4.setBorderTop(CellStyle.BORDER_MEDIUM); - cs4.setBorderBottom(CellStyle.BORDER_MEDIUM); - - cs5.setFont(f2); - cs5.setBorderLeft(CellStyle.BORDER_NONE); - cs5.setBorderRight(CellStyle.BORDER_NONE); - cs5.setBorderTop(CellStyle.BORDER_NONE); - cs5.setBorderBottom(CellStyle.BORDER_NONE); + cs5.setFont(f2); + cs5.setBorderLeft(CellStyle.BORDER_NONE); + cs5.setBorderRight(CellStyle.BORDER_NONE); + cs5.setBorderTop(CellStyle.BORDER_NONE); + cs5.setBorderBottom(CellStyle.BORDER_NONE); // cs5.setWrapText(true); - Row row1 = sheet.createRow((short) 1); // 第二行标题 - row1.setHeight((short) 700); - Cell cellTitle = row1.createCell(0); - cellTitle.setCellValue(ResourceUtil.getConfigByName("comname")+"采购单"); - cellTitle.setCellStyle(cs); - Row rowHead1 = sheet.createRow((short) 2); // 头部第一行 - rowHead1.setHeight((short) 800); - Cell cellHead11 = rowHead1.createCell(0); - cellHead11.setCellValue("采购单号:" + id); - cellHead11.setCellStyle(cs2); - Cell cellHead12 = rowHead1.createCell(2); + Row row1 = sheet.createRow((short) 1); // 第二行标题 + row1.setHeight((short) 700); + Cell cellTitle = row1.createCell(0); + cellTitle.setCellValue(ResourceUtil.getConfigByName("comname") + "采购单"); + cellTitle.setCellStyle(cs); + Row rowHead1 = sheet.createRow((short) 2); // 头部第一行 + rowHead1.setHeight((short) 800); + Cell cellHead11 = rowHead1.createCell(0); + cellHead11.setCellValue("采购单号:" + id ); + cellHead11.setCellStyle(cs2); + Cell cellHead12 = rowHead1.createCell(2); - cellHead12.setCellValue("采购日期:" + DateUtils.date2Str(tWzPoHead.getCreateDate(),DateUtils.date_sdf)); - cellHead12.setCellStyle(cs2); + cellHead12.setCellValue("采购日期:" + DateUtils.date2Str(tWzPoHead.getCreateDate(), DateUtils.date_sdf)); + cellHead12.setCellStyle(cs2); - Row rowHead2 = sheet.createRow((short) 3); // 头部第二行 - rowHead2.setHeight((short) 500); - Cell cellHead21 = rowHead2.createCell(0); - cellHead21.setCellValue("供应商编码:" + tWzPoHead.getVendorCode()); - cellHead21.setCellStyle(cs2); + Row rowHead2 = sheet.createRow((short) 3); // 头部第二行 + rowHead2.setHeight((short) 500); + Cell cellHead21 = rowHead2.createCell(0); + cellHead21.setCellValue("供应商编码:" + tWzPoHead.getVendorCode()); + cellHead21.setCellStyle(cs2); - Cell cellHead23 = rowHead2.createCell(2); - cellHead23.setCellValue("供应商名称:" + tWzPoHead.getVendorName()); - cellHead23.setCellStyle(cs2); + Cell cellHead23 = rowHead2.createCell(2); + cellHead23.setCellValue("供应商名称:" + tWzPoHead.getVendorName()); + cellHead23.setCellStyle(cs2); - Row rowHead3 = sheet.createRow((short) 4); // 头部第三行 - rowHead3.setHeight((short) 500); - Cell cellHead31 = rowHead3.createCell(0); - cellHead31.setCellValue("备注:" + tWzPoHead.getPoRemark() - ); - cellHead31.setCellStyle(cs2); + Row rowHead3 = sheet.createRow((short) 4); // 头部第三行 + rowHead3.setHeight((short) 500); + Cell cellHead31 = rowHead3.createCell(0); + cellHead31.setCellValue("备注:" + tWzPoHead.getPoRemark() + ); + cellHead31.setCellStyle(cs2); - Cell cellHead35 = rowHead3.createCell(2); - cellHead35.setCellValue("采购人:" + tWzPoHead.getCreateName()); - cellHead35.setCellStyle(cs2); + Cell cellHead35 = rowHead3.createCell(2); + cellHead35.setCellValue("采购人:" + tWzPoHead.getCreateName()); + cellHead35.setCellStyle(cs2); + Row rowHead4 = sheet.createRow((short) 5); // 头部第三行 + Cell cellHead41 = rowHead4.createCell(0); + cellHead41.setCellValue("类型:" + tWzPoHead.getPoBy1()); + cellHead41.setCellStyle(cs2); + // 合并单元格 + CellRangeAddress c = new CellRangeAddress(0, 0, 0, 5); // 第一行空白 + CellRangeAddress c0 = new CellRangeAddress(1, 1, 0, 5);// 第二行标题 - // 合并单元格 - CellRangeAddress c = new CellRangeAddress(0, 0, 0, 5); // 第一行空白 - CellRangeAddress c0 = new CellRangeAddress(1, 1, 0, 5);// 第二行标题 + CellRangeAddress c1 = new CellRangeAddress(2, 2, 0, 1);// 第三行通知单号 + CellRangeAddress c11 = new CellRangeAddress(2, 2, 2, 5);// 第三行通知单号 + CellRangeAddress c2 = new CellRangeAddress(3, 3, 0, 1);// 第四行客户 + CellRangeAddress c3 = new CellRangeAddress(3, 3, 2, 5);// 第四行客户送货时间 + CellRangeAddress c4 = new CellRangeAddress(4, 4, 0, 1);// 第五行客户 + CellRangeAddress c5 = new CellRangeAddress(4, 4, 2, 5);// 第五行客户送货时间 + CellRangeAddress c6 = new CellRangeAddress(5, 5, 0, 5); // 第一行空白 - CellRangeAddress c1 = new CellRangeAddress(2, 2, 0, 1);// 第三行通知单号 - CellRangeAddress c11 = new CellRangeAddress(2, 2, 2, 5);// 第三行通知单号 - CellRangeAddress c2 = new CellRangeAddress(3, 3, 0, 1);// 第四行客户 - CellRangeAddress c3 = new CellRangeAddress(3, 3, 2, 5);// 第四行客户送货时间 - CellRangeAddress c4 = new CellRangeAddress(4, 4, 0, 1);// 第五行客户 - CellRangeAddress c5 = new CellRangeAddress(4, 4, 2, 5);// 第五行客户送货时间 - // CellRangeAddress c4 = new CellRangeAddress(4, 4, 0, 1); - // CellRangeAddress c5 = new CellRangeAddress(4, 4, 2, 3); - // CellRangeAddress c6 = new CellRangeAddress(4, 4, 4, 5); - // CellRangeAddress c7 = new CellRangeAddress(4, 4, 6, 6); + // CellRangeAddress c4 = new CellRangeAddress(4, 4, 0, 1); + // CellRangeAddress c5 = new CellRangeAddress(4, 4, 2, 3); + // CellRangeAddress c6 = new CellRangeAddress(4, 4, 4, 5); + // CellRangeAddress c7 = new CellRangeAddress(4, 4, 6, 6); - sheet.addMergedRegion(c); - sheet.addMergedRegion(c0); - sheet.addMergedRegion(c1); - sheet.addMergedRegion(c2); - sheet.addMergedRegion(c3); - sheet.addMergedRegion(c4); - sheet.addMergedRegion(c5); - sheet.addMergedRegion(c11); - // sheet.addMergedRegion(c7); + sheet.addMergedRegion(c); + sheet.addMergedRegion(c0); + sheet.addMergedRegion(c1); + sheet.addMergedRegion(c2); + sheet.addMergedRegion(c3); + sheet.addMergedRegion(c4); + sheet.addMergedRegion(c5); + sheet.addMergedRegion(c11); + sheet.addMergedRegion(c6); - Row rowColumnName = sheet.createRow((short) 6); // 列名 - rowColumnName.setHeight((short) 500); - String[] columnNames = { "序号", "物料编码", "物料名称", "数量", "单位", - "备注" }; + Row rowColumnName = sheet.createRow((short) 7); // 列名 + rowColumnName.setHeight((short) 500); + String[] columnNames = {"序号", "物料编码", "物料名称", "数量", "单位", + "备注"}; - for (int i = 0; i < columnNames.length; i++) { - Cell cell = rowColumnName.createCell(i); - cell.setCellValue(columnNames[i]); - cell.setCellStyle(cs3); - } - int cellsNum = 6; - int cerconNo = 1; - for (int i = 0; i < tWzPoItemEntityList.size(); i++) { - TWzPoItemEntity entity = tWzPoItemEntityList.get(i); - cellsNum++; - Row rowColumnValue = sheet.createRow((short) cellsNum); // 列名 - rowColumnValue.setHeight((short) 500); - Cell cell1 = rowColumnValue.createCell(0); - cell1.setCellValue(cerconNo); - cell1.setCellStyle(cs3); - Cell cell2 = rowColumnValue.createCell(1); + for (int i = 0; i < columnNames.length; i++) { + Cell cell = rowColumnName.createCell(i); + cell.setCellValue(columnNames[i]); + cell.setCellStyle(cs3); + } + int cellsNum = 7; + int cerconNo = 1; + for (int i = 0; i < tWzPoItemEntityList.size(); i++) { + TWzPoItemEntity entity = tWzPoItemEntityList.get(i); + cellsNum++; + Row rowColumnValue = sheet.createRow((short) cellsNum); // 列名 + rowColumnValue.setHeight((short) 500); + Cell cell1 = rowColumnValue.createCell(0); + cell1.setCellValue(cerconNo); + cell1.setCellStyle(cs3); + Cell cell2 = rowColumnValue.createCell(1); - try { - cell2.setCellStyle(cs3); - cell2.setCellValue(entity.getMatCode()); - }catch (Exception e){ + try { + cell2.setCellStyle(cs3); + cell2.setCellValue(entity.getMatCode()); + } catch (Exception e) { - } - try { - Cell cell3 = rowColumnValue.createCell(2); - cell3.setCellValue(entity.getMatName()); - cell3.setCellStyle(cs3); - }catch (Exception e){ + } + try { + Cell cell3 = rowColumnValue.createCell(2); + cell3.setCellValue(entity.getMatName()); + cell3.setCellStyle(cs3); + } catch (Exception e) { - } - try { - Cell cell4 = rowColumnValue.createCell(3); - cell4.setCellValue(entity.getMatQty()); - cell4.setCellStyle(cs3); - }catch (Exception e){ + } + try { + Cell cell4 = rowColumnValue.createCell(3); + cell4.setCellValue(StringUtil.moneyToString(entity.getMatQty(),"#.0000")); + cell4.setCellStyle(cs3); + } catch (Exception e) { - } - try { - Cell cell5 = rowColumnValue.createCell(4); - cell5.setCellValue(entity.getMatUnit()); - cell5.setCellStyle(cs3); - }catch (Exception e){ + } + try { + Cell cell5 = rowColumnValue.createCell(4); + cell5.setCellValue(entity.getMatUnit()); + cell5.setCellStyle(cs3); + } catch (Exception e) { - } - ;try { + } + ; + try { - Cell cell6 = rowColumnValue.createCell(5); - cell6.setCellValue(entity.getItemRemark()); - cell6.setCellStyle(cs3); - }catch (Exception e){ + Cell cell6 = rowColumnValue.createCell(5); + cell6.setCellValue(entity.getItemRemark()); + cell6.setCellStyle(cs3); + } catch (Exception e) { - } - cerconNo++; - } - Row rowColumnInfo = sheet.createRow((short) 2 + cellsNum); // 列名 - Cell cellrow = rowColumnInfo.createCell(0); - cellrow.setCellValue("采购人: 审批人: 主管:"); - cellrow.setCellStyle(cs5); + } + cerconNo++; + } + Row rowColumnInfo = sheet.createRow((short) 2 + cellsNum); // 列名 + Cell cellrow = rowColumnInfo.createCell(0); + cellrow.setCellValue("采购人: 审批人: 主管:"); + cellrow.setCellStyle(cs5); // rowColumnInfo.createCell(0).setCellValue( // "领用人: 仓管: 主管: "); // CellRangeAddress c15 = new CellRangeAddress(10 + cellsNum, // 10 + cellsNum, 0, 5); // sheet.addMergedRegion(c15); - fileOut = response.getOutputStream(); - HSSFPrintSetup printSetup = sheet.getPrintSetup(); - printSetup.setPaperSize(HSSFPrintSetup.A5_PAPERSIZE); - printSetup.setLandscape(true); - wb.write(fileOut); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (fileOut != null) { - try { - fileOut.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - } + fileOut = response.getOutputStream(); + HSSFPrintSetup printSetup = sheet.getPrintSetup(); + printSetup.setPaperSize(HSSFPrintSetup.A5_PAPERSIZE); + printSetup.setLandscape(true); + wb.write(fileOut); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (fileOut != null) { + try { + fileOut.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } - - /** - * 添加物料采购订单 - * - * @return - */ - @RequestMapping(params = "doAdd") - @ResponseBody - public AjaxJson doAdd(TWzPoHeadEntity tWzPoHead,TWzPoHeadPage tWzPoHeadPage, HttpServletRequest request) { - List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); - AjaxJson j = new AjaxJson(); - String message = "添加成功"; - try{ - tWzPoHeadService.addMain(tWzPoHead, tWzPoItemList); - 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 = "doUpdatesp") - @ResponseBody - public AjaxJson doUpdatesp(String id, HttpServletRequest request) { - AjaxJson j = new AjaxJson(); - String message = "审批成功"; - try{ - TWzPoHeadEntity tWzPoHead = systemService.get(TWzPoHeadEntity.class,Integer.parseInt(id)); - tWzPoHead.setBpmStatus("2"); - //=================================================================================== - //查询-采购订单行项目 - String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; - try { - List tWzPoItemEntityList = systemService.findHql(hql0, id.toString()); - for (TWzPoItemEntity page : tWzPoItemEntityList) { - TWzMaterialEntity wz = systemService.findUniqueByProperty(TWzMaterialEntity.class,"matCode",page.getMatCode()); - try{ - if(!StringUtil.isEmpty(page.getMatPrice())){ - wz.setMatPrice(new BigDecimal(page.getMatPrice())); - systemService.updateEntitie(wz); - } - }catch (Exception e){ - } - } - }catch (Exception e){ - } - systemService.saveOrUpdate(tWzPoHead); - systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); - }catch(Exception e){ - e.printStackTrace(); - message = "审批失败"; - throw new BusinessException(e.getMessage()); - } - j.setMsg(message); - return j; - } - - /** - * 更新物料出库 - * - * @return - */ - @RequestMapping(params = "doUpdatecom") - @ResponseBody - public AjaxJson doUpdatecom(String id, HttpServletRequest request) { - AjaxJson j = new AjaxJson(); - String message = "完成成功"; - try{ - TWzPoHeadEntity tWzPoHead = systemService.get(TWzPoHeadEntity.class,Integer.parseInt(id)); - tWzPoHead.setBpmStatus("3"); - systemService.saveOrUpdate(tWzPoHead); - systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); - }catch(Exception e){ - e.printStackTrace(); - message = "完成失败"; - throw new BusinessException(e.getMessage()); - } - j.setMsg(message); - return j; - } - - - /** - * 更新物料采购订单 - * - * @return - */ - @RequestMapping(params = "doUpdate") - @ResponseBody - public AjaxJson doUpdate(TWzPoHeadEntity tWzPoHead,TWzPoHeadPage tWzPoHeadPage, HttpServletRequest request) { - List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); - AjaxJson j = new AjaxJson(); - String message = "更新成功"; - try{ - tWzPoHeadService.updateMain(tWzPoHead, tWzPoItemList); - systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); - }catch(Exception e){ - e.printStackTrace(); - message = "更新物料采购订单失败"; - throw new BusinessException(e.getMessage()); - } - j.setMsg(message); - return j; - } - - /** - * 物料采购订单新增页面跳转 - * - * @return - */ - @RequestMapping(params = "goAdd") - public ModelAndView goAdd(TWzPoHeadEntity tWzPoHead, HttpServletRequest req) { - if (StringUtil.isNotEmpty(tWzPoHead.getId())) { - tWzPoHead = tWzPoHeadService.getEntity(TWzPoHeadEntity.class, tWzPoHead.getId()); - req.setAttribute("tWzPoHeadPage", tWzPoHead); - } - return new ModelAndView("com/zzjee/wzyw/tWzPoHead-add"); - } - - /** - * 物料采购订单编辑页面跳转 - * - * @return - */ - @RequestMapping(params = "goUpdate") - public ModelAndView goUpdate(TWzPoHeadEntity tWzPoHead, HttpServletRequest req) { - if (StringUtil.isNotEmpty(tWzPoHead.getId())) { - tWzPoHead = tWzPoHeadService.getEntity(TWzPoHeadEntity.class, tWzPoHead.getId()); - req.setAttribute("tWzPoHeadPage", tWzPoHead); - } - return new ModelAndView("com/zzjee/wzyw/tWzPoHead-update"); - } - - - /** - * 加载明细列表[采购订单行项目] - * - * @return - */ - @RequestMapping(params = "tWzPoItemList") - public ModelAndView tWzPoItemList(TWzPoHeadEntity tWzPoHead, HttpServletRequest req) { - - //=================================================================================== - //获取参数 - Object id0 = tWzPoHead.getId(); - //=================================================================================== - //查询-采购订单行项目 - String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; - try{ - List tWzPoItemEntityList = systemService.findHql(hql0,id0); - req.setAttribute("tWzPoItemList", tWzPoItemEntityList); - }catch(Exception e){ - logger.info(e.getMessage()); - } - return new ModelAndView("com/zzjee/wzyw/tWzPoItemList"); - } - /** - * 导出excel - * - * @param request - * @param response - */ + * 添加物料采购订单 + * + * @return + */ + @RequestMapping(params = "doAdd") + @ResponseBody + public AjaxJson doAdd(TWzPoHeadEntity tWzPoHead, TWzPoHeadPage tWzPoHeadPage, HttpServletRequest request) { + List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); + AjaxJson j = new AjaxJson(); + String message = "添加成功"; + try { + tWzPoHead.setBpmStatus("1"); + tWzPoHeadService.addMain(tWzPoHead, tWzPoItemList); + + String poid = tWzPoHead.getId().toString(); + String cusCode = ""; + List wmimh = systemService.findByProperty(WmImNoticeHEntity.class, "imCusCode", poid); + if (wmimh != null && wmimh.size() > 0) { + message = "生成入库通知失败,请手工录入入库通知"; + j.setMsg(message); + return j; + } + List wmImNoticeIListnew = new ArrayList(); + for (TWzPoItemEntity page : tWzPoItemList) { + WmImNoticeIEntity wmi = new WmImNoticeIEntity(); + wmi.setGoodsCode(page.getMatCode()); + MvGoodsEntity mvgoods = systemService.findUniqueByProperty( + MvGoodsEntity.class, "goodsCode", wmi.getGoodsCode()); + if (mvgoods != null) { + cusCode = mvgoods.getCusCode(); + wmi.setGoodsName(mvgoods.getGoodsName()); + wmi.setGoodsUnit(mvgoods.getShlDanWei()); + } + try { + wmi.setGoodsCount(page.getMatQty()); + String[] args = page.getMatQty().split("\\."); + wmi.setGoodsCount(args[0]); + } catch (Exception e) { + + } + + wmi.setOtherId(page.getId()); + wmImNoticeIListnew.add(wmi); + + } + + WmImNoticeHEntity wmImNoticeH = new WmImNoticeHEntity(); + wmImNoticeH.setOrderTypeCode("01"); + String noticeid = wmUtil.getNextNoticeid(wmImNoticeH.getOrderTypeCode()); + wmImNoticeH.setCusCode(cusCode); + wmImNoticeH.setNoticeId(noticeid); + wmImNoticeH.setImData(tWzPoHead.getDocDate()); +// wmImNoticeH.setPlatformCode(pageheader.getCusCode()); + wmImNoticeH.setImBeizhu(tWzPoHead.getPoRemark()); + wmImNoticeH.setSupCode(tWzPoHead.getVendorCode()); + MdSupEntity mdsup = systemService.findUniqueByProperty(MdSupEntity.class, "gysBianMa", wmImNoticeH.getSupCode()); + if (mdsup != null) { + wmImNoticeH.setSupName(mdsup.getZhongWenQch()); + } + wmImNoticeH.setImCusCode(poid); + + wmImNoticeHService.addMain(wmImNoticeH, wmImNoticeIListnew); + + + 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 = "doUpdatesp") + @ResponseBody + public AjaxJson doUpdatesp(String id, HttpServletRequest request) { + AjaxJson j = new AjaxJson(); + String message = "审批成功"; + try { + TWzPoHeadEntity tWzPoHead = systemService.get(TWzPoHeadEntity.class, Integer.parseInt(id)); + tWzPoHead.setBpmStatus("2"); + //=================================================================================== + //查询-采购订单行项目 + String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; + try { + List tWzPoItemEntityList = systemService.findHql(hql0, id.toString()); + for (TWzPoItemEntity page : tWzPoItemEntityList) { + TWzMaterialEntity wz = systemService.findUniqueByProperty(TWzMaterialEntity.class, "matCode", page.getMatCode()); + try { + if (!StringUtil.isEmpty(page.getMatPrice())) { + wz.setMatPrice(new BigDecimal(page.getMatPrice())); + systemService.updateEntitie(wz); + } + } catch (Exception e) { + } + } + } catch (Exception e) { + } + systemService.saveOrUpdate(tWzPoHead); + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "审批失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 更新物料出库 + * + * @return + */ + @RequestMapping(params = "doUpdatecom") + @ResponseBody + public AjaxJson doUpdatecom(String id, HttpServletRequest request) { + AjaxJson j = new AjaxJson(); + String message = "完成成功"; + try { + TWzPoHeadEntity tWzPoHead = systemService.get(TWzPoHeadEntity.class, Integer.parseInt(id)); + tWzPoHead.setBpmStatus("3"); + systemService.saveOrUpdate(tWzPoHead); + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "完成失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + + /** + * 更新物料采购订单 + * + * @return + */ + @RequestMapping(params = "doUpdate") + @ResponseBody + public AjaxJson doUpdate(TWzPoHeadEntity tWzPoHead, TWzPoHeadPage tWzPoHeadPage, HttpServletRequest request) { + List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); + AjaxJson j = new AjaxJson(); + String message = "更新成功"; + try { + tWzPoHeadService.updateMain(tWzPoHead, tWzPoItemList); + systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); + } catch (Exception e) { + e.printStackTrace(); + message = "更新物料采购订单失败"; + throw new BusinessException(e.getMessage()); + } + j.setMsg(message); + return j; + } + + /** + * 物料采购订单新增页面跳转 + * + * @return + */ + @RequestMapping(params = "goAdd") + public ModelAndView goAdd(TWzPoHeadEntity tWzPoHead, HttpServletRequest req) { + if (StringUtil.isNotEmpty(tWzPoHead.getId())) { + tWzPoHead = tWzPoHeadService.getEntity(TWzPoHeadEntity.class, tWzPoHead.getId()); + req.setAttribute("tWzPoHeadPage", tWzPoHead); + } + return new ModelAndView("com/zzjee/wzyw/tWzPoHead-add"); + } + + /** + * 物料采购订单编辑页面跳转 + * + * @return + */ + @RequestMapping(params = "goUpdate") + public ModelAndView goUpdate(TWzPoHeadEntity tWzPoHead, HttpServletRequest req) { + if (StringUtil.isNotEmpty(tWzPoHead.getId())) { + tWzPoHead = tWzPoHeadService.getEntity(TWzPoHeadEntity.class, tWzPoHead.getId()); + req.setAttribute("tWzPoHeadPage", tWzPoHead); + } + return new ModelAndView("com/zzjee/wzyw/tWzPoHead-update"); + } + + + /** + * 加载明细列表[采购订单行项目] + * + * @return + */ + @RequestMapping(params = "tWzPoItemList") + public ModelAndView tWzPoItemList(TWzPoHeadEntity tWzPoHead, HttpServletRequest req) { + + //=================================================================================== + //获取参数 + Object id0 = tWzPoHead.getId(); + //=================================================================================== + //查询-采购订单行项目 + String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; + try { + List tWzPoItemEntityList = systemService.findHql(hql0, id0); + req.setAttribute("tWzPoItemList", tWzPoItemEntityList); + } catch (Exception e) { + logger.info(e.getMessage()); + } + return new ModelAndView("com/zzjee/wzyw/tWzPoItemList"); + } + + /** + * 导出excel + * + * @param request + * @param response + */ @RequestMapping(params = "exportXls") - public String exportXls(TWzPoHeadEntity tWzPoHead,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid,ModelMap map) { - CriteriaQuery cq = new CriteriaQuery(TWzPoHeadEntity.class, dataGrid); - //查询条件组装器 - org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzPoHead); - try{ - //自定义追加查询条件 - }catch (Exception e) { - throw new BusinessException(e.getMessage()); - } - cq.add(); - List list=this.tWzPoHeadService.getListByCriteriaQuery(cq, false); - List pageList=new ArrayList(); - if(list!=null&&list.size()>0){ - for(TWzPoHeadEntity entity:list){ - try{ - TWzPoHeadPage page=new TWzPoHeadPage(); - MyBeanUtils.copyBeanNotNull2Bean(entity,page); - Object id0 = entity.getId(); - String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; - List tWzPoItemEntityList = systemService.findHql(hql0,id0.toString()); - page.setTWzPoItemList(tWzPoItemEntityList); - pageList.add(page); - }catch(Exception e){ - logger.info(e.getMessage()); - } + public String exportXls(TWzPoHeadEntity tWzPoHead, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid, ModelMap map) { + CriteriaQuery cq = new CriteriaQuery(TWzPoHeadEntity.class, dataGrid); + //查询条件组装器 + org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzPoHead); + try { + //自定义追加查询条件 + } catch (Exception e) { + throw new BusinessException(e.getMessage()); + } + cq.add(); + List list = this.tWzPoHeadService.getListByCriteriaQuery(cq, false); + List pageList = new ArrayList(); + if (list != null && list.size() > 0) { + for (TWzPoHeadEntity entity : list) { + try { + TWzPoHeadPage page = new TWzPoHeadPage(); + MyBeanUtils.copyBeanNotNull2Bean(entity, page); + Object id0 = entity.getId(); + String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; + List tWzPoItemEntityList = systemService.findHql(hql0, id0.toString()); + page.setTWzPoItemList(tWzPoItemEntityList); + pageList.add(page); + } catch (Exception e) { + logger.info(e.getMessage()); + } } } - map.put(NormalExcelConstants.FILE_NAME,"采购订单"); - map.put(NormalExcelConstants.CLASS,TWzPoHeadPage.class); - map.put(NormalExcelConstants.PARAMS,new ExportParams("采购订单列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), - "导出信息")); - map.put(NormalExcelConstants.DATA_LIST,pageList); + map.put(NormalExcelConstants.FILE_NAME, "采购订单"); + map.put(NormalExcelConstants.CLASS, TWzPoHeadPage.class); + map.put(NormalExcelConstants.PARAMS, new ExportParams("采购订单列表", "导出人:" + ResourceUtil.getSessionUser().getRealName(), + "导出信息")); + map.put(NormalExcelConstants.DATA_LIST, pageList); return NormalExcelConstants.JEECG_EXCEL_VIEW; - } + } /** - * 通过excel导入数据 - * @param request - * @param - * @return - */ - @RequestMapping(params = "importExcel", method = RequestMethod.POST) - @ResponseBody - public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { - AjaxJson j = new AjaxJson(); - MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; - Map fileMap = multipartRequest.getFileMap(); - for (Map.Entry entity : fileMap.entrySet()) { - MultipartFile file = entity.getValue();// 获取上传文件对象 - ImportParams params = new ImportParams(); - params.setTitleRows(2); - params.setHeadRows(2); - params.setNeedSave(true); - try { - List list = ExcelImportUtil.importExcel(file.getInputStream(), TWzPoHeadPage.class, params); - TWzPoHeadEntity entity1=null; - for (TWzPoHeadPage page : list) { - entity1=new TWzPoHeadEntity(); - MyBeanUtils.copyBeanNotNull2Bean(page,entity1); - tWzPoHeadService.addMain(entity1, page.getTWzPoItemList()); - } - j.setMsg("文件导入成功!"); - } catch (Exception e) { - j.setMsg("文件导入失败!"); - logger.error(ExceptionUtil.getExceptionMessage(e)); - }finally{ - try { - file.getInputStream().close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - return j; - } - /** - * 导出excel 使模板 - */ - @RequestMapping(params = "exportXlsByT") - public String exportXlsByT(ModelMap map) { - map.put(NormalExcelConstants.FILE_NAME,"物料采购订单"); - map.put(NormalExcelConstants.CLASS,TWzPoHeadPage.class); - map.put(NormalExcelConstants.PARAMS,new ExportParams("物料采购订单列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), - "导出信息")); - map.put(NormalExcelConstants.DATA_LIST,new ArrayList()); - return NormalExcelConstants.JEECG_EXCEL_VIEW; - } - /** - * 导入功能跳转 - * - * @return - */ - @RequestMapping(params = "upload") - public ModelAndView upload(HttpServletRequest req) { - req.setAttribute("controller_name", "tWzPoHeadController"); - return new ModelAndView("common/upload/pub_excel_upload"); - } - - - @RequestMapping(method = RequestMethod.GET) - @ResponseBody - @ApiOperation(value="物料采购订单列表信息",produces="application/json",httpMethod="GET") - public ResponseMessage> list() { - List list= tWzPoHeadService.getList(TWzPoHeadEntity.class); - List pageList=new ArrayList(); - if(list!=null&&list.size()>0){ - for(TWzPoHeadEntity entity:list){ - try{ - TWzPoHeadPage page=new TWzPoHeadPage(); - MyBeanUtils.copyBeanNotNull2Bean(entity,page); - Object id0 = entity.getId(); - String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; - List tWzPoItemOldList = this.tWzPoHeadService.findHql(hql0,id0); - page.setTWzPoItemList(tWzPoItemOldList); - pageList.add(page); - }catch(Exception e){ - logger.info(e.getMessage()); - } + * 通过excel导入数据 + * + * @param request + * @param + * @return + */ + @RequestMapping(params = "importExcel", method = RequestMethod.POST) + @ResponseBody + public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { + AjaxJson j = new AjaxJson(); + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(2); + params.setNeedSave(true); + try { + List list = ExcelImportUtil.importExcel(file.getInputStream(), TWzPoHeadPage.class, params); + TWzPoHeadEntity entity1 = null; + for (TWzPoHeadPage page : list) { + entity1 = new TWzPoHeadEntity(); + MyBeanUtils.copyBeanNotNull2Bean(page, entity1); + tWzPoHeadService.addMain(entity1, page.getTWzPoItemList()); + } + j.setMsg("文件导入成功!"); + } catch (Exception e) { + j.setMsg("文件导入失败!"); + logger.error(ExceptionUtil.getExceptionMessage(e)); + } finally { + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } } } - return Result.success(pageList); - } - - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - @ApiOperation(value="根据ID获取物料采购订单信息",notes="根据ID获取物料采购订单信息",httpMethod="GET",produces="application/json") - public ResponseMessage get(@ApiParam(required=true,name="id",value="ID")@PathVariable("id") String id) { - TWzPoHeadEntity task = tWzPoHeadService.get(TWzPoHeadEntity.class, id); - if (task == null) { - return Result.error("根据ID获取物料采购订单信息为空"); - } - TWzPoHeadPage page = new TWzPoHeadPage(); - try { - MyBeanUtils.copyBeanNotNull2Bean(task, page); - Object id0 = task.getId(); - String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; - List tWzPoItemOldList = this.tWzPoHeadService.findHql(hql0,id0); - page.setTWzPoItemList(tWzPoItemOldList); - } catch (Exception e) { - e.printStackTrace(); - } - return Result.success(page); - } - - @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - @ApiOperation(value="创建物料采购订单") - public ResponseMessage create(@ApiParam(name="物料采购订单对象")@RequestBody TWzPoHeadPage tWzPoHeadPage, UriComponentsBuilder uriBuilder) { - //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. - Set> failures = validator.validate(tWzPoHeadPage); - if (!failures.isEmpty()) { - return Result.error(JSONArray.toJSONString(BeanValidators.extractPropertyAndMessage(failures))); - } + return j; + } - //保存 - List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); - - TWzPoHeadEntity tWzPoHead = new TWzPoHeadEntity(); - try{ - MyBeanUtils.copyBeanNotNull2Bean(tWzPoHeadPage,tWzPoHead); - }catch(Exception e){ + /** + * 导出excel 使模板 + */ + @RequestMapping(params = "exportXlsByT") + public String exportXlsByT(ModelMap map) { + map.put(NormalExcelConstants.FILE_NAME, "物料采购订单"); + map.put(NormalExcelConstants.CLASS, TWzPoHeadPage.class); + map.put(NormalExcelConstants.PARAMS, new ExportParams("物料采购订单列表", "导出人:" + ResourceUtil.getSessionUser().getRealName(), + "导出信息")); + map.put(NormalExcelConstants.DATA_LIST, new ArrayList()); + return NormalExcelConstants.JEECG_EXCEL_VIEW; + } + + /** + * 导入功能跳转 + * + * @return + */ + @RequestMapping(params = "upload") + public ModelAndView upload(HttpServletRequest req) { + req.setAttribute("controller_name", "tWzPoHeadController"); + return new ModelAndView("common/upload/pub_excel_upload"); + } + + + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "物料采购订单列表信息", produces = "application/json", httpMethod = "GET") + public ResponseMessage> list() { + List list = tWzPoHeadService.getList(TWzPoHeadEntity.class); + List pageList = new ArrayList(); + if (list != null && list.size() > 0) { + for (TWzPoHeadEntity entity : list) { + try { + TWzPoHeadPage page = new TWzPoHeadPage(); + MyBeanUtils.copyBeanNotNull2Bean(entity, page); + Object id0 = entity.getId(); + String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; + List tWzPoItemOldList = this.tWzPoHeadService.findHql(hql0, id0); + page.setTWzPoItemList(tWzPoItemOldList); + pageList.add(page); + } catch (Exception e) { + logger.info(e.getMessage()); + } + } + } + return Result.success(pageList); + } + + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "根据ID获取物料采购订单信息", notes = "根据ID获取物料采购订单信息", httpMethod = "GET", produces = "application/json") + public ResponseMessage get(@ApiParam(required = true, name = "id", value = "ID") @PathVariable("id") String id) { + TWzPoHeadEntity task = tWzPoHeadService.get(TWzPoHeadEntity.class, id); + if (task == null) { + return Result.error("根据ID获取物料采购订单信息为空"); + } + TWzPoHeadPage page = new TWzPoHeadPage(); + try { + MyBeanUtils.copyBeanNotNull2Bean(task, page); + Object id0 = task.getId(); + String hql0 = "from TWzPoItemEntity where 1 = 1 AND pO_ID = ? "; + List tWzPoItemOldList = this.tWzPoHeadService.findHql(hql0, id0); + page.setTWzPoItemList(tWzPoItemOldList); + } catch (Exception e) { + e.printStackTrace(); + } + return Result.success(page); + } + + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + @ApiOperation(value = "创建物料采购订单") + public ResponseMessage create(@ApiParam(name = "物料采购订单对象") @RequestBody TWzPoHeadPage tWzPoHeadPage, UriComponentsBuilder uriBuilder) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(tWzPoHeadPage); + if (!failures.isEmpty()) { + return Result.error(JSONArray.toJSONString(BeanValidators.extractPropertyAndMessage(failures))); + } + + //保存 + List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); + + TWzPoHeadEntity tWzPoHead = new TWzPoHeadEntity(); + try { + MyBeanUtils.copyBeanNotNull2Bean(tWzPoHeadPage, tWzPoHead); + } catch (Exception e) { logger.info(e.getMessage()); return Result.error("保存物料采购订单失败"); } - tWzPoHeadService.addMain(tWzPoHead, tWzPoItemList); + tWzPoHeadService.addMain(tWzPoHead, tWzPoItemList); - return Result.success(tWzPoHead); - } - - @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - @ApiOperation(value="更新物料采购订单",notes="更新物料采购订单") - public ResponseMessage update(@RequestBody TWzPoHeadPage tWzPoHeadPage) { - //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. - Set> failures = validator.validate(tWzPoHeadPage); - if (!failures.isEmpty()) { - return Result.error(JSONArray.toJSONString(BeanValidators.extractPropertyAndMessage(failures))); - } + return Result.success(tWzPoHead); + } - //保存 - List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); - - TWzPoHeadEntity tWzPoHead = new TWzPoHeadEntity(); - try{ - MyBeanUtils.copyBeanNotNull2Bean(tWzPoHeadPage,tWzPoHead); - }catch(Exception e){ + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + @ApiOperation(value = "更新物料采购订单", notes = "更新物料采购订单") + public ResponseMessage update(@RequestBody TWzPoHeadPage tWzPoHeadPage) { + //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. + Set> failures = validator.validate(tWzPoHeadPage); + if (!failures.isEmpty()) { + return Result.error(JSONArray.toJSONString(BeanValidators.extractPropertyAndMessage(failures))); + } + + //保存 + List tWzPoItemList = tWzPoHeadPage.getTWzPoItemList(); + + TWzPoHeadEntity tWzPoHead = new TWzPoHeadEntity(); + try { + MyBeanUtils.copyBeanNotNull2Bean(tWzPoHeadPage, tWzPoHead); + } catch (Exception e) { logger.info(e.getMessage()); return Result.error("物料采购订单更新失败"); } - tWzPoHeadService.updateMain(tWzPoHead, tWzPoItemList); + tWzPoHeadService.updateMain(tWzPoHead, tWzPoItemList); - //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码. - return Result.success(); - } - - @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) - @ResponseStatus(HttpStatus.NO_CONTENT) - @ApiOperation(value="删除物料采购订单") - public ResponseMessage delete(@ApiParam(name="id",value="ID",required=true)@PathVariable("id") String id) { - logger.info("delete[{}]" + id); - // 验证 - if (StringUtils.isEmpty(id)) { - return Result.error("ID不能为空"); - } - try { - TWzPoHeadEntity tWzPoHead = tWzPoHeadService.get(TWzPoHeadEntity.class, id); - tWzPoHeadService.delMain(tWzPoHead); - } catch (Exception e) { - e.printStackTrace(); - return Result.error("物料采购订单删除失败"); - } + //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码. + return Result.success(); + } - return Result.success(); - } + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseStatus(HttpStatus.NO_CONTENT) + @ApiOperation(value = "删除物料采购订单") + public ResponseMessage delete(@ApiParam(name = "id", value = "ID", required = true) @PathVariable("id") String id) { + logger.info("delete[{}]" + id); + // 验证 + if (StringUtils.isEmpty(id)) { + return Result.error("ID不能为空"); + } + try { + TWzPoHeadEntity tWzPoHead = tWzPoHeadService.get(TWzPoHeadEntity.class, id); + tWzPoHeadService.delMain(tWzPoHead); + } catch (Exception e) { + e.printStackTrace(); + return Result.error("物料采购订单删除失败"); + } + + return Result.success(); + } } diff --git a/src/main/java/com/zzjee/wzyw/controller/TWzRkHeadController.java b/src/main/java/com/zzjee/wzyw/controller/TWzRkHeadController.java index b2f0b49f..9388112c 100644 --- a/src/main/java/com/zzjee/wzyw/controller/TWzRkHeadController.java +++ b/src/main/java/com/zzjee/wzyw/controller/TWzRkHeadController.java @@ -1,20 +1,17 @@ package com.zzjee.wzyw.controller; + +import com.alibaba.fastjson.JSONArray; import com.zzjee.util.ReportUtils; import com.zzjee.wz.entity.TWzMaterialEntity; -import com.zzjee.wzyw.entity.*; -import com.zzjee.wzyw.service.TWzRkHeadServiceI; +import com.zzjee.wzyw.entity.TWzRkHeadEntity; +import com.zzjee.wzyw.entity.TWzRkItemDto; +import com.zzjee.wzyw.entity.TWzRkItemEntity; import com.zzjee.wzyw.page.TWzRkHeadPage; - -import java.awt.image.BufferedImage; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import com.zzjee.wzyw.service.TWzRkHeadServiceI; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFPrintSetup; @@ -22,68 +19,55 @@ import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; -import org.apache.poi.ss.util.RegionUtil; -import org.jeecgframework.core.common.dao.jdbc.JdbcDao; -import org.jeecgframework.core.util.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -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.servlet.ModelAndView; - +import org.jeecgframework.core.beanvalidator.BeanValidators; import org.jeecgframework.core.common.controller.BaseController; +import org.jeecgframework.core.common.dao.jdbc.JdbcDao; 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.constant.Globals; -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.*; +import org.jeecgframework.jwt.util.ResponseMessage; +import org.jeecgframework.jwt.util.Result; 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.vo.NormalExcelConstants; +import org.jeecgframework.tag.core.easyui.TagUtil; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; -import java.io.IOException; -import java.util.Map; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.util.UriComponentsBuilder; -import org.apache.commons.lang3.StringUtils; -import org.jeecgframework.jwt.util.GsonUtil; -import org.jeecgframework.jwt.util.ResponseMessage; -import org.jeecgframework.jwt.util.Result; -import com.alibaba.fastjson.JSONArray; -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.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; -/** +/** * @Title: Controller * @Description: 入库抬头 * @author onlineGenerator * @date 2018-05-20 21:43:08 - * @version V1.0 + * @version V1.0 * */ @Api(value="TWzRkHead",description="入库抬头",tags="tWzRkHeadController") @@ -103,11 +87,11 @@ public class TWzRkHeadController extends BaseController { private Validator validator; @Autowired - JdbcDao jdbcDao; + JdbcDao jdbcDao; /** * 入库抬头列表 页面跳转 - * + * * @return */ @RequestMapping(params = "list") @@ -117,7 +101,7 @@ public class TWzRkHeadController extends BaseController { /** * easyui AJAX请求数据 - * + * * @param request * @param response * @param dataGrid @@ -153,7 +137,7 @@ public class TWzRkHeadController extends BaseController { /** * 删除入库抬头 - * + * * @return */ @RequestMapping(params = "doDel") @@ -176,12 +160,12 @@ public class TWzRkHeadController extends BaseController { /** * 批量删除入库抬头 - * + * * @return */ @RequestMapping(params = "doBatchDel") @ResponseBody - public AjaxJson doBatchDel(String ids,HttpServletRequest request){ + public AjaxJson doBatchDel(String ids, HttpServletRequest request){ AjaxJson j = new AjaxJson(); String message = "入库抬头删除成功"; try{ @@ -203,13 +187,13 @@ public class TWzRkHeadController extends BaseController { /** * 添加入库抬头 - * + * * @param ids * @return */ @RequestMapping(params = "doAdd") @ResponseBody - public AjaxJson doAdd(TWzRkHeadEntity tWzRkHead,TWzRkHeadPage tWzRkHeadPage, HttpServletRequest request) { + public AjaxJson doAdd(TWzRkHeadEntity tWzRkHead, TWzRkHeadPage tWzRkHeadPage, HttpServletRequest request) { List tWzRkItemList = tWzRkHeadPage.getTWzRkItemList(); AjaxJson j = new AjaxJson(); String message = "添加成功"; @@ -243,13 +227,13 @@ public class TWzRkHeadController extends BaseController { } /** * 更新入库抬头 - * + * * @param ids * @return */ @RequestMapping(params = "doUpdate") @ResponseBody - public AjaxJson doUpdate(TWzRkHeadEntity tWzRkHead,TWzRkHeadPage tWzRkHeadPage, HttpServletRequest request) { + public AjaxJson doUpdate(TWzRkHeadEntity tWzRkHead, TWzRkHeadPage tWzRkHeadPage, HttpServletRequest request) { List tWzRkItemList = tWzRkHeadPage.getTWzRkItemList(); AjaxJson j = new AjaxJson(); String message = "更新成功"; @@ -267,7 +251,7 @@ public class TWzRkHeadController extends BaseController { /** * 入库抬头新增页面跳转 - * + * * @return */ @RequestMapping(params = "goAdd") @@ -278,10 +262,10 @@ public class TWzRkHeadController extends BaseController { } return new ModelAndView("com/zzjee/wzyw/tWzRkHead-add"); } - + /** * 入库抬头编辑页面跳转 - * + * * @return */ @RequestMapping(params = "goUpdate") @@ -292,16 +276,16 @@ public class TWzRkHeadController extends BaseController { } return new ModelAndView("com/zzjee/wzyw/tWzRkHead-update"); } - - + + /** * 加载明细列表[入库商品] - * + * * @return */ @RequestMapping(params = "tWzRkItemList") public ModelAndView tWzRkItemList(TWzRkHeadEntity tWzRkHead, HttpServletRequest req) { - + //=================================================================================== //获取参数 Object id0 = tWzRkHead.getId(); @@ -346,7 +330,7 @@ public class TWzRkHeadController extends BaseController { * @param response */ @RequestMapping(params = "exportXls") - public String exportXls(TWzRkHeadEntity tWzRkHead,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid,ModelMap map) { + public String exportXls(TWzRkHeadEntity tWzRkHead, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid, ModelMap map) { CriteriaQuery cq = new CriteriaQuery(TWzRkHeadEntity.class, dataGrid); //查询条件组装器 org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzRkHead); @@ -374,8 +358,8 @@ public class TWzRkHeadController extends BaseController { } } map.put(NormalExcelConstants.FILE_NAME,"入库抬头"); - map.put(NormalExcelConstants.CLASS,TWzRkHeadPage.class); - map.put(NormalExcelConstants.PARAMS,new ExportParams("入库抬头列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), + map.put(NormalExcelConstants.CLASS, TWzRkHeadPage.class); + map.put(NormalExcelConstants.PARAMS,new ExportParams("入库抬头列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); map.put(NormalExcelConstants.DATA_LIST,pageList); return NormalExcelConstants.JEECG_EXCEL_VIEW; @@ -427,7 +411,7 @@ public class TWzRkHeadController extends BaseController { @RequestMapping(params = "exportXlsByT") public String exportXlsByT(ModelMap map) { map.put(NormalExcelConstants.FILE_NAME,"入库抬头"); - map.put(NormalExcelConstants.CLASS,TWzRkHeadPage.class); + map.put(NormalExcelConstants.CLASS, TWzRkHeadPage.class); map.put(NormalExcelConstants.PARAMS,new ExportParams("入库抬头列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); map.put(NormalExcelConstants.DATA_LIST,new ArrayList()); @@ -444,7 +428,7 @@ public class TWzRkHeadController extends BaseController { return new ModelAndView("common/upload/pub_excel_upload"); } - + @RequestMapping(method = RequestMethod.GET) @ResponseBody @ApiOperation(value="入库抬头列表信息",produces="application/json",httpMethod="GET") @@ -468,7 +452,7 @@ public class TWzRkHeadController extends BaseController { } return Result.success(pageList); } - + @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody @ApiOperation(value="根据ID获取入库抬头信息",notes="根据ID获取入库抬头信息",httpMethod="GET",produces="application/json") @@ -489,7 +473,7 @@ public class TWzRkHeadController extends BaseController { } return Result.success(page); } - + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody @ApiOperation(value="创建入库抬头") @@ -502,7 +486,7 @@ public class TWzRkHeadController extends BaseController { //保存 List tWzRkItemList = tWzRkHeadPage.getTWzRkItemList(); - + TWzRkHeadEntity tWzRkHead = new TWzRkHeadEntity(); try{ MyBeanUtils.copyBeanNotNull2Bean(tWzRkHeadPage,tWzRkHead); @@ -514,7 +498,7 @@ public class TWzRkHeadController extends BaseController { return Result.success(tWzRkHead); } - + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody @ApiOperation(value="更新入库抬头",notes="更新入库抬头") @@ -527,7 +511,7 @@ public class TWzRkHeadController extends BaseController { //保存 List tWzRkItemList = tWzRkHeadPage.getTWzRkItemList(); - + TWzRkHeadEntity tWzRkHead = new TWzRkHeadEntity(); try{ MyBeanUtils.copyBeanNotNull2Bean(tWzRkHeadPage,tWzRkHead); @@ -540,7 +524,7 @@ public class TWzRkHeadController extends BaseController { //按Restful约定,返回204状态码, 无内容. 也可以返回200状态码. return Result.success(); } - + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) @ApiOperation(value="删除入库抬头") @@ -680,11 +664,11 @@ public class TWzRkHeadController extends BaseController { cell21.setCellStyle(cs2); Cell cell22 = row2.createCell(3); - cell22.setCellValue("单据日期:" + DateUtils.date2Str(tWzRkHead.getDocDate(),DateUtils.date_sdf)); + cell22.setCellValue("单据日期:" + DateUtils.date2Str(tWzRkHead.getDocDate(), DateUtils.date_sdf)); cell22.setCellStyle(cs2); Cell cell23 = row2.createCell(6); - cell23.setCellValue("单据编号:" + tWzRkHead.getId()); + cell23.setCellValue("入库单号:" + tWzRkHead.getId()); cell23.setCellStyle(cs2); // 合并单元格 @@ -705,8 +689,8 @@ public class TWzRkHeadController extends BaseController { rowColumnName.setHeight((short) 500); String[] columnNames = { "序号", "编码/商品名称", "规格", "单位", "仓库","数量","单价", "金额","备注" }; - Double totalAmount = 0d; - Integer totalNumber = 0; + Double totalAmount = 0.00; + Double totalNumber = 0.00; for (int i = 0; i < columnNames.length; i++) { Cell cell = rowColumnName.createCell(i); cell.setCellValue(columnNames[i]); @@ -759,16 +743,19 @@ public class TWzRkHeadController extends BaseController { try { Cell cell6 = rowColumnValue.createCell(5); - cell6.setCellValue(entity.getMatQty()); +// cell6.setCellValue(entity.getMatQty()); + cell6.setCellValue(StringUtil.moneyToString(entity.getMatQty(),"#.0000")); cell6.setCellStyle(cs3); - totalNumber = totalNumber + Integer.parseInt(entity.getMatQty()); + totalNumber = totalNumber + Double.parseDouble(entity.getMatQty()); }catch (Exception e){ } try { Cell cell7 = rowColumnValue.createCell(6); - cell7.setCellValue(entity.getMatPrice()); +// cell7.setCellValue(entity.getMatPrice()); + cell7.setCellValue(StringUtil.moneyToString(entity.getMatPrice(),"#.00")); + cell7.setCellStyle(cs3); }catch (Exception e){ @@ -776,7 +763,9 @@ public class TWzRkHeadController extends BaseController { try { Cell cell8 = rowColumnValue.createCell(7); - cell8.setCellValue(entity.getMatAmount()); +// cell8.setCellValue(entity.getMatAmount()); + cell8.setCellValue(StringUtil.moneyToString(entity.getMatAmount(),"#.00")); + cell8.setCellStyle(cs3); totalAmount = totalAmount + Double.parseDouble(entity.getMatAmount()); }catch (Exception e){ @@ -799,13 +788,13 @@ public class TWzRkHeadController extends BaseController { cellrow.setCellValue("合计"); cellrow.setCellStyle(cs4); Cell cellTotatl2 = rowColumnInfo.createCell(5); - cellTotatl2.setCellValue(totalNumber); + cellTotatl2.setCellValue(StringUtil.moneyToString(totalNumber,"#.0000")); cellTotatl2.setCellStyle(cs3); Cell cellTotatl3 = rowColumnInfo.createCell(6); cellTotatl3.setCellValue(""); cellTotatl3.setCellStyle(cs3); Cell cellTotatl4 = rowColumnInfo.createCell(7); - cellTotatl4.setCellValue(totalAmount); + cellTotatl4.setCellValue(StringUtil.moneyToString(totalAmount,"#.00")); cellTotatl4.setCellStyle(cs3); Cell cellTotatl5 = rowColumnInfo.createCell(8); cellTotatl5.setCellValue(""); @@ -818,7 +807,7 @@ public class TWzRkHeadController extends BaseController { //底部合计金额大写转为汉字 Row rowColumnInfo2 = sheet.createRow((short) 2 + cellsNum); // 列名 Cell cellrow2 = rowColumnInfo2.createCell(0); - cellrow2.setCellValue("合计金额大写:" + ReportUtils.number2CNMontrayUnit(new BigDecimal(totalAmount))); + cellrow2.setCellValue("合计金额大写:" + ReportUtils.number2CNMontrayUnit(new BigDecimal(StringUtil.moneyToString(totalAmount,"#.00")))); cellrow2.setCellStyle(cs4); //合并单元格 CellRangeAddress cellAmount = new CellRangeAddress(2 + cellsNum, 2 + cellsNum, 0, 8); diff --git a/src/main/java/com/zzjee/wzyw/entity/TWzCkHeadEntity.java b/src/main/java/com/zzjee/wzyw/entity/TWzCkHeadEntity.java index e11640eb..4fbcc52d 100644 --- a/src/main/java/com/zzjee/wzyw/entity/TWzCkHeadEntity.java +++ b/src/main/java/com/zzjee/wzyw/entity/TWzCkHeadEntity.java @@ -1,28 +1,16 @@ package com.zzjee.wzyw.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 物料出库 * @author onlineGenerator * @date 2018-05-20 21:43:29 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -76,23 +64,26 @@ public class TWzCkHeadEntity implements java.io.Serializable { @Excel(name="附件",width=15) private String ckFujian; /**备用1*/ + @Excel(name="业务类型",width=15) private String by1; /**备用2*/ + @Excel(name="出库类别",width=15) private String by2; /**备用3*/ + @Excel(name="再利用程度",width=15) private String by3; /**备用4*/ private String by4; /**备用5*/ private String by5; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 */ @Id @GeneratedValue(strategy = GenerationType.AUTO) - + @Column(name ="ID",nullable=false,length=20) public Integer getId(){ return this.id; @@ -105,12 +96,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setId(Integer 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; @@ -123,12 +114,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { 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; @@ -141,12 +132,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setCreateBy(String createBy){ this.createBy = createBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 创建日期 */ - + @Column(name ="CREATE_DATE",nullable=true,length=20) public Date getCreateDate(){ return this.createDate; @@ -159,12 +150,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { 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; @@ -177,12 +168,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { 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; @@ -195,12 +186,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setUpdateBy(String updateBy){ this.updateBy = updateBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 更新日期 */ - + @Column(name ="UPDATE_DATE",nullable=true,length=20) public Date getUpdateDate(){ return this.updateDate; @@ -213,12 +204,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { 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; @@ -231,12 +222,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { 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; @@ -249,12 +240,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setSysCompanyCode(String sysCompanyCode){ this.sysCompanyCode = sysCompanyCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 流程状态 */ - + @Column(name ="BPM_STATUS",nullable=true,length=32) public String getBpmStatus(){ return this.bpmStatus; @@ -267,12 +258,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setBpmStatus(String bpmStatus){ this.bpmStatus = bpmStatus; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 领用部门 */ - + @Column(name ="ORG_CODE",nullable=true,length=32) public String getOrgCode(){ return this.orgCode; @@ -285,12 +276,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setOrgCode(String orgCode){ this.orgCode = orgCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 领用部门名称 */ - + @Column(name ="ORG_NAME",nullable=true,length=32) public String getOrgName(){ return this.orgName; @@ -303,12 +294,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setOrgName(String orgName){ this.orgName = orgName; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 领用人 */ - + @Column(name ="CK_USERNAME",nullable=true,length=32) public String getCkUsername(){ return this.ckUsername; @@ -321,12 +312,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setCkUsername(String ckUsername){ this.ckUsername = ckUsername; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 领用人名字 */ - + @Column(name ="CK_NAME",nullable=true,length=32) public String getCkName(){ return this.ckName; @@ -339,12 +330,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setCkName(String ckName){ this.ckName = ckName; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 单据日期 */ - + @Column(name ="DOC_DATE",nullable=true,length=32) public String getDocDate(){ return this.docDate; @@ -357,12 +348,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setDocDate(String docDate){ this.docDate = docDate; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 整单价值 */ - + @Column(name ="CK_VALUE",nullable=true,length=32) public String getCkValue(){ return this.ckValue; @@ -375,12 +366,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setCkValue(String ckValue){ this.ckValue = ckValue; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 出库备注 */ - + @Column(name ="CK_REMARK",nullable=true,length=232) public String getCkRemark(){ return this.ckRemark; @@ -393,12 +384,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setCkRemark(String ckRemark){ this.ckRemark = ckRemark; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 手工审批 */ - + @Column(name ="CK_SGSP",nullable=true,length=32) public String getCkSgsp(){ return this.ckSgsp; @@ -411,12 +402,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setCkSgsp(String ckSgsp){ this.ckSgsp = ckSgsp; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 附件 */ - + @Column(name ="CK_FUJIAN",nullable=true,length=232) public String getCkFujian(){ return this.ckFujian; @@ -429,12 +420,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setCkFujian(String ckFujian){ this.ckFujian = ckFujian; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用1 */ - + @Column(name ="BY1",nullable=true,length=32) public String getBy1(){ return this.by1; @@ -447,12 +438,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setBy1(String by1){ this.by1 = by1; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用2 */ - + @Column(name ="BY2",nullable=true,length=32) public String getBy2(){ return this.by2; @@ -465,12 +456,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setBy2(String by2){ this.by2 = by2; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用3 */ - + @Column(name ="BY3",nullable=true,length=32) public String getBy3(){ return this.by3; @@ -483,12 +474,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setBy3(String by3){ this.by3 = by3; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用4 */ - + @Column(name ="BY4",nullable=true,length=32) public String getBy4(){ return this.by4; @@ -501,12 +492,12 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setBy4(String by4){ this.by4 = by4; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用5 */ - + @Column(name ="BY5",nullable=true,length=32) public String getBy5(){ return this.by5; @@ -519,5 +510,5 @@ public class TWzCkHeadEntity implements java.io.Serializable { public void setBy5(String by5){ this.by5 = by5; } - + } diff --git a/src/main/java/com/zzjee/wzyw/entity/TWzCkItemEntity.java b/src/main/java/com/zzjee/wzyw/entity/TWzCkItemEntity.java index 1935ddd0..bb27e8be 100644 --- a/src/main/java/com/zzjee/wzyw/entity/TWzCkItemEntity.java +++ b/src/main/java/com/zzjee/wzyw/entity/TWzCkItemEntity.java @@ -1,28 +1,17 @@ package com.zzjee.wzyw.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 出库商品 * @author onlineGenerator * @date 2018-05-20 21:43:28 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -87,7 +76,7 @@ public class TWzCkItemEntity implements java.io.Serializable { private String by4; /**备用5*/ private String by5; - + /** *方法: 取得java.lang.String *@return: java.lang.String 主键 @@ -95,7 +84,7 @@ public class TWzCkItemEntity implements java.io.Serializable { @Id @GeneratedValue(generator = "paymentableGenerator") @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") - + @Column(name ="ID",nullable=false,length=36) public String getId(){ return this.id; @@ -108,12 +97,12 @@ public class TWzCkItemEntity implements java.io.Serializable { 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; @@ -126,12 +115,12 @@ public class TWzCkItemEntity implements java.io.Serializable { 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; @@ -144,12 +133,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setCreateBy(String createBy){ this.createBy = createBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 创建日期 */ - + @Column(name ="CREATE_DATE",nullable=true,length=20) public Date getCreateDate(){ return this.createDate; @@ -162,12 +151,12 @@ public class TWzCkItemEntity implements java.io.Serializable { 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; @@ -180,12 +169,12 @@ public class TWzCkItemEntity implements java.io.Serializable { 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; @@ -198,12 +187,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setUpdateBy(String updateBy){ this.updateBy = updateBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 更新日期 */ - + @Column(name ="UPDATE_DATE",nullable=true,length=20) public Date getUpdateDate(){ return this.updateDate; @@ -216,12 +205,12 @@ public class TWzCkItemEntity implements java.io.Serializable { 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; @@ -234,12 +223,12 @@ public class TWzCkItemEntity implements java.io.Serializable { 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; @@ -252,12 +241,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setSysCompanyCode(String sysCompanyCode){ this.sysCompanyCode = sysCompanyCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 流程状态 */ - + @Column(name ="BPM_STATUS",nullable=true,length=32) public String getBpmStatus(){ return this.bpmStatus; @@ -270,12 +259,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setBpmStatus(String bpmStatus){ this.bpmStatus = bpmStatus; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 外键 */ - + @Column(name ="WZCK_HID",nullable=true,length=32) public String getWzckHid(){ return this.wzckHid; @@ -288,12 +277,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setWzckHid(String wzckHid){ this.wzckHid = wzckHid; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 物料编码 */ - + @Column(name ="MAT_CODE",nullable=true,length=32) public String getMatCode(){ return this.matCode; @@ -306,12 +295,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatCode(String matCode){ this.matCode = matCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 物料名称 */ - + @Column(name ="MAT_NAME",nullable=true,length=32) public String getMatName(){ return this.matName; @@ -324,12 +313,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatName(String matName){ this.matName = matName; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 数量 */ - + @Column(name ="MAT_QTY",nullable=true,length=32) public String getMatQty(){ return this.matQty; @@ -342,12 +331,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatQty(String matQty){ this.matQty = matQty; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 单位 */ - + @Column(name ="MAT_UNIT",nullable=true,length=32) public String getMatUnit(){ return this.matUnit; @@ -360,12 +349,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatUnit(String matUnit){ this.matUnit = matUnit; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 仓库 */ - + @Column(name ="MAT_LOCATION",nullable=true,length=32) public String getMatLocation(){ return this.matLocation; @@ -378,12 +367,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatLocation(String matLocation){ this.matLocation = matLocation; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 批次 */ - + @Column(name ="MAT_BATCH",nullable=true,length=32) public String getMatBatch(){ return this.matBatch; @@ -396,12 +385,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatBatch(String matBatch){ this.matBatch = matBatch; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 单价 */ - + @Column(name ="MAT_PRICE",nullable=true,length=32) public String getMatPrice(){ return this.matPrice; @@ -414,12 +403,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatPrice(String matPrice){ this.matPrice = matPrice; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 总价值 */ - + @Column(name ="MAT_AMOUNT",nullable=true,length=32) public String getMatAmount(){ return this.matAmount; @@ -432,12 +421,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setMatAmount(String matAmount){ this.matAmount = matAmount; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备注 */ - + @Column(name ="ITEM_REMARK",nullable=true,length=232) public String getItemRemark(){ return this.itemRemark; @@ -450,12 +439,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setItemRemark(String itemRemark){ this.itemRemark = itemRemark; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用1 */ - + @Column(name ="BY1",nullable=true,length=32) public String getBy1(){ return this.by1; @@ -468,12 +457,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setBy1(String by1){ this.by1 = by1; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用2 */ - + @Column(name ="BY2",nullable=true,length=32) public String getBy2(){ return this.by2; @@ -486,12 +475,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setBy2(String by2){ this.by2 = by2; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用3 */ - + @Column(name ="BY3",nullable=true,length=32) public String getBy3(){ return this.by3; @@ -504,12 +493,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setBy3(String by3){ this.by3 = by3; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用4 */ - + @Column(name ="BY4",nullable=true,length=32) public String getBy4(){ return this.by4; @@ -522,12 +511,12 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setBy4(String by4){ this.by4 = by4; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用5 */ - + @Column(name ="BY5",nullable=true,length=32) public String getBy5(){ return this.by5; @@ -540,5 +529,5 @@ public class TWzCkItemEntity implements java.io.Serializable { public void setBy5(String by5){ this.by5 = by5; } - + } diff --git a/src/main/java/com/zzjee/wzyw/entity/TWzPoHeadEntity.java b/src/main/java/com/zzjee/wzyw/entity/TWzPoHeadEntity.java index e65e3c5e..22e6078a 100644 --- a/src/main/java/com/zzjee/wzyw/entity/TWzPoHeadEntity.java +++ b/src/main/java/com/zzjee/wzyw/entity/TWzPoHeadEntity.java @@ -1,28 +1,16 @@ package com.zzjee.wzyw.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 物料采购订单 * @author onlineGenerator * @date 2018-05-21 13:23:13 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -69,14 +57,14 @@ public class TWzPoHeadEntity implements java.io.Serializable { private String poBy3; /**备用4*/ private String poBy4; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 */ @Id @GeneratedValue(strategy = GenerationType.AUTO) - + @Column(name ="ID",nullable=false,length=20) public Integer getId(){ return this.id; @@ -89,12 +77,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setId(Integer 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; @@ -107,12 +95,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { 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; @@ -125,12 +113,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setCreateBy(String createBy){ this.createBy = createBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 创建日期 */ - + @Column(name ="CREATE_DATE",nullable=true,length=20) public Date getCreateDate(){ return this.createDate; @@ -143,12 +131,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { 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; @@ -161,12 +149,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { 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; @@ -179,12 +167,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setUpdateBy(String updateBy){ this.updateBy = updateBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 更新日期 */ - + @Column(name ="UPDATE_DATE",nullable=true,length=20) public Date getUpdateDate(){ return this.updateDate; @@ -197,12 +185,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { 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; @@ -215,12 +203,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { 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; @@ -233,12 +221,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setSysCompanyCode(String sysCompanyCode){ this.sysCompanyCode = sysCompanyCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 流程状态 */ - + @Column(name ="BPM_STATUS",nullable=true,length=32) public String getBpmStatus(){ return this.bpmStatus; @@ -251,12 +239,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setBpmStatus(String bpmStatus){ this.bpmStatus = bpmStatus; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 供应商编码 */ - + @Column(name ="VENDOR_CODE",nullable=true,length=32) public String getVendorCode(){ return this.vendorCode; @@ -269,12 +257,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setVendorCode(String vendorCode){ this.vendorCode = vendorCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 供应商名称 */ - + @Column(name ="VENDOR_NAME",nullable=true,length=32) public String getVendorName(){ return this.vendorName; @@ -287,12 +275,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setVendorName(String vendorName){ this.vendorName = vendorName; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 采购订单日期 */ - + @Column(name ="DOC_DATE",nullable=true,length=32) public Date getDocDate(){ return this.docDate; @@ -305,12 +293,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setDocDate(Date docDate){ this.docDate = docDate; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 采购订单备注 */ - + @Column(name ="PO_REMARK",nullable=true,length=232) public String getPoRemark(){ return this.poRemark; @@ -323,12 +311,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setPoRemark(String poRemark){ this.poRemark = poRemark; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用1 */ - + @Column(name ="PO_BY1",nullable=true,length=32) public String getPoBy1(){ return this.poBy1; @@ -341,12 +329,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setPoBy1(String poBy1){ this.poBy1 = poBy1; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用2 */ - + @Column(name ="PO_BY2",nullable=true,length=32) public String getPoBy2(){ return this.poBy2; @@ -359,12 +347,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setPoBy2(String poBy2){ this.poBy2 = poBy2; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用3 */ - + @Column(name ="PO_BY3",nullable=true,length=32) public String getPoBy3(){ return this.poBy3; @@ -377,12 +365,12 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setPoBy3(String poBy3){ this.poBy3 = poBy3; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用4 */ - + @Column(name ="PO_BY4",nullable=true,length=32) public String getPoBy4(){ return this.poBy4; @@ -395,5 +383,5 @@ public class TWzPoHeadEntity implements java.io.Serializable { public void setPoBy4(String poBy4){ this.poBy4 = poBy4; } - + } diff --git a/src/main/java/com/zzjee/wzyw/entity/TWzPoItemEntity.java b/src/main/java/com/zzjee/wzyw/entity/TWzPoItemEntity.java index 429b0bcf..11b5b69b 100644 --- a/src/main/java/com/zzjee/wzyw/entity/TWzPoItemEntity.java +++ b/src/main/java/com/zzjee/wzyw/entity/TWzPoItemEntity.java @@ -1,28 +1,17 @@ package com.zzjee.wzyw.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 采购订单行项目 * @author onlineGenerator * @date 2018-05-21 13:23:13 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -85,7 +74,7 @@ public class TWzPoItemEntity implements java.io.Serializable { private String by3; /**未清数量*/ private String matQtyWq; - + /** *方法: 取得java.lang.String *@return: java.lang.String 主键 @@ -93,7 +82,7 @@ public class TWzPoItemEntity implements java.io.Serializable { @Id @GeneratedValue(generator = "paymentableGenerator") @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") - + @Column(name ="ID",nullable=false,length=36) public String getId(){ return this.id; @@ -106,12 +95,12 @@ public class TWzPoItemEntity implements java.io.Serializable { 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; @@ -124,12 +113,12 @@ public class TWzPoItemEntity implements java.io.Serializable { 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; @@ -142,12 +131,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setCreateBy(String createBy){ this.createBy = createBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 创建日期 */ - + @Column(name ="CREATE_DATE",nullable=true,length=20) public Date getCreateDate(){ return this.createDate; @@ -160,12 +149,12 @@ public class TWzPoItemEntity implements java.io.Serializable { 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; @@ -178,12 +167,12 @@ public class TWzPoItemEntity implements java.io.Serializable { 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; @@ -196,12 +185,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setUpdateBy(String updateBy){ this.updateBy = updateBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 更新日期 */ - + @Column(name ="UPDATE_DATE",nullable=true,length=20) public Date getUpdateDate(){ return this.updateDate; @@ -214,12 +203,12 @@ public class TWzPoItemEntity implements java.io.Serializable { 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; @@ -232,12 +221,12 @@ public class TWzPoItemEntity implements java.io.Serializable { 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; @@ -250,12 +239,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setSysCompanyCode(String sysCompanyCode){ this.sysCompanyCode = sysCompanyCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 流程状态 */ - + @Column(name ="BPM_STATUS",nullable=true,length=32) public String getBpmStatus(){ return this.bpmStatus; @@ -268,12 +257,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setBpmStatus(String bpmStatus){ this.bpmStatus = bpmStatus; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 外键 */ - + @Column(name ="PO_ID",nullable=true,length=32) public String getPoId(){ return this.poId; @@ -286,12 +275,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setPoId(String poId){ this.poId = poId; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 物料编码 */ - + @Column(name ="MAT_CODE",nullable=true,length=32) public String getMatCode(){ return this.matCode; @@ -304,12 +293,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatCode(String matCode){ this.matCode = matCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 物料名称 */ - + @Column(name ="MAT_NAME",nullable=true,length=32) public String getMatName(){ return this.matName; @@ -322,12 +311,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatName(String matName){ this.matName = matName; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 数量 */ - + @Column(name ="MAT_QTY",nullable=true,length=32) public String getMatQty(){ return this.matQty; @@ -340,12 +329,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatQty(String matQty){ this.matQty = matQty; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 单位 */ - + @Column(name ="MAT_UNIT",nullable=true,length=32) public String getMatUnit(){ return this.matUnit; @@ -358,12 +347,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatUnit(String matUnit){ this.matUnit = matUnit; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 仓库 */ - + @Column(name ="MAT_LOCATION",nullable=true,length=32) public String getMatLocation(){ return this.matLocation; @@ -376,12 +365,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatLocation(String matLocation){ this.matLocation = matLocation; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 批次 */ - + @Column(name ="MAT_BATCH",nullable=true,length=32) public String getMatBatch(){ return this.matBatch; @@ -394,12 +383,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatBatch(String matBatch){ this.matBatch = matBatch; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 标准价 */ - + @Column(name ="MAT_PRICE",nullable=true,length=32) public String getMatPrice(){ return this.matPrice; @@ -412,12 +401,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatPrice(String matPrice){ this.matPrice = matPrice; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 总价值 */ - + @Column(name ="MAT_AMOUNT",nullable=true,length=32) public String getMatAmount(){ return this.matAmount; @@ -430,12 +419,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatAmount(String matAmount){ this.matAmount = matAmount; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备注 */ - + @Column(name ="ITEM_REMARK",nullable=true,length=32) public String getItemRemark(){ return this.itemRemark; @@ -448,12 +437,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setItemRemark(String itemRemark){ this.itemRemark = itemRemark; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用1 */ - + @Column(name ="BY1",nullable=true,length=32) public String getBy1(){ return this.by1; @@ -466,12 +455,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setBy1(String by1){ this.by1 = by1; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用2 */ - + @Column(name ="BY2",nullable=true,length=32) public String getBy2(){ return this.by2; @@ -484,12 +473,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setBy2(String by2){ this.by2 = by2; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用3 */ - + @Column(name ="BY3",nullable=true,length=32) public String getBy3(){ return this.by3; @@ -502,12 +491,12 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setBy3(String by3){ this.by3 = by3; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 未清数量 */ - + @Column(name ="MAT_QTY_WQ",nullable=true,length=32) public String getMatQtyWq(){ return this.matQtyWq; @@ -520,5 +509,5 @@ public class TWzPoItemEntity implements java.io.Serializable { public void setMatQtyWq(String matQtyWq){ this.matQtyWq = matQtyWq; } - + } diff --git a/src/main/java/com/zzjee/wzyw/entity/TWzRkHeadEntity.java b/src/main/java/com/zzjee/wzyw/entity/TWzRkHeadEntity.java index abdeff97..1d8a7407 100644 --- a/src/main/java/com/zzjee/wzyw/entity/TWzRkHeadEntity.java +++ b/src/main/java/com/zzjee/wzyw/entity/TWzRkHeadEntity.java @@ -1,28 +1,16 @@ package com.zzjee.wzyw.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 入库抬头 * @author onlineGenerator * @date 2018-05-20 21:43:08 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -74,14 +62,14 @@ public class TWzRkHeadEntity implements java.io.Serializable { private String by4; /**备用5*/ private String by5; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 */ @Id @GeneratedValue(strategy = GenerationType.AUTO) - + @Column(name ="ID",nullable=false,length=20) public Integer getId(){ return this.id; @@ -94,12 +82,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setId(Integer 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; @@ -112,12 +100,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { 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; @@ -130,12 +118,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setCreateBy(String createBy){ this.createBy = createBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 创建日期 */ - + @Column(name ="CREATE_DATE",nullable=true,length=20) public Date getCreateDate(){ return this.createDate; @@ -148,12 +136,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { 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; @@ -166,12 +154,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { 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; @@ -184,12 +172,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setUpdateBy(String updateBy){ this.updateBy = updateBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 更新日期 */ - + @Column(name ="UPDATE_DATE",nullable=true,length=20) public Date getUpdateDate(){ return this.updateDate; @@ -202,12 +190,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { 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; @@ -220,12 +208,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { 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; @@ -238,12 +226,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setSysCompanyCode(String sysCompanyCode){ this.sysCompanyCode = sysCompanyCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 流程状态 */ - + @Column(name ="BPM_STATUS",nullable=true,length=32) public String getBpmStatus(){ return this.bpmStatus; @@ -256,12 +244,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setBpmStatus(String bpmStatus){ this.bpmStatus = bpmStatus; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 供应商编码 */ - + @Column(name ="VENDOR_CODE",nullable=true,length=32) public String getVendorCode(){ return this.vendorCode; @@ -274,12 +262,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setVendorCode(String vendorCode){ this.vendorCode = vendorCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 供应商名称 */ - + @Column(name ="VENDOR_NAME",nullable=true,length=32) public String getVendorName(){ return this.vendorName; @@ -292,12 +280,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setVendorName(String vendorName){ this.vendorName = vendorName; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 入库日期 */ - + @Column(name ="DOC_DATE",nullable=true,length=32) public Date getDocDate(){ return this.docDate; @@ -310,12 +298,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setDocDate(Date docDate){ this.docDate = docDate; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 入库备注 */ - + @Column(name ="RK_REMARK",nullable=true,length=32) public String getRkRemark(){ return this.rkRemark; @@ -328,12 +316,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setRkRemark(String rkRemark){ this.rkRemark = rkRemark; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 附件 */ - + @Column(name ="RK_FUJIAN",nullable=true,length=32) public String getRkFujian(){ return this.rkFujian; @@ -346,12 +334,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setRkFujian(String rkFujian){ this.rkFujian = rkFujian; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用1 */ - + @Column(name ="BY1",nullable=true,length=32) public String getBy1(){ return this.by1; @@ -364,12 +352,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setBy1(String by1){ this.by1 = by1; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用2 */ - + @Column(name ="BY2",nullable=true,length=32) public String getBy2(){ return this.by2; @@ -382,12 +370,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setBy2(String by2){ this.by2 = by2; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用3 */ - + @Column(name ="BY3",nullable=true,length=32) public String getBy3(){ return this.by3; @@ -400,12 +388,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setBy3(String by3){ this.by3 = by3; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用4 */ - + @Column(name ="BY4",nullable=true,length=32) public String getBy4(){ return this.by4; @@ -418,12 +406,12 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setBy4(String by4){ this.by4 = by4; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用5 */ - + @Column(name ="BY5",nullable=true,length=32) public String getBy5(){ return this.by5; @@ -436,5 +424,5 @@ public class TWzRkHeadEntity implements java.io.Serializable { public void setBy5(String by5){ this.by5 = by5; } - + } diff --git a/src/main/java/com/zzjee/wzyw/entity/TWzRkItemEntity.java b/src/main/java/com/zzjee/wzyw/entity/TWzRkItemEntity.java index 56a90509..974a1cf1 100644 --- a/src/main/java/com/zzjee/wzyw/entity/TWzRkItemEntity.java +++ b/src/main/java/com/zzjee/wzyw/entity/TWzRkItemEntity.java @@ -1,28 +1,16 @@ package com.zzjee.wzyw.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; -/** +import javax.persistence.*; +import java.util.Date; + +/** * @Title: Entity * @Description: 入库商品 * @author onlineGenerator * @date 2018-05-20 21:43:08 - * @version V1.0 + * @version V1.0 * */ @Entity @@ -89,14 +77,14 @@ public class TWzRkItemEntity implements java.io.Serializable { private String by5; /**备用6*/ private String by6; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 */ @Id @GeneratedValue(strategy = GenerationType.AUTO) - + @Column(name ="ID",nullable=false,length=20) public Integer getId(){ return this.id; @@ -109,12 +97,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setId(Integer 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; @@ -127,12 +115,12 @@ public class TWzRkItemEntity implements java.io.Serializable { 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; @@ -145,12 +133,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setCreateBy(String createBy){ this.createBy = createBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 创建日期 */ - + @Column(name ="CREATE_DATE",nullable=true,length=20) public Date getCreateDate(){ return this.createDate; @@ -163,12 +151,12 @@ public class TWzRkItemEntity implements java.io.Serializable { 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; @@ -181,12 +169,12 @@ public class TWzRkItemEntity implements java.io.Serializable { 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; @@ -199,12 +187,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setUpdateBy(String updateBy){ this.updateBy = updateBy; } - + /** *方法: 取得java.util.Date *@return: java.util.Date 更新日期 */ - + @Column(name ="UPDATE_DATE",nullable=true,length=20) public Date getUpdateDate(){ return this.updateDate; @@ -217,12 +205,12 @@ public class TWzRkItemEntity implements java.io.Serializable { 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; @@ -235,12 +223,12 @@ public class TWzRkItemEntity implements java.io.Serializable { 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; @@ -253,12 +241,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setSysCompanyCode(String sysCompanyCode){ this.sysCompanyCode = sysCompanyCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 流程状态 */ - + @Column(name ="BPM_STATUS",nullable=true,length=32) public String getBpmStatus(){ return this.bpmStatus; @@ -271,12 +259,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setBpmStatus(String bpmStatus){ this.bpmStatus = bpmStatus; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 外键 */ - + @Column(name ="WZRK_HID",nullable=true,length=32) public String getWzrkHid(){ return this.wzrkHid; @@ -289,12 +277,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setWzrkHid(String wzrkHid){ this.wzrkHid = wzrkHid; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 物料编码 */ - + @Column(name ="MAT_CODE",nullable=true,length=32) public String getMatCode(){ return this.matCode; @@ -307,12 +295,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatCode(String matCode){ this.matCode = matCode; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 物料名称 */ - + @Column(name ="MAT_NAME",nullable=true,length=32) public String getMatName(){ return this.matName; @@ -325,12 +313,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatName(String matName){ this.matName = matName; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 入库数量 */ - + @Column(name ="MAT_QTY",nullable=true,length=32) public String getMatQty(){ return this.matQty; @@ -343,12 +331,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatQty(String matQty){ this.matQty = matQty; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 物料单位 */ - + @Column(name ="MAT_UNIT",nullable=true,length=32) public String getMatUnit(){ return this.matUnit; @@ -361,12 +349,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatUnit(String matUnit){ this.matUnit = matUnit; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 仓库 */ - + @Column(name ="MAT_LOCATION",nullable=true,length=32) public String getMatLocation(){ return this.matLocation; @@ -379,12 +367,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatLocation(String matLocation){ this.matLocation = matLocation; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 批次 */ - + @Column(name ="MAT_BATCH",nullable=true,length=32) public String getMatBatch(){ return this.matBatch; @@ -397,12 +385,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatBatch(String matBatch){ this.matBatch = matBatch; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 标准价 */ - + @Column(name ="MAT_PRICE",nullable=true,length=32) public String getMatPrice(){ return this.matPrice; @@ -415,12 +403,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatPrice(String matPrice){ this.matPrice = matPrice; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 总价 */ - + @Column(name ="MAT_AMOUNT",nullable=true,length=32) public String getMatAmount(){ return this.matAmount; @@ -433,12 +421,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setMatAmount(String matAmount){ this.matAmount = matAmount; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备注 */ - + @Column(name ="ITEM_REMARK",nullable=true,length=32) public String getItemRemark(){ return this.itemRemark; @@ -451,12 +439,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setItemRemark(String itemRemark){ this.itemRemark = itemRemark; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用1 */ - + @Column(name ="BY1",nullable=true,length=32) public String getBy1(){ return this.by1; @@ -469,12 +457,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setBy1(String by1){ this.by1 = by1; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用2 */ - + @Column(name ="BY2",nullable=true,length=32) public String getBy2(){ return this.by2; @@ -487,12 +475,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setBy2(String by2){ this.by2 = by2; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用3 */ - + @Column(name ="BY3",nullable=true,length=32) public String getBy3(){ return this.by3; @@ -505,12 +493,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setBy3(String by3){ this.by3 = by3; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用4 */ - + @Column(name ="BY4",nullable=true,length=32) public String getBy4(){ return this.by4; @@ -523,12 +511,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setBy4(String by4){ this.by4 = by4; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用5 */ - + @Column(name ="BY5",nullable=true,length=32) public String getBy5(){ return this.by5; @@ -541,12 +529,12 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setBy5(String by5){ this.by5 = by5; } - + /** *方法: 取得java.lang.String *@return: java.lang.String 备用6 */ - + @Column(name ="BY6",nullable=true,length=32) public String getBy6(){ return this.by6; @@ -559,5 +547,5 @@ public class TWzRkItemEntity implements java.io.Serializable { public void setBy6(String by6){ this.by6 = by6; } - + } diff --git a/src/main/java/com/zzjee/wzyw/page/TWzCkHeadPage.java b/src/main/java/com/zzjee/wzyw/page/TWzCkHeadPage.java index 46e55e86..954bf13f 100644 --- a/src/main/java/com/zzjee/wzyw/page/TWzCkHeadPage.java +++ b/src/main/java/com/zzjee/wzyw/page/TWzCkHeadPage.java @@ -1,30 +1,20 @@ package com.zzjee.wzyw.page; -import com.zzjee.wzyw.entity.TWzCkHeadEntity; + import com.zzjee.wzyw.entity.TWzCkItemEntity; - -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; -import java.util.ArrayList; - -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; import org.jeecgframework.poi.excel.annotation.ExcelCollection; -/** +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** * @Title: Entity * @Description: 物料出库 * @author onlineGenerator * @date 2018-05-20 21:43:29 - * @version V1.0 + * @version V1.0 * */ public class TWzCkHeadPage implements java.io.Serializable { @@ -85,7 +75,7 @@ public class TWzCkHeadPage implements java.io.Serializable { private String by4; /**备用5*/ private String by5; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 diff --git a/src/main/java/com/zzjee/wzyw/page/TWzPoHeadPage.java b/src/main/java/com/zzjee/wzyw/page/TWzPoHeadPage.java index 2cb0516c..1710844a 100644 --- a/src/main/java/com/zzjee/wzyw/page/TWzPoHeadPage.java +++ b/src/main/java/com/zzjee/wzyw/page/TWzPoHeadPage.java @@ -1,30 +1,20 @@ package com.zzjee.wzyw.page; -import com.zzjee.wzyw.entity.TWzPoHeadEntity; + import com.zzjee.wzyw.entity.TWzPoItemEntity; - -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; -import java.util.ArrayList; - -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; import org.jeecgframework.poi.excel.annotation.ExcelCollection; -/** +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** * @Title: Entity * @Description: 物料采购订单 * @author onlineGenerator * @date 2018-05-21 13:23:13 - * @version V1.0 + * @version V1.0 * */ public class TWzPoHeadPage implements java.io.Serializable { @@ -69,7 +59,7 @@ public class TWzPoHeadPage implements java.io.Serializable { private String poBy3; /**备用4*/ private String poBy4; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 diff --git a/src/main/java/com/zzjee/wzyw/page/TWzRkHeadPage.java b/src/main/java/com/zzjee/wzyw/page/TWzRkHeadPage.java index 09979c33..214c8a58 100644 --- a/src/main/java/com/zzjee/wzyw/page/TWzRkHeadPage.java +++ b/src/main/java/com/zzjee/wzyw/page/TWzRkHeadPage.java @@ -1,30 +1,20 @@ package com.zzjee.wzyw.page; -import com.zzjee.wzyw.entity.TWzRkHeadEntity; + import com.zzjee.wzyw.entity.TWzRkItemEntity; - -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; -import java.util.ArrayList; - -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; import org.jeecgframework.poi.excel.annotation.ExcelCollection; -/** +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** * @Title: Entity * @Description: 入库抬头 * @author onlineGenerator * @date 2018-05-20 21:43:08 - * @version V1.0 + * @version V1.0 * */ public class TWzRkHeadPage implements java.io.Serializable { @@ -74,7 +64,7 @@ public class TWzRkHeadPage implements java.io.Serializable { private String by4; /**备用5*/ private String by5; - + /** *方法: 取得java.lang.Integer *@return: java.lang.Integer 主键 diff --git a/src/main/java/com/zzjee/wzyw/service/TWzCkHeadServiceI.java b/src/main/java/com/zzjee/wzyw/service/TWzCkHeadServiceI.java index d64a80b9..f7b29ed2 100644 --- a/src/main/java/com/zzjee/wzyw/service/TWzCkHeadServiceI.java +++ b/src/main/java/com/zzjee/wzyw/service/TWzCkHeadServiceI.java @@ -1,28 +1,28 @@ package com.zzjee.wzyw.service; + import com.zzjee.wzyw.entity.TWzCkHeadEntity; import com.zzjee.wzyw.entity.TWzCkItemEntity; +import org.jeecgframework.core.common.service.CommonService; import java.util.List; -import org.jeecgframework.core.common.service.CommonService; -import java.io.Serializable; -public interface TWzCkHeadServiceI extends CommonService{ - +public interface TWzCkHeadServiceI extends CommonService { + public void delete(T entity); /** * 添加一对多 - * + * */ public void addMain(TWzCkHeadEntity tWzCkHead, List tWzCkItemList) ; /** * 修改一对多 - * + * */ public void updateMain(TWzCkHeadEntity tWzCkHead, List tWzCkItemList); public void delMain(TWzCkHeadEntity tWzCkHead); - + /** * 默认按钮-sql增强-新增操作 * @param id diff --git a/src/main/java/com/zzjee/wzyw/service/TWzPoHeadServiceI.java b/src/main/java/com/zzjee/wzyw/service/TWzPoHeadServiceI.java index 70a4377a..0f7b8c8a 100644 --- a/src/main/java/com/zzjee/wzyw/service/TWzPoHeadServiceI.java +++ b/src/main/java/com/zzjee/wzyw/service/TWzPoHeadServiceI.java @@ -1,28 +1,28 @@ package com.zzjee.wzyw.service; + import com.zzjee.wzyw.entity.TWzPoHeadEntity; import com.zzjee.wzyw.entity.TWzPoItemEntity; +import org.jeecgframework.core.common.service.CommonService; import java.util.List; -import org.jeecgframework.core.common.service.CommonService; -import java.io.Serializable; -public interface TWzPoHeadServiceI extends CommonService{ - +public interface TWzPoHeadServiceI extends CommonService { + public void delete(T entity); /** * 添加一对多 - * + * */ public void addMain(TWzPoHeadEntity tWzPoHead, List tWzPoItemList) ; /** * 修改一对多 - * + * */ public void updateMain(TWzPoHeadEntity tWzPoHead, List tWzPoItemList); public void delMain(TWzPoHeadEntity tWzPoHead); - + /** * 默认按钮-sql增强-新增操作 * @param id diff --git a/src/main/java/com/zzjee/wzyw/service/TWzRkHeadServiceI.java b/src/main/java/com/zzjee/wzyw/service/TWzRkHeadServiceI.java index f627ff5b..62d2f041 100644 --- a/src/main/java/com/zzjee/wzyw/service/TWzRkHeadServiceI.java +++ b/src/main/java/com/zzjee/wzyw/service/TWzRkHeadServiceI.java @@ -1,28 +1,28 @@ package com.zzjee.wzyw.service; + import com.zzjee.wzyw.entity.TWzRkHeadEntity; import com.zzjee.wzyw.entity.TWzRkItemEntity; +import org.jeecgframework.core.common.service.CommonService; import java.util.List; -import org.jeecgframework.core.common.service.CommonService; -import java.io.Serializable; -public interface TWzRkHeadServiceI extends CommonService{ - +public interface TWzRkHeadServiceI extends CommonService { + public void delete(T entity); /** * 添加一对多 - * + * */ public void addMain(TWzRkHeadEntity tWzRkHead, List tWzRkItemList) ; /** * 修改一对多 - * + * */ public void updateMain(TWzRkHeadEntity tWzRkHead, List tWzRkItemList); public void delMain(TWzRkHeadEntity tWzRkHead); - + /** * 默认按钮-sql增强-新增操作 * @param id diff --git a/src/main/java/com/zzjee/wzyw/service/impl/TWzCkHeadServiceImpl.java b/src/main/java/com/zzjee/wzyw/service/impl/TWzCkHeadServiceImpl.java index 8cdb2d51..12047de2 100644 --- a/src/main/java/com/zzjee/wzyw/service/impl/TWzCkHeadServiceImpl.java +++ b/src/main/java/com/zzjee/wzyw/service/impl/TWzCkHeadServiceImpl.java @@ -1,53 +1,48 @@ package com.zzjee.wzyw.service.impl; -import com.zzjee.util.wzUtil; -import com.zzjee.wzyw.service.TWzCkHeadServiceI; -import org.jeecgframework.core.common.service.impl.CommonServiceImpl; + import com.zzjee.wzyw.entity.TWzCkHeadEntity; import com.zzjee.wzyw.entity.TWzCkItemEntity; - -import org.jeecgframework.core.util.ApplicationContextUtil; -import org.jeecgframework.web.system.service.SystemService; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.List; +import com.zzjee.wzyw.service.TWzCkHeadServiceI; import org.jeecgframework.core.common.exception.BusinessException; import org.jeecgframework.core.common.service.impl.CommonServiceImpl; import org.jeecgframework.core.util.MyBeanUtils; import org.jeecgframework.core.util.StringUtil; import org.jeecgframework.core.util.oConvertUtils; -import java.util.ArrayList; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; import java.util.UUID; -import java.io.Serializable; @Service("tWzCkHeadService") @Transactional public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHeadServiceI { - + public void delete(T entity) { super.delete(entity); //执行删除操作配置的sql增强 this.doDelSql((TWzCkHeadEntity)entity); } - + public void addMain(TWzCkHeadEntity tWzCkHead, List tWzCkItemList){ //保存主信息 - tWzCkHead.setBpmStatus("0"); +// tWzCkHead.setBpmStatus("0"); this.save(tWzCkHead); - + /**保存-出库商品*/ for(TWzCkItemEntity tWzCkItem:tWzCkItemList){ //外键设置 tWzCkItem.setWzckHid(tWzCkHead.getId().toString()); - tWzCkItem.setBpmStatus("0"); +// tWzCkItem.setBpmStatus("0"); this.save(tWzCkItem); } //执行新增操作配置的sql增强 this.doAddSql(tWzCkHead); } - + public void updateMain(TWzCkHeadEntity tWzCkHead, List tWzCkItemList) { //保存主表信息 @@ -91,7 +86,7 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead //如果数据库存在的明细,前台没有传递过来则是删除-出库商品 super.delete(oldE); } - + } //3.持久化新增的数据-出库商品 for(TWzCkItemEntity tWzCkItem:tWzCkItemList){ @@ -106,7 +101,7 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead this.doUpdateSql(tWzCkHead); } - + public void delMain(TWzCkHeadEntity tWzCkHead) { //删除主表信息 this.delete(tWzCkHead); @@ -119,8 +114,8 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead List tWzCkItemOldList = this.findHql(hql0,id0); this.deleteAllEntitie(tWzCkItemOldList); } - - + + /** * 默认按钮-sql增强-新增操作 * @param id @@ -153,7 +148,7 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead public boolean doDelSql(TWzCkHeadEntity t){ return true; } - + /** * 替换sql中的变量 * @param sql @@ -187,4 +182,4 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); return sql; } -} \ No newline at end of file +} diff --git a/src/main/java/com/zzjee/wzyw/service/impl/TWzPoHeadServiceImpl.java b/src/main/java/com/zzjee/wzyw/service/impl/TWzPoHeadServiceImpl.java index d8ca9fd2..55cd929e 100644 --- a/src/main/java/com/zzjee/wzyw/service/impl/TWzPoHeadServiceImpl.java +++ b/src/main/java/com/zzjee/wzyw/service/impl/TWzPoHeadServiceImpl.java @@ -1,37 +1,35 @@ package com.zzjee.wzyw.service.impl; -import com.zzjee.wzyw.service.TWzPoHeadServiceI; -import org.jeecgframework.core.common.service.impl.CommonServiceImpl; + import com.zzjee.wzyw.entity.TWzPoHeadEntity; import com.zzjee.wzyw.entity.TWzPoItemEntity; - -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.List; +import com.zzjee.wzyw.service.TWzPoHeadServiceI; import org.jeecgframework.core.common.exception.BusinessException; import org.jeecgframework.core.common.service.impl.CommonServiceImpl; import org.jeecgframework.core.util.MyBeanUtils; import org.jeecgframework.core.util.StringUtil; import org.jeecgframework.core.util.oConvertUtils; -import java.util.ArrayList; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; import java.util.UUID; -import java.io.Serializable; @Service("tWzPoHeadService") @Transactional public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHeadServiceI { - + public void delete(T entity) { super.delete(entity); //执行删除操作配置的sql增强 this.doDelSql((TWzPoHeadEntity)entity); } - + public void addMain(TWzPoHeadEntity tWzPoHead, List tWzPoItemList){ //保存主信息 this.save(tWzPoHead); - + /**保存-采购订单行项目*/ for(TWzPoItemEntity tWzPoItem:tWzPoItemList){ //外键设置 @@ -42,7 +40,7 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead this.doAddSql(tWzPoHead); } - + public void updateMain(TWzPoHeadEntity tWzPoHead, List tWzPoItemList) { //保存主表信息 @@ -86,7 +84,7 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead //如果数据库存在的明细,前台没有传递过来则是删除-采购订单行项目 super.delete(oldE); } - + } //3.持久化新增的数据-采购订单行项目 for(TWzPoItemEntity tWzPoItem:tWzPoItemList){ @@ -101,7 +99,7 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead this.doUpdateSql(tWzPoHead); } - + public void delMain(TWzPoHeadEntity tWzPoHead) { //删除主表信息 this.delete(tWzPoHead); @@ -114,8 +112,8 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead List tWzPoItemOldList = this.findHql(hql0,id0); this.deleteAllEntitie(tWzPoItemOldList); } - - + + /** * 默认按钮-sql增强-新增操作 * @param id @@ -140,7 +138,7 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead public boolean doDelSql(TWzPoHeadEntity t){ return true; } - + /** * 替换sql中的变量 * @param sql @@ -168,4 +166,4 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); return sql; } -} \ No newline at end of file +} diff --git a/src/main/java/com/zzjee/wzyw/service/impl/TWzRkHeadServiceImpl.java b/src/main/java/com/zzjee/wzyw/service/impl/TWzRkHeadServiceImpl.java index fb7ebf29..d395ccb0 100644 --- a/src/main/java/com/zzjee/wzyw/service/impl/TWzRkHeadServiceImpl.java +++ b/src/main/java/com/zzjee/wzyw/service/impl/TWzRkHeadServiceImpl.java @@ -1,38 +1,36 @@ package com.zzjee.wzyw.service.impl; -import com.zzjee.wzyw.service.TWzRkHeadServiceI; -import org.jeecgframework.core.common.service.impl.CommonServiceImpl; + import com.zzjee.wzyw.entity.TWzRkHeadEntity; import com.zzjee.wzyw.entity.TWzRkItemEntity; - -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.List; +import com.zzjee.wzyw.service.TWzRkHeadServiceI; import org.jeecgframework.core.common.exception.BusinessException; import org.jeecgframework.core.common.service.impl.CommonServiceImpl; import org.jeecgframework.core.util.MyBeanUtils; import org.jeecgframework.core.util.StringUtil; import org.jeecgframework.core.util.oConvertUtils; -import java.util.ArrayList; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; import java.util.UUID; -import java.io.Serializable; @Service("tWzRkHeadService") @Transactional public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHeadServiceI { - + public void delete(T entity) { super.delete(entity); //执行删除操作配置的sql增强 this.doDelSql((TWzRkHeadEntity)entity); } - + public void addMain(TWzRkHeadEntity tWzRkHead, - List tWzRkItemList){ + List tWzRkItemList){ //保存主信息 tWzRkHead.setBpmStatus("0"); this.save(tWzRkHead); - + /**保存-入库商品*/ for(TWzRkItemEntity tWzRkItem:tWzRkItemList){ //外键设置 @@ -44,9 +42,9 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead this.doAddSql(tWzRkHead); } - + public void updateMain(TWzRkHeadEntity tWzRkHead, - List tWzRkItemList) { + List tWzRkItemList) { //保存主表信息 if(StringUtil.isNotEmpty(tWzRkHead.getId())){ try { @@ -88,7 +86,7 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead //如果数据库存在的明细,前台没有传递过来则是删除-入库商品 super.delete(oldE); } - + } //3.持久化新增的数据-入库商品 for(TWzRkItemEntity tWzRkItem:tWzRkItemList){ @@ -103,7 +101,7 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead this.doUpdateSql(tWzRkHead); } - + public void delMain(TWzRkHeadEntity tWzRkHead) { //删除主表信息 this.delete(tWzRkHead); @@ -116,8 +114,8 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead List tWzRkItemOldList = this.findHql(hql0,id0); this.deleteAllEntitie(tWzRkItemOldList); } - - + + /** * 默认按钮-sql增强-新增操作 * @param id @@ -143,13 +141,13 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead public boolean doDelSql(TWzRkHeadEntity t){ return true; } - + /** * 替换sql中的变量 * @param sql * @return */ - public String replaceVal(String sql,TWzRkHeadEntity t){ + public String replaceVal(String sql, TWzRkHeadEntity 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())); @@ -173,4 +171,4 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); return sql; } -} \ No newline at end of file +} diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzLocationList.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzLocationList.jsp index 42d6da8f..5557a09e 100644 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzLocationList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wz/tWzLocationList.jsp @@ -22,7 +22,7 @@ <%----%> <%----%> - + <%----%> <%----%> diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-add.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-add.jsp index b9888e8e..6f8de7c6 100644 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-add.jsp +++ b/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-add.jsp @@ -12,8 +12,94 @@ - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - - + - - + - - - - +<%-- --%> +<%-- --%> + - - + - - + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + +
- - - - - -
--%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%--
- + - +
+ + + + +
diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-update.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-update.jsp index 21c1c1a3..66300681 100644 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-update.jsp +++ b/src/main/webapp/webpage/com/zzjee/wz/tWzMaterial-update.jsp @@ -12,8 +12,88 @@ - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - - + @@ -57,11 +143,9 @@ - - + - - - - +<%-- --%> +<%-- --%> + - - + - + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
- - +
+ + + + +
- - +
- - +
- - +
- - - - - -
--%> +<%-- --%> +<%-- --%> +<%-- --%> + +<%-- - - +
- - - + +
+ + + + +
diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzMaterialList.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzMaterialList.jsp index c54df08f..d0629201 100644 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzMaterialList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wz/tWzMaterialList.jsp @@ -19,14 +19,17 @@ - +<%-- --%> - - - - - - + + + + + + + + + @@ -43,9 +46,9 @@ \ No newline at end of file + diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzSpConfList.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzSpConfList.jsp index 5c0abd4f..faec679f 100644 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzSpConfList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wz/tWzSpConfList.jsp @@ -13,7 +13,7 @@ - + diff --git a/src/main/webapp/webpage/com/zzjee/wzpo/vWzPoWqList.jsp b/src/main/webapp/webpage/com/zzjee/wzpo/vWzPoWqList.jsp index 54e73277..f1be8d1c 100644 --- a/src/main/webapp/webpage/com/zzjee/wzpo/vWzPoWqList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzpo/vWzPoWqList.jsp @@ -5,6 +5,10 @@
+ + + + @@ -27,7 +31,7 @@ <%----%> <%----%> <%----%> - + <%----%> <%----%>
diff --git a/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-add.jsp b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-add.jsp new file mode 100644 index 00000000..bba9807f --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-add.jsp @@ -0,0 +1,332 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + + + 交旧领新登记表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ 创建人名称: +
+
+ + + +
+
+ + +
+
+ 创建人登录名称: +
+
+ + + +
+
+ + +
+
+ 创建日期: +
+
+ + + +
+
+ + +
+
+ 物料编码: +
+
+ + + +
+
+ + +
+
+ 物料名称: +
+
+ + + +
+
+ + +
+
+ 库存地点: +
+
+ + + +
+
+ + +
+
+ 数量: +
+
+ + + +
+
+ + +
+
+ 规格: +
+
+ + + +
+
+ + +
+
+ 单位: +
+
+ + + +
+
+ + +
+
+ 原价值: +
+
+ + + +
+
+ + +
+
+ 现价值: +
+
+ + + +
+
+ + +
+
+ 修复时间: +
+
+ + + +
+
+ + +
+
+ 修复人: +
+
+ + + +
+
+ + +
+
+ 验收人: +
+
+ + + +
+
+ + +
+
+ 修复备注: +
+
+ + + +
+
+ + +
+
+ 出库单号: +
+
+ + + +
+
+ + +
+
+ 出库项目: +
+
+ + + +
+
+ + + + + +
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-update.jsp b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-update.jsp new file mode 100644 index 00000000..11050955 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair-update.jsp @@ -0,0 +1,332 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + + + 交旧领新登记表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ 创建人名称: +
+
+ + + +
+
+ + +
+
+ 创建人登录名称: +
+
+ + + +
+
+ + +
+
+ 创建日期: +
+
+ ' /> + + +
+
+ + +
+
+ 物料编码: +
+
+ + + +
+
+ + +
+
+ 物料名称: +
+
+ + + +
+
+ + +
+
+ 库存地点: +
+
+ + + +
+
+ + +
+
+ 数量: +
+
+ + + +
+
+ + +
+
+ 规格: +
+
+ + + +
+
+ + +
+
+ 单位: +
+
+ + + +
+
+ + +
+
+ 原价值: +
+
+ + + +
+
+ + +
+
+ 现价值: +
+
+ + + +
+
+ + +
+
+ 修复时间: +
+
+ + + +
+
+ + +
+
+ 修复人: +
+
+ + + +
+
+ + +
+
+ 验收人: +
+
+ + + +
+
+ + +
+
+ 修复备注: +
+
+ + + +
+
+ + +
+
+ 出库单号: +
+
+ + + +
+
+ + +
+
+ 出库项目: +
+
+ + + +
+
+ + + + + +
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair.js b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair.js new file mode 100644 index 00000000..3c340156 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepair.js @@ -0,0 +1,28 @@ + + +//通用弹出式文件上传 +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 decode(value, id) {//value传入值,id接受值 + var last = value.lastIndexOf("/"); + var filename = value.substring(last + 1, value.length); + $("#" + id).text(decodeURIComponent(filename)); +} \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepairList.js b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepairList.js new file mode 100644 index 00000000..e69de29b diff --git a/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepairList.jsp b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepairList.jsp new file mode 100644 index 00000000..3c596ef4 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/wzrepair/tWzRepairList.jsp @@ -0,0 +1,66 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + <%----%> + + <%----%> + <%----%> + <%----%> + +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-add.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-add.jsp index f1c6c123..72e0b8a3 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-add.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-add.jsp @@ -43,32 +43,37 @@ - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> + + + + + + + + + <%----%> - - + + + + + - @@ -118,13 +123,13 @@ <%----%> <%----%> - +
--%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%--
+ + + + + + + + + +
+ + + + + - --%> <%----%> @@ -78,33 +83,33 @@ <%----%> <%----%> <%-- - - - - - <%----%> - - -
+ + + <%----%> + + 不可更改 + + -
+ -
<%-- 增加一个div,用于调节页面大小,否则默认太小 --%>
- +
@@ -139,7 +144,7 @@ - + @@ -167,8 +172,8 @@ - - + + @@ -179,4 +184,3 @@ - \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-update.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-update.jsp index a2138398..31f06b6e 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-update.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHead-update.jsp @@ -40,7 +40,7 @@ - + <%----%> @@ -105,7 +105,6 @@ <%----%> - + + + + + + + + +
- --%> <%----%> @@ -115,14 +114,37 @@ <%----%> <%----%> <%--
+ + + + +
+ + + + + + + + + +
<%-- 增加一个div,用于调节页面大小,否则默认太小 --%>
- +
@@ -167,8 +189,8 @@ - - + + @@ -177,141 +199,141 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - <%----%> - <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%--
- - - - - - - - - - - -
- - - - - - - - - - - -
- - - - - - - - - - - -
- - - - - - --%> - <%----%> - <%----%> - <%----%> + <%----%> +<%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> - + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%--<%––%>--%> + <%--<%––%>--%> + <%----%> -
--%> + <%----%> + <%----%> + <%----%> <%----%> - <%----%> - <%--
--%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%--
--%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%--
--%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%--
--%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%--–%>--%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%–
-
- <%-- 增加一个div,用于调节页面大小,否则默认太小 --%> -
- - - -
- - - - - -
- + <%--
--%> + <%--
--%> + <%--<%– 增加一个div,用于调节页面大小,否则默认太小 –%>--%> + <%--
--%> + <%----%> + <%----%> + <%----%> + <%--
--%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%-- - - - - - - - - - - - -
--%> + <%----%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+ <%----%> + <%--
--%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%----%> + <%--
--%> +<%--
--%> diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadList.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadList.jsp index 6cc739cf..be6ad8b7 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadList.jsp @@ -15,7 +15,7 @@ - + @@ -33,15 +33,15 @@ - + <%----%> <%----%> - + <%----%> <%----%> <%----%> - + <%----%> <%----%> diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadspList.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadspList.jsp index 849bcf29..694f827d 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadspList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkHeadspList.jsp @@ -13,7 +13,7 @@ - + @@ -34,10 +34,10 @@ <%----%> - <%----%> + <%----%> - + <%----%> <%----%> diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemList.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemList.jsp index 6f7e5074..8712fa04 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemList.jsp @@ -1,23 +1,23 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/context/mytags.jsp"%> @@ -58,7 +102,7 @@ 备注 - +
- 备注2 + 总价 备注3 @@ -80,14 +124,14 @@ - +<%-- --%> - +<%-- --%> - + @@ -95,7 +139,7 @@ - + @@ -111,7 +155,7 @@ - + @@ -119,8 +163,8 @@ - - + + @@ -144,14 +188,14 @@ - - +<%-- --%> +<%-- --%> - + @@ -159,7 +203,7 @@ - + @@ -175,7 +219,7 @@ - + @@ -183,8 +227,8 @@ - - + + @@ -192,6 +236,6 @@
diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemListUnEdit.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemListUnEdit.jsp index 72243fd4..ef751b32 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemListUnEdit.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzCkItemListUnEdit.jsp @@ -58,7 +58,7 @@ 备注 - 备注2 + 总价 备注3 @@ -80,8 +80,8 @@ - - +<%-- --%> +<%-- --%> @@ -119,8 +119,8 @@ - - + + @@ -144,8 +144,8 @@ - - +<%-- --%> +<%-- --%> @@ -183,8 +183,8 @@ - - + + diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-add.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-add.jsp index 773ba97f..242fb38d 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-add.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-add.jsp @@ -48,7 +48,7 @@ - + @@ -79,7 +79,16 @@ - + + + + + + + + + +
<%-- 增加一个div,用于调节页面大小,否则默认太小 --%> @@ -132,4 +141,3 @@ - \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-update.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-update.jsp index 19a4137e..e4c77c72 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-update.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHead-update.jsp @@ -48,7 +48,7 @@ - + @@ -79,7 +79,16 @@ - + + + + + + + + + +
<%-- 增加一个div,用于调节页面大小,否则默认太小 --%> @@ -97,8 +106,8 @@ - - + + diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadList.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadList.jsp index a25270c0..b0c32f64 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadList.jsp @@ -14,25 +14,26 @@ - - + <%----%> + - + - + <%-- --%> + <%----%> <%----%> - + <%----%> <%----%>
@@ -75,4 +76,4 @@ function ExportXls() { function ExportXlsByT() { JeecgExcelExport("tWzPoHeadController.do?exportXlsByT","tWzPoHeadList"); } - \ No newline at end of file + diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadspList.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadspList.jsp index acd69868..68931917 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadspList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzPoHeadspList.jsp @@ -15,8 +15,8 @@ - - + <%----%> + @@ -30,7 +30,7 @@ <%----%> <%----%> - + <%----%> <%----%>
diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHead-update.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHead-update.jsp index 49ae8aad..54b27ea0 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHead-update.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHead-update.jsp @@ -54,7 +54,7 @@ - + diff --git a/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHeadList.jsp b/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHeadList.jsp index 71206c28..7a66a7bb 100644 --- a/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHeadList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wzyw/tWzRkHeadList.jsp @@ -13,7 +13,7 @@ - + <%----%> @@ -26,9 +26,9 @@ - + - + <%----%> <%----%> <%----%> @@ -36,7 +36,7 @@ <%----%> <%----%> - + <%----%> <%----%> @@ -81,4 +81,4 @@ function ExportXls() { function ExportXlsByT() { JeecgExcelExport("tWzRkHeadController.do?exportXlsByT","tWzRkHeadList"); } - \ No newline at end of file +