增加进销存模块数据库
parent
fddc48af2d
commit
fac946f19b
|
@ -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<TWzVendorEntity> 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<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<TWzVendorEntity> 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<CgUploadEntity> uploadBeans = cgFormFieldService.findByProperty(CgUploadEntity.class, "cgformId", id);
|
||||
List<Map<String,Object>> files = new ArrayList<Map<String,Object>>(0);
|
||||
for(CgUploadEntity b:uploadBeans){
|
||||
String title = b.getAttachmenttitle();//附件名
|
||||
String fileKey = b.getId();//附件主键
|
||||
String path = b.getRealpath();//附件路径
|
||||
String field = b.getCgformField();//表单中作为附件控件的字段
|
||||
Map<String, Object> file = new HashMap<String, Object>();
|
||||
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<TWzVendorEntity>> list() {
|
||||
List<TWzVendorEntity> 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<ConstraintViolation<TWzVendorEntity>> 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<ConstraintViolation<TWzVendorEntity>> 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();
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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<String,Object> populationMap(TWzLocationEntity t){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("id", t.getId());
|
||||
map.put("create_name", t.getCreateName());
|
||||
map.put("create_by", t.getCreateBy());
|
||||
map.put("create_date", t.getCreateDate());
|
||||
map.put("update_name", t.getUpdateName());
|
||||
map.put("update_by", t.getUpdateBy());
|
||||
map.put("update_date", t.getUpdateDate());
|
||||
map.put("sys_org_code", t.getSysOrgCode());
|
||||
map.put("sys_company_code", t.getSysCompanyCode());
|
||||
map.put("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<String,Object> data) throws Exception {
|
||||
if(StringUtil.isNotEmpty(cgJavaValue)){
|
||||
Object obj = null;
|
||||
try {
|
||||
if("class".equals(cgJavaType)){
|
||||
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
|
||||
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
|
||||
}else if("spring".equals(cgJavaType)){
|
||||
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
|
||||
}
|
||||
if(obj instanceof CgformEnhanceJavaInter){
|
||||
CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
|
||||
javaInter.execute("t_wz_location",data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Exception("执行JAVA增强出现异常!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<String,Object> populationMap(TWzMaterialEntity t){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("id", t.getId());
|
||||
map.put("create_name", t.getCreateName());
|
||||
map.put("create_by", t.getCreateBy());
|
||||
map.put("create_date", t.getCreateDate());
|
||||
map.put("update_name", t.getUpdateName());
|
||||
map.put("update_by", t.getUpdateBy());
|
||||
map.put("update_date", t.getUpdateDate());
|
||||
map.put("sys_org_code", t.getSysOrgCode());
|
||||
map.put("sys_company_code", t.getSysCompanyCode());
|
||||
map.put("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<String,Object> data) throws Exception {
|
||||
if(StringUtil.isNotEmpty(cgJavaValue)){
|
||||
Object obj = null;
|
||||
try {
|
||||
if("class".equals(cgJavaType)){
|
||||
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
|
||||
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
|
||||
}else if("spring".equals(cgJavaType)){
|
||||
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
|
||||
}
|
||||
if(obj instanceof CgformEnhanceJavaInter){
|
||||
CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
|
||||
javaInter.execute("t_wz_material",data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Exception("执行JAVA增强出现异常!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<String,Object> populationMap(TWzSpConfEntity t){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("id", t.getId());
|
||||
map.put("create_name", t.getCreateName());
|
||||
map.put("create_by", t.getCreateBy());
|
||||
map.put("create_date", t.getCreateDate());
|
||||
map.put("update_name", t.getUpdateName());
|
||||
map.put("update_by", t.getUpdateBy());
|
||||
map.put("update_date", t.getUpdateDate());
|
||||
map.put("sys_org_code", t.getSysOrgCode());
|
||||
map.put("sys_company_code", t.getSysCompanyCode());
|
||||
map.put("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<String,Object> data) throws Exception {
|
||||
if(StringUtil.isNotEmpty(cgJavaValue)){
|
||||
Object obj = null;
|
||||
try {
|
||||
if("class".equals(cgJavaType)){
|
||||
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
|
||||
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
|
||||
}else if("spring".equals(cgJavaType)){
|
||||
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
|
||||
}
|
||||
if(obj instanceof CgformEnhanceJavaInter){
|
||||
CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
|
||||
javaInter.execute("t_wz_sp_conf",data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Exception("执行JAVA增强出现异常!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<String,Object> populationMap(TWzVendorEntity t){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("id", t.getId());
|
||||
map.put("create_name", t.getCreateName());
|
||||
map.put("create_by", t.getCreateBy());
|
||||
map.put("create_date", t.getCreateDate());
|
||||
map.put("update_name", t.getUpdateName());
|
||||
map.put("update_by", t.getUpdateBy());
|
||||
map.put("update_date", t.getUpdateDate());
|
||||
map.put("sys_org_code", t.getSysOrgCode());
|
||||
map.put("sys_company_code", t.getSysCompanyCode());
|
||||
map.put("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<String,Object> data) throws Exception {
|
||||
if(StringUtil.isNotEmpty(cgJavaValue)){
|
||||
Object obj = null;
|
||||
try {
|
||||
if("class".equals(cgJavaType)){
|
||||
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
|
||||
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
|
||||
}else if("spring".equals(cgJavaType)){
|
||||
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
|
||||
}
|
||||
if(obj instanceof CgformEnhanceJavaInter){
|
||||
CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
|
||||
javaInter.execute("t_wz_vendor",data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Exception("执行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);
|
||||
|
|
|
@ -1,174 +0,0 @@
|
|||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>物资供应商</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css" />
|
||||
<script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="tWzVendorController.do?doAdd" callback="jeecgFormFileCallBack@Override">
|
||||
<input id="id" name="id" type="hidden" value="${tWzVendorPage.id }"/>
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
供应商编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorCode" name="vendorCode" type="text" style="width: 150px" class="inputxt" validType="t_wz_vendor,vendor_code,id" datatype="*" ignore="checked" />
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">供应商编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
供应商名称:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorName" name="vendorName" type="text" style="width: 150px" class="inputxt" datatype="*" ignore="checked" />
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">供应商名称</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
税号:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorShuihao" name="vendorShuihao" type="text" style="width: 150px" class="inputxt" validType="t_wz_vendor,vendor_shuihao,id" datatype="*" ignore="ignore" />
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">税号</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
联系人:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorLianxren" name="vendorLianxren" type="text" style="width: 150px" class="inputxt" ignore="ignore" />
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">联系人</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
联系电话:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorMobile" name="vendorMobile" type="text" style="width: 150px" class="inputxt" ignore="ignore" />
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">联系电话</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
地址:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorAddr" name="vendorAddr" type="text" style="width: 150px" class="inputxt" ignore="ignore" />
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">地址</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
附件:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<t:webUploader name="vendorAttch" auto="true" extensions="doc,txt,jpg,*" buttonStyle="btn-green btn-L" ></t:webUploader>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
备注:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value" >
|
||||
<textarea style="width:600px;" class="inputxt" rows="6" id="vendorText" name="vendorText" ignore="ignore" ></textarea>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">备注</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/wz/tWzVendor.js"></script>
|
||||
<script type="text/javascript">
|
||||
function jeecgFormFileCallBack(data){
|
||||
if (data.success == true) {
|
||||
uploadFile(data);
|
||||
} else {
|
||||
if (data.responseText == '' || data.responseText == undefined) {
|
||||
$.messager.alert('错误', data.msg);
|
||||
$.Hidemsg();
|
||||
} else {
|
||||
try {
|
||||
var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'), data.responseText.indexOf('错误信息'));
|
||||
$.messager.alert('错误', emsg);
|
||||
$.Hidemsg();
|
||||
} catch(ex) {
|
||||
$.messager.alert('错误', data.responseText + '');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!neibuClickFlag) {
|
||||
var win = frameElement.api.opener;
|
||||
win.reloadTable();
|
||||
}
|
||||
}
|
||||
function upload() {
|
||||
$('#vendorAttch').uploadify('upload', '*');
|
||||
}
|
||||
|
||||
var neibuClickFlag = false;
|
||||
function neibuClick() {
|
||||
neibuClickFlag = true;
|
||||
$('#btn_sub').trigger('click');
|
||||
}
|
||||
function cancel() {
|
||||
$('#vendorAttch').uploadify('cancel', '*');
|
||||
}
|
||||
function uploadFile(data){
|
||||
if(!$("input[name='id']").val()){
|
||||
if(data.obj!=null && data.obj!='undefined'){
|
||||
$("input[name='id']").val(data.obj.id);
|
||||
}
|
||||
}
|
||||
if($(".uploadify-queue-item").length>0){
|
||||
upload();
|
||||
}else{
|
||||
if (neibuClickFlag){
|
||||
alert(data.msg);
|
||||
neibuClickFlag = false;
|
||||
}else {
|
||||
var win = frameElement.api.opener;
|
||||
win.reloadTable();
|
||||
win.tip(data.msg);
|
||||
frameElement.api.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,254 +0,0 @@
|
|||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>物资供应商</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css" />
|
||||
<script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="tWzVendorController.do?doUpdate" callback="jeecgFormFileCallBack@Override">
|
||||
<input id="id" name="id" type="hidden" value="${tWzVendorPage.id }"/>
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
供应商编码:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorCode" name="vendorCode" type="text" style="width: 150px" class="inputxt" validType="t_wz_vendor,vendor_code,id" datatype="*" ignore="checked" value='${tWzVendorPage.vendorCode}'/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">供应商编码</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
供应商名称:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorName" name="vendorName" type="text" style="width: 150px" class="inputxt" datatype="*" ignore="checked" value='${tWzVendorPage.vendorName}'/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">供应商名称</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
税号:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorShuihao" name="vendorShuihao" type="text" style="width: 150px" class="inputxt" validType="t_wz_vendor,vendor_shuihao,id" datatype="*" ignore="ignore" value='${tWzVendorPage.vendorShuihao}'/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">税号</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
联系人:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorLianxren" name="vendorLianxren" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${tWzVendorPage.vendorLianxren}'/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">联系人</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
联系电话:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorMobile" name="vendorMobile" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${tWzVendorPage.vendorMobile}'/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">联系电话</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
地址:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="vendorAddr" name="vendorAddr" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${tWzVendorPage.vendorAddr}'/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">地址</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
附件:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
|
||||
<t:webUploader name="vendorAttch" auto="true" extensions="doc,txt,jpg,*" buttonStyle="btn-green btn-L" pathValues="${tWzVendorPage.vendorAttch}"></t:webUploader>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
备注:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value" >
|
||||
<textarea id="vendorText" style="width:600px;" class="inputxt" rows="6" name="vendorText" ignore="ignore" >${tWzVendorPage.vendorText}</textarea>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">备注</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/wz/tWzVendor.js"></script>
|
||||
<script type="text/javascript">
|
||||
//加载 已存在的 文件
|
||||
$(function(){
|
||||
var cgFormId=$("input[name='id']").val();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "tWzVendorController.do?getFiles&id=" + cgFormId,
|
||||
success: function(data){
|
||||
var arrayFileObj = jQuery.parseJSON(data).obj;
|
||||
|
||||
$.each(arrayFileObj,function(n,file){
|
||||
var fieldName = file.field.toLowerCase();
|
||||
var table = $("#"+fieldName+"_fileTable");
|
||||
var tr = $("<tr style=\"height:34px;\"></tr>");
|
||||
var title = file.title;
|
||||
if(title.length > 15){
|
||||
title = title.substring(0,12) + "...";
|
||||
}
|
||||
var td_title = $("<td>" + title + "</td>");
|
||||
var td_download = $("<td><a style=\"margin-left:10px;\" href=\"commonController.do?viewFile&fileid=" + file.fileKey + "&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity\" title=\"下载\">下载</a></td>")
|
||||
var td_view = $("<td><a style=\"margin-left:10px;\" href=\"javascript:void(0);\" onclick=\"openwindow('预览','commonController.do?openViewFile&fileid=" + file.fileKey + "&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity','fList',700,500)\">预览</a></td>");
|
||||
var td_del = $("<td><a style=\"margin-left:10px;\" href=\"javascript:void(0)\" class=\"jeecgDetail\" onclick=\"del('cgUploadController.do?delFile&id=" + file.fileKey + "',this)\">删除</a></td>");
|
||||
tr.appendTo(table);
|
||||
td_title.appendTo(tr);
|
||||
td_download.appendTo(tr);
|
||||
td_view.appendTo(tr);
|
||||
td_del.appendTo(tr);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 删除图片数据资源
|
||||
*/
|
||||
function del(url,obj){
|
||||
var content = "请问是否要删除该资源";
|
||||
var navigatorName = "Microsoft Internet Explorer";
|
||||
if( navigator.appName == navigatorName ){
|
||||
$.dialog.confirm(content, function(){
|
||||
submit(url,obj);
|
||||
}, function(){
|
||||
});
|
||||
}else{
|
||||
layer.open({
|
||||
title:"提示",
|
||||
content:content,
|
||||
icon:7,
|
||||
yes:function(index){
|
||||
submit(url,obj);
|
||||
},
|
||||
btn:['确定','取消'],
|
||||
btn2:function(index){
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function submit(url,obj){
|
||||
$.ajax({
|
||||
async : false,
|
||||
cache : false,
|
||||
type : 'POST',
|
||||
url : url,// 请求的action路径
|
||||
error : function() {// 请求失败处理函数
|
||||
},
|
||||
success : function(data) {
|
||||
var d = $.parseJSON(data);
|
||||
if (d.success) {
|
||||
var msg = d.msg;
|
||||
tip(msg);
|
||||
obj.parentNode.parentNode.parentNode.deleteRow(obj.parentNode.parentNode);
|
||||
} else {
|
||||
tip(d.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function jeecgFormFileCallBack(data){
|
||||
if (data.success == true) {
|
||||
uploadFile(data);
|
||||
} else {
|
||||
if (data.responseText == '' || data.responseText == undefined) {
|
||||
$.messager.alert('错误', data.msg);
|
||||
$.Hidemsg();
|
||||
} else {
|
||||
try {
|
||||
var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'), data.responseText.indexOf('错误信息'));
|
||||
$.messager.alert('错误', emsg);
|
||||
$.Hidemsg();
|
||||
} catch(ex) {
|
||||
$.messager.alert('错误', data.responseText + '');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!neibuClickFlag) {
|
||||
var win = frameElement.api.opener;
|
||||
win.reloadTable();
|
||||
}
|
||||
}
|
||||
function upload() {
|
||||
$('#vendorAttch').uploadify('upload', '*');
|
||||
}
|
||||
|
||||
var neibuClickFlag = false;
|
||||
function neibuClick() {
|
||||
neibuClickFlag = true;
|
||||
$('#btn_sub').trigger('click');
|
||||
}
|
||||
function cancel() {
|
||||
$('#vendorAttch').uploadify('cancel', '*');
|
||||
}
|
||||
function uploadFile(data){
|
||||
if(!$("input[name='id']").val()){
|
||||
if(data.obj!=null && data.obj!='undefined'){
|
||||
$("input[name='id']").val(data.obj.id);
|
||||
}
|
||||
}
|
||||
if($(".uploadify-queue-item").length>0){
|
||||
upload();
|
||||
}else{
|
||||
if (neibuClickFlag){
|
||||
alert(data.msg);
|
||||
neibuClickFlag = false;
|
||||
}else {
|
||||
var win = frameElement.api.opener;
|
||||
win.reloadTable();
|
||||
win.tip(data.msg);
|
||||
frameElement.api.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -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));
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" style="padding:0px;border:0px">
|
||||
<t:datagrid name="tWzVendorList" checkbox="true" pagination="true" fitColumns="true" title="物资供应商" actionUrl="tWzVendorController.do?datagrid" idField="id" fit="true" queryMode="group">
|
||||
<t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人登录名称" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="流程状态" field="bpmStatus" hidden="true" queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
|
||||
<t:dgCol title="供应商编码" field="vendorCode" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="供应商名称" field="vendorName" query="true" queryMode="single" width="220"></t:dgCol>
|
||||
<t:dgCol title="税号" field="vendorShuihao" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="联系人" field="vendorLianxren" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="联系电话" field="vendorMobile" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="地址" field="vendorAddr" queryMode="single" width="320"></t:dgCol>
|
||||
<t:dgCol title="备注" field="vendorText" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="附件" field="vendorAttch" queryMode="single" downloadName="附件下载" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用1" field="by1" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用2" field="by2" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用3" field="by3" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用4" field="by4" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用5" field="by5" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
||||
<%--<t:dgDelOpt title="删除" url="tWzVendorController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>--%>
|
||||
<t:dgToolBar title="录入" icon="icon-add" url="tWzVendorController.do?goAdd" funname="add"></t:dgToolBar>
|
||||
<t:dgToolBar title="编辑" icon="icon-edit" url="tWzVendorController.do?goUpdate" funname="update"></t:dgToolBar>
|
||||
<%--<t:dgToolBar title="批量删除" icon="icon-remove" url="tWzVendorController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>--%>
|
||||
<t:dgToolBar title="查看" icon="icon-search" url="tWzVendorController.do?goUpdate" funname="detail"></t:dgToolBar>
|
||||
<%--<t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>--%>
|
||||
<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
|
||||
<%--<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>--%>
|
||||
</t:datagrid>
|
||||
</div>
|
||||
</div>
|
||||
<script src = "webpage/com/zzjee/wz/tWzVendorList.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
});
|
||||
|
||||
|
||||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'tWzVendorController.do?upload', "tWzVendorList");
|
||||
}
|
||||
|
||||
//导出
|
||||
function ExportXls() {
|
||||
JeecgExcelExport("tWzVendorController.do?exportXls","tWzVendorList");
|
||||
}
|
||||
|
||||
//模板下载
|
||||
function ExportXlsByT() {
|
||||
JeecgExcelExport("tWzVendorController.do?exportXlsByT","tWzVendorList");
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue