⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 carinfo.java

📁 java阿里巴巴代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package com.saas.biz.carMgr;

import java.util.*;
import java.util.HashMap;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.saas.biz.commen.commMethodMgr;
import com.saas.biz.dao.carDao.CarDao;
import com.saas.biz.dao.carDao.CarExt;
import com.saas.sys.buffer.Buffers;
import com.saas.sys.dbm.Dbtable;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;

public class CarInfo {

	Dbtable tradeQuery;

	commMethodMgr comm;

	Logger log;

	Buffers inBuffer;

	Buffers outBuffer;

	ArrayList queryResult = new ArrayList();

	public CarInfo() {

		log = new Logger(this);
		tradeQuery = new Dbtable();
		comm = new commMethodMgr();
	}

	public void setTradeQuery(Dbtable tradeQuery) {

		this.tradeQuery = tradeQuery;
	}

	public Dbtable getTradeQuery() {

		return this.tradeQuery;
	}

	public void setOutBuffer(Buffers outBuffer) {

		this.outBuffer = outBuffer;
	}

	public Buffers getOutBuffer() {

		return this.outBuffer;
	}

	public ArrayList getQueryResult() {

		return this.queryResult;
	}

	public void setQueryResult(ArrayList queryResult) {

		this.queryResult = queryResult;
	}

	// 新增车辆信息
	public void addCarInfo(Buffers inbuffer) {

		log.LOG_INFO("进入addCarInfo方法...");
		this.outBuffer = inbuffer;
		this.inBuffer = inbuffer;
		int iResult = -1;
		String cust_id = inbuffer.getString("SESSION_CUST_ID");
		String auto_id = inbuffer.getString("AUTO_ID");
		String motor_o = inbuffer.getString("MOTOR_O");
		String tag_no = inbuffer.getString("TAG_NO");
		String brand = inbuffer.getString("BRAND");
		String auto_type = inbuffer.getString("AUTO_TYPE");
		String auto_color = inbuffer.getString("AUTO_COLOR");
		String road_num = inbuffer.getString("ROAD_NUM");
		String weight = inbuffer.getString("WEIGHT");
		String link_num = inbuffer.getString("LINK_NUM");
		String frame_now = inbuffer.getString("FRAME_NOW");
		String oil_type = inbuffer.getString("OIL_TYPE");
		String own = inbuffer.getString("OWN");
		String product_addr = inbuffer.getString("PRODUCT_ADDR");
		String tax_date = inbuffer.getString("TAX_DATE");
		String check_end_date = inbuffer.getString("CHECK_END_DATE");
		String in_date = inbuffer.getString("IN_DATE");
		String buy_date = inbuffer.getString("BUY_DATE");
		String own_user = inbuffer.getString("OWN_USER");
		String own_team_id = inbuffer.getString("OWN_TEAM_ID");
		String check_date = inbuffer.getString("CHECK_DATE");
		String state_code = inbuffer.getString("STATE_CODE");
		String state_code_date = comm.GenSysdate("1");
		String rsrv_str1 = inbuffer.getString("RSRV_STR1");
		String rsrv_str2 = inbuffer.getString("RSRV_STR2");
		String rsrv_str3 = inbuffer.getString("RSRV_STR3");
		String rsrv_str4 = inbuffer.getString("RSRV_STR4");
		String rsrv_str5 = inbuffer.getString("RSRV_STR5");
		String rsrv_str8 = inbuffer.getString("RSRV_STR8");
		String rsrv_str9 = inbuffer.getString("RSRV_STR9");
		String rsrv_str10 = inbuffer.getString("RSRV_STR10");
		String oper_date = state_code_date;
		String user_id = inbuffer.getString("SESSION_USER_ID");
		String remark = inbuffer.getString("REMARK");
		try {
			CarDao carDao = new CarDao();
			carDao.setCust_id(cust_id);
			carDao.setAuto_id(auto_id);
			carDao.setMotor_o(motor_o);
			carDao.setTag_no(tag_no);
			carDao.setBrand(brand);
			carDao.setAuto_type(auto_type);
			carDao.setAuto_color(auto_color);
			carDao.setRoad_num(road_num);
			carDao.setWeight(weight);
			carDao.setLink_num(link_num);
			carDao.setFrame_now(frame_now);
			carDao.setOil_type(oil_type);
			carDao.setOwn(own);
			carDao.setProduct_addr(product_addr);
			carDao.setTax_date(tax_date);
			carDao.setCheck_end_date(check_end_date);
			carDao.setIn_date(in_date);
			carDao.setBuy_date(buy_date);
			carDao.setOwn_user(own_user);
			carDao.setOwn_team_id(own_team_id);
			carDao.setCheck_date(check_date);
			carDao.setState_code(state_code);
			carDao.setState_code_date(state_code_date);
			carDao.setRsrv_str1(rsrv_str1);
			carDao.setRsrv_str2(rsrv_str2);
			carDao.setRsrv_str3(rsrv_str3);
			carDao.setRsrv_str4(rsrv_str4);
			carDao.setRsrv_str5(rsrv_str5);
			carDao.setRsrv_str8(rsrv_str8);
			carDao.setRsrv_str9(rsrv_str9);
			carDao.setRsrv_str10(rsrv_str10);
			carDao.setOper_date(oper_date);
			carDao.setUser_id(user_id);
			carDao.setRemark(remark);

			iResult = addCarInfo(carDao);
		} catch (Exception e) {
			log.LOG_INFO(e.getMessage());
		}
		if (iResult != 0) {
			this.outBuffer.setInt("RESULT_CODE", -1);
			this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
		} else {
			this.outBuffer.setInt("RESULT_CODE", 0);
			this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
		}
		log.LOG_INFO("退出addCarInfo方法...");
	}

	public int addCarInfo(CarDao carDao) throws SaasApplicationException {

		CarExt carExt = new CarExt();
		carExt.setParam(":VCUST_ID", carDao.getCust_id());
		carExt.setParam(":VAUTO_ID", carDao.getAuto_id());
		carExt.setParam(":VMOTOR_O", carDao.getMotor_o());
		carExt.setParam(":VTAG_NO", carDao.getTag_no());
		carExt.setParam(":VBRAND", carDao.getBrand());
		carExt.setParam(":VAUTO_TYPE", carDao.getAuto_type());
		carExt.setParam(":VAUTO_COLOR", carDao.getAuto_color());
		carExt.setParam(":VROAD_NUM", carDao.getRoad_num());
		carExt.setParam(":VWEIGHT", carDao.getWeight());
		carExt.setParam(":VLINK_NUM", carDao.getLink_num());
		carExt.setParam(":VFRAME_NOW", carDao.getFrame_now());
		carExt.setParam(":VOIL_TYPE", carDao.getOil_type());
		carExt.setParam(":VOWN", carDao.getOwn());
		carExt.setParam(":VPRODUCT_ADDR", carDao.getProduct_addr());
		carExt.setParam(":VTAX_DATE", carDao.getTax_date());
		carExt.setParam(":VCHECK_END_DATE", carDao.getCheck_end_date());
		carExt.setParam(":VIN_DATE", carDao.getIn_date());
		carExt.setParam(":VBUY_DATE", carDao.getBuy_date());
		carExt.setParam(":VOWN_USER", carDao.getOwn_user());
		carExt.setParam(":VOWN_TEAM_ID", carDao.getOwn_team_id());
		carExt.setParam(":VCHECK_DATE", carDao.getCheck_date());
		carExt.setParam(":VSTATE_CODE", carDao.getState_code());
		carExt.setParam(":VSTATE_CODE_DATE", carDao.getState_code_date());
		carExt.setParam(":VRSRV_STR1", carDao.getRsrv_str1());
		carExt.setParam(":VRSRV_STR2", carDao.getRsrv_str2());
		carExt.setParam(":VRSRV_STR3", carDao.getRsrv_str3());
		carExt.setParam(":VRSRV_STR4", carDao.getRsrv_str4());
		carExt.setParam(":VRSRV_STR5", carDao.getRsrv_str5());
		carExt.setParam(":VRSRV_STR8", carDao.getRsrv_str8());
		carExt.setParam(":VRSRV_STR9", carDao.getRsrv_str9());
		carExt.setParam(":VRSRV_STR10", carDao.getRsrv_str10());
		carExt.setParam(":VOPER_DATE", carDao.getOper_date());
		carExt.setParam(":VUSER_ID", carDao.getUser_id());
		carExt.setParam(":VREMARK", carDao.getRemark());
		tradeQuery.executeBy(carExt.insBy("INS_BY_ALL"));
		return 0;
	}

	// 修改车辆信息
	public void editCarInfo(Buffers inbuffer) {

		log.LOG_INFO("进入editCarInfo方法...");
		this.outBuffer = inbuffer;
		this.inBuffer = inbuffer;
		int iResult = -1;
		String cust_id = inbuffer.getString("SESSION_CUST_ID");
		String auto_id = inbuffer.getString("AUTO_ID");
		String motor_o = inbuffer.getString("MOTOR_O");
		String tag_no = inbuffer.getString("TAG_NO");
		String brand = inbuffer.getString("BRAND");
		String auto_type = inbuffer.getString("AUTO_TYPE");
		String auto_color = inbuffer.getString("AUTO_COLOR");
		String road_num = inbuffer.getString("ROAD_NUM");
		String weight = inbuffer.getString("WEIGHT");
		String link_num = inbuffer.getString("LINK_NUM");
		String frame_now = inbuffer.getString("FRAME_NOW");
		String oil_type = inbuffer.getString("OIL_TYPE");
		String own = inbuffer.getString("OWN");
		String product_addr = inbuffer.getString("PRODUCT_ADDR");
		String tax_date = inbuffer.getString("TAX_DATE");
		String check_end_date = inbuffer.getString("CHECK_END_DATE");
		String in_date = inbuffer.getString("IN_DATE");
		String buy_date = inbuffer.getString("BUY_DATE");
		String own_user = inbuffer.getString("OWN_USER");
		String own_team_id = inbuffer.getString("OWN_TEAM_ID");
		String check_date = inbuffer.getString("CHECK_DATE");
		String state_code = inbuffer.getString("STATE_CODE");
		String state_code_date = comm.GenSysdate("1");
		String rsrv_str1 = inbuffer.getString("RSRV_STR1");
		String rsrv_str2 = inbuffer.getString("RSRV_STR2");
		String rsrv_str3 = inbuffer.getString("RSRV_STR3");
		String rsrv_str4 = inbuffer.getString("RSRV_STR4");
		String rsrv_str5 = inbuffer.getString("RSRV_STR5");
		String rsrv_str8 = inbuffer.getString("RSRV_STR8");
		String rsrv_str9 = inbuffer.getString("RSRV_STR9");
		String rsrv_str10 = inbuffer.getString("RSRV_STR10");
		String oper_date = comm.GenSysdate("1");
		String user_id = inbuffer.getString("SESSION_USER_ID");
		String remark = inbuffer.getString("REMARK");
		try {
			CarDao carDao = new CarDao();
			carDao.setCust_id(cust_id);
			carDao.setAuto_id(auto_id);
			carDao.setMotor_o(motor_o);
			carDao.setTag_no(tag_no);
			carDao.setBrand(brand);
			carDao.setAuto_type(auto_type);
			carDao.setAuto_color(auto_color);
			carDao.setRoad_num(road_num);
			carDao.setWeight(weight);
			carDao.setLink_num(link_num);
			carDao.setFrame_now(frame_now);
			carDao.setOil_type(oil_type);
			carDao.setOwn(own);
			carDao.setProduct_addr(product_addr);
			carDao.setTax_date(tax_date);
			carDao.setCheck_end_date(check_end_date);
			carDao.setIn_date(in_date);
			carDao.setBuy_date(buy_date);
			carDao.setOwn_user(own_user);
			carDao.setOwn_team_id(own_team_id);
			carDao.setCheck_date(check_date);
			carDao.setState_code(state_code);
			carDao.setState_code_date(state_code_date);
			carDao.setRsrv_str1(rsrv_str1);
			carDao.setRsrv_str2(rsrv_str2);
			carDao.setRsrv_str3(rsrv_str3);
			carDao.setRsrv_str4(rsrv_str4);
			carDao.setRsrv_str5(rsrv_str5);
			carDao.setRsrv_str8(rsrv_str8);
			carDao.setRsrv_str9(rsrv_str9);
			carDao.setRsrv_str10(rsrv_str10);
			carDao.setOper_date(oper_date);
			carDao.setUser_id(user_id);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -