📄 car_notsqd.java
字号:
package com.t60.oa.service.car;
import java.text.SimpleDateFormat;
import com.t60.oa.po.Apply;
import com.t60.oa.web.car.Car_notsqdForm;
import hong.javanet.dao.HibernateUtil;
import org.hibernate.Session;
import org.apache.commons.beanutils.BeanUtils;
public class Car_notsqd {
private Car_notsqdForm form;
private static SimpleDateFormat sdf =
new SimpleDateFormat("yyyy-MM-dd");
public void car_notsqd() throws Exception {
Session session = HibernateUtil.currentSession();
Apply apply = (Apply) session.load(Apply.class,
new Integer(this.getForm().getId()));
form.setAuser(apply.getAuse().getXm());
form.setCartype(apply.getCartype());
form.setGagebreakout(sdf.format(apply.getGagebreakout()));
form.setGagegiveback(sdf.format(apply.getGagegiveback()));
form.setExcuse(apply.getExcuse());
org.hibernate.Hibernate.initialize(apply.getAuse().getXm());
org.hibernate.Hibernate.initialize(apply.getCartype());
org.hibernate.Hibernate.initialize(apply.getGagebreakout());
org.hibernate.Hibernate.initialize(apply.getGagegiveback());
org.hibernate.Hibernate.initialize(apply.getExcuse());
HibernateUtil.closeSession();
}
public void update() throws Exception{
Session session = HibernateUtil.currentSession();
Apply apply = (Apply) session.load(Apply.class,
new Integer(this.getForm().getId()));
// BeanUtils.copyProperties(apply,form);
apply.setExamine(form.getExamine());
apply.setState("已审批");
session.update(apply);
// HibernateUtil.closeSession();
}
public SimpleDateFormat getSdf() {
return sdf;
}
public Car_notsqdForm getForm() {
return form;
}
public void setSdf(SimpleDateFormat sdf) {
this.sdf = sdf;
}
public void setForm(Car_notsqdForm form) {
this.form = form;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -