diff --git a/src/main/java/com/zzjee/wz/controller/TWzVendorController.java b/src/main/java/com/zzjee/wz/controller/TWzVendorController.java deleted file mode 100644 index 868f5c19..00000000 --- a/src/main/java/com/zzjee/wz/controller/TWzVendorController.java +++ /dev/null @@ -1,460 +0,0 @@ -package com.zzjee.wz.controller; -import com.zzjee.wz.entity.TWzVendorEntity; -import com.zzjee.wz.service.TWzVendorServiceI; -import java.util.ArrayList; -import java.util.List; -import java.text.SimpleDateFormat; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.servlet.ModelAndView; - -import org.jeecgframework.core.common.controller.BaseController; -import org.jeecgframework.core.common.exception.BusinessException; -import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery; -import org.jeecgframework.core.common.model.common.TreeChildCount; -import org.jeecgframework.core.common.model.json.AjaxJson; -import org.jeecgframework.core.common.model.json.DataGrid; -import org.jeecgframework.core.constant.Globals; -import org.jeecgframework.core.util.StringUtil; -import org.jeecgframework.tag.core.easyui.TagUtil; -import org.jeecgframework.web.system.pojo.base.TSDepart; -import org.jeecgframework.web.system.service.SystemService; -import org.jeecgframework.core.util.MyBeanUtils; - -import java.io.OutputStream; -import org.jeecgframework.core.util.BrowserUtils; -import org.jeecgframework.poi.excel.ExcelExportUtil; -import org.jeecgframework.poi.excel.ExcelImportUtil; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.entity.ImportParams; -import org.jeecgframework.poi.excel.entity.TemplateExportParams; -import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.jeecgframework.core.util.ResourceUtil; -import java.io.IOException; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; -import java.util.Map; -import java.util.HashMap; -import org.jeecgframework.core.util.ExceptionUtil; - -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.jeecgframework.core.beanvalidator.BeanValidators; -import java.util.Set; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; -import java.net.URI; -import org.springframework.http.MediaType; -import org.springframework.web.util.UriComponentsBuilder; -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 org.jeecgframework.web.cgform.entity.upload.CgUploadEntity; -import org.jeecgframework.web.cgform.service.config.CgFormFieldServiceI; -import java.util.HashMap; -/** - * @Title: Controller - * @Description: 物资供应商 - * @author onlineGenerator - * @date 2018-05-20 21:40:25 - * @version V1.0 - * - */ -@Api(value="TWzVendor",description="物资供应商",tags="tWzVendorController") -@Controller -@RequestMapping("/tWzVendorController") -public class TWzVendorController extends BaseController { - /** - * Logger for this class - */ - private static final Logger logger = Logger.getLogger(TWzVendorController.class); - - @Autowired - private TWzVendorServiceI tWzVendorService; - @Autowired - private SystemService systemService; - @Autowired - private Validator validator; - @Autowired - private CgFormFieldServiceI cgFormFieldService; - - - - /** - * 物资供应商列表 页面跳转 - * - * @return - */ - @RequestMapping(params = "list") - public ModelAndView list(HttpServletRequest request) { - return new ModelAndView("com/zzjee/wz/tWzVendorList"); - } - - /** - * easyui AJAX请求数据 - * - * @param request - * @param response - * @param dataGrid - * @param user - */ - - @RequestMapping(params = "datagrid") - public void datagrid(TWzVendorEntity tWzVendor,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { - CriteriaQuery cq = new CriteriaQuery(TWzVendorEntity.class, dataGrid); - //查询条件组装器 - org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzVendor, request.getParameterMap()); - try{ - //自定义追加查询条件 - }catch (Exception e) { - throw new BusinessException(e.getMessage()); - } - cq.add(); - this.tWzVendorService.getDataGridReturn(cq, true); - TagUtil.datagrid(response, dataGrid); - } - - /** - * 删除物资供应商 - * - * @return - */ - @RequestMapping(params = "doDel") - @ResponseBody - public AjaxJson doDel(TWzVendorEntity tWzVendor, HttpServletRequest request) { - String message = null; - AjaxJson j = new AjaxJson(); - tWzVendor = systemService.getEntity(TWzVendorEntity.class, tWzVendor.getId()); - message = "物资供应商删除成功"; - try{ - tWzVendorService.delete(tWzVendor); - 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(",")){ - TWzVendorEntity tWzVendor = systemService.getEntity(TWzVendorEntity.class, - Integer.parseInt(id) - ); - tWzVendorService.delete(tWzVendor); - 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(TWzVendorEntity tWzVendor, HttpServletRequest request) { - String message = null; - AjaxJson j = new AjaxJson(); - message = "物资供应商添加成功"; - try{ - tWzVendorService.save(tWzVendor); - 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); - j.setObj(tWzVendor); - return j; - } - - /** - * 更新物资供应商 - * - * @param ids - * @return - */ - @RequestMapping(params = "doUpdate") - @ResponseBody - public AjaxJson doUpdate(TWzVendorEntity tWzVendor, HttpServletRequest request) { - String message = null; - AjaxJson j = new AjaxJson(); - message = "物资供应商更新成功"; - TWzVendorEntity t = tWzVendorService.get(TWzVendorEntity.class, tWzVendor.getId()); - try { - MyBeanUtils.copyBeanNotNull2Bean(tWzVendor, t); - tWzVendorService.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(TWzVendorEntity tWzVendor, HttpServletRequest req) { - if (StringUtil.isNotEmpty(tWzVendor.getId())) { - tWzVendor = tWzVendorService.getEntity(TWzVendorEntity.class, tWzVendor.getId()); - req.setAttribute("tWzVendorPage", tWzVendor); - } - return new ModelAndView("com/zzjee/wz/tWzVendor-add"); - } - /** - * 物资供应商编辑页面跳转 - * - * @return - */ - @RequestMapping(params = "goUpdate") - public ModelAndView goUpdate(TWzVendorEntity tWzVendor, HttpServletRequest req) { - if (StringUtil.isNotEmpty(tWzVendor.getId())) { - tWzVendor = tWzVendorService.getEntity(TWzVendorEntity.class, tWzVendor.getId()); - req.setAttribute("tWzVendorPage", tWzVendor); - } - return new ModelAndView("com/zzjee/wz/tWzVendor-update"); - } - - /** - * 导入功能跳转 - * - * @return - */ - @RequestMapping(params = "upload") - public ModelAndView upload(HttpServletRequest req) { - req.setAttribute("controller_name","tWzVendorController"); - return new ModelAndView("common/upload/pub_excel_upload"); - } - - /** - * 导出excel - * - * @param request - * @param response - */ - @RequestMapping(params = "exportXls") - public String exportXls(TWzVendorEntity tWzVendor,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { - CriteriaQuery cq = new CriteriaQuery(TWzVendorEntity.class, dataGrid); - org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tWzVendor, request.getParameterMap()); - List tWzVendors = this.tWzVendorService.getListByCriteriaQuery(cq,false); - modelMap.put(NormalExcelConstants.FILE_NAME,"物资供应商"); - modelMap.put(NormalExcelConstants.CLASS,TWzVendorEntity.class); - modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("物资供应商列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), - "导出信息")); - modelMap.put(NormalExcelConstants.DATA_LIST,tWzVendors); - return NormalExcelConstants.JEECG_EXCEL_VIEW; - } - /** - * 导出excel 使模板 - * - * @param request - * @param response - */ - @RequestMapping(params = "exportXlsByT") - public String exportXlsByT(TWzVendorEntity tWzVendor,HttpServletRequest request,HttpServletResponse response - , DataGrid dataGrid,ModelMap modelMap) { - modelMap.put(NormalExcelConstants.FILE_NAME,"物资供应商"); - modelMap.put(NormalExcelConstants.CLASS,TWzVendorEntity.class); - 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()) { - MultipartFile file = entity.getValue();// 获取上传文件对象 - ImportParams params = new ImportParams(); - params.setTitleRows(2); - params.setHeadRows(1); - params.setNeedSave(true); - try { - List listTWzVendorEntitys = ExcelImportUtil.importExcel(file.getInputStream(),TWzVendorEntity.class,params); - for (TWzVendorEntity tWzVendor : listTWzVendorEntitys) { - tWzVendorService.save(tWzVendor); - } - j.setMsg("文件导入成功!"); - } catch (Exception e) { - j.setMsg("文件导入失败!"); - logger.error(ExceptionUtil.getExceptionMessage(e)); - }finally{ - try { - file.getInputStream().close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - return j; - } - - /** - * 获取文件附件信息 - * - * @param id tWzVendor主键id - */ - @RequestMapping(params = "getFiles") - @ResponseBody - public AjaxJson getFiles(String id){ - List uploadBeans = cgFormFieldService.findByProperty(CgUploadEntity.class, "cgformId", id); - List> files = new ArrayList>(0); - for(CgUploadEntity b:uploadBeans){ - String title = b.getAttachmenttitle();//附件名 - String fileKey = b.getId();//附件主键 - String path = b.getRealpath();//附件路径 - String field = b.getCgformField();//表单中作为附件控件的字段 - Map file = new HashMap(); - file.put("title", title); - file.put("fileKey", fileKey); - file.put("path", path); - file.put("field", field==null?"":field); - files.add(file); - } - AjaxJson j = new AjaxJson(); - j.setObj(files); - return j; - } - @RequestMapping(method = RequestMethod.GET) - @ResponseBody - @ApiOperation(value="物资供应商列表信息",produces="application/json",httpMethod="GET") - public ResponseMessage> list() { - List listTWzVendors=tWzVendorService.getList(TWzVendorEntity.class); - return Result.success(listTWzVendors); - } - - @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) { - TWzVendorEntity task = tWzVendorService.get(TWzVendorEntity.class, id); - if (task == null) { - return Result.error("根据ID获取物资供应商信息为空"); - } - return Result.success(task); - } - - @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - @ApiOperation(value="创建物资供应商") - public ResponseMessage create(@ApiParam(name="物资供应商对象")@RequestBody TWzVendorEntity tWzVendor, UriComponentsBuilder uriBuilder) { - //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. - Set> failures = validator.validate(tWzVendor); - if (!failures.isEmpty()) { - return Result.error(JSONArray.toJSONString(BeanValidators.extractPropertyAndMessage(failures))); - } - - //保存 - try{ - tWzVendorService.save(tWzVendor); - } catch (Exception e) { - e.printStackTrace(); - return Result.error("物资供应商信息保存失败"); - } - return Result.success(tWzVendor); - } - - @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - @ApiOperation(value="更新物资供应商",notes="更新物资供应商") - public ResponseMessage update(@ApiParam(name="物资供应商对象")@RequestBody TWzVendorEntity tWzVendor) { - //调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息. - Set> failures = validator.validate(tWzVendor); - if (!failures.isEmpty()) { - return Result.error(JSONArray.toJSONString(BeanValidators.extractPropertyAndMessage(failures))); - } - - //保存 - try{ - tWzVendorService.saveOrUpdate(tWzVendor); - } catch (Exception e) { - e.printStackTrace(); - return Result.error("更新物资供应商信息失败"); - } - - //按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 { - tWzVendorService.deleteEntityById(TWzVendorEntity.class, id); - } catch (Exception e) { - e.printStackTrace(); - return Result.error("物资供应商删除失败"); - } - - return Result.success(); - } -} diff --git a/src/main/java/com/zzjee/wz/entity/TWzVendorEntity.java b/src/main/java/com/zzjee/wz/entity/TWzVendorEntity.java deleted file mode 100644 index 4994733a..00000000 --- a/src/main/java/com/zzjee/wz/entity/TWzVendorEntity.java +++ /dev/null @@ -1,481 +0,0 @@ -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; - -/** - * @Title: Entity - * @Description: 物资供应商 - * @author onlineGenerator - * @date 2018-05-20 21:40:25 - * @version V1.0 - * - */ -@Entity -@Table(name = "t_wz_vendor", schema = "") -@SuppressWarnings("serial") -public class TWzVendorEntity implements java.io.Serializable { - /**主键*/ - private Integer id; - /**创建人名称*/ - private String createName; - /**创建人登录名称*/ - private String createBy; - /**创建日期*/ - private Date createDate; - /**更新人名称*/ - private String updateName; - /**更新人登录名称*/ - private String updateBy; - /**更新日期*/ - private Date updateDate; - /**所属部门*/ - private String sysOrgCode; - /**所属公司*/ - private String sysCompanyCode; - /**流程状态*/ - private String bpmStatus; - /**供应商编码*/ - @Excel(name="供应商编码",width=15) - private String vendorCode; - /**供应商名称*/ - @Excel(name="供应商名称",width=15) - private String vendorName; - /**税号*/ - @Excel(name="税号",width=15) - private String vendorShuihao; - /**联系人*/ - @Excel(name="联系人",width=15) - private String vendorLianxren; - /**联系电话*/ - @Excel(name="联系电话",width=15) - private String vendorMobile; - /**地址*/ - @Excel(name="地址",width=15) - private String vendorAddr; - /**备注*/ - @Excel(name="备注",width=15) - private String vendorText; - /**附件*/ - @Excel(name="附件",width=15) - private String vendorAttch; - /**备用1*/ - private String by1; - /**备用2*/ - private String by2; - /**备用3*/ - 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; - } - - /** - *方法: 设置java.lang.Integer - *@param: java.lang.Integer 主键 - */ - 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; - } - - /** - *方法: 设置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 ="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=132) - public String getVendorName(){ - return this.vendorName; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 供应商名称 - */ - public void setVendorName(String vendorName){ - this.vendorName = vendorName; - } - /** - *方法: 取得java.lang.String - *@return: java.lang.String 税号 - */ - - @Column(name ="VENDOR_SHUIHAO",nullable=true,length=32) - public String getVendorShuihao(){ - return this.vendorShuihao; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 税号 - */ - public void setVendorShuihao(String vendorShuihao){ - this.vendorShuihao = vendorShuihao; - } - /** - *方法: 取得java.lang.String - *@return: java.lang.String 联系人 - */ - - @Column(name ="VENDOR_LIANXREN",nullable=true,length=32) - public String getVendorLianxren(){ - return this.vendorLianxren; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 联系人 - */ - public void setVendorLianxren(String vendorLianxren){ - this.vendorLianxren = vendorLianxren; - } - /** - *方法: 取得java.lang.String - *@return: java.lang.String 联系电话 - */ - - @Column(name ="VENDOR_MOBILE",nullable=true,length=32) - public String getVendorMobile(){ - return this.vendorMobile; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 联系电话 - */ - public void setVendorMobile(String vendorMobile){ - this.vendorMobile = vendorMobile; - } - /** - *方法: 取得java.lang.String - *@return: java.lang.String 地址 - */ - - @Column(name ="VENDOR_ADDR",nullable=true,length=132) - public String getVendorAddr(){ - return this.vendorAddr; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 地址 - */ - public void setVendorAddr(String vendorAddr){ - this.vendorAddr = vendorAddr; - } - /** - *方法: 取得java.lang.String - *@return: java.lang.String 备注 - */ - - @Column(name ="VENDOR_TEXT",nullable=true,length=132) - public String getVendorText(){ - return this.vendorText; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 备注 - */ - public void setVendorText(String vendorText){ - this.vendorText = vendorText; - } - /** - *方法: 取得java.lang.String - *@return: java.lang.String 附件 - */ - - @Column(name ="VENDOR_ATTCH",nullable=true,length=232) - public String getVendorAttch(){ - return this.vendorAttch; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 附件 - */ - public void setVendorAttch(String vendorAttch){ - this.vendorAttch = vendorAttch; - } - /** - *方法: 取得java.lang.String - *@return: java.lang.String 备用1 - */ - - @Column(name ="BY1",nullable=true,length=32) - public String getBy1(){ - return this.by1; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 备用1 - */ - 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; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 备用2 - */ - 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; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 备用3 - */ - 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; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 备用4 - */ - 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; - } - - /** - *方法: 设置java.lang.String - *@param: java.lang.String 备用5 - */ - public void setBy5(String by5){ - this.by5 = by5; - } -} diff --git a/src/main/java/com/zzjee/wz/service/TWzVendorServiceI.java b/src/main/java/com/zzjee/wz/service/TWzVendorServiceI.java deleted file mode 100644 index 8b423d2c..00000000 --- a/src/main/java/com/zzjee/wz/service/TWzVendorServiceI.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.zzjee.wz.service; -import com.zzjee.wz.entity.TWzVendorEntity; -import org.jeecgframework.core.common.service.CommonService; - -import java.io.Serializable; - -public interface TWzVendorServiceI extends CommonService{ - - public void delete(TWzVendorEntity entity) throws Exception; - - public Serializable save(TWzVendorEntity entity) throws Exception; - - public void saveOrUpdate(TWzVendorEntity entity) throws Exception; - -} diff --git a/src/main/java/com/zzjee/wz/service/impl/TWzLocationServiceImpl.java b/src/main/java/com/zzjee/wz/service/impl/TWzLocationServiceImpl.java deleted file mode 100644 index 9a460083..00000000 --- a/src/main/java/com/zzjee/wz/service/impl/TWzLocationServiceImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.zzjee.wz.service.impl; -import com.zzjee.wz.service.TWzLocationServiceI; -import org.jeecgframework.core.common.service.impl.CommonServiceImpl; -import com.zzjee.wz.entity.TWzLocationEntity; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import java.io.Serializable; -import org.jeecgframework.core.util.ApplicationContextUtil; -import org.jeecgframework.core.util.MyClassLoader; -import org.jeecgframework.core.util.StringUtil; -import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter; - -@Service("tWzLocationService") -@Transactional -public class TWzLocationServiceImpl extends CommonServiceImpl implements TWzLocationServiceI { - - - public void delete(TWzLocationEntity entity) throws Exception{ - super.delete(entity); - //执行删除操作增强业务 - this.doDelBus(entity); - } - - public Serializable save(TWzLocationEntity entity) throws Exception{ - Serializable t = super.save(entity); - //执行新增操作增强业务 - this.doAddBus(entity); - return t; - } - - public void saveOrUpdate(TWzLocationEntity entity) throws Exception{ - super.saveOrUpdate(entity); - //执行更新操作增强业务 - this.doUpdateBus(entity); - } - - /** - * 新增操作增强业务 - * @param t - * @return - */ - private void doAddBus(TWzLocationEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 更新操作增强业务 - * @param t - * @return - */ - private void doUpdateBus(TWzLocationEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 删除操作增强业务 - * @param id - * @return - */ - private void doDelBus(TWzLocationEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - - private Map populationMap(TWzLocationEntity 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_location", t.getMatLocation()); - return map; - } - - /** - * 替换sql中的变量 - * @param sql - * @param t - * @return - */ - public String replaceVal(String sql,TWzLocationEntity 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_location}",String.valueOf(t.getMatLocation())); - 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_location",data); - } - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("执行JAVA增强出现异常!"); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/com/zzjee/wz/service/impl/TWzMaterialServiceImpl.java b/src/main/java/com/zzjee/wz/service/impl/TWzMaterialServiceImpl.java deleted file mode 100644 index 0020e082..00000000 --- a/src/main/java/com/zzjee/wz/service/impl/TWzMaterialServiceImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.zzjee.wz.service.impl; -import com.zzjee.wz.service.TWzMaterialServiceI; -import org.jeecgframework.core.common.service.impl.CommonServiceImpl; -import com.zzjee.wz.entity.TWzMaterialEntity; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import java.io.Serializable; -import org.jeecgframework.core.util.ApplicationContextUtil; -import org.jeecgframework.core.util.MyClassLoader; -import org.jeecgframework.core.util.StringUtil; -import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter; - -@Service("tWzMaterialService") -@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 - * @return - */ - private void doAddBus(TWzMaterialEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 更新操作增强业务 - * @param t - * @return - */ - private void doUpdateBus(TWzMaterialEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 删除操作增强业务 - * @param id - * @return - */ - 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()); - 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_unit", t.getMatUnit()); - map.put("mat_guige", t.getMatGuige()); - map.put("mat_class", t.getMatClass()); - map.put("mat_price", t.getMatPrice()); - map.put("mat_aqkc", t.getMatAqkc()); - map.put("mat_location", t.getMatLocation()); - map.put("by1", t.getBy1()); - map.put("by2", t.getBy2()); - map.put("by3", t.getBy3()); - map.put("by4", t.getBy4()); - map.put("by5", t.getBy5()); - return map; - } - - /** - * 替换sql中的变量 - * @param sql - * @param t - * @return - */ - 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())); - 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_unit}",String.valueOf(t.getMatUnit())); - sql = sql.replace("#{mat_guige}",String.valueOf(t.getMatGuige())); - sql = sql.replace("#{mat_class}",String.valueOf(t.getMatClass())); - sql = sql.replace("#{mat_price}",String.valueOf(t.getMatPrice())); - sql = sql.replace("#{mat_aqkc}",String.valueOf(t.getMatAqkc())); - sql = sql.replace("#{mat_location}",String.valueOf(t.getMatLocation())); - sql = sql.replace("#{by1}",String.valueOf(t.getBy1())); - sql = sql.replace("#{by2}",String.valueOf(t.getBy2())); - sql = sql.replace("#{by3}",String.valueOf(t.getBy3())); - sql = sql.replace("#{by4}",String.valueOf(t.getBy4())); - sql = sql.replace("#{by5}",String.valueOf(t.getBy5())); - 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_material",data); - } - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("执行JAVA增强出现异常!"); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/com/zzjee/wz/service/impl/TWzSpConfServiceImpl.java b/src/main/java/com/zzjee/wz/service/impl/TWzSpConfServiceImpl.java deleted file mode 100644 index a9201ea4..00000000 --- a/src/main/java/com/zzjee/wz/service/impl/TWzSpConfServiceImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.zzjee.wz.service.impl; -import com.zzjee.wz.service.TWzSpConfServiceI; -import org.jeecgframework.core.common.service.impl.CommonServiceImpl; -import com.zzjee.wz.entity.TWzSpConfEntity; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import java.io.Serializable; -import org.jeecgframework.core.util.ApplicationContextUtil; -import org.jeecgframework.core.util.MyClassLoader; -import org.jeecgframework.core.util.StringUtil; -import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter; - -@Service("tWzSpConfService") -@Transactional -public class TWzSpConfServiceImpl extends CommonServiceImpl implements TWzSpConfServiceI { - - - public void delete(TWzSpConfEntity entity) throws Exception{ - super.delete(entity); - //执行删除操作增强业务 - this.doDelBus(entity); - } - - public Serializable save(TWzSpConfEntity entity) throws Exception{ - Serializable t = super.save(entity); - //执行新增操作增强业务 - this.doAddBus(entity); - return t; - } - - public void saveOrUpdate(TWzSpConfEntity entity) throws Exception{ - super.saveOrUpdate(entity); - //执行更新操作增强业务 - this.doUpdateBus(entity); - } - - /** - * 新增操作增强业务 - * @param t - * @return - */ - private void doAddBus(TWzSpConfEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 更新操作增强业务 - * @param t - * @return - */ - private void doUpdateBus(TWzSpConfEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 删除操作增强业务 - * @param id - * @return - */ - private void doDelBus(TWzSpConfEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - - private Map populationMap(TWzSpConfEntity 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("sp_type", t.getSpType()); - map.put("sp_jine", t.getSpJine()); - map.put("sp_username", t.getSpUsername()); - map.put("sp_remark", t.getSpRemark()); - return map; - } - - /** - * 替换sql中的变量 - * @param sql - * @param t - * @return - */ - public String replaceVal(String sql,TWzSpConfEntity 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("#{sp_type}",String.valueOf(t.getSpType())); - sql = sql.replace("#{sp_jine}",String.valueOf(t.getSpJine())); - sql = sql.replace("#{sp_username}",String.valueOf(t.getSpUsername())); - sql = sql.replace("#{sp_remark}",String.valueOf(t.getSpRemark())); - 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_sp_conf",data); - } - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("执行JAVA增强出现异常!"); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/com/zzjee/wz/service/impl/TWzVendorServiceImpl.java b/src/main/java/com/zzjee/wz/service/impl/TWzVendorServiceImpl.java deleted file mode 100644 index 2d924a21..00000000 --- a/src/main/java/com/zzjee/wz/service/impl/TWzVendorServiceImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.zzjee.wz.service.impl; -import com.zzjee.wz.service.TWzVendorServiceI; -import org.jeecgframework.core.common.service.impl.CommonServiceImpl; -import com.zzjee.wz.entity.TWzVendorEntity; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import java.io.Serializable; -import org.jeecgframework.core.util.ApplicationContextUtil; -import org.jeecgframework.core.util.MyClassLoader; -import org.jeecgframework.core.util.StringUtil; -import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter; - -@Service("tWzVendorService") -@Transactional -public class TWzVendorServiceImpl extends CommonServiceImpl implements TWzVendorServiceI { - - - public void delete(TWzVendorEntity entity) throws Exception{ - super.delete(entity); - //执行删除操作增强业务 - this.doDelBus(entity); - } - - public Serializable save(TWzVendorEntity entity) throws Exception{ - Serializable t = super.save(entity); - //执行新增操作增强业务 - this.doAddBus(entity); - return t; - } - - public void saveOrUpdate(TWzVendorEntity entity) throws Exception{ - super.saveOrUpdate(entity); - //执行更新操作增强业务 - this.doUpdateBus(entity); - } - - /** - * 新增操作增强业务 - * @param t - * @return - */ - private void doAddBus(TWzVendorEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 更新操作增强业务 - * @param t - * @return - */ - private void doUpdateBus(TWzVendorEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - /** - * 删除操作增强业务 - * @param id - * @return - */ - private void doDelBus(TWzVendorEntity t) throws Exception{ - //-----------------sql增强 start---------------------------- - //-----------------sql增强 end------------------------------ - - //-----------------java增强 start--------------------------- - //-----------------java增强 end----------------------------- - } - - private Map populationMap(TWzVendorEntity 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("vendor_code", t.getVendorCode()); - map.put("vendor_name", t.getVendorName()); - map.put("vendor_shuihao", t.getVendorShuihao()); - map.put("vendor_lianxren", t.getVendorLianxren()); - map.put("vendor_mobile", t.getVendorMobile()); - map.put("vendor_addr", t.getVendorAddr()); - map.put("vendor_text", t.getVendorText()); - map.put("vendor_attch", t.getVendorAttch()); - map.put("by1", t.getBy1()); - map.put("by2", t.getBy2()); - map.put("by3", t.getBy3()); - map.put("by4", t.getBy4()); - map.put("by5", t.getBy5()); - return map; - } - - /** - * 替换sql中的变量 - * @param sql - * @param t - * @return - */ - public String replaceVal(String sql,TWzVendorEntity 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("#{vendor_code}",String.valueOf(t.getVendorCode())); - sql = sql.replace("#{vendor_name}",String.valueOf(t.getVendorName())); - sql = sql.replace("#{vendor_shuihao}",String.valueOf(t.getVendorShuihao())); - sql = sql.replace("#{vendor_lianxren}",String.valueOf(t.getVendorLianxren())); - sql = sql.replace("#{vendor_mobile}",String.valueOf(t.getVendorMobile())); - sql = sql.replace("#{vendor_addr}",String.valueOf(t.getVendorAddr())); - sql = sql.replace("#{vendor_text}",String.valueOf(t.getVendorText())); - sql = sql.replace("#{vendor_attch}",String.valueOf(t.getVendorAttch())); - sql = sql.replace("#{by1}",String.valueOf(t.getBy1())); - sql = sql.replace("#{by2}",String.valueOf(t.getBy2())); - sql = sql.replace("#{by3}",String.valueOf(t.getBy3())); - sql = sql.replace("#{by4}",String.valueOf(t.getBy4())); - sql = sql.replace("#{by5}",String.valueOf(t.getBy5())); - 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_vendor",data); - } - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("执行JAVA增强出现异常!"); - } - } - } -} \ No newline at end of file diff --git a/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java b/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java index 959a8f9e..3fe42a64 100644 --- a/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java +++ b/src/main/java/com/zzjee/wzyw/controller/TWzPoHeadController.java @@ -137,6 +137,7 @@ public class TWzPoHeadController extends BaseController { 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); diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzVendor-add.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzVendor-add.jsp deleted file mode 100644 index 0f7ba153..00000000 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzVendor-add.jsp +++ /dev/null @@ -1,174 +0,0 @@ -<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@include file="/context/mytags.jsp"%> - - - - 物资供应商 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - -
- - - - - -
-
- - - diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzVendor-update.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzVendor-update.jsp deleted file mode 100644 index 06aaedc9..00000000 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzVendor-update.jsp +++ /dev/null @@ -1,254 +0,0 @@ -<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@include file="/context/mytags.jsp"%> - - - - 物资供应商 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
-
- - - diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzVendor.js b/src/main/webapp/webpage/com/zzjee/wz/tWzVendor.js deleted file mode 100644 index 5ec72b64..00000000 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzVendor.js +++ /dev/null @@ -1,32 +0,0 @@ - - -//通用弹出式文件上传 -function commonUpload(callback){ - $.dialog({ - content: "url:systemController.do?commonUpload", - lock : true, - title:"文件上传", - zIndex:2100, - width:700, - height: 200, - parent:windowapi, - cache:false, - ok: function(){ - var iframe = this.iframe.contentWindow; - iframe.uploadCallback(callback); - return true; - }, - cancelVal: '关闭', - cancel: function(){ - } - }); -} -function browseImages(inputId, Img) {// 图片管理器,可多个上传共用 -} -function browseFiles(inputId, file) {// 文件管理器,可多个上传共用 -} -function decode(value, id) {//value传入值,id接受值 - var last = value.lastIndexOf("/"); - var filename = value.substring(last + 1, value.length); - $("#" + id).text(decodeURIComponent(filename)); -} \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzVendorList.js b/src/main/webapp/webpage/com/zzjee/wz/tWzVendorList.js deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/webapp/webpage/com/zzjee/wz/tWzVendorList.jsp b/src/main/webapp/webpage/com/zzjee/wz/tWzVendorList.jsp deleted file mode 100644 index 1c2ff298..00000000 --- a/src/main/webapp/webpage/com/zzjee/wz/tWzVendorList.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@include file="/context/mytags.jsp"%> - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - <%----%> - - - <%----%> - - <%----%> - - <%----%> - -
-
- - \ No newline at end of file