Merge branch 'master' of https://gitee.com/erzhongxmu/jeewms
commit
25f4aaf0da
14
README.md
14
README.md
|
@ -1,21 +1,21 @@
|
||||||
|
|
||||||
JEEWMSQQ交流群:335607153 有任何问题可以加群交流
|
JEEWMSQQ交流群:335607153 有任何问题可以加群交流 基于JEECG-BOOT开发的前后端分离版本于20221111日发布,届时欢迎大家多多提意见
|
||||||
**智能制造产品JEEMES已经开源** (https://gitee.com/erzhongxmu/jeemes) 欢迎大家STAR
|
**智能制造产品JEEMES已经开源** (https://gitee.com/erzhongxmu/jeemes) 欢迎大家STAR
|
||||||
|
|
||||||
测试系统地址 http://47.113.229.131:9080/wms 用户名:test 密码:123456 本地启动的用户名:admin 密码:llg123
|
测试系统地址 http://47.113.229.131:9080/jeewms 用户名:test 密码:123456 本地启动的用户名:admin 密码:llg123
|
||||||
android app也已经开源,近期更新会比较频繁 app开源地址 https://gitee.com/erzhongxmu/jeewmsapp和https://gitee.com/erzhongxmu/jeewmsapp-uni(正在测试完善)
|
android app也已经开源,近期更新会比较频繁 app开源地址 https://gitee.com/erzhongxmu/JeeWMSapp-uni
|
||||||
大家看到了,star一下,谢谢,本团队会持续更新,一直开源!
|
大家看到了,star一下,谢谢,本团队会持续更新,一直开源!
|
||||||
欢迎喜欢的朋友一起来优化功能。
|
|
||||||
开源不易,如果大家需要购买华为云可以通过我们的专属链接,优惠多多 [华为云服务器优惠购买](https://account.huaweicloud.com/obmgr/invitation/invitation.html?bpName=0000000100000002F529029E50A53299E1C24B9DC20691B285756AA52DA030F9E7013E8FF7E22C3EFF074BF9586E43C07842F8F96D38EC45878383D1D406B2F7341FC7D6635CED56&inviteCode=0000000100000002FC491B524CF3FDCE52F12DFD3BB98C8AB2DD5D05BA2CCD464D69E4293D91369A&bindType=1&isDefault=1)
|
开源不易,如果大家需要购买华为云可以通过我们的专属链接,优惠多多 [华为云服务器优惠购买](https://account.huaweicloud.com/obmgr/invitation/invitation.html?bpName=0000000100000002F529029E50A53299E1C24B9DC20691B285756AA52DA030F9E7013E8FF7E22C3EFF074BF9586E43C07842F8F96D38EC45878383D1D406B2F7341FC7D6635CED56&inviteCode=0000000100000002FC491B524CF3FDCE52F12DFD3BB98C8AB2DD5D05BA2CCD464D69E4293D91369A&bindType=1&isDefault=1)
|
||||||
|
|
||||||
一、项目简介:
|
一、项目简介:
|
||||||
|
|
||||||
jeewms在经过多家公司上线运行后,为了降低物流仓储企业的信息化成本,决定全面开源
|
JeeWMS在经过多家公司上线运行后,为了降低物流仓储企业的信息化成本,决定全面开源
|
||||||
此产品。针对有特殊信息化需求的企业,提供高性价比的实施服务。
|
此产品。针对有特殊信息化需求的企业,提供高性价比的实施服务。
|
||||||
|
|
||||||
产品特点:
|
产品特点:
|
||||||
1、适用范围:第三方物流仓储企业,冷链仓库,自营仓储等。
|
1、适用范围:第三方物流仓储企业,冷链仓库,自营仓储等。
|
||||||
2、技术特点:基于JAVA的WEB后台,基于ANDROID开发的PDA系统。
|
2、技术特点:基于JAVA的WEB后台,基于UNIAPP开发的PDA系统。
|
||||||
3、功能特点:涵盖订单管理系统(OMS),仓储管理系统(WMS),计费管理系统(BMS),现场作业系统(RF),第三方接口模块
|
3、功能特点:涵盖订单管理系统(OMS),仓储管理系统(WMS),计费管理系统(BMS),现场作业系统(RF),第三方接口模块
|
||||||
4、接口支持:已经对接:SAP ECC,SAP HANA 数据库,用友U8,百胜E3,UAS。
|
4、接口支持:已经对接:SAP ECC,SAP HANA 数据库,用友U8,百胜E3,UAS。
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ android app也已经开源,近期更新会比较频繁 app开源地址 https:
|
||||||
5、主要技术
|
5、主要技术
|
||||||
开发语言:JAVA。
|
开发语言:JAVA。
|
||||||
6、技术架构
|
6、技术架构
|
||||||
基础架构基于jeecg。技术架构为SpringMVC+Hibernat+Minidao(类Mybatis)+Easyui(UI库)+ Jquery + Boostrap + Ehcache + Redis + Ztree等基础架构
|
基础架构基于jeecg。技术架构为SpringMVC+Hibernat+Minidao(类Mybatis)+Easyui(UI库)+ Jquery + Bootstrap + Ehcache + Redis + Ztree等基础架构
|
||||||
|
|
||||||
四、技术支持:
|
四、技术支持:
|
||||||
|
|
||||||
|
|
10086
database/wms20220818.sql
10086
database/wms20220818.sql
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
pom.xml
2
pom.xml
|
@ -806,7 +806,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jsoup</groupId>
|
<groupId>org.jsoup</groupId>
|
||||||
<artifactId>jsoup</artifactId>
|
<artifactId>jsoup</artifactId>
|
||||||
<version>1.8.3</version>
|
<version>1.15.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- google 工具类 -->
|
<!-- google 工具类 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,19 +1,24 @@
|
||||||
package com.zzjee.plc.controller;
|
package com.zzjee.plc.controller;
|
||||||
|
|
||||||
import HslCommunication.Core.Types.OperateResult;
|
import HslCommunication.Core.Types.OperateResult;
|
||||||
import HslCommunication.Profinet.Siemens.SiemensPLCS;
|
import HslCommunication.Profinet.Siemens.SiemensPLCS;
|
||||||
import HslCommunication.Profinet.Siemens.SiemensS7Net;
|
import HslCommunication.Profinet.Siemens.SiemensS7Net;
|
||||||
import com.zzjee.plc.entity.WmsPlcEntity;
|
import com.zzjee.plc.entity.WmsPlcEntity;
|
||||||
import com.zzjee.plc.service.WmsPlcServiceI;
|
import com.zzjee.plc.service.WmsPlcServiceI;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.zzjee.wm.entity.WmToMoveGoodsEntity;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
@ -32,6 +37,7 @@ import org.jeecgframework.web.system.service.SystemService;
|
||||||
import org.jeecgframework.core.util.MyBeanUtils;
|
import org.jeecgframework.core.util.MyBeanUtils;
|
||||||
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
import org.jeecgframework.core.util.BrowserUtils;
|
import org.jeecgframework.core.util.BrowserUtils;
|
||||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
@ -42,12 +48,16 @@ import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
||||||
import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants;
|
import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
import org.jeecgframework.core.util.ResourceUtil;
|
import org.jeecgframework.core.util.ResourceUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.jeecgframework.core.util.ExceptionUtil;
|
import org.jeecgframework.core.util.ExceptionUtil;
|
||||||
|
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
@ -61,400 +71,493 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.ConstraintViolation;
|
import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @author onlineGenerator
|
||||||
|
* @version V1.0
|
||||||
* @Title: Controller
|
* @Title: Controller
|
||||||
* @Description: PLC指令
|
* @Description: PLC指令
|
||||||
* @author onlineGenerator
|
|
||||||
* @date 2022-09-12 18:33:25
|
* @date 2022-09-12 18:33:25
|
||||||
* @version V1.0
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/wmsPlcController")
|
@RequestMapping("/wmsPlcController")
|
||||||
public class WmsPlcController extends BaseController {
|
public class WmsPlcController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* Logger for this class
|
* Logger for this class
|
||||||
*/
|
*/
|
||||||
private static final Logger logger = Logger.getLogger(WmsPlcController.class);
|
private static final Logger logger = Logger.getLogger(WmsPlcController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private WmsPlcServiceI wmsPlcService;
|
private WmsPlcServiceI wmsPlcService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemService systemService;
|
private SystemService systemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private Validator validator;
|
private Validator validator;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PLC指令列表 页面跳转
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(params = "list")
|
||||||
|
public ModelAndView list(HttpServletRequest request) {
|
||||||
|
return new ModelAndView("com/zzjee/plc/wmsPlcList");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PLC指令列表 页面跳转
|
* easyui AJAX请求数据
|
||||||
*
|
*
|
||||||
* @return
|
* @param request
|
||||||
*/
|
* @param response
|
||||||
@RequestMapping(params = "list")
|
* @param dataGrid
|
||||||
public ModelAndView list(HttpServletRequest request) {
|
*/
|
||||||
return new ModelAndView("com/zzjee/plc/wmsPlcList");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
@RequestMapping(params = "datagrid")
|
||||||
* easyui AJAX请求数据
|
public void datagrid(WmsPlcEntity wmsPlc, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||||
*
|
CriteriaQuery cq = new CriteriaQuery(WmsPlcEntity.class, dataGrid);
|
||||||
* @param request
|
//查询条件组装器
|
||||||
* @param response
|
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmsPlc, request.getParameterMap());
|
||||||
* @param dataGrid
|
try {
|
||||||
*/
|
//自定义追加查询条件
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new BusinessException(e.getMessage());
|
||||||
|
}
|
||||||
|
cq.add();
|
||||||
|
this.wmsPlcService.getDataGridReturn(cq, true);
|
||||||
|
TagUtil.datagrid(response, dataGrid);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(params = "datagrid")
|
/**
|
||||||
public void datagrid(WmsPlcEntity wmsPlc,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
* 删除PLC指令
|
||||||
CriteriaQuery cq = new CriteriaQuery(WmsPlcEntity.class, dataGrid);
|
*
|
||||||
//查询条件组装器
|
* @return
|
||||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmsPlc, request.getParameterMap());
|
*/
|
||||||
try{
|
@RequestMapping(params = "doDel")
|
||||||
//自定义追加查询条件
|
@ResponseBody
|
||||||
}catch (Exception e) {
|
public AjaxJson doDel(WmsPlcEntity wmsPlc, HttpServletRequest request) {
|
||||||
throw new BusinessException(e.getMessage());
|
String message = null;
|
||||||
}
|
AjaxJson j = new AjaxJson();
|
||||||
cq.add();
|
wmsPlc = systemService.getEntity(WmsPlcEntity.class, wmsPlc.getId());
|
||||||
this.wmsPlcService.getDataGridReturn(cq, true);
|
message = "PLC指令删除成功";
|
||||||
TagUtil.datagrid(response, dataGrid);
|
try {
|
||||||
}
|
wmsPlcService.delete(wmsPlc);
|
||||||
|
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
message = "PLC指令删除失败";
|
||||||
|
throw new BusinessException(e.getMessage());
|
||||||
|
}
|
||||||
|
j.setMsg(message);
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除PLC指令
|
* 批量删除PLC指令
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "doDel")
|
@RequestMapping(params = "dotoup")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxJson doDel(WmsPlcEntity wmsPlc, HttpServletRequest request) {
|
public AjaxJson dotoup(String ids, HttpServletRequest request) {
|
||||||
String message = null;
|
String message = null;
|
||||||
AjaxJson j = new AjaxJson();
|
AjaxJson j = new AjaxJson();
|
||||||
wmsPlc = systemService.getEntity(WmsPlcEntity.class, wmsPlc.getId());
|
message = "PLC指令执行成功";
|
||||||
message = "PLC指令删除成功";
|
try {
|
||||||
try{
|
for (String id : ids.split(",")) {
|
||||||
wmsPlcService.delete(wmsPlc);
|
run(id, "", "");
|
||||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
}
|
||||||
}catch(Exception e){
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = "PLC指令删除失败";
|
message = "PLC指令执行失败";
|
||||||
throw new BusinessException(e.getMessage());
|
throw new BusinessException(e.getMessage());
|
||||||
}
|
}
|
||||||
j.setMsg(message);
|
j.setMsg(message);
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
public void runu() {
|
||||||
|
WmsPlcEntity wmsPlc = null;
|
||||||
|
String hql = "";
|
||||||
|
List<WmsPlcEntity> wmsPlcEntityList = new ArrayList<WmsPlcEntity>();
|
||||||
|
hql = "from WmsPlcEntity t where t.comNo = ? ";
|
||||||
|
wmsPlcEntityList = systemService.findHql(hql, "runu");
|
||||||
|
if (!CollectionUtils.isEmpty(wmsPlcEntityList)) {
|
||||||
|
wmsPlc = wmsPlcEntityList.get(0);
|
||||||
|
}
|
||||||
|
String[] coms = wmsPlc.getComCons().split(";");
|
||||||
|
for (String com : coms) {
|
||||||
|
String comid[] = com.split(",");
|
||||||
|
String comno = comid[0];
|
||||||
|
String comstep = comid[1];
|
||||||
|
run("", comno, comstep);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
}
|
||||||
* 批量删除PLC指令
|
public void run(String id, String comNo, String stepNum) {
|
||||||
*
|
System.out.println("id:" + id + ";comNo:" + comNo + ";stepNum:" + stepNum);
|
||||||
* @return
|
if (stepNum.equals("0")) {
|
||||||
*/
|
return;
|
||||||
@RequestMapping(params = "dotoup")
|
}
|
||||||
@ResponseBody
|
WmsPlcEntity wmsPlc = null;
|
||||||
public AjaxJson dotoup(String ids,HttpServletRequest request){
|
if (StringUtil.isNotEmpty(id)) {
|
||||||
String message = null;
|
wmsPlc = systemService.getEntity(WmsPlcEntity.class, id);
|
||||||
AjaxJson j = new AjaxJson();
|
}
|
||||||
message = "PLC指令执行成功";
|
if (StringUtil.isNotEmpty(comNo)) {
|
||||||
try{
|
|
||||||
for(String id:ids.split(",")){
|
|
||||||
WmsPlcEntity wmsPlc = systemService.getEntity(WmsPlcEntity.class,
|
|
||||||
id
|
|
||||||
);
|
|
||||||
SiemensPLCS siemensPLCS = SiemensPLCS.S200Smart;
|
|
||||||
SiemensS7Net siemensS7Net = null;
|
|
||||||
siemensS7Net = new SiemensS7Net(siemensPLCS);
|
|
||||||
siemensS7Net.setIpAddress(wmsPlc.getPlcIp());
|
|
||||||
siemensS7Net.setPort(Integer.parseInt(wmsPlc.getPlcPort()) );
|
|
||||||
OperateResult connect = siemensS7Net.ConnectServer();
|
|
||||||
if(connect.IsSuccess){
|
|
||||||
System.out.println("connect success");
|
|
||||||
}else{
|
|
||||||
System.out.println("connect error");
|
|
||||||
}
|
|
||||||
String[] coms = wmsPlc.getComCons().split(";");
|
|
||||||
for (String com : coms) {
|
|
||||||
String[] split = com.split(",");
|
|
||||||
String defaultAddress = split[1];
|
|
||||||
if(split[0].equals("boolean")){
|
|
||||||
if(split[2].equals("false")){
|
|
||||||
siemensS7Net.Write(defaultAddress,false);
|
|
||||||
}else{
|
|
||||||
siemensS7Net.Write(defaultAddress,true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(split[0].equals("float")){
|
|
||||||
siemensS7Net.Write(defaultAddress,Float.parseFloat(split[2]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//执行完指令等待时间
|
String hql = "";
|
||||||
Thread.sleep(Long.parseLong(wmsPlc.getComTime()));
|
List<WmsPlcEntity> wmsPlcEntityList = new ArrayList<WmsPlcEntity>();
|
||||||
}
|
hql = "from WmsPlcEntity t where t.comNo = ? ";
|
||||||
}catch(Exception e){
|
wmsPlcEntityList = systemService.findHql(hql, comNo);
|
||||||
e.printStackTrace();
|
if (!CollectionUtils.isEmpty(wmsPlcEntityList)) {
|
||||||
message = "PLC指令执行失败";
|
wmsPlc = wmsPlcEntityList.get(0);
|
||||||
throw new BusinessException(e.getMessage());
|
}
|
||||||
}
|
}
|
||||||
j.setMsg(message);
|
if (wmsPlc != null) {
|
||||||
return j;
|
long start = System.currentTimeMillis();
|
||||||
}
|
|
||||||
/**
|
SiemensPLCS siemensPLCS = SiemensPLCS.S200Smart;
|
||||||
* 批量删除PLC指令
|
SiemensS7Net siemensS7Net = null;
|
||||||
*
|
siemensS7Net = new SiemensS7Net(siemensPLCS);
|
||||||
* @return
|
siemensS7Net.setIpAddress(wmsPlc.getPlcIp());
|
||||||
*/
|
siemensS7Net.setPort(Integer.parseInt(wmsPlc.getPlcPort()));
|
||||||
@RequestMapping(params = "doBatchDel")
|
OperateResult connect = siemensS7Net.ConnectServer();
|
||||||
@ResponseBody
|
if (connect.IsSuccess) {
|
||||||
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
|
System.out.println("connect success");
|
||||||
String message = null;
|
} else {
|
||||||
AjaxJson j = new AjaxJson();
|
System.out.println("connect error");
|
||||||
message = "PLC指令删除成功";
|
try {
|
||||||
try{
|
siemensS7Net.ConnectClose();
|
||||||
for(String id:ids.split(",")){
|
} catch (Exception e) {
|
||||||
WmsPlcEntity wmsPlc = systemService.getEntity(WmsPlcEntity.class,
|
e.printStackTrace();
|
||||||
id
|
}
|
||||||
);
|
}
|
||||||
wmsPlcService.delete(wmsPlc);
|
String comCons = wmsPlc.getComCons();
|
||||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
String query01 = wmsPlc.getQuery01();
|
||||||
}
|
String query02 = wmsPlc.getQuery02();
|
||||||
}catch(Exception e){
|
Float stepNumrun = Float.valueOf("1");
|
||||||
e.printStackTrace();
|
if (StringUtil.isNotEmpty(stepNum)) {
|
||||||
message = "PLC指令删除失败";
|
stepNumrun = Float.parseFloat(stepNum);
|
||||||
throw new BusinessException(e.getMessage());
|
} else {
|
||||||
}
|
stepNumrun = Float.parseFloat(wmsPlc.getSetpNum());
|
||||||
j.setMsg(message);
|
}
|
||||||
return j;
|
Float stepTime = Float.parseFloat(wmsPlc.getSetpTime());
|
||||||
}
|
comCons = StringUtils.replace(comCons, "{query01}", query01);
|
||||||
|
comCons = StringUtils.replace(comCons, "{query02}", query02);
|
||||||
|
String[] coms = comCons.split(";");
|
||||||
|
for (String com : coms) {
|
||||||
|
System.out.println("指令:" + com);
|
||||||
|
try {
|
||||||
|
Thread.sleep(500);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
String[] split = com.split(",");
|
||||||
|
String defaultAddress = split[1];
|
||||||
|
if (split[0].equals("boolean")) {
|
||||||
|
if (split[2].equals("false")) {
|
||||||
|
siemensS7Net.Write(defaultAddress, false);
|
||||||
|
} else {
|
||||||
|
siemensS7Net.Write(defaultAddress, true);
|
||||||
|
}
|
||||||
|
} else if (split[0].equals("float")) {
|
||||||
|
Float runfloat = Float.parseFloat(split[2]) * stepNumrun;
|
||||||
|
System.out.println("runfloat:" + Math.abs(runfloat));
|
||||||
|
siemensS7Net.Write(defaultAddress, Math.abs(runfloat));
|
||||||
|
} else if (split[0].equals("-float")) {
|
||||||
|
Float runfloat = Float.parseFloat(split[2]) * stepNumrun;
|
||||||
|
System.out.println("runfloat:" + runfloat);
|
||||||
|
siemensS7Net.Write(defaultAddress, runfloat);
|
||||||
|
} else if (split[0].equals("int")) {
|
||||||
|
Float runfloat = Float.parseFloat(split[2]) * stepNumrun;
|
||||||
|
Float abs = Math.abs(runfloat);
|
||||||
|
int runint = abs.intValue();
|
||||||
|
System.out.println("runint:" + runint);
|
||||||
|
siemensS7Net.Write(defaultAddress, runint);
|
||||||
|
} else if (split[0].equals("-int")) {
|
||||||
|
Float runfloat = Float.parseFloat(split[2]) * stepNumrun;
|
||||||
|
int runint = runfloat.intValue();
|
||||||
|
System.out.println("runint:" + runint);
|
||||||
|
siemensS7Net.Write(defaultAddress, runint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//执行完指令等待时间
|
||||||
|
try {
|
||||||
|
Float sleeptime = Math.abs(stepNumrun * stepTime);
|
||||||
|
Thread.sleep(sleeptime.longValue());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
long times = end - start;
|
||||||
|
org.jeecgframework.core.util.LogUtil.info(wmsPlc.getComRemark() + "总耗时" + times + "毫秒" + comCons);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
}
|
||||||
* 添加PLC指令
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(params = "doAdd")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxJson doAdd(WmsPlcEntity wmsPlc, HttpServletRequest request) {
|
|
||||||
String message = null;
|
|
||||||
AjaxJson j = new AjaxJson();
|
|
||||||
message = "PLC指令添加成功";
|
|
||||||
try{
|
|
||||||
wmsPlcService.save(wmsPlc);
|
|
||||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
|
||||||
}catch(Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
message = "PLC指令添加失败";
|
|
||||||
throw new BusinessException(e.getMessage());
|
|
||||||
}
|
|
||||||
j.setMsg(message);
|
|
||||||
return j;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新PLC指令
|
* 批量删除PLC指令
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "doUpdate")
|
@RequestMapping(params = "doBatchDel")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxJson doUpdate(WmsPlcEntity wmsPlc, HttpServletRequest request) {
|
public AjaxJson doBatchDel(String ids, HttpServletRequest request) {
|
||||||
String message = null;
|
String message = null;
|
||||||
AjaxJson j = new AjaxJson();
|
AjaxJson j = new AjaxJson();
|
||||||
message = "PLC指令更新成功";
|
message = "PLC指令删除成功";
|
||||||
WmsPlcEntity t = wmsPlcService.get(WmsPlcEntity.class, wmsPlc.getId());
|
try {
|
||||||
try {
|
for (String id : ids.split(",")) {
|
||||||
MyBeanUtils.copyBeanNotNull2Bean(wmsPlc, t);
|
WmsPlcEntity wmsPlc = systemService.getEntity(WmsPlcEntity.class,
|
||||||
wmsPlcService.saveOrUpdate(t);
|
id
|
||||||
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
);
|
||||||
} catch (Exception e) {
|
wmsPlcService.delete(wmsPlc);
|
||||||
e.printStackTrace();
|
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||||
message = "PLC指令更新失败";
|
}
|
||||||
throw new BusinessException(e.getMessage());
|
} catch (Exception e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
j.setMsg(message);
|
message = "PLC指令删除失败";
|
||||||
return j;
|
throw new BusinessException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
j.setMsg(message);
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PLC指令新增页面跳转
|
* 添加PLC指令
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "goAdd")
|
@RequestMapping(params = "doAdd")
|
||||||
public ModelAndView goAdd(WmsPlcEntity wmsPlc, HttpServletRequest req) {
|
@ResponseBody
|
||||||
if (StringUtil.isNotEmpty(wmsPlc.getId())) {
|
public AjaxJson doAdd(WmsPlcEntity wmsPlc, HttpServletRequest request) {
|
||||||
wmsPlc = wmsPlcService.getEntity(WmsPlcEntity.class, wmsPlc.getId());
|
String message = null;
|
||||||
req.setAttribute("wmsPlcPage", wmsPlc);
|
AjaxJson j = new AjaxJson();
|
||||||
}
|
message = "PLC指令添加成功";
|
||||||
return new ModelAndView("com/zzjee/plc/wmsPlc-add");
|
try {
|
||||||
}
|
wmsPlcService.save(wmsPlc);
|
||||||
/**
|
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||||
* PLC指令编辑页面跳转
|
} catch (Exception e) {
|
||||||
*
|
e.printStackTrace();
|
||||||
* @return
|
message = "PLC指令添加失败";
|
||||||
*/
|
throw new BusinessException(e.getMessage());
|
||||||
@RequestMapping(params = "goUpdate")
|
}
|
||||||
public ModelAndView goUpdate(WmsPlcEntity wmsPlc, HttpServletRequest req) {
|
j.setMsg(message);
|
||||||
if (StringUtil.isNotEmpty(wmsPlc.getId())) {
|
return j;
|
||||||
wmsPlc = wmsPlcService.getEntity(WmsPlcEntity.class, wmsPlc.getId());
|
}
|
||||||
req.setAttribute("wmsPlcPage", wmsPlc);
|
|
||||||
}
|
|
||||||
return new ModelAndView("com/zzjee/plc/wmsPlc-update");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入功能跳转
|
* 更新PLC指令
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "upload")
|
@RequestMapping(params = "doUpdate")
|
||||||
public ModelAndView upload(HttpServletRequest req) {
|
@ResponseBody
|
||||||
req.setAttribute("controller_name","wmsPlcController");
|
public AjaxJson doUpdate(WmsPlcEntity wmsPlc, HttpServletRequest request) {
|
||||||
return new ModelAndView("common/upload/pub_excel_upload");
|
String message = null;
|
||||||
}
|
AjaxJson j = new AjaxJson();
|
||||||
|
message = "PLC指令更新成功";
|
||||||
|
WmsPlcEntity t = wmsPlcService.get(WmsPlcEntity.class, wmsPlc.getId());
|
||||||
|
try {
|
||||||
|
MyBeanUtils.copyBeanNotNull2Bean(wmsPlc, t);
|
||||||
|
wmsPlcService.saveOrUpdate(t);
|
||||||
|
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
message = "PLC指令更新失败";
|
||||||
|
throw new BusinessException(e.getMessage());
|
||||||
|
}
|
||||||
|
j.setMsg(message);
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出excel
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
*/
|
|
||||||
@RequestMapping(params = "exportXls")
|
|
||||||
public String exportXls(WmsPlcEntity wmsPlc,HttpServletRequest request,HttpServletResponse response
|
|
||||||
, DataGrid dataGrid,ModelMap modelMap) {
|
|
||||||
CriteriaQuery cq = new CriteriaQuery(WmsPlcEntity.class, dataGrid);
|
|
||||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmsPlc, request.getParameterMap());
|
|
||||||
List<WmsPlcEntity> wmsPlcs = this.wmsPlcService.getListByCriteriaQuery(cq,false);
|
|
||||||
modelMap.put(NormalExcelConstants.FILE_NAME,"PLC指令");
|
|
||||||
modelMap.put(NormalExcelConstants.CLASS,WmsPlcEntity.class);
|
|
||||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("PLC指令列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
|
||||||
"导出信息"));
|
|
||||||
modelMap.put(NormalExcelConstants.DATA_LIST,wmsPlcs);
|
|
||||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 导出excel 使模板
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
*/
|
|
||||||
@RequestMapping(params = "exportXlsByT")
|
|
||||||
public String exportXlsByT(WmsPlcEntity wmsPlc,HttpServletRequest request,HttpServletResponse response
|
|
||||||
, DataGrid dataGrid,ModelMap modelMap) {
|
|
||||||
modelMap.put(NormalExcelConstants.FILE_NAME,"PLC指令");
|
|
||||||
modelMap.put(NormalExcelConstants.CLASS,WmsPlcEntity.class);
|
|
||||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("PLC指令列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
|
||||||
"导出信息"));
|
|
||||||
modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
|
|
||||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
/**
|
||||||
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
* PLC指令新增页面跳转
|
||||||
@ResponseBody
|
*
|
||||||
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
|
* @return
|
||||||
AjaxJson j = new AjaxJson();
|
*/
|
||||||
|
@RequestMapping(params = "goAdd")
|
||||||
|
public ModelAndView goAdd(WmsPlcEntity wmsPlc, HttpServletRequest req) {
|
||||||
|
if (StringUtil.isNotEmpty(wmsPlc.getId())) {
|
||||||
|
wmsPlc = wmsPlcService.getEntity(WmsPlcEntity.class, wmsPlc.getId());
|
||||||
|
req.setAttribute("wmsPlcPage", wmsPlc);
|
||||||
|
}
|
||||||
|
return new ModelAndView("com/zzjee/plc/wmsPlc-add");
|
||||||
|
}
|
||||||
|
|
||||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
/**
|
||||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
* PLC指令编辑页面跳转
|
||||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
*
|
||||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
* @return
|
||||||
ImportParams params = new ImportParams();
|
*/
|
||||||
params.setTitleRows(2);
|
@RequestMapping(params = "goUpdate")
|
||||||
params.setHeadRows(1);
|
public ModelAndView goUpdate(WmsPlcEntity wmsPlc, HttpServletRequest req) {
|
||||||
params.setNeedSave(true);
|
if (StringUtil.isNotEmpty(wmsPlc.getId())) {
|
||||||
try {
|
wmsPlc = wmsPlcService.getEntity(WmsPlcEntity.class, wmsPlc.getId());
|
||||||
List<WmsPlcEntity> listWmsPlcEntitys = ExcelImportUtil.importExcel(file.getInputStream(),WmsPlcEntity.class,params);
|
req.setAttribute("wmsPlcPage", wmsPlc);
|
||||||
for (WmsPlcEntity wmsPlc : listWmsPlcEntitys) {
|
}
|
||||||
wmsPlcService.save(wmsPlc);
|
return new ModelAndView("com/zzjee/plc/wmsPlc-update");
|
||||||
}
|
}
|
||||||
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<WmsPlcEntity> list() {
|
*
|
||||||
List<WmsPlcEntity> listWmsPlcs=wmsPlcService.getList(WmsPlcEntity.class);
|
* @return
|
||||||
return listWmsPlcs;
|
*/
|
||||||
}
|
@RequestMapping(params = "upload")
|
||||||
|
public ModelAndView upload(HttpServletRequest req) {
|
||||||
|
req.setAttribute("controller_name", "wmsPlcController");
|
||||||
|
return new ModelAndView("common/upload/pub_excel_upload");
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
/**
|
||||||
@ResponseBody
|
* 导出excel
|
||||||
public ResponseEntity<?> get(@PathVariable("id") String id) {
|
*
|
||||||
WmsPlcEntity task = wmsPlcService.get(WmsPlcEntity.class, id);
|
* @param request
|
||||||
if (task == null) {
|
* @param response
|
||||||
return new ResponseEntity(HttpStatus.NOT_FOUND);
|
*/
|
||||||
}
|
@RequestMapping(params = "exportXls")
|
||||||
return new ResponseEntity(task, HttpStatus.OK);
|
public String exportXls(WmsPlcEntity wmsPlc, HttpServletRequest request, HttpServletResponse response
|
||||||
}
|
, DataGrid dataGrid, ModelMap modelMap) {
|
||||||
|
CriteriaQuery cq = new CriteriaQuery(WmsPlcEntity.class, dataGrid);
|
||||||
|
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmsPlc, request.getParameterMap());
|
||||||
|
List<WmsPlcEntity> wmsPlcs = this.wmsPlcService.getListByCriteriaQuery(cq, false);
|
||||||
|
modelMap.put(NormalExcelConstants.FILE_NAME, "PLC指令");
|
||||||
|
modelMap.put(NormalExcelConstants.CLASS, WmsPlcEntity.class);
|
||||||
|
modelMap.put(NormalExcelConstants.PARAMS, new ExportParams("PLC指令列表", "导出人:" + ResourceUtil.getSessionUserName().getRealName(),
|
||||||
|
"导出信息"));
|
||||||
|
modelMap.put(NormalExcelConstants.DATA_LIST, wmsPlcs);
|
||||||
|
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
/**
|
||||||
@ResponseBody
|
* 导出excel 使模板
|
||||||
public ResponseEntity<?> create(@RequestBody WmsPlcEntity wmsPlc, UriComponentsBuilder uriBuilder) {
|
*
|
||||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
* @param request
|
||||||
Set<ConstraintViolation<WmsPlcEntity>> failures = validator.validate(wmsPlc);
|
* @param response
|
||||||
if (!failures.isEmpty()) {
|
*/
|
||||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
@RequestMapping(params = "exportXlsByT")
|
||||||
}
|
public String exportXlsByT(WmsPlcEntity wmsPlc, HttpServletRequest request, HttpServletResponse response
|
||||||
|
, DataGrid dataGrid, ModelMap modelMap) {
|
||||||
|
modelMap.put(NormalExcelConstants.FILE_NAME, "PLC指令");
|
||||||
|
modelMap.put(NormalExcelConstants.CLASS, WmsPlcEntity.class);
|
||||||
|
modelMap.put(NormalExcelConstants.PARAMS, new ExportParams("PLC指令列表", "导出人:" + ResourceUtil.getSessionUserName().getRealName(),
|
||||||
|
"导出信息"));
|
||||||
|
modelMap.put(NormalExcelConstants.DATA_LIST, new ArrayList());
|
||||||
|
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||||
|
}
|
||||||
|
|
||||||
//保存
|
@SuppressWarnings("unchecked")
|
||||||
try{
|
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
||||||
wmsPlcService.save(wmsPlc);
|
@ResponseBody
|
||||||
} catch (Exception e) {
|
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
e.printStackTrace();
|
AjaxJson j = new AjaxJson();
|
||||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
|
||||||
//按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
|
|
||||||
String id = wmsPlc.getId();
|
|
||||||
URI uri = uriBuilder.path("/rest/wmsPlcController/" + id).build().toUri();
|
|
||||||
HttpHeaders headers = new HttpHeaders();
|
|
||||||
headers.setLocation(uri);
|
|
||||||
|
|
||||||
return new ResponseEntity(headers, HttpStatus.CREATED);
|
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<WmsPlcEntity> listWmsPlcEntitys = ExcelImportUtil.importExcel(file.getInputStream(), WmsPlcEntity.class, params);
|
||||||
|
for (WmsPlcEntity wmsPlc : listWmsPlcEntitys) {
|
||||||
|
wmsPlcService.save(wmsPlc);
|
||||||
|
}
|
||||||
|
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(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.GET)
|
||||||
public ResponseEntity<?> update(@RequestBody WmsPlcEntity wmsPlc) {
|
@ResponseBody
|
||||||
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
public List<WmsPlcEntity> list() {
|
||||||
Set<ConstraintViolation<WmsPlcEntity>> failures = validator.validate(wmsPlc);
|
List<WmsPlcEntity> listWmsPlcs = wmsPlcService.getList(WmsPlcEntity.class);
|
||||||
if (!failures.isEmpty()) {
|
return listWmsPlcs;
|
||||||
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//保存
|
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||||
try{
|
@ResponseBody
|
||||||
wmsPlcService.saveOrUpdate(wmsPlc);
|
public ResponseEntity<?> get(@PathVariable("id") String id) {
|
||||||
} catch (Exception e) {
|
WmsPlcEntity task = wmsPlcService.get(WmsPlcEntity.class, id);
|
||||||
e.printStackTrace();
|
if (task == null) {
|
||||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
return new ResponseEntity(HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
return new ResponseEntity(task, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
//按Restful约定,返回204状态码, 无内容. 也可以返回200状态码.
|
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
@ResponseBody
|
||||||
}
|
public ResponseEntity<?> create(@RequestBody WmsPlcEntity wmsPlc, UriComponentsBuilder uriBuilder) {
|
||||||
|
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||||
|
Set<ConstraintViolation<WmsPlcEntity>> failures = validator.validate(wmsPlc);
|
||||||
|
if (!failures.isEmpty()) {
|
||||||
|
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
//保存
|
||||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
try {
|
||||||
public void delete(@PathVariable("id") String id) {
|
wmsPlcService.save(wmsPlc);
|
||||||
wmsPlcService.deleteEntityById(WmsPlcEntity.class, id);
|
} catch (Exception e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
|
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
//按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
|
||||||
|
String id = wmsPlc.getId();
|
||||||
|
URI uri = uriBuilder.path("/rest/wmsPlcController/" + 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 WmsPlcEntity wmsPlc) {
|
||||||
|
//调用JSR303 Bean Validator进行校验,如果出错返回含400错误码及json格式的错误信息.
|
||||||
|
Set<ConstraintViolation<WmsPlcEntity>> failures = validator.validate(wmsPlc);
|
||||||
|
if (!failures.isEmpty()) {
|
||||||
|
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存
|
||||||
|
try {
|
||||||
|
wmsPlcService.saveOrUpdate(wmsPlc);
|
||||||
|
} 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) {
|
||||||
|
wmsPlcService.deleteEntityById(WmsPlcEntity.class, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
* @Title: Entity
|
* @Title: Entity
|
||||||
* @Description: PLC指令
|
* @Description: PLC指令
|
||||||
* @author onlineGenerator
|
* @author onlineGenerator
|
||||||
* @date 2022-09-12 18:33:25
|
* @date 2022-10-22 10:15:15
|
||||||
* @version V1.0
|
* @version V1.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
@Table(name = "wms_plc", schema = "")
|
@Table(name = "wms_plc", schema = "")
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class WmsPlcEntity implements java.io.Serializable {
|
public class WmsPlcEntity implements java.io.Serializable {
|
||||||
/**主键*/
|
/**id*/
|
||||||
private String id;
|
private String id;
|
||||||
/**创建人名称*/
|
/**创建人名称*/
|
||||||
private String createName;
|
private String createName;
|
||||||
|
@ -74,10 +74,25 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
/**备用1*/
|
/**备用1*/
|
||||||
@Excel(name="备用1")
|
@Excel(name="备用1")
|
||||||
private String remark1;
|
private String remark1;
|
||||||
|
/**指令编号*/
|
||||||
|
@Excel(name="指令编号")
|
||||||
|
private String comNo;
|
||||||
|
/**单步参数1*/
|
||||||
|
@Excel(name="单步参数1")
|
||||||
|
private String query01;
|
||||||
|
/**单步参数2*/
|
||||||
|
@Excel(name="单步参数2")
|
||||||
|
private String query02;
|
||||||
|
/**单步时间*/
|
||||||
|
@Excel(name="单步时间")
|
||||||
|
private String setpTime;
|
||||||
|
/**步数*/
|
||||||
|
@Excel(name="步数")
|
||||||
|
private String setpNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*方法: 取得java.lang.String
|
*方法: 取得java.lang.String
|
||||||
*@return: java.lang.String 主键
|
*@return: java.lang.String id
|
||||||
*/
|
*/
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(generator = "paymentableGenerator")
|
@GeneratedValue(generator = "paymentableGenerator")
|
||||||
|
@ -89,7 +104,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*方法: 设置java.lang.String
|
*方法: 设置java.lang.String
|
||||||
*@param: java.lang.String 主键
|
*@param: java.lang.String id
|
||||||
*/
|
*/
|
||||||
public void setId(String id){
|
public void setId(String id){
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -130,7 +145,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
*方法: 取得java.util.Date
|
*方法: 取得java.util.Date
|
||||||
*@return: java.util.Date 创建日期
|
*@return: java.util.Date 创建日期
|
||||||
*/
|
*/
|
||||||
@Column(name ="CREATE_DATE",nullable=true,length=20)
|
@Column(name ="CREATE_DATE",nullable=true)
|
||||||
public Date getCreateDate(){
|
public Date getCreateDate(){
|
||||||
return this.createDate;
|
return this.createDate;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +193,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
*方法: 取得java.util.Date
|
*方法: 取得java.util.Date
|
||||||
*@return: java.util.Date 更新日期
|
*@return: java.util.Date 更新日期
|
||||||
*/
|
*/
|
||||||
@Column(name ="UPDATE_DATE",nullable=true,length=20)
|
@Column(name ="UPDATE_DATE",nullable=true)
|
||||||
public Date getUpdateDate(){
|
public Date getUpdateDate(){
|
||||||
return this.updateDate;
|
return this.updateDate;
|
||||||
}
|
}
|
||||||
|
@ -338,7 +353,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
*方法: 取得java.lang.String
|
*方法: 取得java.lang.String
|
||||||
*@return: java.lang.String 指令集
|
*@return: java.lang.String 指令集
|
||||||
*/
|
*/
|
||||||
@Column(name ="COM_CONS",nullable=true,length=32)
|
@Column(name ="COM_CONS",nullable=true)
|
||||||
public String getComCons(){
|
public String getComCons(){
|
||||||
return this.comCons;
|
return this.comCons;
|
||||||
}
|
}
|
||||||
|
@ -366,4 +381,84 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
public void setRemark1(String remark1){
|
public void setRemark1(String remark1){
|
||||||
this.remark1 = remark1;
|
this.remark1 = remark1;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 指令编号
|
||||||
|
*/
|
||||||
|
@Column(name ="COM_NO",nullable=true,length=32)
|
||||||
|
public String getComNo(){
|
||||||
|
return this.comNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 指令编号
|
||||||
|
*/
|
||||||
|
public void setComNo(String comNo){
|
||||||
|
this.comNo = comNo;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 单步参数1
|
||||||
|
*/
|
||||||
|
@Column(name ="QUERY01",nullable=true,length=32)
|
||||||
|
public String getQuery01(){
|
||||||
|
return this.query01;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 单步参数1
|
||||||
|
*/
|
||||||
|
public void setQuery01(String query01){
|
||||||
|
this.query01 = query01;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 单步参数2
|
||||||
|
*/
|
||||||
|
@Column(name ="QUERY02",nullable=true,length=32)
|
||||||
|
public String getQuery02(){
|
||||||
|
return this.query02;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 单步参数2
|
||||||
|
*/
|
||||||
|
public void setQuery02(String query02){
|
||||||
|
this.query02 = query02;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 单步时间
|
||||||
|
*/
|
||||||
|
@Column(name ="SETP_TIME",nullable=true,length=32)
|
||||||
|
public String getSetpTime(){
|
||||||
|
return this.setpTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 单步时间
|
||||||
|
*/
|
||||||
|
public void setSetpTime(String setpTime){
|
||||||
|
this.setpTime = setpTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 步数
|
||||||
|
*/
|
||||||
|
@Column(name ="SETP_NUM",nullable=true,length=32)
|
||||||
|
public String getSetpNum(){
|
||||||
|
return this.setpNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 步数
|
||||||
|
*/
|
||||||
|
public void setSetpNum(String setpNum){
|
||||||
|
this.setpNum = setpNum;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,14 +7,7 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -32,15 +25,7 @@ import org.jeecgframework.core.constant.Globals;
|
||||||
import org.jeecgframework.core.extend.hqlsearch.parse.ObjectParseUtil;
|
import org.jeecgframework.core.extend.hqlsearch.parse.ObjectParseUtil;
|
||||||
import org.jeecgframework.core.extend.hqlsearch.parse.PageValueConvertRuleEnum;
|
import org.jeecgframework.core.extend.hqlsearch.parse.PageValueConvertRuleEnum;
|
||||||
import org.jeecgframework.core.extend.hqlsearch.parse.vo.HqlRuleEnum;
|
import org.jeecgframework.core.extend.hqlsearch.parse.vo.HqlRuleEnum;
|
||||||
import org.jeecgframework.core.util.JSONHelper;
|
import org.jeecgframework.core.util.*;
|
||||||
import org.jeecgframework.core.util.ListUtils;
|
|
||||||
import org.jeecgframework.core.util.MutiLangSqlCriteriaUtil;
|
|
||||||
import org.jeecgframework.core.util.MutiLangUtil;
|
|
||||||
import org.jeecgframework.core.util.ResourceUtil;
|
|
||||||
import org.jeecgframework.core.util.SetListSort;
|
|
||||||
import org.jeecgframework.core.util.StringUtil;
|
|
||||||
import org.jeecgframework.core.util.YouBianCodeUtil;
|
|
||||||
import org.jeecgframework.core.util.oConvertUtils;
|
|
||||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||||
import org.jeecgframework.tag.vo.datatable.SortDirection;
|
import org.jeecgframework.tag.vo.datatable.SortDirection;
|
||||||
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
|
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
|
||||||
|
@ -277,36 +262,6 @@ public class SystemController extends BaseController {
|
||||||
return new ModelAndView("system/type/typeListForTypegroup");
|
return new ModelAndView("system/type/typeListForTypegroup");
|
||||||
}
|
}
|
||||||
|
|
||||||
// @RequestMapping(params = "typeGroupTree")
|
|
||||||
// @ResponseBody
|
|
||||||
// public List<ComboTree> typeGroupTree(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
|
||||||
// CriteriaQuery cq = new CriteriaQuery(TSTypegroup.class);
|
|
||||||
// List<TSTypegroup> typeGroupList = systemService.getListByCriteriaQuery(cq, false);
|
|
||||||
// List<ComboTree> trees = new ArrayList<ComboTree>();
|
|
||||||
// for (TSTypegroup obj : typeGroupList) {
|
|
||||||
// ComboTree tree = new ComboTree();
|
|
||||||
// tree.setId(obj.getId());
|
|
||||||
// tree.setText(obj.getTypegroupname());
|
|
||||||
// List<TSType> types = obj.getTSTypes();
|
|
||||||
// if (types != null) {
|
|
||||||
// if (types.size() > 0) {
|
|
||||||
// //tree.setState("closed");
|
|
||||||
// List<ComboTree> children = new ArrayList<ComboTree>();
|
|
||||||
// for (TSType type : types) {
|
|
||||||
// ComboTree tree2 = new ComboTree();
|
|
||||||
// tree2.setId(type.getId());
|
|
||||||
// tree2.setText(type.getTypename());
|
|
||||||
// children.add(tree2);
|
|
||||||
// }
|
|
||||||
// tree.setChildren(children);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// //tree.setChecked(false);
|
|
||||||
// trees.add(tree);
|
|
||||||
// }
|
|
||||||
// return trees;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@RequestMapping(params = "typeGridTree")
|
@RequestMapping(params = "typeGridTree")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Deprecated // add-begin-end--Author:zhangguoming Date:20140928 for:数据字典修改,该方法启用,数据字典不在已树结构展示了
|
@Deprecated // add-begin-end--Author:zhangguoming Date:20140928 for:数据字典修改,该方法启用,数据字典不在已树结构展示了
|
||||||
|
@ -360,41 +315,6 @@ public class SystemController extends BaseController {
|
||||||
return treeGrids;
|
return treeGrids;
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void assembleConditionForMutilLang(CriteriaQuery cq, String typegroupname, List<String> typegroupnameKeyList) {
|
|
||||||
// Map<String,String> typegroupnameMap = new HashMap<String, String>();
|
|
||||||
// for (String nameKey : typegroupnameKeyList) {
|
|
||||||
// String name = mutiLangService.getLang(nameKey);
|
|
||||||
// typegroupnameMap.put(nameKey, name);
|
|
||||||
// }
|
|
||||||
// List<String> tepegroupnameParamList = new ArrayList<String>();
|
|
||||||
// for (Map.Entry<String, String> entry : typegroupnameMap.entrySet()) {
|
|
||||||
// String key = entry.getKey();
|
|
||||||
// String value = entry.getValue();
|
|
||||||
// if (typegroupname.startsWith("*") && typegroupname.endsWith("*")) {
|
|
||||||
// if (value.contains(typegroupname)) {
|
|
||||||
// tepegroupnameParamList.add(key);
|
|
||||||
// }
|
|
||||||
// } else if(typegroupname.startsWith("*")) {
|
|
||||||
// if (value.endsWith(typegroupname.substring(1))) {
|
|
||||||
// tepegroupnameParamList.add(key);
|
|
||||||
// }
|
|
||||||
// } else if(typegroupname.endsWith("*")) {
|
|
||||||
// if (value.startsWith(typegroupname.substring(0, typegroupname.length() -1))) {
|
|
||||||
// tepegroupnameParamList.add(key);
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// if (value.equals(typegroupname)) {
|
|
||||||
// tepegroupnameParamList.add(key);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (tepegroupnameParamList.size() > 0) {
|
|
||||||
// cq.in("typegroupname", tepegroupnameParamList.toArray());
|
|
||||||
// cq.add();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除类型分组或者类型(ID以G开头的是分组)
|
* 删除类型分组或者类型(ID以G开头的是分组)
|
||||||
*
|
*
|
||||||
|
@ -1255,7 +1175,9 @@ public class SystemController extends BaseController {
|
||||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||||
MultipartFile mf=multipartRequest.getFile("file");// 获取上传文件对象
|
MultipartFile mf=multipartRequest.getFile("file");// 获取上传文件对象
|
||||||
fileName = mf.getOriginalFilename();// 获取文件名
|
fileName = mf.getOriginalFilename();// 获取文件名
|
||||||
String savePath = file.getPath() + File.separator + fileName;
|
String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
|
||||||
|
// TODO: 2022/11/30 判断文件后缀
|
||||||
|
String savePath = file.getPath() + File.separator + fileName;
|
||||||
File savefile = new File(savePath);
|
File savefile = new File(savePath);
|
||||||
FileCopyUtils.copy(mf.getBytes(), savefile);
|
FileCopyUtils.copy(mf.getBytes(), savefile);
|
||||||
msg="上传成功";
|
msg="上传成功";
|
||||||
|
|
|
@ -0,0 +1,293 @@
|
||||||
|
<%@ 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 style="padding:0px;border:0px">
|
||||||
|
<div style="float: left; padding-left: 0px;padding-top: 5px;">
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:left;"
|
||||||
|
title="仓库">仓库: </span>
|
||||||
|
<input type="text" name="cangku" value="agv" style="width: 55px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:right;"
|
||||||
|
title="层数">层数: </span>
|
||||||
|
<input type="text" name="cengshu" value="01" style="width: 55px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:right;"
|
||||||
|
title="行数">行数: </span>
|
||||||
|
<input type="text" name="hangshu" value="03" style="width: 55px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:right;"
|
||||||
|
title="列数">列数: </span>
|
||||||
|
<input type="text" name="lieshu" value="03" style="width: 55px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div name="searchColums" style="float: left; padding-left: 0px;padding-top: 5px;">
|
||||||
|
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:left;"
|
||||||
|
title="开始">开始: </span>
|
||||||
|
<input type="text" id = "chuweiid" name="chuwei" style="width: 55px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:right;"
|
||||||
|
title="结束">结束: </span>
|
||||||
|
<input type="text" id = "desid" name="des" style="width: 55px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 75px;text-align:right;"
|
||||||
|
title="开始指令">开始指令: </span>
|
||||||
|
<t:dictSelect id="startcom" field="startcom" type="list" extendJson="{class:'form-control'}"
|
||||||
|
dictTable="wms_plc" dictField="com_no" dictText="com_remark" hasLabel="false" ></t:dictSelect>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 75px;text-align:right;"
|
||||||
|
title="中间指令">中间指令: </span>
|
||||||
|
<t:dictSelect id="midcom" field="midcom" type="list" extendJson="{class:'form-control'}"
|
||||||
|
dictTable="wms_plc" dictField="com_no" dictText="com_remark" hasLabel="false" ></t:dictSelect>
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 75px;text-align:right;"
|
||||||
|
title="结束指令">结束指令: </span>
|
||||||
|
<t:dictSelect id="endcom" field="endcom" type="list" extendJson="{class:'form-control'}"
|
||||||
|
dictTable="wms_plc" dictField="com_no" dictText="com_remark" hasLabel="false" ></t:dictSelect>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
<%-- <span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;">--%>
|
||||||
|
<button onclick="chaxun('zhengxiang')">加载储位</button> </span>
|
||||||
|
<button onclick="chaxun('diaodu')">调度</button> </span>
|
||||||
|
<button onclick="chaxun('diaoduu')">U型调度</button> </span>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="bottom" style="margin-top:60px;border:2px">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<style type="text/css">
|
||||||
|
#bottom{
|
||||||
|
/*width: 1000px;*/
|
||||||
|
/*background: red;*/
|
||||||
|
/*width: 100%;*/
|
||||||
|
}
|
||||||
|
a.a01:link, a.a01:visited {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
background-color: #FF4040;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.a01:active, a.a01:hover {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.a02:link, a.a01:visited {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
background-color: #66CD00;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.a02:active, a.a01:hover {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
}
|
||||||
|
.all{
|
||||||
|
/*display: inline-block;*/
|
||||||
|
width: 160.5px;
|
||||||
|
height:160.5px;
|
||||||
|
line-height: 160.5px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 1px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
}
|
||||||
|
#bottom{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function addtab(name) {
|
||||||
|
var binid = document.getElementById("chuweiid").value
|
||||||
|
if(!binid){
|
||||||
|
document.getElementById("chuweiid").value = name;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
document.getElementById("desid").value =name;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
chaxun();
|
||||||
|
// $("#mvCusCostListtb").find("input[name='outtime_begin']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
|
||||||
|
// $("#mvCusCostListtb").find("input[name='outtime_end']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function chaxun(type) {
|
||||||
|
|
||||||
|
var cangku;
|
||||||
|
var chuwei;
|
||||||
|
var des;
|
||||||
|
var startcom;
|
||||||
|
var midcom;
|
||||||
|
var endcom;
|
||||||
|
|
||||||
|
cangku = $('input[name="cangku"]').attr("value");
|
||||||
|
chuwei = $('input[name="chuwei"]').attr("value");
|
||||||
|
var hangshu = $('input[name="hangshu"]').attr("value") * 1;
|
||||||
|
var lieshu = $('input[name="lieshu"]').attr("value") * 1;
|
||||||
|
var cengshu = $('input[name="cengshu"]').attr("value");
|
||||||
|
des = $('input[name="des"]').attr("value");
|
||||||
|
startcom = 'no';
|
||||||
|
midcom = 'no';
|
||||||
|
endcom = 'no';
|
||||||
|
var countstartcom=$("#startcom option").length;
|
||||||
|
var countmidcom=$("#midcom option").length;
|
||||||
|
var countendcom=$("#endcom option").length;
|
||||||
|
for(var i=0;i<countstartcom;i++) {
|
||||||
|
if ($("#startcom").get(0).options[i].selected) {
|
||||||
|
startcom = $("#startcom").get(0).options[i].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i=0;i<countmidcom;i++) {
|
||||||
|
|
||||||
|
if ($("#midcom").get(0).options[i].selected) {
|
||||||
|
midcom = $("#midcom").get(0).options[i].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i=0;i<countendcom;i++) {
|
||||||
|
|
||||||
|
if ($("#endcom").get(0).options[i].selected) {
|
||||||
|
endcom = $("#endcom").get(0).options[i].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载消息
|
||||||
|
var url = "mdBinController.do?getbinallagv&binstore=" +
|
||||||
|
cangku +
|
||||||
|
"&binid=" + chuwei +
|
||||||
|
"&des=" + des+
|
||||||
|
"&cengshu=" + cengshu+
|
||||||
|
"&hangshu=" + hangshu+
|
||||||
|
"&type=" + type+
|
||||||
|
"&startcom=" + startcom+
|
||||||
|
"&midcom=" + midcom+
|
||||||
|
"&endcom=" + endcom;
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: "GET",
|
||||||
|
dataType: "JSON",
|
||||||
|
async: false,
|
||||||
|
success: function (data) {
|
||||||
|
if (data.success) {
|
||||||
|
var messageList = data.attributes.messageList;
|
||||||
|
var messageCount = data.obj;
|
||||||
|
|
||||||
|
var messageContent = "";
|
||||||
|
var tincount = 0;
|
||||||
|
if (messageList.length > 0) {
|
||||||
|
let num = hangshu * lieshu +1; // 行数乘以列数 计算一共有多少格子
|
||||||
|
let obj ={
|
||||||
|
bin_store: "",
|
||||||
|
binid: "",
|
||||||
|
colour: "white",
|
||||||
|
des: "",
|
||||||
|
tincount: "",
|
||||||
|
xnode: "",
|
||||||
|
ynode: "",
|
||||||
|
znode: "",
|
||||||
|
} ;// 创建一个空数字 用于填充空格子(因为空格子后台不返回 前端循环渲染需要填充数据)
|
||||||
|
let list = []; // 创建数组填充所有格子
|
||||||
|
//循环填充数组
|
||||||
|
for(let s = 0 ; s < num ; s ++){
|
||||||
|
list.push(obj);
|
||||||
|
}
|
||||||
|
for(let o = 0; o < messageList.length; o++){
|
||||||
|
if(messageList[o].ynode*1 == 1){
|
||||||
|
console.log(messageList[o].ynode*1 * messageList[o].xnode*1 )
|
||||||
|
list[messageList[o].ynode*1 * messageList[o].xnode*1 ] = messageList[o]
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log((messageList[o].ynode*1 - 1) * hangshu*1 + messageList[o].xnode*1)
|
||||||
|
list[(messageList[o].ynode*1 - 1) * hangshu*1 + messageList[o].xnode*1 ] = messageList[o]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(list)
|
||||||
|
//计算宽度
|
||||||
|
var width = 170.5 * hangshu*1
|
||||||
|
$("#bottom").css("width",width);
|
||||||
|
|
||||||
|
for (let i = 1; i < list.length; i++) {
|
||||||
|
messageContent += " <div class='all' href='javascript:void(0);' style='background:" +list[i].colour+"' id='" +list[i].binid+"' onclick='javascript:addtab(\"" + list[i].binid + "\")';return false;'>";
|
||||||
|
messageContent += list[i].binid+ " </div> ";
|
||||||
|
// tincount = list[i].tincount + 0;
|
||||||
|
// if (tincount > 0) {
|
||||||
|
// messageContent += " <a class='a01 all' href='javascript:void(0);' onclick='javascript:addtab(\"" + list[i].des + "\")';return false;'>";
|
||||||
|
// messageContent += list[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// messageContent += " <a class='a02 all' href='javascript:void(0);' >";
|
||||||
|
// messageContent += list[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
// var aList = $('.all')
|
||||||
|
// console.log(aList)
|
||||||
|
|
||||||
|
// for (var i = 0; i < messageList.length; i++) {
|
||||||
|
// tincount = messageList[i].tincount + 0;
|
||||||
|
// if (tincount > 0) {
|
||||||
|
// messageContent += " <a class='a01' href='javascript:void(0);' onclick='javascript:addtab(\"" + messageList[i].des + "\")';return false;'>";
|
||||||
|
// messageContent += messageList[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// messageContent += " <a class='a02' href='javascript:void(0);' >";
|
||||||
|
// messageContent += messageList[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#bottom").html(messageContent);
|
||||||
|
// console.dir(messageContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function print(id) {
|
||||||
|
|
||||||
|
if (begindate == "" || enddate == "") {
|
||||||
|
alert("开始或者结束日期不能为空");
|
||||||
|
} else {
|
||||||
|
var url = "mvCusCostController.do?doPrint&id=" + id + "&begindate=" + begindate + "&enddate=" + enddate;
|
||||||
|
window.open(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
|
@ -1,206 +1,222 @@
|
||||||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
<%@include file="/context/mytags.jsp"%>
|
<%@include file="/context/mytags.jsp"%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<title>PLC指令</title>
|
<title>PLC指令</title>
|
||||||
<meta name="description" content="">
|
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<script type="text/javascript">
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
//编写自定义JS代码
|
//编写自定义JS代码
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doAdd" >
|
||||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doAdd" tiptype="1" >
|
<input id="id" name="id" type="hidden" value="${wmsPlcPage.id }"/>
|
||||||
<input type="hidden" id="btn_sub" class="btn_sub"/>
|
<input id="createName" name="createName" type="hidden" value="${wmsPlcPage.createName }"/>
|
||||||
<input type="hidden" id="id" name="id"/>
|
<input id="createBy" name="createBy" type="hidden" value="${wmsPlcPage.createBy }"/>
|
||||||
<div class="tab-wrapper">
|
<input id="createDate" name="createDate" type="hidden" value="${wmsPlcPage.createDate }"/>
|
||||||
<!-- tab -->
|
<input id="updateName" name="updateName" type="hidden" value="${wmsPlcPage.updateName }"/>
|
||||||
<ul class="nav nav-tabs">
|
<input id="updateBy" name="updateBy" type="hidden" value="${wmsPlcPage.updateBy }"/>
|
||||||
<li role="presentation" class="active"><a href="javascript:void(0);">PLC指令</a></li>
|
<input id="updateDate" name="updateDate" type="hidden" value="${wmsPlcPage.updateDate }"/>
|
||||||
</ul>
|
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${wmsPlcPage.sysOrgCode }"/>
|
||||||
<!-- tab内容 -->
|
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${wmsPlcPage.sysCompanyCode }"/>
|
||||||
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
|
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${wmsPlcPage.bpmStatus }"/>
|
||||||
<div class="row form-wrapper">
|
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||||
<div class="row show-grid">
|
<tr>
|
||||||
<div class="col-xs-3 text-center">
|
<td align="right">
|
||||||
<b>PLCIP:</b>
|
<label class="Validform_label">
|
||||||
</div>
|
PLCIP:
|
||||||
<div class="col-xs-3">
|
</label>
|
||||||
<input id="plcIp" name="plcIp" type="text" class="form-control"
|
</td>
|
||||||
ignore="ignore"
|
<td class="value">
|
||||||
/>
|
<input id="plcIp" name="plcIp" type="text" style="width: 150px" class="inputxt"
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
|
||||||
<label class="Validform_label" style="display: none">PLCIP</label>
|
ignore="ignore"
|
||||||
</div>
|
/>
|
||||||
</div>
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">PLCIP</label>
|
||||||
|
</td>
|
||||||
<div class="row show-grid">
|
<tr>
|
||||||
<div class="col-xs-3 text-center">
|
<td align="right">
|
||||||
<b>PLC端口:</b>
|
<label class="Validform_label">
|
||||||
</div>
|
PLC端口:
|
||||||
<div class="col-xs-3">
|
</label>
|
||||||
<input id="plcPort" name="plcPort" type="text" class="form-control"
|
</td>
|
||||||
ignore="ignore"
|
<td class="value">
|
||||||
/>
|
<input id="plcPort" name="plcPort" type="text" style="width: 150px" class="inputxt"
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
|
||||||
<label class="Validform_label" style="display: none">PLC端口</label>
|
ignore="ignore"
|
||||||
</div>
|
/>
|
||||||
</div>
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">PLC端口</label>
|
||||||
|
</td>
|
||||||
<div class="row show-grid">
|
</tr>
|
||||||
<div class="col-xs-3 text-center">
|
<tr>
|
||||||
<b>PLC型号:</b>
|
<td align="right">
|
||||||
</div>
|
<label class="Validform_label">
|
||||||
<div class="col-xs-3">
|
PLC型号:
|
||||||
<input id="plcType" name="plcType" type="text" class="form-control"
|
</label>
|
||||||
ignore="ignore"
|
</td>
|
||||||
/>
|
<td class="value">
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<input id="plcType" name="plcType" type="text" style="width: 150px" class="inputxt"
|
||||||
<label class="Validform_label" style="display: none">PLC型号</label>
|
|
||||||
</div>
|
ignore="ignore"
|
||||||
</div>
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">PLC型号</label>
|
||||||
<div class="row show-grid">
|
</td>
|
||||||
<div class="col-xs-3 text-center">
|
<tr>
|
||||||
<b>指令备注:</b>
|
<td align="right">
|
||||||
</div>
|
<label class="Validform_label">
|
||||||
<div class="col-xs-3">
|
指令备注:
|
||||||
<input id="comRemark" name="comRemark" type="text" class="form-control"
|
</label>
|
||||||
ignore="ignore"
|
</td>
|
||||||
/>
|
<td class="value">
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<input id="comRemark" name="comRemark" type="text" style="width: 150px" class="inputxt"
|
||||||
<label class="Validform_label" style="display: none">指令备注</label>
|
|
||||||
</div>
|
ignore="ignore"
|
||||||
</div>
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">指令备注</label>
|
||||||
<div class="row show-grid">
|
</td>
|
||||||
<div class="col-xs-3 text-center">
|
</tr>
|
||||||
<b>执行时间:</b>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
<div class="col-xs-3">
|
<label class="Validform_label">
|
||||||
<input id="comTime" name="comTime" type="text" class="form-control"
|
执行时间:
|
||||||
ignore="ignore"
|
</label>
|
||||||
/>
|
</td>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<td class="value">
|
||||||
<label class="Validform_label" style="display: none">执行时间</label>
|
<input id="comTime" name="comTime" type="text" style="width: 150px" class="inputxt"
|
||||||
</div>
|
|
||||||
</div>
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
<div class="row show-grid">
|
<label class="Validform_label" style="display: none;">执行时间</label>
|
||||||
<div class="col-xs-3 text-center">
|
</td>
|
||||||
<b>执行顺序:</b>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
<div class="col-xs-3">
|
<label class="Validform_label">
|
||||||
<input id="comSeq" name="comSeq" type="text" class="form-control"
|
执行顺序:
|
||||||
ignore="ignore"
|
</label>
|
||||||
/>
|
</td>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<td class="value">
|
||||||
<label class="Validform_label" style="display: none">执行顺序</label>
|
<input id="comSeq" name="comSeq" type="text" style="width: 150px" class="inputxt"
|
||||||
</div>
|
|
||||||
</div>
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
<div class="row show-grid">
|
<label class="Validform_label" style="display: none;">执行顺序</label>
|
||||||
<div class="col-xs-3 text-center">
|
</td>
|
||||||
<b>指令集:</b>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
<div class="col-xs-3">
|
<td align="right">
|
||||||
<textarea id="comCons" class="form-control" rows="6"
|
<label class="Validform_label">
|
||||||
ignore="ignore"
|
指令集:
|
||||||
name="comCons"></textarea>
|
</label>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
</td>
|
||||||
<label class="Validform_label" style="display: none">指令集</label>
|
<td class="value">
|
||||||
</div>
|
<textarea style="width:600px;" class="inputxt" rows="6" id="comCons" name="comCons"
|
||||||
</div>
|
ignore="ignore"
|
||||||
|
></textarea>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
<div class="row show-grid">
|
<label class="Validform_label" style="display: none;">指令集</label>
|
||||||
<div class="col-xs-3 text-center">
|
</td>
|
||||||
<b>备用1:</b>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
<div class="col-xs-3">
|
<label class="Validform_label">
|
||||||
<input id="remark1" name="remark1" type="text" class="form-control"
|
备用1:
|
||||||
ignore="ignore"
|
</label>
|
||||||
/>
|
</td>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<td class="value">
|
||||||
<label class="Validform_label" style="display: none">备用1</label>
|
<input id="remark1" name="remark1" type="text" style="width: 150px" class="inputxt"
|
||||||
</div>
|
|
||||||
</div>
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">备用1</label>
|
||||||
|
</td>
|
||||||
<div class="row" id = "sub_tr" style="display: none;">
|
</tr>
|
||||||
<div class="col-xs-12 layout-header">
|
<tr>
|
||||||
<div class="col-xs-6"></div>
|
<td align="right">
|
||||||
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
|
<label class="Validform_label">
|
||||||
</div>
|
指令编号:
|
||||||
</div>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<td class="value">
|
||||||
|
<input id="comNo" name="comNo" type="text" style="width: 150px" class="inputxt"
|
||||||
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
|
|
||||||
</div>
|
ignore="ignore"
|
||||||
</t:formvalid>
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
<script type="text/javascript">
|
<label class="Validform_label" style="display: none;">指令编号</label>
|
||||||
$(function(){
|
</td>
|
||||||
//查看模式情况下,删除和上传附件功能禁止使用
|
<tr>
|
||||||
if(location.href.indexOf("load=detail")!=-1){
|
<td align="right">
|
||||||
$(".jeecgDetail").hide();
|
<label class="Validform_label">
|
||||||
}
|
单步参数1:
|
||||||
|
</label>
|
||||||
if(location.href.indexOf("mode=read")!=-1){
|
</td>
|
||||||
//查看模式控件禁用
|
<td class="value">
|
||||||
$("#formobj").find(":input").attr("disabled","disabled");
|
<input id="query01" name="query01" type="text" style="width: 150px" class="inputxt"
|
||||||
}
|
|
||||||
if(location.href.indexOf("mode=onbutton")!=-1){
|
ignore="ignore"
|
||||||
//其他模式显示提交按钮
|
/>
|
||||||
$("#sub_tr").show();
|
<span class="Validform_checktip"></span>
|
||||||
}
|
<label class="Validform_label" style="display: none;">单步参数1</label>
|
||||||
});
|
</td>
|
||||||
|
</tr>
|
||||||
var neibuClickFlag = false;
|
<tr>
|
||||||
function neibuClick() {
|
<td align="right">
|
||||||
neibuClickFlag = true;
|
<label class="Validform_label">
|
||||||
$('#btn_sub').trigger('click');
|
单步参数2:
|
||||||
}
|
</label>
|
||||||
|
</td>
|
||||||
</script>
|
<td class="value">
|
||||||
|
<input id="query02" name="query02" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">单步参数2</label>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
单步时间:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="setpTime" name="setpTime" 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="setpNum" name="setpNum" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">步数</label>
|
||||||
|
</td>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</t:formvalid>
|
||||||
</body>
|
</body>
|
||||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,206 +1,210 @@
|
||||||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
<%@include file="/context/mytags.jsp"%>
|
<%@include file="/context/mytags.jsp"%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<title>PLC指令</title>
|
<title>PLC指令</title>
|
||||||
<meta name="description" content="">
|
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<script type="text/javascript">
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
//编写自定义JS代码
|
//编写自定义JS代码
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doUpdate" tiptype="1" >
|
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doUpdate" >
|
||||||
<input type="hidden" id="btn_sub" class="btn_sub"/>
|
<input id="id" name="id" type="hidden" value="${wmsPlcPage.id }">
|
||||||
<input type="hidden" name="id" value='${wmsPlcPage.id}' >
|
<input id="createName" name="createName" type="hidden" value="${wmsPlcPage.createName }">
|
||||||
|
<input id="createBy" name="createBy" type="hidden" value="${wmsPlcPage.createBy }">
|
||||||
|
<input id="createDate" name="createDate" type="hidden" value="${wmsPlcPage.createDate }">
|
||||||
<div class="tab-wrapper">
|
<input id="updateName" name="updateName" type="hidden" value="${wmsPlcPage.updateName }">
|
||||||
<!-- tab -->
|
<input id="updateBy" name="updateBy" type="hidden" value="${wmsPlcPage.updateBy }">
|
||||||
<ul class="nav nav-tabs">
|
<input id="updateDate" name="updateDate" type="hidden" value="${wmsPlcPage.updateDate }">
|
||||||
<li role="presentation" class="active"><a href="javascript:void(0);">PLC指令</a></li>
|
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${wmsPlcPage.sysOrgCode }">
|
||||||
</ul>
|
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${wmsPlcPage.sysCompanyCode }">
|
||||||
<!-- tab内容 -->
|
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${wmsPlcPage.bpmStatus }">
|
||||||
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
|
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||||
<div class="row form-wrapper">
|
<tr>
|
||||||
<div class="row show-grid">
|
<td align="right">
|
||||||
<div class="col-xs-3 text-center">
|
<label class="Validform_label">
|
||||||
<b>PLCIP:</b>
|
PLCIP:
|
||||||
</div>
|
</label>
|
||||||
<div class="col-xs-3">
|
</td>
|
||||||
<input id="plcIp" name="plcIp" type="text" class="form-control"
|
<td class="value">
|
||||||
ignore="ignore"
|
<input id="plcIp" name="plcIp" type="text" style="width: 150px" class="inputxt"
|
||||||
value='${wmsPlcPage.plcIp}' />
|
ignore="ignore"
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
value='${wmsPlcPage.plcIp}'>
|
||||||
<label class="Validform_label" style="display: none">PLCIP</label>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">PLCIP</label>
|
||||||
</div>
|
</td>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
<div class="row show-grid">
|
<label class="Validform_label">
|
||||||
<div class="col-xs-3 text-center">
|
PLC端口:
|
||||||
<b>PLC端口:</b>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
<div class="col-xs-3">
|
<td class="value">
|
||||||
<input id="plcPort" name="plcPort" type="text" class="form-control"
|
<input id="plcPort" name="plcPort" type="text" style="width: 150px" class="inputxt"
|
||||||
ignore="ignore"
|
ignore="ignore"
|
||||||
value='${wmsPlcPage.plcPort}' />
|
value='${wmsPlcPage.plcPort}'>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<span class="Validform_checktip"></span>
|
||||||
<label class="Validform_label" style="display: none">PLC端口</label>
|
<label class="Validform_label" style="display: none;">PLC端口</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
<div class="row show-grid">
|
<label class="Validform_label">
|
||||||
<div class="col-xs-3 text-center">
|
PLC型号:
|
||||||
<b>PLC型号:</b>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
<div class="col-xs-3">
|
<td class="value">
|
||||||
<input id="plcType" name="plcType" type="text" class="form-control"
|
<input id="plcType" name="plcType" type="text" style="width: 150px" class="inputxt"
|
||||||
ignore="ignore"
|
ignore="ignore"
|
||||||
value='${wmsPlcPage.plcType}' />
|
value='${wmsPlcPage.plcType}'>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<span class="Validform_checktip"></span>
|
||||||
<label class="Validform_label" style="display: none">PLC型号</label>
|
<label class="Validform_label" style="display: none;">PLC型号</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
<div class="row show-grid">
|
指令备注:
|
||||||
<div class="col-xs-3 text-center">
|
</label>
|
||||||
<b>指令备注:</b>
|
</td>
|
||||||
</div>
|
<td class="value">
|
||||||
<div class="col-xs-3">
|
<input id="comRemark" name="comRemark" type="text" style="width: 150px" class="inputxt"
|
||||||
<input id="comRemark" name="comRemark" type="text" class="form-control"
|
ignore="ignore"
|
||||||
ignore="ignore"
|
value='${wmsPlcPage.comRemark}'>
|
||||||
value='${wmsPlcPage.comRemark}' />
|
<span class="Validform_checktip"></span>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<label class="Validform_label" style="display: none;">指令备注</label>
|
||||||
<label class="Validform_label" style="display: none">指令备注</label>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
<div class="row show-grid">
|
执行时间:
|
||||||
<div class="col-xs-3 text-center">
|
</label>
|
||||||
<b>执行时间:</b>
|
</td>
|
||||||
</div>
|
<td class="value">
|
||||||
<div class="col-xs-3">
|
<input id="comTime" name="comTime" type="text" style="width: 150px" class="inputxt"
|
||||||
<input id="comTime" name="comTime" type="text" class="form-control"
|
ignore="ignore"
|
||||||
ignore="ignore"
|
value='${wmsPlcPage.comTime}'>
|
||||||
value='${wmsPlcPage.comTime}' />
|
<span class="Validform_checktip"></span>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<label class="Validform_label" style="display: none;">执行时间</label>
|
||||||
<label class="Validform_label" style="display: none">执行时间</label>
|
</td>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
执行顺序:
|
||||||
<div class="row show-grid">
|
</label>
|
||||||
<div class="col-xs-3 text-center">
|
</td>
|
||||||
<b>执行顺序:</b>
|
<td class="value">
|
||||||
</div>
|
<input id="comSeq" name="comSeq" type="text" style="width: 150px" class="inputxt"
|
||||||
<div class="col-xs-3">
|
ignore="ignore"
|
||||||
<input id="comSeq" name="comSeq" type="text" class="form-control"
|
value='${wmsPlcPage.comSeq}'>
|
||||||
ignore="ignore"
|
<span class="Validform_checktip"></span>
|
||||||
value='${wmsPlcPage.comSeq}' />
|
<label class="Validform_label" style="display: none;">执行顺序</label>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
</td>
|
||||||
<label class="Validform_label" style="display: none">执行顺序</label>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
指令集:
|
||||||
<div class="row show-grid">
|
</label>
|
||||||
<div class="col-xs-3 text-center">
|
</td>
|
||||||
<b>指令集:</b>
|
<td class="value">
|
||||||
</div>
|
<textarea id="comCons" style="width:600px;" class="inputxt" rows="6" name="comCons"
|
||||||
<div class="col-xs-3">
|
ignore="ignore"
|
||||||
<textarea id="comCons" class="form-control" rows="6"
|
>${wmsPlcPage.comCons}</textarea>
|
||||||
ignore="ignore"
|
<span class="Validform_checktip"></span>
|
||||||
name="comCons">${wmsPlcPage.comCons}</textarea>
|
<label class="Validform_label" style="display: none;">指令集</label>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
</td>
|
||||||
<label class="Validform_label" style="display: none">指令集</label>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
</div>
|
<label class="Validform_label">
|
||||||
|
备用1:
|
||||||
|
</label>
|
||||||
<div class="row show-grid">
|
</td>
|
||||||
<div class="col-xs-3 text-center">
|
<td class="value">
|
||||||
<b>备用1:</b>
|
<input id="remark1" name="remark1" type="text" style="width: 150px" class="inputxt"
|
||||||
</div>
|
ignore="ignore"
|
||||||
<div class="col-xs-3">
|
value='${wmsPlcPage.remark1}'>
|
||||||
<input id="remark1" name="remark1" type="text" class="form-control"
|
<span class="Validform_checktip"></span>
|
||||||
ignore="ignore"
|
<label class="Validform_label" style="display: none;">备用1</label>
|
||||||
value='${wmsPlcPage.remark1}' />
|
</td>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
</tr>
|
||||||
<label class="Validform_label" style="display: none">备用1</label>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
</div>
|
<label class="Validform_label">
|
||||||
|
指令编号:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
<div class="row" id = "sub_tr" style="display: none;">
|
<input id="comNo" name="comNo" type="text" style="width: 150px" class="inputxt"
|
||||||
<div class="col-xs-12 layout-header">
|
ignore="ignore"
|
||||||
<div class="col-xs-6"></div>
|
value='${wmsPlcPage.comNo}'>
|
||||||
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">指令编号</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
|
单步参数1:
|
||||||
</div>
|
</label>
|
||||||
</t:formvalid>
|
</td>
|
||||||
|
<td class="value">
|
||||||
<script type="text/javascript">
|
<input id="query01" name="query01" type="text" style="width: 150px" class="inputxt"
|
||||||
$(function(){
|
ignore="ignore"
|
||||||
//查看模式情况下,删除和上传附件功能禁止使用
|
value='${wmsPlcPage.query01}'>
|
||||||
if(location.href.indexOf("load=detail")!=-1){
|
<span class="Validform_checktip"></span>
|
||||||
$(".jeecgDetail").hide();
|
<label class="Validform_label" style="display: none;">单步参数1</label>
|
||||||
}
|
</td>
|
||||||
|
</tr>
|
||||||
if(location.href.indexOf("mode=read")!=-1){
|
<tr>
|
||||||
//查看模式控件禁用
|
<td align="right">
|
||||||
$("#formobj").find(":input").attr("disabled","disabled");
|
<label class="Validform_label">
|
||||||
}
|
单步参数2:
|
||||||
if(location.href.indexOf("mode=onbutton")!=-1){
|
</label>
|
||||||
//其他模式显示提交按钮
|
</td>
|
||||||
$("#sub_tr").show();
|
<td class="value">
|
||||||
}
|
<input id="query02" name="query02" type="text" style="width: 150px" class="inputxt"
|
||||||
});
|
ignore="ignore"
|
||||||
|
value='${wmsPlcPage.query02}'>
|
||||||
var neibuClickFlag = false;
|
<span class="Validform_checktip"></span>
|
||||||
function neibuClick() {
|
<label class="Validform_label" style="display: none;">单步参数2</label>
|
||||||
neibuClickFlag = true;
|
</td>
|
||||||
$('#btn_sub').trigger('click');
|
<tr>
|
||||||
}
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
</script>
|
单步时间:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="setpTime" name="setpTime" type="text" style="width: 150px" class="inputxt"
|
||||||
|
ignore="ignore"
|
||||||
|
value='${wmsPlcPage.setpTime}'>
|
||||||
|
<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="setpNum" name="setpNum" type="text" style="width: 150px" class="inputxt"
|
||||||
|
ignore="ignore"
|
||||||
|
value='${wmsPlcPage.setpNum}'>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">步数</label>
|
||||||
|
</td>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</t:formvalid>
|
||||||
</body>
|
</body>
|
||||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||||
</html>
|
|
||||||
|
|
|
@ -21,6 +21,10 @@ function commonUpload(callback){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function browseImages(inputId, Img) {// 图片管理器,可多个上传共用
|
||||||
|
}
|
||||||
|
function browseFiles(inputId, file) {// 文件管理器,可多个上传共用
|
||||||
|
}
|
||||||
function decode(value, id) {//value传入值,id接受值
|
function decode(value, id) {//value传入值,id接受值
|
||||||
var last = value.lastIndexOf("/");
|
var last = value.lastIndexOf("/");
|
||||||
var filename = value.substring(last + 1, value.length);
|
var filename = value.substring(last + 1, value.length);
|
||||||
|
|
|
@ -14,14 +14,19 @@
|
||||||
<t:dgCol title="所属部门" field="sysOrgCode" 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="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="bpmStatus" hidden="true" queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
|
||||||
<t:dgCol title="PLCIP" field="plcIp" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="PLCIP" field="plcIp" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="PLC端口" field="plcPort" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="PLC端口" field="plcPort" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="PLC型号" field="plcType" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="PLC型号" field="plcType" query="true" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="指令备注" field="comRemark" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="指令备注" field="comRemark" query="true" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="执行时间(毫秒)" field="comTime" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="执行时间" field="comTime" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="执行顺序" field="comSeq" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="执行顺序" field="comSeq" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="指令集" field="comCons" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="指令集" field="comCons" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="备用1" field="remark1" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="备用1" field="remark1" queryMode="group" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="指令编号" field="comNo" query="true" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="单步参数1" field="query01" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="单步参数2" field="query02" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="单步时间" field="setpTime" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="步数" field="setpNum" queryMode="single" width="120"></t:dgCol>
|
||||||
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
||||||
<t:dgDelOpt title="删除" url="wmsPlcController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
|
<t:dgDelOpt title="删除" url="wmsPlcController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
|
||||||
<t:dgToolBar title="录入" icon="icon-add" url="wmsPlcController.do?goAdd" funname="add"></t:dgToolBar>
|
<t:dgToolBar title="录入" icon="icon-add" url="wmsPlcController.do?goAdd" funname="add"></t:dgToolBar>
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
<%-- <t:dgToolBar title="批量删除" icon="icon-remove" url="wmToUpGoodsController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
|
<%-- <t:dgToolBar title="批量删除" icon="icon-remove" url="wmToUpGoodsController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
|
||||||
<t:dgToolBar title="查看" icon="icon-search" url="wmToUpGoodsController.do?goUpdate" funname="detail"></t:dgToolBar>
|
<t:dgToolBar title="查看" icon="icon-search" url="wmToUpGoodsController.do?goUpdate" funname="detail"></t:dgToolBar>
|
||||||
<t:dgToolBar title="导入库存" icon="icon-put" funname="ImportXls"></t:dgToolBar>
|
<t:dgToolBar title="导入库存" icon="icon-put" funname="ImportXls"></t:dgToolBar>
|
||||||
<t:dgToolBar title="清空基础数据" icon="icon-put" funname="ImportXls"></t:dgToolBar>
|
<%-- <t:dgToolBar title="清空基础数据" icon="icon-put" funname="ImportXls"></t:dgToolBar>--%>
|
||||||
<t:dgToolBar title="清空库存数据" icon="icon-put" funname="ImportXls"></t:dgToolBar>
|
<%-- <t:dgToolBar title="清空库存数据" icon="icon-put" funname="ImportXls"></t:dgToolBar>--%>
|
||||||
<t:dgToolBar title="清空业务数据" icon="icon-put" funname="ImportXls"></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="ExportXls"></t:dgToolBar>
|
||||||
<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
|
<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
|
||||||
|
|
||||||
|
|
|
@ -1,141 +1,160 @@
|
||||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
<%@page import="org.jeecgframework.core.util.SysThemesUtil,org.jeecgframework.core.enums.SysThemesEnum"%>
|
<%@page import="org.jeecgframework.core.util.SysThemesUtil,org.jeecgframework.core.enums.SysThemesEnum" %>
|
||||||
<%@include file="/context/mytags.jsp"%>
|
<%@include file="/context/mytags.jsp" %>
|
||||||
<%
|
<%
|
||||||
session.setAttribute("lang","zh-cn");
|
session.setAttribute("lang", "zh-cn");
|
||||||
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
|
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
|
||||||
String lhgdialogTheme = SysThemesUtil.getLhgdialogTheme(sysTheme);
|
String lhgdialogTheme = SysThemesUtil.getLhgdialogTheme(sysTheme);
|
||||||
%>
|
%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8"/>
|
||||||
<title><t:mutiLang langKey="jeect.platform"/></title>
|
<title><t:mutiLang langKey="jeect.platform"/></title>
|
||||||
<link rel="shortcut icon" href="images/favicon.ico">
|
<link rel="shortcut icon" href="images/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
|
||||||
<!-- bootstrap & fontawesome -->
|
<!-- bootstrap & fontawesome -->
|
||||||
<link rel="stylesheet" href="plug-in/ace/css/bootstrap.css" />
|
<link rel="stylesheet" href="plug-in/ace/css/bootstrap.css"/>
|
||||||
<link rel="stylesheet" href="plug-in/ace/css/font-awesome.css" />
|
<link rel="stylesheet" href="plug-in/ace/css/font-awesome.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="plug-in/accordion/css/accordion.css">
|
<link rel="stylesheet" type="text/css" href="plug-in/accordion/css/accordion.css">
|
||||||
<!-- text fonts -->
|
<!-- text fonts -->
|
||||||
<link rel="stylesheet" href="plug-in/ace/css/ace-fonts.css" />
|
<link rel="stylesheet" href="plug-in/ace/css/ace-fonts.css"/>
|
||||||
|
|
||||||
<link rel="stylesheet" href="plug-in/ace/css/jquery-ui.css" />
|
<link rel="stylesheet" href="plug-in/ace/css/jquery-ui.css"/>
|
||||||
<!-- ace styles -->
|
<!-- ace styles -->
|
||||||
<link rel="stylesheet" href="plug-in/ace/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />
|
<link rel="stylesheet" href="plug-in/ace/css/ace.css" class="ace-main-stylesheet" id="main-ace-style"/>
|
||||||
<!--[if lte IE 9]>
|
<!--[if lte IE 9]>
|
||||||
<link rel="stylesheet" href="plug-in/ace/css/ace-part2.css" class="ace-main-stylesheet" />
|
<link rel="stylesheet" href="plug-in/ace/css/ace-part2.css" class="ace-main-stylesheet"/>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<!--[if lte IE 9]>
|
<!--[if lte IE 9]>
|
||||||
<link rel="stylesheet" href="plug-in/ace/css/ace-ie.css" />
|
<link rel="stylesheet" href="plug-in/ace/css/ace-ie.css"/>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<!-- ace settings handler -->
|
<!-- ace settings handler -->
|
||||||
<script src="plug-in/ace/js/ace-extra.js"></script>
|
<script src="plug-in/ace/js/ace-extra.js"></script>
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
|
|
||||||
<!--[if lte IE 8]>
|
<!--[if lte IE 8]>
|
||||||
<script src="plug-in/ace/js/html5shiv.js"></script>
|
<script src="plug-in/ace/js/html5shiv.js"></script>
|
||||||
<script src="plug-in/ace/js/respond.js"></script>
|
<script src="plug-in/ace/js/respond.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="login-layout light-login">
|
<body class="login-layout light-login">
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-10 col-sm-offset-1">
|
<div class="col-sm-10 col-sm-offset-1">
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<h1 id="id-text2" class="grey">
|
<h1 id="id-text2" class="grey">
|
||||||
<!-- <i class="ace-icon fa fa-leaf green"></i> -->
|
<!-- <i class="ace-icon fa fa-leaf green"></i> -->
|
||||||
<t:mutiLang langKey="com.sysname"/>
|
<t:mutiLang langKey="com.sysname"/>
|
||||||
</h1>
|
</h1>
|
||||||
<!-- <h4 class="blue" id="id-company-text">www.zzjee.org</h4> -->
|
<!-- <h4 class="blue" id="id-company-text">www.zzjee.org</h4> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="space-6"></div>
|
<div class="space-6"></div>
|
||||||
<div class="position-relative">
|
<div class="position-relative">
|
||||||
<div id="login-box" class="login-box visible widget-box no-border">
|
<div id="login-box" class="login-box visible widget-box no-border">
|
||||||
<div class="widget-body">
|
<div class="widget-body">
|
||||||
<form id="loinForm" class="form-horizontal" check="loginController.do?checkuser" role="form" action="loginController.do?login" method="post">
|
<form id="loinForm" class="form-horizontal" check="loginController.do?checkuser"
|
||||||
<div class="widget-main">
|
role="form" action="loginController.do?login" method="post">
|
||||||
<div class="alert alert-warning alert-dismissible" role="alert" id="errMsgContiner">
|
<div class="widget-main">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<div class="alert alert-warning alert-dismissible" role="alert"
|
||||||
<div id="showErrMsg"></div>
|
id="errMsgContiner">
|
||||||
</div>
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||||
<h4 class="header blue lighter bigger">
|
<span aria-hidden="true">×</span></button>
|
||||||
<i class="ace-icon fa fa-coffee green"></i>
|
<div id="showErrMsg"></div>
|
||||||
用户登录
|
</div>
|
||||||
</h4>
|
<h4 class="header blue lighter bigger">
|
||||||
<div class="space-6"></div>
|
<i class="ace-icon fa fa-coffee green"></i>
|
||||||
<label class="block clearfix">
|
<t:mutiLang langKey="login.info"/>
|
||||||
|
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
<div class="space-6"></div>
|
||||||
|
<label class="block clearfix">
|
||||||
<span class="block input-icon input-icon-right">
|
<span class="block input-icon input-icon-right">
|
||||||
<input type="text" name="userName" class="form-control" placeholder="请输入用户名" id="userName" value="admin"/>
|
<input type="text" name="userName" class="form-control" id="userName"
|
||||||
|
value="admin"/>
|
||||||
<i class="ace-icon fa fa-user"></i>
|
<i class="ace-icon fa fa-user"></i>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="block clearfix">
|
<label class="block clearfix">
|
||||||
<span class="block input-icon input-icon-right">
|
<span class="block input-icon input-icon-right">
|
||||||
<input type="password" name="password" class="form-control" placeholder="请输入密码" id="password" value="llg123"/>
|
<input type="password" name="password" class="form-control" id="password"
|
||||||
|
value="llg123"/>
|
||||||
<i class="ace-icon fa fa-lock"></i>
|
<i class="ace-icon fa fa-lock"></i>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="block clearfix">
|
<label class="block clearfix">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" style="width:150px" name="randCode" class="form-control" placeholder="请输入验证码" id="randCode"/>
|
<input type="text" style="width:150px" name="randCode"
|
||||||
<span class="input-group-addon" style="padding: 0px;"><img id="randCodeImage" src="randCodeImage" /></span>
|
class="form-control" id="randCode"/>
|
||||||
|
<span class="input-group-addon" style="padding: 0px;"><img
|
||||||
|
id="randCodeImage" src="randCodeImage"/></span>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="space"></div>
|
||||||
|
<div class="clearfix">
|
||||||
|
<label class="inline">
|
||||||
|
<input type="checkbox" class="ace" id="on_off" name="remember"
|
||||||
|
value="yes"/>
|
||||||
|
<span class="lbl">
|
||||||
|
<t:mutiLang langKey="login.saveusername"/>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<button type="button" id="but_login" onclick="checkUser()"
|
||||||
|
class="width-35 pull-right btn btn-sm btn-primary">
|
||||||
|
<i class="ace-icon fa fa-key"></i>
|
||||||
|
<span class="bigger-110">
|
||||||
|
<t:mutiLang langKey="login.login"/>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="space-4"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="toolbar clearfix">
|
||||||
|
<div style="float: right">
|
||||||
|
<a href="#" class="forgot-password-link">
|
||||||
|
语言
|
||||||
|
<i class="ace-icon fa fa-arrow-right"></i>
|
||||||
|
<t:dictSelect id="langCode" field="langCode" typeGroupCode="lang"
|
||||||
|
hasLabel="false"
|
||||||
|
extendJson="{style:'padding:2px; width:80px;'}"
|
||||||
|
defaultVal="zh-cn"></t:dictSelect>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
<%-- <div class="center"><h4 class="blue" id="id-company-text">© 本系统未在任何平台出售源码,版权归jeewms所有,如果需要服务请联系13850081872</h4></div>--%>
|
||||||
<div class="space"></div>
|
<div class="navbar-fixed-top align-right">
|
||||||
<div class="clearfix">
|
<br/>
|
||||||
<label class="inline">
|
|
||||||
<input type="checkbox" class="ace" id="on_off" name="remember" value="yes"/>
|
<a id="btn-login-dark" class="blue" href="#" onclick="darkStyle()">Dark</a>
|
||||||
<span class="lbl">记住用户名</span>
|
|
||||||
</label>
|
<span class="blue">/</span>
|
||||||
<button type="button" id="but_login" onclick="checkUser()" class="width-35 pull-right btn btn-sm btn-primary">
|
|
||||||
<i class="ace-icon fa fa-key"></i>
|
<a id="btn-login-blur" class="blue" href="#" onclick="blurStyle()">Blur</a>
|
||||||
<span class="bigger-110" >登录</span>
|
|
||||||
</button>
|
<span class="blue">/</span>
|
||||||
</div>
|
|
||||||
<div class="space-4"></div>
|
<a id="btn-login-light" class="blue" href="#" onclick="lightStyle()">Light</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar clearfix">
|
|
||||||
<div style="float: right">
|
|
||||||
<a href="#" class="forgot-password-link">
|
|
||||||
语言
|
|
||||||
<i class="ace-icon fa fa-arrow-right"></i>
|
|
||||||
<t:dictSelect id="langCode" field="langCode" typeGroupCode="lang" hasLabel="false" extendJson="{style:'padding:2px; width:80px;'}" defaultVal="zh-cn"></t:dictSelect>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<%-- <div class="center"><h4 class="blue" id="id-company-text">© 本系统未在任何平台出售源码,版权归jeewms所有,如果需要服务请联系13850081872</h4></div>--%>
|
|
||||||
<div class="navbar-fixed-top align-right">
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<a id="btn-login-dark" class="blue" href="#" onclick="darkStyle()">Dark</a>
|
|
||||||
|
|
||||||
<span class="blue">/</span>
|
|
||||||
|
|
||||||
<a id="btn-login-blur" class="blue" href="#" onclick="blurStyle()">Blur</a>
|
|
||||||
|
|
||||||
<span class="blue">/</span>
|
|
||||||
|
|
||||||
<a id="btn-login-light" class="blue" href="#" onclick="lightStyle()">Light</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.min.js"></script>
|
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.min.js"></script>
|
||||||
|
@ -146,209 +165,214 @@
|
||||||
<script type="text/javascript" src="plug-in/login/js/iphone.check.js"></script>
|
<script type="text/javascript" src="plug-in/login/js/iphone.check.js"></script>
|
||||||
<script type="text/javascript" src="plug-in/login/js/login.js"></script>
|
<script type="text/javascript" src="plug-in/login/js/login.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function () {
|
||||||
optErrMsg();
|
optErrMsg();
|
||||||
});
|
|
||||||
$("#errMsgContiner").hide();
|
|
||||||
function optErrMsg(){
|
|
||||||
$("#showErrMsg").html('');
|
|
||||||
$("#errMsgContiner").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
//输入验证码,回车登录
|
|
||||||
$(document).keydown(function(e){
|
|
||||||
if(e.keyCode == 13) {
|
|
||||||
$("#but_login").click();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//验证用户信息
|
|
||||||
function checkUser(){
|
|
||||||
if(!validForm()){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
newLogin();
|
|
||||||
}
|
|
||||||
//表单验证
|
|
||||||
function validForm(){
|
|
||||||
if($.trim($("#userName").val()).length==0){
|
|
||||||
showErrorMsg("请输入用户名");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($.trim($("#password").val()).length==0){
|
|
||||||
showErrorMsg("请输入密码");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($.trim($("#randCode").val()).length==0){
|
|
||||||
showErrorMsg("请输入验证码");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//登录处理函数
|
|
||||||
function newLogin(orgId) {
|
|
||||||
setCookie();
|
|
||||||
var actionurl=$('form').attr('action');//提交路径
|
|
||||||
var checkurl=$('form').attr('check');//验证路径
|
|
||||||
var formData = new Object();
|
|
||||||
var data=$(":input").each(function() {
|
|
||||||
formData[this.name] =$("#"+this.name ).val();
|
|
||||||
});
|
});
|
||||||
formData['orgId'] = orgId ? orgId : "";
|
$("#errMsgContiner").hide();
|
||||||
//语言
|
|
||||||
formData['langCode']=$("#langCode").val();
|
|
||||||
formData['langCode'] = $("#langCode option:selected").val();
|
|
||||||
$.ajax({
|
|
||||||
async : false,
|
|
||||||
cache : false,
|
|
||||||
type : 'POST',
|
|
||||||
url : checkurl,// 请求的action路径
|
|
||||||
data : formData,
|
|
||||||
error : function() {// 请求失败处理函数
|
|
||||||
},
|
|
||||||
success : function(data) {
|
|
||||||
var d = $.parseJSON(data);
|
|
||||||
if (d.success) {
|
|
||||||
if (d.attributes.orgNum > 1) {
|
|
||||||
//用户拥有多个部门,需选择部门进行登录
|
|
||||||
var title, okButton;
|
|
||||||
if($("#langCode").val() == 'en') {
|
|
||||||
title = "Please select Org";
|
|
||||||
okButton = "Ok";
|
|
||||||
} else {
|
|
||||||
title = "请选择组织机构";
|
|
||||||
okButton = "确定";
|
|
||||||
}
|
|
||||||
$.dialog({
|
|
||||||
id: 'LHG1976D',
|
|
||||||
title: title,
|
|
||||||
max: false,
|
|
||||||
min: false,
|
|
||||||
drag: false,
|
|
||||||
resize: false,
|
|
||||||
content: 'url:userController.do?userOrgSelect&userId=' + d.attributes.user.id,
|
|
||||||
lock:true,
|
|
||||||
button : [ {
|
|
||||||
name : okButton,
|
|
||||||
focus : true,
|
|
||||||
callback : function() {
|
|
||||||
iframe = this.iframe.contentWindow;
|
|
||||||
var orgId = $('#orgId', iframe.document).val();
|
|
||||||
|
|
||||||
formData['orgId'] = orgId ? orgId : "";
|
function optErrMsg() {
|
||||||
$.ajax({
|
$("#showErrMsg").html('');
|
||||||
async : false,
|
$("#errMsgContiner").hide();
|
||||||
cache : false,
|
}
|
||||||
type : 'POST',
|
|
||||||
url : 'loginController.do?changeDefaultOrg',// 请求的action路径
|
|
||||||
data : formData,
|
|
||||||
error : function() {// 请求失败处理函数
|
|
||||||
},
|
|
||||||
success : function(data) {
|
|
||||||
window.location.href = actionurl;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
close: function(){
|
|
||||||
setTimeout("window.location.href='"+actionurl+"'", 10);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
window.location.href = actionurl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
showErrorMsg(d.msg);
|
|
||||||
if(d.msg === "用户名或密码错误" || d.msg === "验证码错误")
|
|
||||||
reloadRandCodeImage();
|
|
||||||
|
|
||||||
|
//输入验证码,回车登录
|
||||||
|
$(document).keydown(function (e) {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
$("#but_login").click();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
//登录提示消息显示
|
|
||||||
function showErrorMsg(msg){
|
|
||||||
$("#errMsgContiner").show();
|
|
||||||
$("#showErrMsg").html(msg);
|
|
||||||
window.setTimeout(optErrMsg,3000);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 刷新验证码
|
|
||||||
*/
|
|
||||||
$('#randCodeImage').click(function(){
|
|
||||||
reloadRandCodeImage();
|
|
||||||
});
|
|
||||||
function reloadRandCodeImage() {
|
|
||||||
var date = new Date();
|
|
||||||
var img = document.getElementById("randCodeImage");
|
|
||||||
img.src='randCodeImage?a=' + date.getTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
function darkStyle(){
|
//验证用户信息
|
||||||
$('body').attr('class', 'login-layout');
|
function checkUser() {
|
||||||
$('#id-text2').attr('class', 'red');
|
if (!validForm()) {
|
||||||
$('#id-company-text').attr('class', 'blue');
|
return false;
|
||||||
e.preventDefault();
|
}
|
||||||
}
|
newLogin();
|
||||||
function lightStyle(){
|
}
|
||||||
$('body').attr('class', 'login-layout light-login');
|
|
||||||
$('#id-text2').attr('class', 'grey');
|
|
||||||
$('#id-company-text').attr('class', 'blue');
|
|
||||||
|
|
||||||
e.preventDefault();
|
//表单验证
|
||||||
}
|
function validForm() {
|
||||||
function blurStyle(){
|
if ($.trim($("#userName").val()).length == 0) {
|
||||||
$('body').attr('class', 'login-layout blur-login');
|
showErrorMsg("请输入用户名");
|
||||||
$('#id-text2').attr('class', 'white');
|
return false;
|
||||||
$('#id-company-text').attr('class', 'light-blue');
|
}
|
||||||
|
|
||||||
e.preventDefault();
|
if ($.trim($("#password").val()).length == 0) {
|
||||||
}
|
showErrorMsg("请输入密码");
|
||||||
//设置cookie
|
return false;
|
||||||
function setCookie()
|
}
|
||||||
{
|
|
||||||
if ($('#on_off').val() == '1') {
|
if ($.trim($("#randCode").val()).length == 0) {
|
||||||
$("input[iscookie='true']").each(function() {
|
showErrorMsg("请输入验证码");
|
||||||
$.cookie(this.name, $("#"+this.name).val(), "/",24);
|
return false;
|
||||||
$.cookie("COOKIE_NAME","true", "/",24);
|
}
|
||||||
});
|
return true;
|
||||||
} else {
|
}
|
||||||
$("input[iscookie='true']").each(function() {
|
|
||||||
$.cookie(this.name,null);
|
//登录处理函数
|
||||||
$.cookie("COOKIE_NAME",null);
|
function newLogin(orgId) {
|
||||||
});
|
setCookie();
|
||||||
}
|
var actionurl = $('form').attr('action');//提交路径
|
||||||
}
|
var checkurl = $('form').attr('check');//验证路径
|
||||||
//读取cookie
|
var formData = new Object();
|
||||||
function getCookie()
|
var data = $(":input").each(function () {
|
||||||
{
|
formData[this.name] = $("#" + this.name).val();
|
||||||
var COOKIE_NAME=$.cookie("COOKIE_NAME");
|
});
|
||||||
if (COOKIE_NAME !=null) {
|
formData['orgId'] = orgId ? orgId : "";
|
||||||
$("input[iscookie='true']").each(function() {
|
//语言
|
||||||
$($("#"+this.name).val( $.cookie(this.name)));
|
formData['langCode'] = $("#langCode").val();
|
||||||
if("admin" == $.cookie(this.name)) {
|
formData['langCode'] = $("#langCode option:selected").val();
|
||||||
$("#randCode").focus();
|
$.ajax({
|
||||||
} else {
|
async: false,
|
||||||
$("#password").val("");
|
cache: false,
|
||||||
$("#password").focus();
|
type: 'POST',
|
||||||
}
|
url: checkurl,// 请求的action路径
|
||||||
});
|
data: formData,
|
||||||
$("#on_off").attr("checked", true);
|
error: function () {// 请求失败处理函数
|
||||||
$("#on_off").val("1");
|
},
|
||||||
}
|
success: function (data) {
|
||||||
else
|
var d = $.parseJSON(data);
|
||||||
{
|
if (d.success) {
|
||||||
$("#on_off").attr("checked", false);
|
if (d.attributes.orgNum > 1) {
|
||||||
$("#on_off").val("0");
|
//用户拥有多个部门,需选择部门进行登录
|
||||||
$("#randCode").focus();
|
var title, okButton;
|
||||||
}
|
if ($("#langCode").val() == 'en') {
|
||||||
}
|
title = "Please select Org";
|
||||||
|
okButton = "Ok";
|
||||||
|
} else {
|
||||||
|
title = "请选择组织机构";
|
||||||
|
okButton = "确定";
|
||||||
|
}
|
||||||
|
$.dialog({
|
||||||
|
id: 'LHG1976D',
|
||||||
|
title: title,
|
||||||
|
max: false,
|
||||||
|
min: false,
|
||||||
|
drag: false,
|
||||||
|
resize: false,
|
||||||
|
content: 'url:userController.do?userOrgSelect&userId=' + d.attributes.user.id,
|
||||||
|
lock: true,
|
||||||
|
button: [{
|
||||||
|
name: okButton,
|
||||||
|
focus: true,
|
||||||
|
callback: function () {
|
||||||
|
iframe = this.iframe.contentWindow;
|
||||||
|
var orgId = $('#orgId', iframe.document).val();
|
||||||
|
|
||||||
|
formData['orgId'] = orgId ? orgId : "";
|
||||||
|
$.ajax({
|
||||||
|
async: false,
|
||||||
|
cache: false,
|
||||||
|
type: 'POST',
|
||||||
|
url: 'loginController.do?changeDefaultOrg',// 请求的action路径
|
||||||
|
data: formData,
|
||||||
|
error: function () {// 请求失败处理函数
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
window.location.href = actionurl;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
close: function () {
|
||||||
|
setTimeout("window.location.href='" + actionurl + "'", 10);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
window.location.href = actionurl;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
showErrorMsg(d.msg);
|
||||||
|
if (d.msg === "用户名或密码错误" || d.msg === "验证码错误")
|
||||||
|
reloadRandCodeImage();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//登录提示消息显示
|
||||||
|
function showErrorMsg(msg) {
|
||||||
|
$("#errMsgContiner").show();
|
||||||
|
$("#showErrMsg").html(msg);
|
||||||
|
window.setTimeout(optErrMsg, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新验证码
|
||||||
|
*/
|
||||||
|
$('#randCodeImage').click(function () {
|
||||||
|
reloadRandCodeImage();
|
||||||
|
});
|
||||||
|
|
||||||
|
function reloadRandCodeImage() {
|
||||||
|
var date = new Date();
|
||||||
|
var img = document.getElementById("randCodeImage");
|
||||||
|
img.src = 'randCodeImage?a=' + date.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
function darkStyle() {
|
||||||
|
$('body').attr('class', 'login-layout');
|
||||||
|
$('#id-text2').attr('class', 'red');
|
||||||
|
$('#id-company-text').attr('class', 'blue');
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
function lightStyle() {
|
||||||
|
$('body').attr('class', 'login-layout light-login');
|
||||||
|
$('#id-text2').attr('class', 'grey');
|
||||||
|
$('#id-company-text').attr('class', 'blue');
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
function blurStyle() {
|
||||||
|
$('body').attr('class', 'login-layout blur-login');
|
||||||
|
$('#id-text2').attr('class', 'white');
|
||||||
|
$('#id-company-text').attr('class', 'light-blue');
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置cookie
|
||||||
|
function setCookie() {
|
||||||
|
if ($('#on_off').val() == '1') {
|
||||||
|
$("input[iscookie='true']").each(function () {
|
||||||
|
$.cookie(this.name, $("#" + this.name).val(), "/", 24);
|
||||||
|
$.cookie("COOKIE_NAME", "true", "/", 24);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$("input[iscookie='true']").each(function () {
|
||||||
|
$.cookie(this.name, null);
|
||||||
|
$.cookie("COOKIE_NAME", null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//读取cookie
|
||||||
|
function getCookie() {
|
||||||
|
var COOKIE_NAME = $.cookie("COOKIE_NAME");
|
||||||
|
if (COOKIE_NAME != null) {
|
||||||
|
$("input[iscookie='true']").each(function () {
|
||||||
|
$($("#" + this.name).val($.cookie(this.name)));
|
||||||
|
if ("admin" == $.cookie(this.name)) {
|
||||||
|
$("#randCode").focus();
|
||||||
|
} else {
|
||||||
|
$("#password").val("");
|
||||||
|
$("#password").focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#on_off").attr("checked", true);
|
||||||
|
$("#on_off").val("1");
|
||||||
|
} else {
|
||||||
|
$("#on_off").attr("checked", false);
|
||||||
|
$("#on_off").val("0");
|
||||||
|
$("#randCode").focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<%=lhgdialogTheme %>
|
<%=lhgdialogTheme %>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue