%@ page contentType="text/html; charset=utf-8" session="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.text.DecimalFormat"%>
我的工作台
<%@ include file="../common/header.jsp" %>
日计划打印表(按每次投料量)
日计划打印表(按投料累加量)
日计划打印表(按发料量)
牧场日粮配合表()
牧场日粮累加配合表()
日计划打印表(包装量)
牧场日粮实发表((单位:公斤))
|
|
|
<%
Boolean tmrFlag = (Boolean) request.getAttribute("tmrFlag");
String btnType = (String) request.getAttribute("btnType");
List colList = (List) request.getAttribute("colList");
List rsList = (List) request.getAttribute("rsList");
Integer scount = (Integer) request.getAttribute("scount");
Float lsVale = 0F;
String str = "";
if(scount==0){
str = "##0";
}else if(scount==1){
str = "##0.0";
}else if(scount==2){
str = "##0.00";
}else if(scount==3){
str = "##0.000";
}
DecimalFormat fnum = new DecimalFormat(str);
if("1".equals(btnType)){
for (int i = 0; i < rsList.size(); i++){
lsVale = 0F;
Map rsMap = (Map) rsList.get(i);
%>
<%
for (int j = 0; j < colList.size(); j++){
Map colMap = (Map) colList.get(j);
if(colMap==null){
continue;
}
String colName = (String)colMap.get("name");
if("没有数据!".equals(colName)){
%>
没有数据! |
<%
}else{
if(i%2==1){
if("车次".equals(colName)||"时间".equals(colName)||"配方模板".equals(colName)||"日系数比例".equals(colName)||"驾驶员".equals(colName)||"班组".equals(colName)){
String colValueOld = (String)rsMap.get(colName);
%>
|
<%
}else if("TMR".equals(colName)){
if(tmrFlag){
String colValueOld = (String)rsMap.get(colName);
%>
|
<%
}
}else{
String colValueOld = (String)rsMap.get(colName);
if(colValueOld!=null&&!colValueOld.isEmpty()){
Float colValue = Float.valueOf(colValueOld);
if(lsVale == 0){
lsVale = colValue;
}else{
lsVale += colValue;
}
String colValueNew = fnum.format(lsVale);
%>
|
<%
}else{
%>
|
<%
}
}
}else{
if("车次".equals(colName)||"时间".equals(colName)||"配方模板".equals(colName)||"日系数比例".equals(colName)||"驾驶员".equals(colName)||"班组".equals(colName)){
String colValueOld = (String)rsMap.get(colName);
%>
|
<%
}else if("TMR".equals(colName)){
if(tmrFlag){
String colValueOld = (String)rsMap.get(colName);
%>
|
<%
}
}else{
String colValueOld = (String)rsMap.get(colName);
if(colValueOld!=null&&!colValueOld.isEmpty()){
Float colValue = Float.valueOf(colValueOld);
if(lsVale == 0){
lsVale = colValue;
}else{
lsVale += colValue;
}
String colValueNew = fnum.format(lsVale);
%>
|
<%
}else{
%>
|
<%
}
}
}
}
}
%>
<%
}
}else{
for (int i = 0; i < rsList.size(); i++){
Map rsMap = (Map) rsList.get(i);
%>
<%
for (int j = 0; j < colList.size(); j++){
Map colMap = (Map) colList.get(j);
String colName = (String)colMap.get("name");
if("没有数据!".equals(colName)){
%>
没有数据! |
<%
}else{
Object colValueOld = (Object)rsMap.get(colName);
String colValueNew = "";
if(!"TMR".equals(colName)){
if("发料合计".equals(colName)){
if(colValueOld != null){
String sss = colValueOld.toString();
Float fff = Float.valueOf(sss);
colValueNew = fnum.format(fff);
}
if(i%2==1){
%>
|
<%
}else{
%>
|
<%
}
}else{
if(i%2==1){
%>
|
<%
}else{
%>
|
<%
}
}
}else{
if(tmrFlag){
if(i%2==1){
%>
|
<%
}else{
%>
|
<%
}
}
}
}
}
%>
<%
}
}
%>