<%@page import="com.northglass.Globel.mes"%>
|
<%@page import="com.northglass.SqlHelper.*"%>
|
<%@page import="org.json.*"%>
|
<%@ page contentType="text/json;charset=UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<%
|
String yemian = request.getParameter("yemian");
|
|
if ("中空管理".equals(yemian)) {
|
String caozuo = request.getParameter("caozuo");
|
String leixing = request.getParameter("leixing");
|
String pLine = request.getParameter("line");
|
String liuchengka = request.getParameter("liuchengka");
|
DBSession sn = null;
|
boolean ok = false;
|
|
try {
|
|
sn = mes.getMesDBHelper().createSession(false);
|
String qSQL = "";
|
|
if ("获取列表".equals(caozuo)) {
|
|
qSQL = "select main_liuchengka,piece_count from gmms_drop_frame_5 as dr left join gmms_shelf_rack_2 as sr on dr.rank=sr.id left join gmms_liuchengka as gl on sr.processcard_id=gl.liuchengka where dr.rank is not null and sr.processcard_id is not null and (dr.groups_=4 or dr.groups_=100) group by main_liuchengka";
|
}
|
if ("获取列表2".equals(caozuo)) {
|
|
qSQL = "select main_liuchengka,piece_count from gmms_liuchengka where is_single=0 and main_liuchengka='"+liuchengka+"'";
|
}
|
|
//System.out.println(qSQL);
|
sn.createSql(qSQL);
|
//System.out.print(qSQL);
|
if ("修改".equals(leixing)) {
|
if ("领取任务".equals(caozuo)) {
|
|
String Id = request.getParameter("Id");
|
qSQL="update gmms_liuchengka set getgroups='"+pLine+"',current_work_position='中空',current_status='等待中',getdatatime=now() where id='"+Id+"'";
|
|
sn.createSql(qSQL);
|
int s=sn.update();//括号内是参数,没有参数不输入
|
out.print(s);
|
}
|
if ("全部吸完".equals(caozuo)) {
|
String Id = request.getParameter("Id");
|
qSQL="update gmms_liuchengka set Occupied=1 where liuchengka='"+Id+"'";
|
/* qSQL="update gmms_drop_frame_5 as dr left join gmms_shelf_rack_2 as sr on dr.rank=sr.id"+
|
" left join gmms_liuchengka as lk on lk.liuchengka=sr.processcard_id set Occupied=1"+
|
" where dr.rank is not null and sr.processcard_id is not null and lk.parent_liuchengka='"+Id+"'"; */
|
sn.createSql(qSQL);
|
int s=sn.update();//括号内是参数,没有参数不输入
|
out.print(s);
|
}
|
if ("完工退库".equals(caozuo)) {
|
String Id = request.getParameter("Id");
|
qSQL="update gmms_liuchengka set Occupied=2 where liuchengka='"+Id+"'";
|
/* qSQL="update gmms_drop_frame_5 as dr left join gmms_shelf_rack_2 as sr on dr.rank=sr.id"+
|
" left join gmms_liuchengka as lk on lk.liuchengka=sr.processcard_id set Occupied=2"+
|
" where dr.rank is not null and sr.processcard_id is not null and lk.parent_liuchengka='"+Id+"'"; */
|
sn.createSql(qSQL);
|
int s=sn.update();//括号内是参数,没有参数不输入
|
out.print(s);
|
}
|
}
|
|
if ("查询".equals(leixing)) {
|
|
JSONArray a = sn.query().resultToJson(false);
|
if (a != null) {
|
out.print(a.toString());
|
} else {
|
out.print("[]");
|
}
|
}
|
//sn.createStdCall("aaa",3);
|
//String s= sn.stdCall(1,2,3).ResultMessage;
|
|
} catch (Exception e) {
|
e.printStackTrace();
|
|
} finally {
|
if (sn != null)
|
sn.close();
|
}
|
}
|
|
|
%>
|