亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? choiceaction.java

?? 一個使用Java語言開發(fā)
?? JAVA
字號:
package com.easyjf.asp.action;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.easyjf.asp.business.ActiveUser;
import com.easyjf.asp.business.CoreBusiness;
import com.easyjf.asp.business.Customer;
import com.easyjf.asp.business.Material;
import com.easyjf.asp.business.Product;
import com.easyjf.asp.business.SystemBasicDataDetail;
import com.easyjf.asp.business.SystemRegion;
import com.easyjf.asp.business.SystemUser;
import com.easyjf.dbo.EasyJDB;
import com.easyjf.util.CommUtil;
import com.easyjf.web.ActionContext;
import com.easyjf.web.IWebAction;
import com.easyjf.web.Module;
import com.easyjf.web.Page;
import com.easyjf.web.WebForm;
import com.easyjf.web.tools.DbPageList;
/**
 * 執(zhí)行選擇客戶、產(chǎn)品、原材料、系統(tǒng)用戶的窗口
 * @author 蔡世友
 *
 */
public class ChoiceAction implements IWebAction {
	public Page execute(WebForm form, Module module) {
		String method=CommUtil.null2String(form.get("easyJWebCommand"));		
		ActiveUser user=(ActiveUser)ActionContext.getContext().getSession().getAttribute("user");
		String xmlChoice=CommUtil.null2String(form.get("xmlChoice"));
		if("".equals(method)||"customer".equals(method))//查詢客戶
		{					
			doChoiceCustomer(form,module,user);	
			initCustomer(form);
			if(!xmlChoice.equals(""))return new Page("xmlChoice","/xmlChoice.xml","template");
		}
		else if("deliveryDept".equals(method))
		{
			doChoiceDeliveryDept(form,module,user);
			initCustomer(form);
			if(!xmlChoice.equals(""))return new Page("xmlChoice","/xmlChoice.xml","template");
		}
		else if("product".equals(method))//查詢產(chǎn)品
		{					
			doChoiceProduct(form,module,user);	
			initProduct(form);
			if(!xmlChoice.equals(""))return new Page("xmlChoice","/xmlChoice.xml","template");
		}
		else if("sysuser".equals(method))//查詢操作用戶
		{
			doChoiceSystemUser(form,module,user);	
		}
		else if("material".equals(method))//查詢原材料
		{
			doChoiceMaterial(form,module,user);			
		}
		else if("orderProduct".equals(method))//查詢原材料
		{
			doChoiceOrderProduct(form,module,user);	
			initProduct(form);
			if(!xmlChoice.equals(""))return new Page("xmlChoice","/xmlChoice.xml","template");
		}
		else if("unit".equals(method))
		{
			doChoiceUnit(form,module,user);
		}
		else if("productDetail".equals(method))//查詢原材料
		{
			doChoiceProductDetail(form,module,user);
			return new Page("xmlMsg","/xmlMsg.xml","template");
		}		
		else if("region".equals(method))
		{
			doChoiceRegion(form,module,user);
			return new Page("xmlChoice","/xmlChoice.xml","template");
		}		
		return module.findPage(module.getDefaultPage());
	}
	private void initCustomer(WebForm form)
	{
		List provinceList=SystemRegion.query("lev=1");			
		form.addResult("provinceList",provinceList);
		form.addResult("choiceCustomer","true");
	}
	private void initProduct(WebForm form)
	{
		form.addResult("choiceProduct","true");
		form.addResult("productTypesList",CoreBusiness.getProductTypes());
	}
	private void doChoiceCustomer(WebForm form, Module module,ActiveUser user)
	{
		String scope="belongDept=?";
		Collection paras=new ArrayList();
		paras.add(user.getDept());
		String province=CommUtil.null2String(form.get("queryProvince"));
		String city=CommUtil.null2String(form.get("queryCity"));
		String title=CommUtil.null2String(form.get("title"));
		if(!province.equals(""))
		{
		    scope+=" and province=?";
		    paras.add(province);
		}
		if(!city.equals(""))
		{
			scope+=" and city=?";
			paras.add(city);
		}	
		if(!title.equals(""))
		{
			scope+=" and (title like ? or linkMan like ?)";
			paras.add("%"+title+"%");
			paras.add("%"+title+"%");
		}
		DbPageList pList=new DbPageList(Customer.class,scope,paras);
		pList.doList(1,-1);
		List list=pList.getResult();
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				Customer obj=(Customer)list.get(i);
				map.put("title",obj.getTitle());
				map.put("value",obj.getTitle()+";"+obj.getSn()+";"+obj.getLinkMan()+";"+obj.getTel());
				ret.add(map);
			}
		}
		form.addResult("list",ret);
	}
	private void doChoiceDeliveryDept(WebForm form, Module module,ActiveUser user)
	{
		String scope="belongDept=? and types='10'";
		Collection paras=new ArrayList();
		paras.add(user.getDept());
		String province=CommUtil.null2String(form.get("queryProvince"));
		String city=CommUtil.null2String(form.get("queryCity"));
		String title=CommUtil.null2String(form.get("title"));
		if(!province.equals(""))
		{
		    scope+=" and province=?";
		    paras.add(province);
		}
		if(!city.equals(""))
		{
			scope+=" and city=?";
			paras.add(city);
		}	
		if(!title.equals(""))
		{
			scope+=" and title like ?";
			paras.add("%"+title+"%");
		}
		DbPageList pList=new DbPageList(Customer.class,scope,paras);
		if(pList==null)return;
		pList.doList(1,-1);			
		List list=pList.getResult();
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				Customer obj=(Customer)list.get(i);
				map.put("title",obj.getTitle());
				map.put("value",obj.getTitle()+";"+obj.getSn()+";"+obj.getLinkMan()+";"+obj.getTel());
				ret.add(map);
			}
		}
		form.addResult("list",ret);
	
	}
	private void doChoiceProduct(WebForm form, Module module,ActiveUser user)
	{
		String scope="belongDept=?";
		Collection paras=new ArrayList();
		paras.add(user.getDept());
		String types=CommUtil.null2String(form.get("types"));
		String title=CommUtil.null2String(form.get("title"));
		if(!types.equals(""))
		{
			scope+=" and types=?";
			paras.add(types);
		}	
		if(!title.equals(""))
		{
			scope+=" and (title like ? or sn like ?) ";
			paras.add("%"+title+"%");
			paras.add("%"+title+"%");
		}	
		DbPageList pList=new DbPageList(Product.class,scope,paras);
		pList.doList(1,-1);
		List list=pList.getResult();
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				Product obj=(Product)list.get(i);
				map.put("title",obj.getTitle());
				map.put("value",obj.getTitle()+";"+obj.getSn());
				ret.add(map);
			}
		}
		form.addResult("list",ret);
	}
	private void doChoiceMaterial(WebForm form, Module module,ActiveUser user)
	{
		String scope="belongDept=?";
		Collection paras=new ArrayList();
		paras.add(user.getDept());
		DbPageList pList=new DbPageList(Material.class,scope,paras);
		pList.doList(1,-1);
		List list=pList.getResult();
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				Material obj=(Material)list.get(i);
				map.put("title",obj.getTitle());
				map.put("value",obj.getTitle()+";"+obj.getCid());
				ret.add(map);
			}
		}
		form.addResult("list",ret);
	}
	private void doChoiceSystemUser(WebForm form, Module module,ActiveUser user)
	{
		String scope="belongDept=?";
		Collection paras=new ArrayList();
		paras.add(user.getDept());
		DbPageList pList=new DbPageList(SystemUser.class,scope,paras);
		pList.doList(1,-1);
		List list=pList.getResult();
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				SystemUser obj=(SystemUser)list.get(i);
				map.put("title",obj.getTrueName());
				map.put("value",obj.getTrueName()+";"+obj.getCid());
				ret.add(map);
			}
		}
		form.addResult("list",ret);
	}
	private void doChoiceOrderProduct(WebForm form, Module module,ActiveUser user)
	{
		String customerSn=CommUtil.null2String(form.get("customerSn"));
		String scope="belongDept=?";
		Collection paras=new ArrayList();
		paras.add(user.getDept());
		String types=CommUtil.null2String(form.get("types"));
		if(!types.equals(""))
		{
			scope+=" and types=?";
			paras.add(types);
		}
		DbPageList pList=new DbPageList(Product.class,scope,paras);
		pList.doList(1,-1);
		List list=pList.getResult();
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				Product obj=(Product)list.get(i);
				map.put("title",obj.getTitle());
				//傳到外面的值為title;sn;types;dir;unit;unitBase;price
				String value=obj.getTitle()+";"+obj.getSn()+";"+obj.getTypes()+";"+obj.getDir()+";"+obj.getUnit();
				String sql="select tvalue from SystemBasicDataDetail where parentSn='SystemUnit' and title='"+obj.getUnit()+"'";				
				Object unitBase=EasyJDB.getInstance().uniqueResult(sql);
				if(unitBase!=null)
				{
					value+=";"+unitBase;
				}
				else
				{
					value+=";1";//默認(rèn)為1個單位
				}
				//sql="select price from CustomerPrice where belongDept='"+user.getDept()+"' and productSn='"+obj.getSn()+"' and customerSn='"+customerSn+"' and unit='"+obj.getUnit()+"'";
				sql="select price from OrderList where  productSn='"+obj.getSn()+"' and  unit='"+obj.getUnit()+"' and orderSn in(select sn as orderSn from OrderInfo where customerSn='"+customerSn+"')";
				//System.out.println(sql);
				Object defaultPrice=null;//EasyJDB.getInstance().uniqueResult(sql);					
				if(defaultPrice!=null)
				{
					value+=";"+defaultPrice;
				}
				else
				{
					value+=";"+obj.getSalePrice();
				}						
				map.put("value",value);
				ret.add(map);
			}
		}
		form.addResult("list",ret);
	}
	private void doChoiceProductDetail(WebForm form, Module module,ActiveUser user)
	{
		String customerSn=CommUtil.null2String(form.get("customerSn"));
		String productSn=CommUtil.null2String(form.get("productSn"));
		
				Map map=new HashMap();					
				Product obj=Product.readBySn(productSn);
				map.put("title",obj.getTitle());
				//傳到外面的值為title;sn;types;dir;unit;unitBase;price
				String value=obj.getTitle()+";"+obj.getSn()+";"+obj.getTypes()+";"+obj.getDir()+";"+obj.getUnit();
				String sql="select tvalue from SystemBasicDataDetail where parentSn='SystemUnit' and title='"+obj.getUnit()+"'";				
				Object unitBase=EasyJDB.getInstance().uniqueResult(sql);
				if(unitBase!=null)
				{
					value+=";"+unitBase;
				}
				else
				{
					value+=";1";//默認(rèn)為1個單位
				}
				//sql="select price from CustomerPrice where belongDept='"+user.getDept()+"' and productSn='"+obj.getSn()+"' and customerSn='"+customerSn+"' and unit='"+obj.getUnit()+"'";
				sql="select price from OrderList where  productSn='"+obj.getSn()+"' and  unit='"+obj.getUnit()+"' and orderSn in(select top 1 sn as orderSn from OrderInfo where customerSn='"+customerSn+"' order by inputTime desc)";
				//System.out.println(sql);
				Object defaultPrice=EasyJDB.getInstance().uniqueResult(sql);					
				if(defaultPrice!=null)
				{
					value+=";"+defaultPrice;
				}
				else
				{
					value+=";"+obj.getSalePrice();
				}						
				map.put("value",value);
				
			
		form.addResult("msg",value);
	}
	private void doChoiceUnit(WebForm form, Module module,ActiveUser user)
	{
		String scope="parentSn='SystemUnit'";
		DbPageList pList=new DbPageList(SystemBasicDataDetail.class,scope);
		pList.doList(1,-1);
		List list=pList.getResult();
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				SystemBasicDataDetail obj=(SystemBasicDataDetail)list.get(i);
				map.put("title",obj.getTitle());
				map.put("value",obj.getTitle()+";"+obj.getTvalue());
				ret.add(map);
			}
		}
		form.addResult("list",ret);
	}
	private void doChoiceRegion(WebForm form, Module module,ActiveUser user)
	{
		String pSn=CommUtil.null2String(form.get("sn"));
		String scope="parentSn='"+pSn+"'";
		DbPageList pList=new DbPageList(SystemRegion.class,scope);
		pList.doList(1,-1);
		List list=pList.getResult();
		/*
		List ret=new ArrayList();
		if(list!=null)
		{
			for(int i=0;i<list.size();i++)
			{
				Map map=new HashMap();					
				SystemBasicDataDetail obj=(SystemBasicDataDetail)list.get(i);
				map.put("title",obj.getTitle());
				map.put("value",obj.getTitle()+";"+obj.getTvalue());
				ret.add(map);
			}
		}*/
		form.addResult("list",list);
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区免费观看| 91国在线观看| 亚洲午夜久久久久久久久久久| 精品免费日韩av| 日本高清不卡在线观看| 久99久精品视频免费观看| 亚洲综合色区另类av| 国产亚洲制服色| 91精品久久久久久久91蜜桃| 99久久99久久精品免费看蜜桃| 久久精品噜噜噜成人av农村| 樱桃视频在线观看一区| 欧美高清在线视频| 欧美大胆一级视频| 欧美精品精品一区| 欧美系列在线观看| 色诱视频网站一区| 99视频在线观看一区三区| 国产成人自拍网| 国产高清视频一区| 国产一区二区剧情av在线| 青青草97国产精品免费观看无弹窗版| 一区二区在线看| 亚洲激情欧美激情| 亚洲国产欧美在线| 亚洲国产精品久久人人爱| 亚洲国产综合色| 五月天久久比比资源色| 夜夜爽夜夜爽精品视频| 亚洲小说欧美激情另类| 亚洲制服丝袜av| 亚洲高清三级视频| 亚洲成人午夜电影| 日韩av一区二区三区| 奇米影视7777精品一区二区| 日本不卡123| 久久不见久久见中文字幕免费| 玖玖九九国产精品| 国产成人综合视频| 91亚洲国产成人精品一区二区三 | 国产日韩欧美电影| 欧美精品亚洲一区二区在线播放| 国产精品久久久久久亚洲毛片| 欧美日韩在线不卡| 欧洲视频一区二区| 欧美大片日本大片免费观看| 久久久久久9999| 亚洲乱码日产精品bd| 日韩高清在线观看| 国产美女av一区二区三区| 波多野结衣在线aⅴ中文字幕不卡| 99在线视频精品| 91麻豆精品国产91久久久使用方法 | 欧美激情一区二区三区蜜桃视频| 中文字幕亚洲成人| 日韩不卡一区二区三区| 国产成人精品aa毛片| 欧美一a一片一级一片| 精品第一国产综合精品aⅴ| 日本一区二区三区在线不卡| 亚洲成人第一页| 麻豆成人久久精品二区三区小说| 99热99精品| 久久这里只精品最新地址| 一区二区高清在线| 国产成人日日夜夜| 日韩视频永久免费| 中文字幕一区二区在线观看| 人妖欧美一区二区| 欧洲av一区二区嗯嗯嗯啊| 久久久久久久久伊人| 毛片av中文字幕一区二区| 国产精品中文字幕一区二区三区| 99久久久久免费精品国产| 亚洲精品一区二区三区在线观看| 午夜伦理一区二区| 在线亚洲一区二区| 国产精品久久久久影院色老大| 韩国女主播成人在线观看| 678五月天丁香亚洲综合网| 亚洲免费资源在线播放| 97精品国产露脸对白| 国产日韩高清在线| 国产一区二区福利| 日韩免费福利电影在线观看| 香蕉加勒比综合久久| 色综合天天综合网天天看片| 国产精品欧美综合在线| 成人久久18免费网站麻豆 | 亚洲丶国产丶欧美一区二区三区| 99久久综合狠狠综合久久| 日本一区二区三区免费乱视频 | 波多野结衣亚洲| 亚洲欧美日韩一区二区三区在线观看| 韩国三级在线一区| 国产亚洲欧美色| 成人动漫视频在线| 亚洲欧美偷拍三级| 欧美图片一区二区三区| 一区二区三区国产精品| 欧美日韩国产一区二区三区地区| 午夜精品一区在线观看| 91精品国产黑色紧身裤美女| 美女脱光内衣内裤视频久久影院| 69av一区二区三区| 热久久一区二区| wwwwww.欧美系列| 精品一区二区国语对白| 久久久久久电影| 成人的网站免费观看| 国产欧美一区二区精品性| 国产精品一二三区在线| 国产亚洲一二三区| 另类欧美日韩国产在线| 日韩午夜精品视频| 国产成人精品综合在线观看| 国产精品久久久久7777按摩| 色综合 综合色| 青青草国产成人av片免费| 日韩一区二区免费电影| 国产一区二区按摩在线观看| 亚洲视频免费在线观看| 欧美日韩国产高清一区二区| 国产在线精品视频| 亚洲人123区| 日韩三级在线免费观看| 国产成人鲁色资源国产91色综| 日韩一区有码在线| 欧美一区二区成人| 不卡一区二区三区四区| 天堂va蜜桃一区二区三区| 日韩欧美一卡二卡| 一本大道久久a久久精二百| 日韩在线卡一卡二| 中文字幕中文字幕在线一区| 6080午夜不卡| 高清在线不卡av| 日韩国产欧美在线观看| 国产精品欧美一区喷水| 日韩一区二区影院| 日本道精品一区二区三区| 国产在线播放一区三区四| 亚洲图片欧美一区| 综合色中文字幕| 国产欧美日韩一区二区三区在线观看| 欧美久久久久久久久久 | 久久影院视频免费| 欧美精品自拍偷拍| 色婷婷久久久综合中文字幕| 国产一区二三区| 久久精品国产99国产精品| 亚洲成人av一区二区三区| 亚洲视频一二三| 欧美xingq一区二区| 777午夜精品免费视频| 在线观看视频91| 在线这里只有精品| 91免费视频网| 成人免费观看男女羞羞视频| 国产综合色在线| 国产寡妇亲子伦一区二区| 精品在线视频一区| 精品一区二区三区蜜桃| 精品在线免费视频| 欧美aaaaa成人免费观看视频| 亚洲成人手机在线| 日韩电影在线免费| 日韩不卡在线观看日韩不卡视频| 五月激情综合网| 日本特黄久久久高潮 | 久久人人超碰精品| 欧美天堂一区二区三区| 欧美美女一区二区三区| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲综合视频在线观看| 中文字幕一区二区5566日韩| 亚洲伦理在线精品| 一区二区三区**美女毛片| 亚洲成人高清在线| 久久99精品国产.久久久久| 国产一区二区美女| 91浏览器入口在线观看| 色爱区综合激月婷婷| 制服丝袜av成人在线看| 久久婷婷一区二区三区| 国产精品麻豆视频| 亚洲精品成a人| 亚洲国产视频网站| 亚洲欧美日韩国产手机在线| 欧美精品粉嫩高潮一区二区| 97久久精品人人做人人爽| 不卡电影一区二区三区| 在线观看日韩毛片| 久久网站热最新地址| 亚洲图片你懂的| 免费成人在线视频观看| 99视频在线观看一区三区| 欧美日韩精品二区第二页| 亚洲精品在线三区| 亚洲一区在线电影|