RFID API
parent
5587112b9f
commit
bc4c55e4a0
|
@ -10,6 +10,7 @@ import java.util.Map;
|
|||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.zzjee.rfid.entity.RfidBuseEntity;
|
||||
import com.zzjee.wave.entity.WaveToDownEntity;
|
||||
import com.zzjee.wave.entity.WaveToFjEntity;
|
||||
import org.apache.log4j.Logger;
|
||||
|
@ -44,9 +45,9 @@ import io.swagger.annotations.ApiOperation;
|
|||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
/**
|
||||
* 获取和删除token的请求地址,
|
||||
* 获取和删除token的请求地址,
|
||||
* 在Restful设计中其实就对应着登录和退出登录的资源映射
|
||||
*
|
||||
*
|
||||
* @author scott
|
||||
* @date 2015/7/30.
|
||||
*/
|
||||
|
@ -171,7 +172,7 @@ public class wmomController {
|
|||
page.setWmOmNoticeIList(WmOmNoticeIEntityList);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
|
||||
}
|
||||
return Result.success(page);
|
||||
}
|
||||
|
@ -341,4 +342,34 @@ public class wmomController {
|
|||
HttpServletRequest request) {
|
||||
return Result.success("波次分拣保存成功");
|
||||
}
|
||||
@RequestMapping(value = "/rfidsave/{username}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "RFID保存", produces = "application/json", httpMethod = "POST")
|
||||
public ResponseMessage<?> rfid_save(@PathVariable("username") String username,
|
||||
@RequestBody wmientity wmientityin,
|
||||
HttpServletRequest request) {
|
||||
List<wmi1entity> wmi1entityList = wmientityin.getWmi1List();
|
||||
String rfidType = wmientityin.getWmX1();
|
||||
String rfidbuseno = wmientityin.getWmX2();
|
||||
String rfidbusecon = wmientityin.getWmX3();
|
||||
List<RfidBuseEntity> rflist = new ArrayList<>();
|
||||
for(wmi1entity t: wmi1entityList){
|
||||
RfidBuseEntity rf = new RfidBuseEntity();
|
||||
rf.setCreateBy(username);
|
||||
rf.setRfidType(rfidType);
|
||||
rf.setRfidBuseno(rfidbuseno);
|
||||
rf.setRfidBusecont(rfidbusecon);
|
||||
rf.setRfidId1(t.getWmX1());
|
||||
rf.setRfidId2(t.getWmX2());
|
||||
rf.setRfidId3(t.getWmX3());
|
||||
rflist.add(rf);
|
||||
|
||||
}
|
||||
try{
|
||||
systemService.batchSave(rflist);
|
||||
}catch (Exception e){
|
||||
Result.error("RFID保存失败");
|
||||
}
|
||||
return Result.success("RFID保存成功");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,414 @@
|
|||
package com.zzjee.rfid.controller;
|
||||
import com.zzjee.RFID.entity.RfidBuseEntity;
|
||||
import com.zzjee.RFID.service.RfidBuseServiceI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.text.SimpleDateFormat;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import org.jeecgframework.core.common.controller.BaseController;
|
||||
import org.jeecgframework.core.common.exception.BusinessException;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.common.model.common.TreeChildCount;
|
||||
import org.jeecgframework.core.common.model.json.AjaxJson;
|
||||
import org.jeecgframework.core.common.model.json.DataGrid;
|
||||
import org.jeecgframework.core.constant.Globals;
|
||||
import org.jeecgframework.core.util.StringUtil;
|
||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||
import org.jeecgframework.web.system.pojo.base.TSDepart;
|
||||
import org.jeecgframework.web.system.service.SystemService;
|
||||
import org.jeecgframework.core.util.MyBeanUtils;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import org.jeecgframework.core.util.BrowserUtils;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.entity.TemplateExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
import java.io.IOException;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import org.jeecgframework.core.util.ExceptionUtil;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||
import java.util.Set;
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.Validator;
|
||||
import java.net.URI;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: RFID表
|
||||
* @author onlineGenerator
|
||||
* @date 2020-06-19 06:45:01
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rfidBuseController")
|
||||
public class RfidBuseController extends BaseController {
|
||||
/**
|
||||
* Logger for this class
|
||||
*/
|
||||
private static final Logger logger = Logger.getLogger(RfidBuseController.class);
|
||||
|
||||
@Autowired
|
||||
private RfidBuseServiceI rfidBuseService;
|
||||
@Autowired
|
||||
private SystemService systemService;
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* RFID表列表 页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "list")
|
||||
public ModelAndView list(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/RFID/rfidBuseList");
|
||||
}
|
||||
|
||||
/**
|
||||
* easyui AJAX请求数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
* @param user
|
||||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
public void datagrid(RfidBuseEntity rfidBuse,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(RfidBuseEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, rfidBuse, request.getParameterMap());
|
||||
try{
|
||||
//自定义追加查询条件
|
||||
String query_createDate_begin = request.getParameter("createDate_begin");
|
||||
String query_createDate_end = request.getParameter("createDate_end");
|
||||
if(StringUtil.isNotEmpty(query_createDate_begin)){
|
||||
cq.ge("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(query_createDate_begin));
|
||||
}
|
||||
if(StringUtil.isNotEmpty(query_createDate_end)){
|
||||
cq.le("createDate", new SimpleDateFormat("yyyy-MM-dd").parse(query_createDate_end));
|
||||
}
|
||||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
cq.add();
|
||||
this.rfidBuseService.getDataGridReturn(cq, true);
|
||||
TagUtil.datagrid(response, dataGrid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除RFID表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doDel(RfidBuseEntity rfidBuse, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
rfidBuse = systemService.getEntity(RfidBuseEntity.class, rfidBuse.getId());
|
||||
message = "RFID表删除成功";
|
||||
try{
|
||||
rfidBuseService.delete(rfidBuse);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "RFID表删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除RFID表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doBatchDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "RFID表删除成功";
|
||||
try{
|
||||
for(String id:ids.split(",")){
|
||||
RfidBuseEntity rfidBuse = systemService.getEntity(RfidBuseEntity.class,
|
||||
id
|
||||
);
|
||||
rfidBuseService.delete(rfidBuse);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "RFID表删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加RFID表
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doAdd")
|
||||
@ResponseBody
|
||||
public AjaxJson doAdd(RfidBuseEntity rfidBuse, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "RFID表添加成功";
|
||||
try{
|
||||
rfidBuseService.save(rfidBuse);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
message = "RFID表添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新RFID表
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doUpdate")
|
||||
@ResponseBody
|
||||
public AjaxJson doUpdate(RfidBuseEntity rfidBuse, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "RFID表更新成功";
|
||||
RfidBuseEntity t = rfidBuseService.get(RfidBuseEntity.class, rfidBuse.getId());
|
||||
try {
|
||||
MyBeanUtils.copyBeanNotNull2Bean(rfidBuse, t);
|
||||
rfidBuseService.saveOrUpdate(t);
|
||||
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "RFID表更新失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* RFID表新增页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goAdd")
|
||||
public ModelAndView goAdd(RfidBuseEntity rfidBuse, HttpServletRequest req) {
|
||||
if (StringUtil.isNotEmpty(rfidBuse.getId())) {
|
||||
rfidBuse = rfidBuseService.getEntity(RfidBuseEntity.class, rfidBuse.getId());
|
||||
req.setAttribute("rfidBusePage", rfidBuse);
|
||||
}
|
||||
return new ModelAndView("com/zzjee/RFID/rfidBuse-add");
|
||||
}
|
||||
/**
|
||||
* RFID表编辑页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goUpdate")
|
||||
public ModelAndView goUpdate(RfidBuseEntity rfidBuse, HttpServletRequest req) {
|
||||
if (StringUtil.isNotEmpty(rfidBuse.getId())) {
|
||||
rfidBuse = rfidBuseService.getEntity(RfidBuseEntity.class, rfidBuse.getId());
|
||||
req.setAttribute("rfidBusePage", rfidBuse);
|
||||
}
|
||||
return new ModelAndView("com/zzjee/RFID/rfidBuse-update");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入功能跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "upload")
|
||||
public ModelAndView upload(HttpServletRequest req) {
|
||||
req.setAttribute("controller_name","rfidBuseController");
|
||||
return new ModelAndView("common/upload/pub_excel_upload");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXls")
|
||||
public String exportXls(RfidBuseEntity rfidBuse,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
CriteriaQuery cq = new CriteriaQuery(RfidBuseEntity.class, dataGrid);
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, rfidBuse, request.getParameterMap());
|
||||
List<RfidBuseEntity> rfidBuses = this.rfidBuseService.getListByCriteriaQuery(cq,false);
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"RFID表");
|
||||
modelMap.put(NormalExcelConstants.CLASS,RfidBuseEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("RFID表列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
||||
"导出信息"));
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST,rfidBuses);
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
/**
|
||||
* 导出excel 使模板
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXlsByT")
|
||||
public String exportXlsByT(RfidBuseEntity rfidBuse,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"RFID表");
|
||||
modelMap.put(NormalExcelConstants.CLASS,RfidBuseEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("RFID表列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
||||
"导出信息"));
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
AjaxJson j = new AjaxJson();
|
||||
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<RfidBuseEntity> listRfidBuseEntitys = ExcelImportUtil.importExcel(file.getInputStream(),RfidBuseEntity.class,params);
|
||||
for (RfidBuseEntity rfidBuse : listRfidBuseEntitys) {
|
||||
rfidBuseService.save(rfidBuse);
|
||||
}
|
||||
j.setMsg("文件导入成功!");
|
||||
} catch (Exception e) {
|
||||
j.setMsg("文件导入失败!");
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}finally{
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<RfidBuseEntity> list() {
|
||||
List<RfidBuseEntity> listRfidBuses=rfidBuseService.getList(RfidBuseEntity.class);
|
||||
return listRfidBuses;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> get(@PathVariable("id") String id) {
|
||||
RfidBuseEntity task = rfidBuseService.get(RfidBuseEntity.class, id);
|
||||
if (task == null) {
|
||||
return new ResponseEntity(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return new ResponseEntity(task, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> create(@RequestBody RfidBuseEntity rfidBuse, UriComponentsBuilder uriBuilder) {
|
||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||
Set<ConstraintViolation<RfidBuseEntity>> failures = validator.validate(rfidBuse);
|
||||
if (!failures.isEmpty()) {
|
||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
rfidBuseService.save(rfidBuse);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
//按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
|
||||
String id = rfidBuse.getId();
|
||||
URI uri = uriBuilder.path("/rest/rfidBuseController/" + id).build().toUri();
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setLocation(uri);
|
||||
|
||||
return new ResponseEntity(headers, HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> update(@RequestBody RfidBuseEntity rfidBuse) {
|
||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||
Set<ConstraintViolation<RfidBuseEntity>> failures = validator.validate(rfidBuse);
|
||||
if (!failures.isEmpty()) {
|
||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
rfidBuseService.saveOrUpdate(rfidBuse);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
//按Restful约定,返回204状态码, 无内容. 也可以返回200状态码.
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||
public void delete(@PathVariable("id") String id) {
|
||||
rfidBuseService.deleteEntityById(RfidBuseEntity.class, id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,333 @@
|
|||
package com.zzjee.rfid.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: RFID表
|
||||
* @author onlineGenerator
|
||||
* @date 2020-06-19 06:45:01
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "rfid_buse", schema = "")
|
||||
@SuppressWarnings("serial")
|
||||
public class RfidBuseEntity implements java.io.Serializable {
|
||||
/**主键*/
|
||||
private String id;
|
||||
/**创建人名称*/
|
||||
private String createName;
|
||||
/**创建人登录名称*/
|
||||
@Excel(name="创建人登录名称")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@Excel(name="创建日期",format = "yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
/**更新人名称*/
|
||||
private String updateName;
|
||||
/**更新人登录名称*/
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
private Date updateDate;
|
||||
/**所属部门*/
|
||||
private String sysOrgCode;
|
||||
/**所属公司*/
|
||||
private String sysCompanyCode;
|
||||
/**流程状态*/
|
||||
private String bpmStatus;
|
||||
/**类型*/
|
||||
@Excel(name="类型")
|
||||
private String rfidType;
|
||||
/**业务编号*/
|
||||
@Excel(name="业务编号")
|
||||
private String rfidBuseno;
|
||||
/**业务内容*/
|
||||
@Excel(name="业务内容")
|
||||
private String rfidBusecont;
|
||||
/**RFID1*/
|
||||
@Excel(name="RFID1")
|
||||
private String rfidId1;
|
||||
/**RFID2*/
|
||||
@Excel(name="RFID2")
|
||||
private String rfidId2;
|
||||
/**RFID3*/
|
||||
@Excel(name="RFID3")
|
||||
private String rfidId3;
|
||||
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 主键
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(generator = "paymentableGenerator")
|
||||
@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
|
||||
@Column(name ="ID",nullable=false,length=36)
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 主键
|
||||
*/
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 创建人名称
|
||||
*/
|
||||
@Column(name ="CREATE_NAME",nullable=true,length=50)
|
||||
public String getCreateName(){
|
||||
return this.createName;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 创建人名称
|
||||
*/
|
||||
public void setCreateName(String createName){
|
||||
this.createName = createName;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 创建人登录名称
|
||||
*/
|
||||
@Column(name ="CREATE_BY",nullable=true,length=50)
|
||||
public String getCreateBy(){
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 创建人登录名称
|
||||
*/
|
||||
public void setCreateBy(String createBy){
|
||||
this.createBy = createBy;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.util.Date
|
||||
*@return: java.util.Date 创建日期
|
||||
*/
|
||||
@Column(name ="CREATE_DATE",nullable=true,length=20)
|
||||
public Date getCreateDate(){
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.util.Date
|
||||
*@param: java.util.Date 创建日期
|
||||
*/
|
||||
public void setCreateDate(Date createDate){
|
||||
this.createDate = createDate;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 更新人名称
|
||||
*/
|
||||
@Column(name ="UPDATE_NAME",nullable=true,length=50)
|
||||
public String getUpdateName(){
|
||||
return this.updateName;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 更新人名称
|
||||
*/
|
||||
public void setUpdateName(String updateName){
|
||||
this.updateName = updateName;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 更新人登录名称
|
||||
*/
|
||||
@Column(name ="UPDATE_BY",nullable=true,length=50)
|
||||
public String getUpdateBy(){
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 更新人登录名称
|
||||
*/
|
||||
public void setUpdateBy(String updateBy){
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.util.Date
|
||||
*@return: java.util.Date 更新日期
|
||||
*/
|
||||
@Column(name ="UPDATE_DATE",nullable=true,length=20)
|
||||
public Date getUpdateDate(){
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.util.Date
|
||||
*@param: java.util.Date 更新日期
|
||||
*/
|
||||
public void setUpdateDate(Date updateDate){
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 所属部门
|
||||
*/
|
||||
@Column(name ="SYS_ORG_CODE",nullable=true,length=50)
|
||||
public String getSysOrgCode(){
|
||||
return this.sysOrgCode;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 所属部门
|
||||
*/
|
||||
public void setSysOrgCode(String sysOrgCode){
|
||||
this.sysOrgCode = sysOrgCode;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 所属公司
|
||||
*/
|
||||
@Column(name ="SYS_COMPANY_CODE",nullable=true,length=50)
|
||||
public String getSysCompanyCode(){
|
||||
return this.sysCompanyCode;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 所属公司
|
||||
*/
|
||||
public void setSysCompanyCode(String sysCompanyCode){
|
||||
this.sysCompanyCode = sysCompanyCode;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 流程状态
|
||||
*/
|
||||
@Column(name ="BPM_STATUS",nullable=true,length=32)
|
||||
public String getBpmStatus(){
|
||||
return this.bpmStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 流程状态
|
||||
*/
|
||||
public void setBpmStatus(String bpmStatus){
|
||||
this.bpmStatus = bpmStatus;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 类型
|
||||
*/
|
||||
@Column(name ="RFID_TYPE",nullable=true,length=128)
|
||||
public String getRfidType(){
|
||||
return this.rfidType;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 类型
|
||||
*/
|
||||
public void setRfidType(String rfidType){
|
||||
this.rfidType = rfidType;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 业务编号
|
||||
*/
|
||||
@Column(name ="RFID_BUSENO",nullable=true,length=128)
|
||||
public String getRfidBuseno(){
|
||||
return this.rfidBuseno;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 业务编号
|
||||
*/
|
||||
public void setRfidBuseno(String rfidBuseno){
|
||||
this.rfidBuseno = rfidBuseno;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 业务内容
|
||||
*/
|
||||
@Column(name ="RFID_BUSECONT",nullable=true,length=128)
|
||||
public String getRfidBusecont(){
|
||||
return this.rfidBusecont;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 业务内容
|
||||
*/
|
||||
public void setRfidBusecont(String rfidBusecont){
|
||||
this.rfidBusecont = rfidBusecont;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String RFID1
|
||||
*/
|
||||
@Column(name ="RFID_ID1",nullable=true,length=128)
|
||||
public String getRfidId1(){
|
||||
return this.rfidId1;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String RFID1
|
||||
*/
|
||||
public void setRfidId1(String rfidId1){
|
||||
this.rfidId1 = rfidId1;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String RFID2
|
||||
*/
|
||||
@Column(name ="RFID_ID2",nullable=true,length=128)
|
||||
public String getRfidId2(){
|
||||
return this.rfidId2;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String RFID2
|
||||
*/
|
||||
public void setRfidId2(String rfidId2){
|
||||
this.rfidId2 = rfidId2;
|
||||
}
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String RFID3
|
||||
*/
|
||||
@Column(name ="RFID_ID3",nullable=true,length=128)
|
||||
public String getRfidId3(){
|
||||
return this.rfidId3;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String RFID3
|
||||
*/
|
||||
public void setRfidId3(String rfidId3){
|
||||
this.rfidId3 = rfidId3;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.zzjee.rfid.service;
|
||||
import com.zzjee.RFID.entity.RfidBuseEntity;
|
||||
import org.jeecgframework.core.common.service.CommonService;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface RfidBuseServiceI extends CommonService{
|
||||
|
||||
public void delete(RfidBuseEntity entity) throws Exception;
|
||||
|
||||
public Serializable save(RfidBuseEntity entity) throws Exception;
|
||||
|
||||
public void saveOrUpdate(RfidBuseEntity entity) throws Exception;
|
||||
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.zzjee.rfid.service.impl;
|
||||
import com.zzjee.RFID.service.RfidBuseServiceI;
|
||||
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
|
||||
import com.zzjee.RFID.entity.RfidBuseEntity;
|
||||
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("rfidBuseService")
|
||||
@Transactional
|
||||
public class RfidBuseServiceImpl extends CommonServiceImpl implements RfidBuseServiceI {
|
||||
|
||||
|
||||
public void delete(RfidBuseEntity entity) throws Exception{
|
||||
super.delete(entity);
|
||||
//执行删除操作增强业务
|
||||
this.doDelBus(entity);
|
||||
}
|
||||
|
||||
public Serializable save(RfidBuseEntity entity) throws Exception{
|
||||
Serializable t = super.save(entity);
|
||||
//执行新增操作增强业务
|
||||
this.doAddBus(entity);
|
||||
return t;
|
||||
}
|
||||
|
||||
public void saveOrUpdate(RfidBuseEntity entity) throws Exception{
|
||||
super.saveOrUpdate(entity);
|
||||
//执行更新操作增强业务
|
||||
this.doUpdateBus(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增操作增强业务
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
private void doAddBus(RfidBuseEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
/**
|
||||
* 更新操作增强业务
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
private void doUpdateBus(RfidBuseEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
/**
|
||||
* 删除操作增强业务
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private void doDelBus(RfidBuseEntity t) throws Exception{
|
||||
//-----------------sql增强 start----------------------------
|
||||
//-----------------sql增强 end------------------------------
|
||||
|
||||
//-----------------java增强 start---------------------------
|
||||
//-----------------java增强 end-----------------------------
|
||||
}
|
||||
|
||||
private Map<String,Object> populationMap(RfidBuseEntity 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("rfid_type", t.getRfidType());
|
||||
map.put("rfid_buseno", t.getRfidBuseno());
|
||||
map.put("rfid_busecont", t.getRfidBusecont());
|
||||
map.put("rfid_id1", t.getRfidId1());
|
||||
map.put("rfid_id2", t.getRfidId2());
|
||||
map.put("rfid_id3", t.getRfidId3());
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换sql中的变量
|
||||
* @param sql
|
||||
* @param t
|
||||
* @return
|
||||
*/
|
||||
public String replaceVal(String sql,RfidBuseEntity 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("#{rfid_type}",String.valueOf(t.getRfidType()));
|
||||
sql = sql.replace("#{rfid_buseno}",String.valueOf(t.getRfidBuseno()));
|
||||
sql = sql.replace("#{rfid_busecont}",String.valueOf(t.getRfidBusecont()));
|
||||
sql = sql.replace("#{rfid_id1}",String.valueOf(t.getRfidId1()));
|
||||
sql = sql.replace("#{rfid_id2}",String.valueOf(t.getRfidId2()));
|
||||
sql = sql.replace("#{rfid_id3}",String.valueOf(t.getRfidId3()));
|
||||
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("rfid_buse",data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Exception("执行JAVA增强出现异常!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
<%@ 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>RFID表</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="rfidBuseController.do?doAdd" >
|
||||
<input id="id" name="id" type="hidden" value="${rfidBusePage.id }"/>
|
||||
<input id="createName" name="createName" type="hidden" value="${rfidBusePage.createName }"/>
|
||||
<input id="updateName" name="updateName" type="hidden" value="${rfidBusePage.updateName }"/>
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${rfidBusePage.updateBy }"/>
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${rfidBusePage.updateDate }"/>
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${rfidBusePage.sysOrgCode }"/>
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${rfidBusePage.sysCompanyCode }"/>
|
||||
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${rfidBusePage.bpmStatus }"/>
|
||||
<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="createBy" name="createBy" 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="createDate" name="createDate" type="text" style="width: 150px" class="Wdate" onClick="WdatePicker()"
|
||||
|
||||
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="rfidType" name="rfidType" 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="rfidBuseno" name="rfidBuseno" 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="rfidBusecont" name="rfidBusecont" 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">
|
||||
RFID1:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="rfidId1" name="rfidId1" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">RFID1</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
RFID2:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="rfidId2" name="rfidId2" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">RFID2</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
RFID3:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="rfidId3" name="rfidId3" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">RFID3</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/RFID/rfidBuse.js"></script>
|
|
@ -0,0 +1,138 @@
|
|||
<%@ 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>RFID表</title>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="rfidBuseController.do?doUpdate" >
|
||||
<input id="id" name="id" type="hidden" value="${rfidBusePage.id }">
|
||||
<input id="createName" name="createName" type="hidden" value="${rfidBusePage.createName }">
|
||||
<input id="updateName" name="updateName" type="hidden" value="${rfidBusePage.updateName }">
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${rfidBusePage.updateBy }">
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${rfidBusePage.updateDate }">
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${rfidBusePage.sysOrgCode }">
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${rfidBusePage.sysCompanyCode }">
|
||||
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${rfidBusePage.bpmStatus }">
|
||||
<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="createBy" name="createBy" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${rfidBusePage.createBy}'>
|
||||
<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="createDate" name="createDate" type="text" style="width: 150px" class="Wdate" onClick="WdatePicker()"
|
||||
ignore="ignore"
|
||||
value='<fmt:formatDate value='${rfidBusePage.createDate}' type="date" pattern="yyyy-MM-dd"/>'>
|
||||
<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="rfidType" name="rfidType" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${rfidBusePage.rfidType}'>
|
||||
<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="rfidBuseno" name="rfidBuseno" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${rfidBusePage.rfidBuseno}'>
|
||||
<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="rfidBusecont" name="rfidBusecont" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${rfidBusePage.rfidBusecont}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">业务内容</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
RFID1:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="rfidId1" name="rfidId1" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${rfidBusePage.rfidId1}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">RFID1</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
RFID2:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="rfidId2" name="rfidId2" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${rfidBusePage.rfidId2}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">RFID2</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
RFID3:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="rfidId3" name="rfidId3" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${rfidBusePage.rfidId3}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">RFID3</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t:formvalid>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/RFID/rfidBuse.js"></script>
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
|
||||
//通用弹出式文件上传
|
||||
function commonUpload(callback){
|
||||
$.dialog({
|
||||
content: "url:systemController.do?commonUpload",
|
||||
lock : true,
|
||||
title:"文件上传",
|
||||
zIndex:2100,
|
||||
width:700,
|
||||
height: 200,
|
||||
parent:windowapi,
|
||||
cache:false,
|
||||
ok: function(){
|
||||
var iframe = this.iframe.contentWindow;
|
||||
iframe.uploadCallback(callback);
|
||||
return true;
|
||||
},
|
||||
cancelVal: '关闭',
|
||||
cancel: function(){
|
||||
}
|
||||
});
|
||||
}
|
||||
function browseImages(inputId, Img) {// 图片管理器,可多个上传共用
|
||||
}
|
||||
function browseFiles(inputId, file) {// 文件管理器,可多个上传共用
|
||||
}
|
||||
function decode(value, id) {//value传入值,id接受值
|
||||
var last = value.lastIndexOf("/");
|
||||
var filename = value.substring(last + 1, value.length);
|
||||
$("#" + id).text(decodeURIComponent(filename));
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" style="padding:0px;border:0px">
|
||||
<t:datagrid name="rfidBuseList" checkbox="false" pagination="true" fitColumns="false" title="RFID表" actionUrl="rfidBuseController.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" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" query="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="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="rfidType" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="业务编号" field="rfidBuseno" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="业务内容" field="rfidBusecont" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="RFID1" field="rfidId1" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="RFID2" field="rfidId2" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="RFID3" field="rfidId3" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
||||
<t:dgDelOpt title="删除" url="rfidBuseController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
|
||||
<t:dgToolBar title="录入" icon="icon-add" url="rfidBuseController.do?goAdd" funname="add"></t:dgToolBar>
|
||||
<t:dgToolBar title="编辑" icon="icon-edit" url="rfidBuseController.do?goUpdate" funname="update"></t:dgToolBar>
|
||||
<t:dgToolBar title="批量删除" icon="icon-remove" url="rfidBuseController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
|
||||
<t:dgToolBar title="查看" icon="icon-search" url="rfidBuseController.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/RFID/rfidBuseList.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
});
|
||||
|
||||
|
||||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'rfidBuseController.do?upload', "rfidBuseList");
|
||||
}
|
||||
|
||||
//导出
|
||||
function ExportXls() {
|
||||
JeecgExcelExport("rfidBuseController.do?exportXls","rfidBuseList");
|
||||
}
|
||||
|
||||
//模板下载
|
||||
function ExportXlsByT() {
|
||||
JeecgExcelExport("rfidBuseController.do?exportXlsByT","rfidBuseList");
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue