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
|
||||
|
||||
测试系统地址 http://47.113.229.131:9080/wms 用户名:test 密码:123456 本地启动的用户名:admin 密码:llg123
|
||||
android app也已经开源,近期更新会比较频繁 app开源地址 https://gitee.com/erzhongxmu/jeewmsapp和https://gitee.com/erzhongxmu/jeewmsapp-uni(正在测试完善)
|
||||
测试系统地址 http://47.113.229.131:9080/jeewms 用户名:test 密码:123456 本地启动的用户名:admin 密码:llg123
|
||||
android app也已经开源,近期更新会比较频繁 app开源地址 https://gitee.com/erzhongxmu/JeeWMSapp-uni
|
||||
大家看到了,star一下,谢谢,本团队会持续更新,一直开源!
|
||||
欢迎喜欢的朋友一起来优化功能。
|
||||
|
||||
开源不易,如果大家需要购买华为云可以通过我们的专属链接,优惠多多 [华为云服务器优惠购买](https://account.huaweicloud.com/obmgr/invitation/invitation.html?bpName=0000000100000002F529029E50A53299E1C24B9DC20691B285756AA52DA030F9E7013E8FF7E22C3EFF074BF9586E43C07842F8F96D38EC45878383D1D406B2F7341FC7D6635CED56&inviteCode=0000000100000002FC491B524CF3FDCE52F12DFD3BB98C8AB2DD5D05BA2CCD464D69E4293D91369A&bindType=1&isDefault=1)
|
||||
|
||||
一、项目简介:
|
||||
|
||||
jeewms在经过多家公司上线运行后,为了降低物流仓储企业的信息化成本,决定全面开源
|
||||
JeeWMS在经过多家公司上线运行后,为了降低物流仓储企业的信息化成本,决定全面开源
|
||||
此产品。针对有特殊信息化需求的企业,提供高性价比的实施服务。
|
||||
|
||||
产品特点:
|
||||
1、适用范围:第三方物流仓储企业,冷链仓库,自营仓储等。
|
||||
2、技术特点:基于JAVA的WEB后台,基于ANDROID开发的PDA系统。
|
||||
2、技术特点:基于JAVA的WEB后台,基于UNIAPP开发的PDA系统。
|
||||
3、功能特点:涵盖订单管理系统(OMS),仓储管理系统(WMS),计费管理系统(BMS),现场作业系统(RF),第三方接口模块
|
||||
4、接口支持:已经对接:SAP ECC,SAP HANA 数据库,用友U8,百胜E3,UAS。
|
||||
|
||||
|
@ -53,7 +53,7 @@ android app也已经开源,近期更新会比较频繁 app开源地址 https:
|
|||
5、主要技术
|
||||
开发语言:JAVA。
|
||||
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>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.8.3</version>
|
||||
<version>1.15.3</version>
|
||||
</dependency>
|
||||
<!-- google 工具类 -->
|
||||
<dependency>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package com.zzjee.md.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
|
@ -6,15 +7,19 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import com.zzjee.plc.controller.WmsPlcController;
|
||||
import com.zzjee.rfid.entity.RfidBuseEntity;
|
||||
import com.zzjee.wmutil.wmUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
|
||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||
import org.jeecgframework.core.common.controller.BaseController;
|
||||
import org.jeecgframework.core.common.exception.BusinessException;
|
||||
|
@ -32,6 +37,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
|||
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||
import org.jeecgframework.web.system.service.SystemService;
|
||||
import org.omg.CORBA.PUBLIC_MEMBER;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
@ -58,12 +64,11 @@ import net.sf.json.JSONArray;
|
|||
import net.sf.json.JSONObject;
|
||||
|
||||
/**
|
||||
* @author erzhongxmu
|
||||
* @version V1.0
|
||||
* @Title: Controller
|
||||
* @Description: 仓位定义
|
||||
* @author erzhongxmu
|
||||
* @date 2017-08-15 23:17:02
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/mdBinController")
|
||||
|
@ -79,7 +84,9 @@ public class MdBinController extends BaseController {
|
|||
private SystemService systemService;
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
@Autowired
|
||||
private WmsPlcController wmsPlcController;
|
||||
ExecutorService executor = Executors.newFixedThreadPool(8);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -91,10 +98,17 @@ public class MdBinController extends BaseController {
|
|||
public ModelAndView list(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/md/mdBinList");
|
||||
}
|
||||
|
||||
@RequestMapping(params = "listc")
|
||||
public ModelAndView listc(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/md/mdavabinlist");
|
||||
}
|
||||
|
||||
@RequestMapping(params = "listagv")
|
||||
public ModelAndView listagv(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/md/mdbinagvlist");
|
||||
}
|
||||
|
||||
/**
|
||||
* easyui AJAX请求数据
|
||||
*
|
||||
|
@ -104,13 +118,13 @@ public class MdBinController extends BaseController {
|
|||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
public void datagrid(MdBinEntity mdBin,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
public void datagrid(MdBinEntity mdBin, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(MdBinEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, mdBin, request.getParameterMap());
|
||||
try{
|
||||
try {
|
||||
//自定义追加查询条件
|
||||
}catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
cq.add();
|
||||
|
@ -130,20 +144,20 @@ public class MdBinController extends BaseController {
|
|||
AjaxJson j = new AjaxJson();
|
||||
mdBin = systemService.getEntity(MdBinEntity.class, mdBin.getId());
|
||||
message = "仓位停用成功";
|
||||
try{
|
||||
try {
|
||||
|
||||
if(wmUtil.checkishavestock("bin",mdBin.getKuWeiBianMa())){
|
||||
if (wmUtil.checkishavestock("bin", mdBin.getKuWeiBianMa())) {
|
||||
message = "仓位停用成功,但是存在库存";
|
||||
j.setSuccess(false);
|
||||
j.setMsg(message);
|
||||
mdBin.setTingYong("Y");
|
||||
mdBinService.saveOrUpdate(mdBin);
|
||||
return j;
|
||||
}else{
|
||||
} else {
|
||||
mdBinService.delete(mdBin);
|
||||
}
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "仓位停用失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -151,6 +165,7 @@ public class MdBinController extends BaseController {
|
|||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仓位定义
|
||||
*
|
||||
|
@ -163,10 +178,10 @@ public class MdBinController extends BaseController {
|
|||
AjaxJson j = new AjaxJson();
|
||||
mdBin = systemService.getEntity(MdBinEntity.class, mdBin.getId());
|
||||
message = "仓位同步有货成功";
|
||||
try{
|
||||
try {
|
||||
// mdBin.setTingYong("Y");
|
||||
// mdBinService.saveOrUpdate(mdBin);
|
||||
if(wmUtil.checkishavestock("bin",mdBin.getKuWeiBianMa())){
|
||||
if (wmUtil.checkishavestock("bin", mdBin.getKuWeiBianMa())) {
|
||||
RfidBuseEntity rfidBuseEntity = new RfidBuseEntity();
|
||||
rfidBuseEntity.setRfidType("CW");
|
||||
rfidBuseEntity.setRfidId1(mdBin.getKuWeiBianMa());
|
||||
|
@ -177,7 +192,7 @@ public class MdBinController extends BaseController {
|
|||
j.setSuccess(false);
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
}else{
|
||||
} else {
|
||||
RfidBuseEntity rfidBuseEntity = new RfidBuseEntity();
|
||||
rfidBuseEntity.setRfidType("CW");
|
||||
rfidBuseEntity.setRfidId1(mdBin.getKuWeiBianMa());
|
||||
|
@ -190,7 +205,7 @@ public class MdBinController extends BaseController {
|
|||
return j;
|
||||
}
|
||||
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "仓位同步失败功";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -207,17 +222,17 @@ public class MdBinController extends BaseController {
|
|||
j.setObj(0);
|
||||
String tsql = "select * "
|
||||
+ " from wv_bin_all ws where 1 = 1 ";
|
||||
if(!StringUtil.isEmpty(req.getParameter("binstore"))){
|
||||
tsql = tsql + " and ws.bin_store like '%"+req.getParameter("binstore")+"%' ";
|
||||
if (!StringUtil.isEmpty(req.getParameter("binstore"))) {
|
||||
tsql = tsql + " and ws.bin_store like '%" + req.getParameter("binstore") + "%' ";
|
||||
}
|
||||
if(!StringUtil.isEmpty(req.getParameter("binid"))){
|
||||
tsql = tsql + " and ws.binid like '%"+req.getParameter("binid")+"%' ";
|
||||
if (!StringUtil.isEmpty(req.getParameter("binid"))) {
|
||||
tsql = tsql + " and ws.binid like '%" + req.getParameter("binid") + "%' ";
|
||||
}
|
||||
if(!StringUtil.isEmpty(req.getParameter("des"))){
|
||||
tsql = tsql + " and ws.des like '%"+req.getParameter("des")+"%' ";
|
||||
if (!StringUtil.isEmpty(req.getParameter("des"))) {
|
||||
tsql = tsql + " and ws.des like '%" + req.getParameter("des") + "%' ";
|
||||
}
|
||||
if(!StringUtil.isEmpty(req.getParameter("cengshu"))){
|
||||
tsql = tsql + " and ws.znode like '%"+req.getParameter("cengshu")+"%' ";
|
||||
if (!StringUtil.isEmpty(req.getParameter("cengshu"))) {
|
||||
tsql = tsql + " and ws.znode like '%" + req.getParameter("cengshu") + "%' ";
|
||||
}
|
||||
|
||||
String hangshu = req.getParameter("hangshu");
|
||||
|
@ -229,28 +244,27 @@ public class MdBinController extends BaseController {
|
|||
// list = this.tSSmsService.getMsgsList(curUser,curDate);
|
||||
//将List转换成JSON存储
|
||||
JSONArray result = new JSONArray();
|
||||
if(resultt!=null && resultt.size()>0){
|
||||
for(int i=0;i<resultt.size();i++){
|
||||
if (resultt != null && resultt.size() > 0) {
|
||||
for (int i = 0; i < resultt.size(); i++) {
|
||||
JSONObject jsonParts = new JSONObject();
|
||||
jsonParts.put("bin_store", resultt.get(i).get("bin_store"));
|
||||
jsonParts.put("binid", resultt.get(i).get("binid"));
|
||||
jsonParts.put("des", resultt.get(i).get("des"));
|
||||
jsonParts.put("tincount", resultt.get(i).get("tincount"));
|
||||
try{
|
||||
try {
|
||||
|
||||
if("fanxiang".equals(type)){
|
||||
try{
|
||||
if ("fanxiang".equals(type)) {
|
||||
try {
|
||||
int hangshuint = Integer.parseInt(hangshu);
|
||||
int xnode = Integer.parseInt(resultt.get(i).get("xnode").toString());
|
||||
|
||||
jsonParts.put("xnode", hangshuint+1-xnode);
|
||||
}catch (Exception e){
|
||||
jsonParts.put("xnode", hangshuint + 1 - xnode);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
} else {
|
||||
jsonParts.put("xnode", resultt.get(i).get("xnode"));
|
||||
|
||||
}
|
||||
|
@ -261,7 +275,7 @@ public class MdBinController extends BaseController {
|
|||
|
||||
jsonParts.put("colour", resultt.get(i).get("colour"));
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
result.add(jsonParts);
|
||||
|
@ -269,7 +283,7 @@ public class MdBinController extends BaseController {
|
|||
j.setObj(resultt.size());
|
||||
|
||||
|
||||
Map<String,Object> attrs = new HashMap<String, Object>();
|
||||
Map<String, Object> attrs = new HashMap<String, Object>();
|
||||
attrs.put("messageList", result);
|
||||
// String tip = MutiLangUtil.getMutiLangInstance().getLang("message.tip");
|
||||
// attrs.put("tip", tip);
|
||||
|
@ -283,7 +297,180 @@ public class MdBinController extends BaseController {
|
|||
return j;
|
||||
}
|
||||
|
||||
@RequestMapping(params = "getbinallagv")
|
||||
@ResponseBody
|
||||
public AjaxJson getbinallagv(HttpServletRequest req) {
|
||||
AjaxJson j = new AjaxJson();
|
||||
String hangshu = req.getParameter("hangshu");
|
||||
String type = req.getParameter("type");
|
||||
String binFrom = req.getParameter("binid");
|
||||
String binTo = req.getParameter("des");
|
||||
String startcom = req.getParameter("startcom");
|
||||
String midcom = req.getParameter("midcom");
|
||||
String endcom = req.getParameter("endcom");
|
||||
if ("diaodu".equals(type)||"diaoduu".equals(type)) {//调度需要方式指令
|
||||
// 异步发送指令
|
||||
if (StringUtil.isEmpty(binFrom)&&"diaodu".equals(type)) {
|
||||
j.setMsg("开始储位为空");
|
||||
j.setSuccess(false);
|
||||
return j;
|
||||
}
|
||||
if (StringUtil.isEmpty(binTo)&&"diaodu".equals(type)) {
|
||||
j.setMsg("结束储位为空");
|
||||
j.setSuccess(false);
|
||||
return j;
|
||||
}
|
||||
try {
|
||||
executor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
runagv(binFrom, binTo, startcom, midcom, endcom, type);
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
j.setObj(0);
|
||||
String tsql = "select * "
|
||||
+ " from wv_bin_all ws where 1 = 1 ";
|
||||
if (!StringUtil.isEmpty(req.getParameter("binstore"))) {
|
||||
tsql = tsql + " and ws.bin_store like '%" + req.getParameter("binstore") + "%' ";
|
||||
}
|
||||
|
||||
if (!StringUtil.isEmpty(req.getParameter("cengshu"))) {
|
||||
tsql = tsql + " and ws.znode like '%" + req.getParameter("cengshu") + "%' ";
|
||||
}
|
||||
|
||||
|
||||
System.out.print(tsql);
|
||||
List<Map<String, Object>> resultt = systemService
|
||||
.findForJdbc(tsql);
|
||||
// list = this.tSSmsService.getMsgsList(curUser,curDate);
|
||||
//将List转换成JSON存储
|
||||
JSONArray result = new JSONArray();
|
||||
if (resultt != null && resultt.size() > 0) {
|
||||
for (int i = 0; i < resultt.size(); i++) {
|
||||
JSONObject jsonParts = new JSONObject();
|
||||
jsonParts.put("bin_store", resultt.get(i).get("bin_store"));
|
||||
jsonParts.put("binid", resultt.get(i).get("binid"));
|
||||
jsonParts.put("des", resultt.get(i).get("des"));
|
||||
jsonParts.put("tincount", resultt.get(i).get("tincount"));
|
||||
try {
|
||||
if ("fanxiang".equals(type)) {
|
||||
try {
|
||||
int hangshuint = Integer.parseInt(hangshu);
|
||||
int xnode = Integer.parseInt(resultt.get(i).get("xnode").toString());
|
||||
|
||||
jsonParts.put("xnode", hangshuint + 1 - xnode);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
jsonParts.put("xnode", resultt.get(i).get("xnode"));
|
||||
|
||||
}
|
||||
|
||||
jsonParts.put("xnode", resultt.get(i).get("xnode"));
|
||||
jsonParts.put("ynode", resultt.get(i).get("ynode"));
|
||||
|
||||
jsonParts.put("znode", resultt.get(i).get("znode"));
|
||||
|
||||
jsonParts.put("colour", resultt.get(i).get("colour"));
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
result.add(jsonParts);
|
||||
}
|
||||
j.setObj(resultt.size());
|
||||
|
||||
|
||||
Map<String, Object> attrs = new HashMap<String, Object>();
|
||||
attrs.put("messageList", result);
|
||||
// String tip = MutiLangUtil.getMutiLangInstance().getLang("message.tip");
|
||||
// attrs.put("tip", tip);
|
||||
// String seeAll = MutiLangUtil.getMutiLangInstance().getLang("message.seeAll");
|
||||
// attrs.put("seeAll", seeAll);
|
||||
j.setAttributes(attrs);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
j.setSuccess(false);
|
||||
}
|
||||
|
||||
|
||||
return j;
|
||||
}
|
||||
|
||||
public void runagv(String binfrom, String binto, String startcom, String midcom, String endcom, String type) {
|
||||
if ("diaodu".equals(type)) {
|
||||
List<MdBinEntity> mdblistfrom = systemService.findByProperty(MdBinEntity.class, "kuWeiBianMa", binfrom);
|
||||
List<MdBinEntity> mdblistto = systemService.findByProperty(MdBinEntity.class, "kuWeiBianMa", binto);
|
||||
MdBinEntity mdBinEntityfrom = mdblistfrom.get(0);
|
||||
MdBinEntity mdBinEntityto = mdblistto.get(0);
|
||||
String x0 = mdBinEntityfrom.getXnode();
|
||||
String x1 = mdBinEntityto.getXnode();
|
||||
int xStep = Integer.parseInt(x1) - Integer.parseInt(x0);
|
||||
String y0 = mdBinEntityfrom.getYnode();
|
||||
String y1 = mdBinEntityto.getYnode();
|
||||
int yStep = Integer.parseInt(y1) - Integer.parseInt(y0);
|
||||
String xstepNum = "1";
|
||||
String ystepNum = "1";
|
||||
String hxstepNum = "1";
|
||||
xstepNum = Integer.toString(xStep);
|
||||
ystepNum = Integer.toString(yStep);
|
||||
if (!"no".equals(startcom) && StringUtil.isNotEmpty(startcom)) {
|
||||
hxstepNum = "1";
|
||||
System.out.println("startcom,startcom:" + startcom);
|
||||
wmsPlcController.run("", startcom, hxstepNum);
|
||||
}
|
||||
|
||||
|
||||
if (y0.equals("01")) {
|
||||
System.out.println("1,runx:" + xstepNum);
|
||||
wmsPlcController.run("", "runx", xstepNum);
|
||||
} else {
|
||||
System.out.println("2,runy:" + ystepNum);
|
||||
|
||||
wmsPlcController.run("", "runy", ystepNum);
|
||||
}
|
||||
|
||||
|
||||
// if(xStep>0 && yStep>0){
|
||||
// hxstepNum = "1";
|
||||
// System.out.println("3,change:"+hxstepNum);
|
||||
//
|
||||
// wmsPlcController.run("","change",hxstepNum);
|
||||
// }
|
||||
if (!"no".equals(midcom) && StringUtil.isNotEmpty(midcom)) {
|
||||
hxstepNum = "1";
|
||||
System.out.println("midcom,midcom:" + midcom);
|
||||
wmsPlcController.run("", midcom, hxstepNum);
|
||||
}
|
||||
|
||||
if (y0.equals("01")) {
|
||||
System.out.println("4,runy:" + ystepNum);
|
||||
wmsPlcController.run("", "runy", ystepNum);
|
||||
} else {
|
||||
System.out.println("5,runx:" + xstepNum);
|
||||
|
||||
wmsPlcController.run("", "runx", xstepNum);
|
||||
}
|
||||
if (!"no".equals(endcom) && StringUtil.isNotEmpty(endcom)) {
|
||||
hxstepNum = "1";
|
||||
System.out.println("endcom,endcom:" + endcom);
|
||||
wmsPlcController.run("", endcom, hxstepNum);
|
||||
}
|
||||
} else {
|
||||
wmsPlcController.runu();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除仓位定义
|
||||
|
@ -292,28 +479,28 @@ public class MdBinController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(params = "doBatchDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
|
||||
public AjaxJson doBatchDel(String ids, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "仓位停用成功";
|
||||
try{
|
||||
for(String id:ids.split(",")){
|
||||
try {
|
||||
for (String id : ids.split(",")) {
|
||||
MdBinEntity mdBin = systemService.getEntity(MdBinEntity.class,
|
||||
id
|
||||
);
|
||||
mdBin.setTingYong("Y");
|
||||
if(wmUtil.checkishavestock("bin",mdBin.getKuWeiBianMa())){
|
||||
if (wmUtil.checkishavestock("bin", mdBin.getKuWeiBianMa())) {
|
||||
message = "仓位停用成功,但是存在库存";
|
||||
mdBinService.updateEntitie(mdBin);
|
||||
// j.setSuccess(false);
|
||||
// j.setMsg(message);
|
||||
// return j;
|
||||
}else{
|
||||
} else {
|
||||
mdBinService.delete(mdBin);
|
||||
}
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "仓位停用失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -334,25 +521,25 @@ public class MdBinController extends BaseController {
|
|||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "仓位定义添加成功";
|
||||
try{
|
||||
try {
|
||||
|
||||
MdBinEntity mdb = null;
|
||||
List<MdBinEntity> mdblist = systemService.findByProperty(MdBinEntity.class, "kuWeiBianMa", mdBin.getKuWeiBianMa());
|
||||
for (MdBinEntity t:mdblist){
|
||||
if(t.getBinStore().equals(mdBin.getBinStore())){
|
||||
for (MdBinEntity t : mdblist) {
|
||||
if (t.getBinStore().equals(mdBin.getBinStore())) {
|
||||
mdb = t;
|
||||
}
|
||||
}
|
||||
|
||||
// MdBinEntity mdBin1 = systemService.findUniqueByProperty(MdBinEntity.class, "kuWeiBianMa", mdBin.getKuWeiBianMa());
|
||||
if(mdb ==null ){
|
||||
if (mdb == null) {
|
||||
mdBinService.save(mdBin);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||
}else{
|
||||
} else {
|
||||
message = "库位编码或者库位条码已经存在";
|
||||
j.setSuccess(false);
|
||||
}
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "仓位定义添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -400,6 +587,7 @@ public class MdBinController extends BaseController {
|
|||
}
|
||||
return new ModelAndView("com/zzjee/md/mdBin-add");
|
||||
}
|
||||
|
||||
/**
|
||||
* 仓位定义编辑页面跳转
|
||||
*
|
||||
|
@ -421,7 +609,7 @@ public class MdBinController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(params = "upload")
|
||||
public ModelAndView upload(HttpServletRequest req) {
|
||||
req.setAttribute("controller_name","mdBinController");
|
||||
req.setAttribute("controller_name", "mdBinController");
|
||||
return new ModelAndView("common/upload/pub_excel_upload");
|
||||
}
|
||||
|
||||
|
@ -432,18 +620,19 @@ public class MdBinController extends BaseController {
|
|||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXls")
|
||||
public String exportXls(MdBinEntity mdBin,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
public String exportXls(MdBinEntity mdBin, HttpServletRequest request, HttpServletResponse response
|
||||
, DataGrid dataGrid, ModelMap modelMap) {
|
||||
CriteriaQuery cq = new CriteriaQuery(MdBinEntity.class, dataGrid);
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, mdBin, request.getParameterMap());
|
||||
List<MdBinEntity> mdBins = this.mdBinService.getListByCriteriaQuery(cq,false);
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"仓位定义");
|
||||
modelMap.put(NormalExcelConstants.CLASS,MdBinEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓位定义列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
||||
List<MdBinEntity> mdBins = this.mdBinService.getListByCriteriaQuery(cq, false);
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME, "仓位定义");
|
||||
modelMap.put(NormalExcelConstants.CLASS, MdBinEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS, new ExportParams("仓位定义列表", "导出人:" + ResourceUtil.getSessionUserName().getRealName(),
|
||||
"导出信息"));
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST,mdBins);
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST, mdBins);
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel 使模板
|
||||
*
|
||||
|
@ -451,13 +640,13 @@ public class MdBinController extends BaseController {
|
|||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXlsByT")
|
||||
public String exportXlsByT(MdBinEntity mdBin,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME,"仓位定义");
|
||||
modelMap.put(NormalExcelConstants.CLASS,MdBinEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("仓位定义列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
|
||||
public String exportXlsByT(MdBinEntity mdBin, HttpServletRequest request, HttpServletResponse response
|
||||
, DataGrid dataGrid, ModelMap modelMap) {
|
||||
modelMap.put(NormalExcelConstants.FILE_NAME, "仓位定义");
|
||||
modelMap.put(NormalExcelConstants.CLASS, MdBinEntity.class);
|
||||
modelMap.put(NormalExcelConstants.PARAMS, new ExportParams("仓位定义列表", "导出人:" + ResourceUtil.getSessionUserName().getRealName(),
|
||||
"导出信息"));
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST, new ArrayList());
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
|
||||
|
@ -476,20 +665,20 @@ public class MdBinController extends BaseController {
|
|||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<MdBinEntity> listMdBinEntitys = ExcelImportUtil.importExcel(file.getInputStream(),MdBinEntity.class,params);
|
||||
List<MdBinEntity> listMdBinEntitys = ExcelImportUtil.importExcel(file.getInputStream(), MdBinEntity.class, params);
|
||||
for (MdBinEntity mdBin : listMdBinEntitys) {
|
||||
|
||||
MdBinEntity mdb = null;
|
||||
List<MdBinEntity> mdblist = systemService.findByProperty(MdBinEntity.class, "kuWeiBianMa", mdBin.getKuWeiBianMa());
|
||||
for (MdBinEntity t:mdblist){
|
||||
if(t.getKuWeiBianMa().equals(mdBin.getKuWeiBianMa())){
|
||||
for (MdBinEntity t : mdblist) {
|
||||
if (t.getKuWeiBianMa().equals(mdBin.getKuWeiBianMa())) {
|
||||
mdb = t;
|
||||
}
|
||||
}
|
||||
if(mdb!=null){
|
||||
if (mdb != null) {
|
||||
MyBeanUtils.copyBeanNotNull2Bean(mdBin, mdb);
|
||||
systemService.saveOrUpdate(mdb);
|
||||
}else{
|
||||
} else {
|
||||
mdBinService.save(mdBin);
|
||||
}
|
||||
}
|
||||
|
@ -497,7 +686,7 @@ public class MdBinController extends BaseController {
|
|||
} catch (Exception e) {
|
||||
j.setMsg("文件导入失败!");
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}finally{
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
|
@ -511,7 +700,7 @@ public class MdBinController extends BaseController {
|
|||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<MdBinEntity> list() {
|
||||
List<MdBinEntity> listMdBins=mdBinService.getList(MdBinEntity.class);
|
||||
List<MdBinEntity> listMdBins = mdBinService.getList(MdBinEntity.class);
|
||||
return listMdBins;
|
||||
}
|
||||
|
||||
|
@ -535,7 +724,7 @@ public class MdBinController extends BaseController {
|
|||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
try {
|
||||
mdBinService.save(mdBin);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -559,7 +748,7 @@ public class MdBinController extends BaseController {
|
|||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
try {
|
||||
mdBinService.saveOrUpdate(mdBin);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -578,28 +767,28 @@ public class MdBinController extends BaseController {
|
|||
|
||||
@RequestMapping(params = "addMdBin")
|
||||
@ResponseBody
|
||||
public void addMdBin(){
|
||||
public void addMdBin() {
|
||||
List<MdBinEntity> mdBinEntityList = new ArrayList<>();
|
||||
for (int i = 1; i <= 15; i++) {
|
||||
for (int j = 1; j <= 6; j++) {
|
||||
for (int k = 1; k <= 30; k++) {
|
||||
MdBinEntity mdBinEntity = new MdBinEntity();
|
||||
String kuweibianma = "A"+String.format("%02d",i)+"-"+String.format("%02d",j)+"-"+String.format("%02d",k);
|
||||
String kuweibianma = "A" + String.format("%02d", i) + "-" + String.format("%02d", j) + "-" + String.format("%02d", k);
|
||||
mdBinEntity.setKuWeiBianMa(kuweibianma);
|
||||
mdBinEntity.setKuWeiTiaoMa(kuweibianma);
|
||||
mdBinEntity.setKuWeiMingCheng("A1");
|
||||
mdBinEntity.setKuWeiLeiXing("收货储位");
|
||||
mdBinEntity.setKuWeiShuXing("常温");
|
||||
mdBinEntity.setShangJiaCiXu(String.format("%02d",i)+String.format("%02d",j)+String.format("%02d",k));
|
||||
mdBinEntity.setQuHuoCiXu(String.format("%02d",i)+String.format("%02d",j)+String.format("%02d",k));
|
||||
mdBinEntity.setShangJiaCiXu(String.format("%02d", i) + String.format("%02d", j) + String.format("%02d", k));
|
||||
mdBinEntity.setQuHuoCiXu(String.format("%02d", i) + String.format("%02d", j) + String.format("%02d", k));
|
||||
mdBinEntity.setTiJiDanWei("0");
|
||||
mdBinEntity.setZhongLiangDanWei("5");
|
||||
mdBinEntity.setZuiDaTuoPan("2");
|
||||
mdBinEntity.setTingYong("N");
|
||||
mdBinEntity.setBinStore("BJTZ7");
|
||||
mdBinEntity.setXnode(String.format("%02d",i));
|
||||
mdBinEntity.setYnode(String.format("%02d",j));
|
||||
mdBinEntity.setZnode(String.format("%02d",k));
|
||||
mdBinEntity.setXnode(String.format("%02d", i));
|
||||
mdBinEntity.setYnode(String.format("%02d", j));
|
||||
mdBinEntity.setZnode(String.format("%02d", k));
|
||||
mdBinEntityList.add(mdBinEntity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,24 @@
|
|||
package com.zzjee.plc.controller;
|
||||
|
||||
import HslCommunication.Core.Types.OperateResult;
|
||||
import HslCommunication.Profinet.Siemens.SiemensPLCS;
|
||||
import HslCommunication.Profinet.Siemens.SiemensS7Net;
|
||||
import com.zzjee.plc.entity.WmsPlcEntity;
|
||||
import com.zzjee.plc.service.WmsPlcServiceI;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.text.SimpleDateFormat;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzjee.wm.entity.WmToMoveGoodsEntity;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
@ -32,6 +37,7 @@ import org.jeecgframework.web.system.service.SystemService;
|
|||
import org.jeecgframework.core.util.MyBeanUtils;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
import org.jeecgframework.core.util.BrowserUtils;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
|
@ -42,12 +48,16 @@ import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
|||
import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.jeecgframework.core.util.ExceptionUtil;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
@ -61,20 +71,21 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
|||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||
|
||||
import java.util.Set;
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.Validator;
|
||||
import java.net.URI;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
/**
|
||||
* @author onlineGenerator
|
||||
* @version V1.0
|
||||
* @Title: Controller
|
||||
* @Description: PLC指令
|
||||
* @author onlineGenerator
|
||||
* @date 2022-09-12 18:33:25
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/wmsPlcController")
|
||||
|
@ -92,7 +103,6 @@ public class WmsPlcController extends BaseController {
|
|||
private Validator validator;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* PLC指令列表 页面跳转
|
||||
*
|
||||
|
@ -112,13 +122,13 @@ public class WmsPlcController extends BaseController {
|
|||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
public void datagrid(WmsPlcEntity wmsPlc,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
public void datagrid(WmsPlcEntity wmsPlc, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(WmsPlcEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmsPlc, request.getParameterMap());
|
||||
try{
|
||||
try {
|
||||
//自定义追加查询条件
|
||||
}catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
cq.add();
|
||||
|
@ -138,10 +148,10 @@ public class WmsPlcController extends BaseController {
|
|||
AjaxJson j = new AjaxJson();
|
||||
wmsPlc = systemService.getEntity(WmsPlcEntity.class, wmsPlc.getId());
|
||||
message = "PLC指令删除成功";
|
||||
try{
|
||||
try {
|
||||
wmsPlcService.delete(wmsPlc);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "PLC指令删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -157,46 +167,15 @@ public class WmsPlcController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(params = "dotoup")
|
||||
@ResponseBody
|
||||
public AjaxJson dotoup(String ids,HttpServletRequest request){
|
||||
public AjaxJson dotoup(String ids, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "PLC指令执行成功";
|
||||
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");
|
||||
try {
|
||||
for (String id : ids.split(",")) {
|
||||
run(id, "", "");
|
||||
}
|
||||
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]));
|
||||
}
|
||||
}
|
||||
|
||||
//执行完指令等待时间
|
||||
Thread.sleep(Long.parseLong(wmsPlc.getComTime()));
|
||||
}
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "PLC指令执行失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -204,6 +183,128 @@ public class WmsPlcController extends BaseController {
|
|||
j.setMsg(message);
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
public void run(String id, String comNo, String stepNum) {
|
||||
System.out.println("id:" + id + ";comNo:" + comNo + ";stepNum:" + stepNum);
|
||||
if (stepNum.equals("0")) {
|
||||
return;
|
||||
}
|
||||
WmsPlcEntity wmsPlc = null;
|
||||
if (StringUtil.isNotEmpty(id)) {
|
||||
wmsPlc = systemService.getEntity(WmsPlcEntity.class, id);
|
||||
}
|
||||
if (StringUtil.isNotEmpty(comNo)) {
|
||||
|
||||
String hql = "";
|
||||
List<WmsPlcEntity> wmsPlcEntityList = new ArrayList<WmsPlcEntity>();
|
||||
hql = "from WmsPlcEntity t where t.comNo = ? ";
|
||||
wmsPlcEntityList = systemService.findHql(hql, comNo);
|
||||
if (!CollectionUtils.isEmpty(wmsPlcEntityList)) {
|
||||
wmsPlc = wmsPlcEntityList.get(0);
|
||||
}
|
||||
}
|
||||
if (wmsPlc != null) {
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
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");
|
||||
try {
|
||||
siemensS7Net.ConnectClose();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
String comCons = wmsPlc.getComCons();
|
||||
String query01 = wmsPlc.getQuery01();
|
||||
String query02 = wmsPlc.getQuery02();
|
||||
Float stepNumrun = Float.valueOf("1");
|
||||
if (StringUtil.isNotEmpty(stepNum)) {
|
||||
stepNumrun = Float.parseFloat(stepNum);
|
||||
} else {
|
||||
stepNumrun = Float.parseFloat(wmsPlc.getSetpNum());
|
||||
}
|
||||
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指令
|
||||
*
|
||||
|
@ -211,19 +312,19 @@ public class WmsPlcController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(params = "doBatchDel")
|
||||
@ResponseBody
|
||||
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
|
||||
public AjaxJson doBatchDel(String ids, HttpServletRequest request) {
|
||||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "PLC指令删除成功";
|
||||
try{
|
||||
for(String id:ids.split(",")){
|
||||
try {
|
||||
for (String id : ids.split(",")) {
|
||||
WmsPlcEntity wmsPlc = systemService.getEntity(WmsPlcEntity.class,
|
||||
id
|
||||
);
|
||||
wmsPlcService.delete(wmsPlc);
|
||||
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
|
||||
}
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "PLC指令删除失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -244,10 +345,10 @@ public class WmsPlcController extends BaseController {
|
|||
String message = null;
|
||||
AjaxJson j = new AjaxJson();
|
||||
message = "PLC指令添加成功";
|
||||
try{
|
||||
try {
|
||||
wmsPlcService.save(wmsPlc);
|
||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = "PLC指令添加失败";
|
||||
throw new BusinessException(e.getMessage());
|
||||
|
@ -295,6 +396,7 @@ public class WmsPlcController extends BaseController {
|
|||
}
|
||||
return new ModelAndView("com/zzjee/plc/wmsPlc-add");
|
||||
}
|
||||
|
||||
/**
|
||||
* PLC指令编辑页面跳转
|
||||
*
|
||||
|
@ -316,7 +418,7 @@ public class WmsPlcController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(params = "upload")
|
||||
public ModelAndView upload(HttpServletRequest req) {
|
||||
req.setAttribute("controller_name","wmsPlcController");
|
||||
req.setAttribute("controller_name", "wmsPlcController");
|
||||
return new ModelAndView("common/upload/pub_excel_upload");
|
||||
}
|
||||
|
||||
|
@ -327,18 +429,19 @@ public class WmsPlcController extends BaseController {
|
|||
* @param response
|
||||
*/
|
||||
@RequestMapping(params = "exportXls")
|
||||
public String exportXls(WmsPlcEntity wmsPlc,HttpServletRequest request,HttpServletResponse response
|
||||
, DataGrid dataGrid,ModelMap modelMap) {
|
||||
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(),
|
||||
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);
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST, wmsPlcs);
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel 使模板
|
||||
*
|
||||
|
@ -346,13 +449,13 @@ public class WmsPlcController extends BaseController {
|
|||
* @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(),
|
||||
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());
|
||||
modelMap.put(NormalExcelConstants.DATA_LIST, new ArrayList());
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
|
||||
|
@ -371,7 +474,7 @@ public class WmsPlcController extends BaseController {
|
|||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<WmsPlcEntity> listWmsPlcEntitys = ExcelImportUtil.importExcel(file.getInputStream(),WmsPlcEntity.class,params);
|
||||
List<WmsPlcEntity> listWmsPlcEntitys = ExcelImportUtil.importExcel(file.getInputStream(), WmsPlcEntity.class, params);
|
||||
for (WmsPlcEntity wmsPlc : listWmsPlcEntitys) {
|
||||
wmsPlcService.save(wmsPlc);
|
||||
}
|
||||
|
@ -379,7 +482,7 @@ public class WmsPlcController extends BaseController {
|
|||
} catch (Exception e) {
|
||||
j.setMsg("文件导入失败!");
|
||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||
}finally{
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
|
@ -393,7 +496,7 @@ public class WmsPlcController extends BaseController {
|
|||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<WmsPlcEntity> list() {
|
||||
List<WmsPlcEntity> listWmsPlcs=wmsPlcService.getList(WmsPlcEntity.class);
|
||||
List<WmsPlcEntity> listWmsPlcs = wmsPlcService.getList(WmsPlcEntity.class);
|
||||
return listWmsPlcs;
|
||||
}
|
||||
|
||||
|
@ -417,7 +520,7 @@ public class WmsPlcController extends BaseController {
|
|||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
try {
|
||||
wmsPlcService.save(wmsPlc);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -441,7 +544,7 @@ public class WmsPlcController extends BaseController {
|
|||
}
|
||||
|
||||
//保存
|
||||
try{
|
||||
try {
|
||||
wmsPlcService.saveOrUpdate(wmsPlc);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
|||
* @Title: Entity
|
||||
* @Description: PLC指令
|
||||
* @author onlineGenerator
|
||||
* @date 2022-09-12 18:33:25
|
||||
* @date 2022-10-22 10:15:15
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
|||
@Table(name = "wms_plc", schema = "")
|
||||
@SuppressWarnings("serial")
|
||||
public class WmsPlcEntity implements java.io.Serializable {
|
||||
/**主键*/
|
||||
/**id*/
|
||||
private String id;
|
||||
/**创建人名称*/
|
||||
private String createName;
|
||||
|
@ -74,10 +74,25 @@ public class WmsPlcEntity implements java.io.Serializable {
|
|||
/**备用1*/
|
||||
@Excel(name="备用1")
|
||||
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
|
||||
*@return: java.lang.String 主键
|
||||
*@return: java.lang.String id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(generator = "paymentableGenerator")
|
||||
|
@ -89,7 +104,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
|||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 主键
|
||||
*@param: java.lang.String id
|
||||
*/
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
|
@ -130,7 +145,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
|||
*方法: 取得java.util.Date
|
||||
*@return: java.util.Date 创建日期
|
||||
*/
|
||||
@Column(name ="CREATE_DATE",nullable=true,length=20)
|
||||
@Column(name ="CREATE_DATE",nullable=true)
|
||||
public Date getCreateDate(){
|
||||
return this.createDate;
|
||||
}
|
||||
|
@ -178,7 +193,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
|||
*方法: 取得java.util.Date
|
||||
*@return: java.util.Date 更新日期
|
||||
*/
|
||||
@Column(name ="UPDATE_DATE",nullable=true,length=20)
|
||||
@Column(name ="UPDATE_DATE",nullable=true)
|
||||
public Date getUpdateDate(){
|
||||
return this.updateDate;
|
||||
}
|
||||
|
@ -338,7 +353,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
|||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 指令集
|
||||
*/
|
||||
@Column(name ="COM_CONS",nullable=true,length=32)
|
||||
@Column(name ="COM_CONS",nullable=true)
|
||||
public String getComCons(){
|
||||
return this.comCons;
|
||||
}
|
||||
|
@ -366,4 +381,84 @@ public class WmsPlcEntity implements java.io.Serializable {
|
|||
public void setRemark1(String 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.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
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 java.util.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
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.PageValueConvertRuleEnum;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.vo.HqlRuleEnum;
|
||||
import org.jeecgframework.core.util.JSONHelper;
|
||||
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.core.util.*;
|
||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||
import org.jeecgframework.tag.vo.datatable.SortDirection;
|
||||
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
|
||||
|
@ -277,36 +262,6 @@ public class SystemController extends BaseController {
|
|||
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")
|
||||
@ResponseBody
|
||||
@Deprecated // add-begin-end--Author:zhangguoming Date:20140928 for:数据字典修改,该方法启用,数据字典不在已树结构展示了
|
||||
|
@ -360,41 +315,6 @@ public class SystemController extends BaseController {
|
|||
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开头的是分组)
|
||||
*
|
||||
|
@ -1255,6 +1175,8 @@ public class SystemController extends BaseController {
|
|||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
MultipartFile mf=multipartRequest.getFile("file");// 获取上传文件对象
|
||||
fileName = mf.getOriginalFilename();// 获取文件名
|
||||
String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
|
||||
// TODO: 2022/11/30 判断文件后缀
|
||||
String savePath = file.getPath() + File.separator + fileName;
|
||||
File savefile = new File(savePath);
|
||||
FileCopyUtils.copy(mf.getBytes(), savefile);
|
||||
|
|
|
@ -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"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<html>
|
||||
<head>
|
||||
<title>PLC指令</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<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>
|
||||
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doAdd" >
|
||||
<input id="id" name="id" type="hidden" 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 }"/>
|
||||
<input id="updateName" name="updateName" type="hidden" value="${wmsPlcPage.updateName }"/>
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${wmsPlcPage.updateBy }"/>
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${wmsPlcPage.updateDate }"/>
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${wmsPlcPage.sysOrgCode }"/>
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${wmsPlcPage.sysCompanyCode }"/>
|
||||
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${wmsPlcPage.bpmStatus }"/>
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
PLCIP:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="plcIp" name="plcIp" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doAdd" tiptype="1" >
|
||||
<input type="hidden" id="btn_sub" class="btn_sub"/>
|
||||
<input type="hidden" id="id" name="id"/>
|
||||
<div class="tab-wrapper">
|
||||
<!-- tab -->
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="javascript:void(0);">PLC指令</a></li>
|
||||
</ul>
|
||||
<!-- tab内容 -->
|
||||
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
|
||||
<div class="row form-wrapper">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>PLCIP:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="plcIp" name="plcIp" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">PLCIP</label>
|
||||
</div>
|
||||
</div>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">PLCIP</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
PLC端口:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="plcPort" name="plcPort" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>PLC端口:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="plcPort" name="plcPort" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">PLC端口</label>
|
||||
</div>
|
||||
</div>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">PLC端口</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
PLC型号:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="plcType" name="plcType" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>PLC型号:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="plcType" name="plcType" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">PLC型号</label>
|
||||
</div>
|
||||
</div>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">PLC型号</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
指令备注:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="comRemark" name="comRemark" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>指令备注:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="comRemark" name="comRemark" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">指令备注</label>
|
||||
</div>
|
||||
</div>
|
||||
<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="comTime" name="comTime" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>执行时间:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="comTime" name="comTime" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">执行时间</label>
|
||||
</div>
|
||||
</div>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">执行时间</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
执行顺序:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="comSeq" name="comSeq" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>执行顺序:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="comSeq" name="comSeq" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">执行顺序</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>指令集:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<textarea id="comCons" class="form-control" rows="6"
|
||||
<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">
|
||||
<textarea style="width:600px;" class="inputxt" rows="6" id="comCons" name="comCons"
|
||||
ignore="ignore"
|
||||
name="comCons"></textarea>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">指令集</label>
|
||||
</div>
|
||||
</div>
|
||||
></textarea>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">指令集</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
备用1:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="remark1" name="remark1" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>备用1:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="remark1" name="remark1" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">备用1</label>
|
||||
</div>
|
||||
</div>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">备用1</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
指令编号:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="comNo" name="comNo" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">指令编号</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
单步参数1:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="query01" name="query01" type="text" style="width: 150px" class="inputxt"
|
||||
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">单步参数1</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
单步参数2:
|
||||
</label>
|
||||
</td>
|
||||
<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"
|
||||
|
||||
<div class="row" id = "sub_tr" style="display: none;">
|
||||
<div class="col-xs-12 layout-header">
|
||||
<div class="col-xs-6"></div>
|
||||
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
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"
|
||||
|
||||
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
|
||||
</div>
|
||||
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>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//查看模式情况下,删除和上传附件功能禁止使用
|
||||
if(location.href.indexOf("load=detail")!=-1){
|
||||
$(".jeecgDetail").hide();
|
||||
}
|
||||
|
||||
if(location.href.indexOf("mode=read")!=-1){
|
||||
//查看模式控件禁用
|
||||
$("#formobj").find(":input").attr("disabled","disabled");
|
||||
}
|
||||
if(location.href.indexOf("mode=onbutton")!=-1){
|
||||
//其他模式显示提交按钮
|
||||
$("#sub_tr").show();
|
||||
}
|
||||
});
|
||||
|
||||
var neibuClickFlag = false;
|
||||
function neibuClick() {
|
||||
neibuClickFlag = true;
|
||||
$('#btn_sub').trigger('click');
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||
</html>
|
||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||
|
|
|
@ -1,206 +1,210 @@
|
|||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<html>
|
||||
<head>
|
||||
<title>PLC指令</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<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>
|
||||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<script type="text/javascript">
|
||||
//编写自定义JS代码
|
||||
</script>
|
||||
</head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doUpdate" tiptype="1" >
|
||||
<input type="hidden" id="btn_sub" class="btn_sub"/>
|
||||
<input type="hidden" name="id" value='${wmsPlcPage.id}' >
|
||||
|
||||
|
||||
<div class="tab-wrapper">
|
||||
<!-- tab -->
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="javascript:void(0);">PLC指令</a></li>
|
||||
</ul>
|
||||
<!-- tab内容 -->
|
||||
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
|
||||
<div class="row form-wrapper">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>PLCIP:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="plcIp" name="plcIp" type="text" class="form-control"
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doUpdate" >
|
||||
<input id="id" name="id" type="hidden" 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 }">
|
||||
<input id="updateName" name="updateName" type="hidden" value="${wmsPlcPage.updateName }">
|
||||
<input id="updateBy" name="updateBy" type="hidden" value="${wmsPlcPage.updateBy }">
|
||||
<input id="updateDate" name="updateDate" type="hidden" value="${wmsPlcPage.updateDate }">
|
||||
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${wmsPlcPage.sysOrgCode }">
|
||||
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${wmsPlcPage.sysCompanyCode }">
|
||||
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${wmsPlcPage.bpmStatus }">
|
||||
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
PLCIP:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="plcIp" name="plcIp" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.plcIp}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">PLCIP</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>PLC端口:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="plcPort" name="plcPort" type="text" class="form-control"
|
||||
value='${wmsPlcPage.plcIp}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">PLCIP</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
PLC端口:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="plcPort" name="plcPort" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.plcPort}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">PLC端口</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>PLC型号:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="plcType" name="plcType" type="text" class="form-control"
|
||||
value='${wmsPlcPage.plcPort}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">PLC端口</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
PLC型号:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="plcType" name="plcType" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.plcType}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">PLC型号</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>指令备注:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="comRemark" name="comRemark" type="text" class="form-control"
|
||||
value='${wmsPlcPage.plcType}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">PLC型号</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
指令备注:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="comRemark" name="comRemark" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.comRemark}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">指令备注</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>执行时间:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="comTime" name="comTime" type="text" class="form-control"
|
||||
value='${wmsPlcPage.comRemark}'>
|
||||
<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="comTime" name="comTime" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.comTime}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">执行时间</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>执行顺序:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="comSeq" name="comSeq" type="text" class="form-control"
|
||||
value='${wmsPlcPage.comTime}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">执行时间</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
执行顺序:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="comSeq" name="comSeq" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.comSeq}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">执行顺序</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>指令集:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<textarea id="comCons" class="form-control" rows="6"
|
||||
value='${wmsPlcPage.comSeq}'>
|
||||
<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">
|
||||
<textarea id="comCons" style="width:600px;" class="inputxt" rows="6" name="comCons"
|
||||
ignore="ignore"
|
||||
name="comCons">${wmsPlcPage.comCons}</textarea>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">指令集</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>备用1:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="remark1" name="remark1" type="text" class="form-control"
|
||||
>${wmsPlcPage.comCons}</textarea>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">指令集</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
备用1:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="remark1" name="remark1" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.remark1}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">备用1</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row" id = "sub_tr" style="display: none;">
|
||||
<div class="col-xs-12 layout-header">
|
||||
<div class="col-xs-6"></div>
|
||||
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
|
||||
</div>
|
||||
value='${wmsPlcPage.remark1}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">备用1</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
指令编号:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="comNo" name="comNo" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.comNo}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">指令编号</label>
|
||||
</td>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
单步参数1:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="query01" name="query01" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.query01}'>
|
||||
<span class="Validform_checktip"></span>
|
||||
<label class="Validform_label" style="display: none;">单步参数1</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="Validform_label">
|
||||
单步参数2:
|
||||
</label>
|
||||
</td>
|
||||
<td class="value">
|
||||
<input id="query02" name="query02" type="text" style="width: 150px" class="inputxt"
|
||||
ignore="ignore"
|
||||
value='${wmsPlcPage.query02}'>
|
||||
<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"
|
||||
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>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//查看模式情况下,删除和上传附件功能禁止使用
|
||||
if(location.href.indexOf("load=detail")!=-1){
|
||||
$(".jeecgDetail").hide();
|
||||
}
|
||||
|
||||
if(location.href.indexOf("mode=read")!=-1){
|
||||
//查看模式控件禁用
|
||||
$("#formobj").find(":input").attr("disabled","disabled");
|
||||
}
|
||||
if(location.href.indexOf("mode=onbutton")!=-1){
|
||||
//其他模式显示提交按钮
|
||||
$("#sub_tr").show();
|
||||
}
|
||||
});
|
||||
|
||||
var neibuClickFlag = false;
|
||||
function neibuClick() {
|
||||
neibuClickFlag = true;
|
||||
$('#btn_sub').trigger('click');
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||
</html>
|
||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||
|
|
|
@ -21,6 +21,10 @@ function commonUpload(callback){
|
|||
}
|
||||
});
|
||||
}
|
||||
function browseImages(inputId, Img) {// 图片管理器,可多个上传共用
|
||||
}
|
||||
function browseFiles(inputId, file) {// 文件管理器,可多个上传共用
|
||||
}
|
||||
function decode(value, id) {//value传入值,id接受值
|
||||
var last = value.lastIndexOf("/");
|
||||
var filename = value.substring(last + 1, value.length);
|
||||
|
|
|
@ -14,14 +14,19 @@
|
|||
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="流程状态" field="bpmStatus" hidden="true" queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
|
||||
<t:dgCol title="PLCIP" field="plcIp" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="PLC端口" field="plcPort" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="PLC型号" field="plcType" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="指令备注" field="comRemark" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="执行时间(毫秒)" field="comTime" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="执行顺序" field="comSeq" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="指令集" field="comCons" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="备用1" field="remark1" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="PLCIP" field="plcIp" queryMode="group" 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="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="指令备注" field="comRemark" query="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="执行时间" field="comTime" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="执行顺序" field="comSeq" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="指令集" field="comCons" queryMode="group" 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: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>
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
<%-- <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-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="ExportXlsByT"></t:dgToolBar>
|
||||
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="org.jeecgframework.core.util.SysThemesUtil,org.jeecgframework.core.enums.SysThemesEnum"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@page import="org.jeecgframework.core.util.SysThemesUtil,org.jeecgframework.core.enums.SysThemesEnum" %>
|
||||
<%@include file="/context/mytags.jsp" %>
|
||||
<%
|
||||
session.setAttribute("lang","zh-cn");
|
||||
session.setAttribute("lang", "zh-cn");
|
||||
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
|
||||
String lhgdialogTheme = SysThemesUtil.getLhgdialogTheme(sysTheme);
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta charset="utf-8"/>
|
||||
<title><t:mutiLang langKey="jeect.platform"/></title>
|
||||
<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 -->
|
||||
<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/bootstrap.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">
|
||||
<!-- 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 -->
|
||||
<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]>
|
||||
<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]-->
|
||||
|
||||
<!--[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]-->
|
||||
<!-- ace settings handler -->
|
||||
<script src="plug-in/ace/js/ace-extra.js"></script>
|
||||
|
@ -50,53 +50,70 @@
|
|||
<div class="login-container">
|
||||
<div class="center">
|
||||
<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"/>
|
||||
</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 class="space-6"></div>
|
||||
<div class="position-relative">
|
||||
<div id="login-box" class="login-box visible widget-box no-border">
|
||||
<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"
|
||||
role="form" action="loginController.do?login" method="post">
|
||||
<div class="widget-main">
|
||||
<div class="alert alert-warning alert-dismissible" role="alert" id="errMsgContiner">
|
||||
<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"
|
||||
id="errMsgContiner">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<div id="showErrMsg"></div>
|
||||
</div>
|
||||
<h4 class="header blue lighter bigger">
|
||||
<i class="ace-icon fa fa-coffee green"></i>
|
||||
用户登录
|
||||
<t:mutiLang langKey="login.info"/>
|
||||
|
||||
|
||||
</h4>
|
||||
<div class="space-6"></div>
|
||||
<label class="block clearfix">
|
||||
<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>
|
||||
</span>
|
||||
</label>
|
||||
<label class="block clearfix">
|
||||
<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>
|
||||
</span>
|
||||
</label>
|
||||
<label class="block clearfix">
|
||||
<div class="input-group">
|
||||
<input type="text" style="width:150px" name="randCode" class="form-control" placeholder="请输入验证码" id="randCode"/>
|
||||
<span class="input-group-addon" style="padding: 0px;"><img id="randCodeImage" src="randCodeImage" /></span>
|
||||
<input type="text" style="width:150px" name="randCode"
|
||||
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">记住用户名</span>
|
||||
<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">
|
||||
<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" >登录</span>
|
||||
<span class="bigger-110">
|
||||
<t:mutiLang langKey="login.login"/>
|
||||
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
|
@ -107,16 +124,19 @@
|
|||
<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>
|
||||
<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 class="center"><h4 class="blue" id="id-company-text">© 本系统未在任何平台出售源码,版权归jeewms所有,如果需要服务请联系13850081872</h4></div>--%>
|
||||
<%-- <div class="center"><h4 class="blue" id="id-company-text">© 本系统未在任何平台出售源码,版权归jeewms所有,如果需要服务请联系13850081872</h4></div>--%>
|
||||
<div class="navbar-fixed-top align-right">
|
||||
<br />
|
||||
<br/>
|
||||
|
||||
<a id="btn-login-dark" class="blue" href="#" onclick="darkStyle()">Dark</a>
|
||||
|
||||
|
@ -134,8 +154,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.min.js"></script>
|
||||
|
@ -146,42 +165,44 @@
|
|||
<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">
|
||||
$(function(){
|
||||
$(function () {
|
||||
optErrMsg();
|
||||
});
|
||||
$("#errMsgContiner").hide();
|
||||
function optErrMsg(){
|
||||
|
||||
function optErrMsg() {
|
||||
$("#showErrMsg").html('');
|
||||
$("#errMsgContiner").hide();
|
||||
}
|
||||
|
||||
//输入验证码,回车登录
|
||||
$(document).keydown(function(e){
|
||||
if(e.keyCode == 13) {
|
||||
$(document).keydown(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$("#but_login").click();
|
||||
}
|
||||
});
|
||||
|
||||
//验证用户信息
|
||||
function checkUser(){
|
||||
if(!validForm()){
|
||||
function checkUser() {
|
||||
if (!validForm()) {
|
||||
return false;
|
||||
}
|
||||
newLogin();
|
||||
}
|
||||
|
||||
//表单验证
|
||||
function validForm(){
|
||||
if($.trim($("#userName").val()).length==0){
|
||||
function validForm() {
|
||||
if ($.trim($("#userName").val()).length == 0) {
|
||||
showErrorMsg("请输入用户名");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($.trim($("#password").val()).length==0){
|
||||
if ($.trim($("#password").val()).length == 0) {
|
||||
showErrorMsg("请输入密码");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($.trim($("#randCode").val()).length==0){
|
||||
if ($.trim($("#randCode").val()).length == 0) {
|
||||
showErrorMsg("请输入验证码");
|
||||
return false;
|
||||
}
|
||||
|
@ -191,31 +212,31 @@
|
|||
//登录处理函数
|
||||
function newLogin(orgId) {
|
||||
setCookie();
|
||||
var actionurl=$('form').attr('action');//提交路径
|
||||
var checkurl=$('form').attr('check');//验证路径
|
||||
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();
|
||||
var data = $(":input").each(function () {
|
||||
formData[this.name] = $("#" + this.name).val();
|
||||
});
|
||||
formData['orgId'] = orgId ? orgId : "";
|
||||
//语言
|
||||
formData['langCode']=$("#langCode").val();
|
||||
formData['langCode'] = $("#langCode").val();
|
||||
formData['langCode'] = $("#langCode option:selected").val();
|
||||
$.ajax({
|
||||
async : false,
|
||||
cache : false,
|
||||
type : 'POST',
|
||||
url : checkurl,// 请求的action路径
|
||||
data : formData,
|
||||
error : function() {// 请求失败处理函数
|
||||
async: false,
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
url: checkurl,// 请求的action路径
|
||||
data: formData,
|
||||
error: function () {// 请求失败处理函数
|
||||
},
|
||||
success : function(data) {
|
||||
success: function (data) {
|
||||
var d = $.parseJSON(data);
|
||||
if (d.success) {
|
||||
if (d.attributes.orgNum > 1) {
|
||||
//用户拥有多个部门,需选择部门进行登录
|
||||
var title, okButton;
|
||||
if($("#langCode").val() == 'en') {
|
||||
if ($("#langCode").val() == 'en') {
|
||||
title = "Please select Org";
|
||||
okButton = "Ok";
|
||||
} else {
|
||||
|
@ -230,24 +251,24 @@
|
|||
drag: false,
|
||||
resize: false,
|
||||
content: 'url:userController.do?userOrgSelect&userId=' + d.attributes.user.id,
|
||||
lock:true,
|
||||
button : [ {
|
||||
name : okButton,
|
||||
focus : true,
|
||||
callback : function() {
|
||||
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() {// 请求失败处理函数
|
||||
async: false,
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
url: 'loginController.do?changeDefaultOrg',// 请求的action路径
|
||||
data: formData,
|
||||
error: function () {// 请求失败处理函数
|
||||
},
|
||||
success : function(data) {
|
||||
success: function (data) {
|
||||
window.location.href = actionurl;
|
||||
}
|
||||
});
|
||||
|
@ -256,8 +277,8 @@
|
|||
return false;
|
||||
}
|
||||
}],
|
||||
close: function(){
|
||||
setTimeout("window.location.href='"+actionurl+"'", 10);
|
||||
close: function () {
|
||||
setTimeout("window.location.href='" + actionurl + "'", 10);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -265,74 +286,79 @@
|
|||
}
|
||||
} else {
|
||||
showErrorMsg(d.msg);
|
||||
if(d.msg === "用户名或密码错误" || d.msg === "验证码错误")
|
||||
if (d.msg === "用户名或密码错误" || d.msg === "验证码错误")
|
||||
reloadRandCodeImage();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//登录提示消息显示
|
||||
function showErrorMsg(msg){
|
||||
function showErrorMsg(msg) {
|
||||
$("#errMsgContiner").show();
|
||||
$("#showErrMsg").html(msg);
|
||||
window.setTimeout(optErrMsg,3000);
|
||||
window.setTimeout(optErrMsg, 3000);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新验证码
|
||||
*/
|
||||
$('#randCodeImage').click(function(){
|
||||
$('#randCodeImage').click(function () {
|
||||
reloadRandCodeImage();
|
||||
});
|
||||
function reloadRandCodeImage() {
|
||||
});
|
||||
|
||||
function reloadRandCodeImage() {
|
||||
var date = new Date();
|
||||
var img = document.getElementById("randCodeImage");
|
||||
img.src='randCodeImage?a=' + date.getTime();
|
||||
}
|
||||
img.src = 'randCodeImage?a=' + date.getTime();
|
||||
}
|
||||
|
||||
function darkStyle(){
|
||||
function darkStyle() {
|
||||
$('body').attr('class', 'login-layout');
|
||||
$('#id-text2').attr('class', 'red');
|
||||
$('#id-company-text').attr('class', 'blue');
|
||||
e.preventDefault();
|
||||
}
|
||||
function lightStyle(){
|
||||
|
||||
function lightStyle() {
|
||||
$('body').attr('class', 'login-layout light-login');
|
||||
$('#id-text2').attr('class', 'grey');
|
||||
$('#id-company-text').attr('class', 'blue');
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
function blurStyle(){
|
||||
|
||||
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()
|
||||
{
|
||||
|
||||
//设置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);
|
||||
$("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);
|
||||
$("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)) {
|
||||
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("");
|
||||
|
@ -341,9 +367,7 @@ function reloadRandCodeImage() {
|
|||
});
|
||||
$("#on_off").attr("checked", true);
|
||||
$("#on_off").val("1");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$("#on_off").attr("checked", false);
|
||||
$("#on_off").val("0");
|
||||
$("#randCode").focus();
|
||||
|
|
Loading…
Reference in New Issue