📄 xs3202serviceimpl.java
字号:
package jp.com.cost.xs.service.impl;
import jp.com.cost.common.ComTool;
import jp.com.cost.dao.ShipDao;
import jp.com.cost.pojo.Ship;
import jp.com.cost.xs.service.XS3202Service;
import jp.com.cost.xs.web.form.XS3202Form;
/**
* Service类,通过调用ShipDao中的方法实现添加船期信息的功能
*
* @author 彭启刚
* @version 1.0
*/
public class XS3202ServiceImpl implements XS3202Service {
private ShipDao shipDao;
public ShipDao getShipDao() {
return shipDao;
}
public void setShipDao(ShipDao shipDao) {
this.shipDao = shipDao;
}
/**
* 保存添加的船期信息
*
* @param XS3202Form
* xs3202Form--封装了船期信息的ActionForm类
* @return boolean --返回操作结果 成功或失败
*/
public boolean save(XS3202Form xs3202Form) {
// TODO Auto-generated method stub
Ship ship = new Ship();
ship.setAimport(xs3202Form.getAimport());
ship.setArrive(xs3202Form.getArrive());
ship.setBoxcount(xs3202Form.getBoxcount());
ship.setBoxid(xs3202Form.getBoxid());
ship.setBoxweight(xs3202Form.getBoxweight());
ship.setDelstate(ComTool.UDL);
ship.setHavenstop(xs3202Form.getHavenstop());
ship.setLine(xs3202Form.getLine());
ship.setMytel(xs3202Form.getMytel());
ship.setShipcno(xs3202Form.getShipcno());
ship.setShipname(xs3202Form.getShipname());
ship.setShipnumber(xs3202Form.getShipnumber());
ship.setShipoener(xs3202Form.getShipoener());
ship.setStartport(xs3202Form.getStartport());
ship.setStop(xs3202Form.getStop());
ship.setTel(xs3202Form.getTel());
ship.setVoyno(xs3202Form.getVoyno());
ship.setVoytime(xs3202Form.getVoytime());
boolean bln = shipDao.insert(ship);
return bln;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -