@SuppressWarnings("unchecked")
public String dqfnLotDetailUI() {
String className = (page.getName() == null ? res.getParameter(request, "page.name", "") : page.getName());
String flag = res.getParameter(request, "flag", "");
// lot的Id
String tf_id = res.getParameter(request, "tf_id", "");
String Hql = "";
if (className.equals("DQFNWP1_1") || className.equals("DQFNWP1_2") || className.equals("DQFNWP1_3")) {
Hql = "select model.tf_id,model.tf_lot,model.tf_dingdan,model.tf_lrTime,model.tf_tr,model.tf_p1,model.tf_p2,model.tf_p3,model.tf_p6,model.tf_p7,model.tf_p8,model.tf_p9,model.tf_p10,model.tf_sTime,model.tf_eTime,model.tf_p4,model.tf_p5,model.tf_cc from "
+ className + " model where model.tf_id = '" + tf_id + "'";
} else {
Hql = "select model.tf_id,model.tf_lot,model.tf_dingdan,model.tf_lrTime,model.tf_tr,model.tf_p1,model.tf_p2,model.tf_p3,model.tf_sTime,model.tf_eTime,model.tf_p4,model.tf_p5,model.tf_cc from "
+ className + " model where model.tf_id = '" + tf_id + "'";
}
Object[] object = (Object[]) dqfnService.findByHql(Hql).get(0);
request.setAttribute("ob", object);
DQFNPlan plan = dqfnPlanService.findById("from DQFNPlan p where p.tf_id = '" + object[2] + "'");// 数组对应查询订单号
DQFNTcline tcline = (DQFNTcline) systemService
.findObjectByHql("from DQFNTcline tc where tc.tf_id = '" + plan.getTf_tcline() + "'");
DQFNBom bom = (DQFNBom) systemService
.findObjectByHql("from DQFNBom b where b.tf_id = '" + plan.getTf_bom() + "'");
DQFNPlanBom _bom = (DQFNPlanBom) systemService
.findObjectByHql("from DQFNPlanBom b where b.tf_id = '" + plan.getTf_bom() + "'");
Protype protype = protypeService.findById(_bom != null ? _bom.getTf_protype() : bom.getTf_protype());
Encfor encfor = encforService.findById(protype.getTf_encfor());
// 单片信息加载
List<TBFtLog> listLog = (List<TBFtLog>) dqfnService
.findByHql("from TBFtLog l where l.tf_lot = '" + object[1] + "' order by l.tf_p1");
List<Object> listobj = new ArrayList<Object>();
listobj.add(object); // 对应前台 list[0][0]
listobj.add(plan);
listobj.add(_bom != null ? _bom : bom);
listobj.add(encfor);// <span class="value">${list[3].tf_name}</span>
listobj.add(protype);
String subSite = TclineUtils.getSubSite(className);
Boolean testFlag = TclineUtils.isContainTest(tcline.getTf_desc());
boolean f = TclineUtils.isContainYT(tcline.getTf_desc());
if ("DQFNWP7".equals(className) && f) {
DQFNWP1_1 wp = (DQFNWP1_1) systemService.findObjectByHql(
"from DQFNWP1_1 wp where wp.tf_lot = '" + object[1] + "' and wp.tf_dingdan = '" + object[2] + "'");
request.setAttribute("wp", wp);
}
if ("DQFNWP6".equals(className)) {
String hql = "select sum(tf_cc+0),sum(tf_ng1+0),sum(tf_ng2+0),sum(tf_ng3+0),sum(tf_ng4+0),sum(tf_ng5+0)"
+ ",sum(tf_ng6+0),sum(tf_ng7+0),sum(tf_ng8+0),sum(tf_ng9+0),sum(tf_ng10+0),sum(tf_ng11+0),sum(tf_tr+0) from TBFtLog"
+ " where tf_lot = '" + object[1] + "'";
Object[] obj = (Object[]) dqfnService.findByHql(hql).get(0);
request.setAttribute("log", obj);
}
// 加载不良信息
DQFNNg ng = (DQFNNg) systemService.findObjectByHql("from DQFNNg n where n.tf_lot = '" + object[1]
+ "' and n.tf_wp = '" + className + "' and n.tf_id = '" + object[0] + "'");
if (ng == null) {
ng = getDefaultNG();
}
/*
* SELECT * FROM tb_dqfn_wp7 where tf_lot='RE1917AN001' update
* tb_dqfn_wp7 set tf_opeFlag='Y' where tf_lot='RE1917AN001'
*/
if (className.equals("DQFNWP5")) {
List<TBFtLog> logs = (List<TBFtLog>) systemService
.findListByHql("from TBFtLog where tf_print = 'N' and tf_lot = '" + object[1] + "'");
if (logs == null || (logs != null && logs.size() == 0)) {
request.setAttribute("opeFlag", true);
} else {
request.setAttribute("opeFlag", false);
}
}
request.setAttribute("testFlag", testFlag);
request.setAttribute("ng", ng);
request.setAttribute("flag", flag);
request.setAttribute("list", listobj);
request.setAttribute("listLog", listLog);
request.setAttribute("className", className);
request.setAttribute("subSite", subSite);
return "dqfnLotDetailUI";
}
=======================================================================
<%@page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"😕/"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c”%>
<title></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script language="javascript" type="text/javascript" src="<%=basePath %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath %>js/jquery-1.8.0.min.js"></script>
<script language="javascript" type="text/javascript" src="<%=basePath %>/js/common/key.js"></script>
<script language="javascript" type="text/javascript" src="<%=basePath %>/js/check.js"></script>
<style>
body {
margin: 0px;
padding: 0px;
font-size: 12px;
color: black;
}
fieldset {
padding: 10px;
margin: 10px;
width: 1000px;
color: #333;
border: #b5d6e6 dotted 1px;
}
legend {
color: #06c;
font-weight: 1000;
background: #fff;
}
.td {
height: 40px;
line-height: 35px;
width:120px;
text-align:leftt;
font-size: 12px;
background-color:lightgray;
}
.smalltd {
height: 30px;
line-height: 30px;
width: 200px;
text-align: left;
font-size: 12px;
}
.td_f {
text-align: left;
width: 300px;
}
.smalltd_f {
text-align: left;
width: 45px;
}
font{
size: 12px;
}
.input {
margin-left:5px;
width: 150px;
/* background-color: lightgray; */
}
.mininput {
margin-left: 10px;
width: 40px;
}
.maxinput {
margin-left: 10px;
width: 300px;
}
.select {
margin-left: 10px;
width: 200px;
}
.area {
width: 540px;
height: 50px;
margin-left: 10px;
}
.smalltitle {
font-size: 12px;
font-weight: bolder;
}
.value {
margin-left: 5px;
font-size: 12px;
color: blue;
font-weight: bolder;
}