📄 billinfobusiness.java
字号:
for (Object object : ls) {
BillInfo billinfo=(BillInfo)object;
MarsBillInfoForm billf=new MarsBillInfoForm();
billf.setBillid(billinfo.getBillId().toString());
//创建货物集合对象
Vector vccg=new Vector();
//获取货票货物集合
Set cargovs=billinfo.getCargoVectors();
if(cargovs!=null||!cargovs.isEmpty())
{
Iterator it=cargovs.iterator();
//获取货票货物对象
while(it.hasNext())
{
CargoVector cargovc=(CargoVector)it.next();
CargoInfo cargo=cargovc.getCargoInfo();
MarsCargoInfoForm cargof=new MarsCargoInfoForm();
cargof.setCargoid(cargo.getCargoId().toString());
cargof.setCargoname(cargo.getCargoName());
cargof.setCargoweight(cargo.getCargoWeight());
cargof.setCargobulk(cargo.getCargoBulk());
cargof.setCargonum(cargo.getCargoNum());
cargof.setCargounit(cargo.getCargoUnit());
cargof.setCargovalue(cargo.getCargoValue());
cargof.setCargofreight(cargo.getCargoFreight());
cargof.setCargoamends(cargo.getCargoAmends());
cargof.setCargomemo(cargo.getCargoMemo());
cargof.setCargostate(cargo.getCargoState().toString());
cargof.setBranchid(cargo.getBranchInfo().getBranchId().toString());
cargof.setBranchname(cargo.getBranchInfo().getBranchName());
cargof.setCargostartdata(cargo.getCargoStartData());
cargof.setCargoenddata(cargo.getCargoEndData());
vccg.add(cargof);
}
}
//获取发货用户信息
billf.setSendid(billinfo.getCustomerInfoBySendId().getCustomerId().toString());
billf.setSendcusname(billinfo.getCustomerInfoBySendId().getCustomerName());
billf.setReceiveid(billinfo.getCustomerInfoByReceiveId().getCustomerId().toString());
//获取收货用户信息
billf.setReceivecusname(billinfo.getCustomerInfoByReceiveId().getCustomerName());
billf.setTruckline(billinfo.getTruckLine());
billf.setPayername(billinfo.getPayerName());
billf.setUserid(billinfo.getUserInfo().getUserId().toString());
billf.setUsername(billinfo.getUserInfo().getUserName());
billf.setBilldata(billinfo.getBillData());
billf.setBillstateid(billinfo.getBillState().getBillStateId().toString());
billf.setBillstatename(billinfo.getBillState().getBillStateName());
billf.setBillmemo(billinfo.getBillMemo());
//获取发货分公司信息
billf.setSendbranchname(billinfo.getBranchInfoBySendBranchId().getBranchName());
//获取收货分公司信息
billf.setReceivebranchname(billinfo.getBranchInfoByReceiveBranchId().getBranchName());
billf.setCgvcs(vccg);
billvc.add(billf);
}
return billvc;
}
//按公司(发货),制单时间,货票状态查发货的货票
public Vector findBySendBranch(String branchid,String billstartdata,String billenddata,String billstateid)
{
BranchInfo branch=daos.getBranchinfodao().findById(new Integer(branchid));
BillState billstate=daos.getBillstatedao().findById(new Integer(billstateid));
Vector billvc=new Vector();
List ls=daos.getBillinfodao().findBySendBranch(branch, billstartdata, billenddata, billstate);
for (Object object : ls) {
BillInfo billinfo=(BillInfo)object;
MarsBillInfoForm billf=new MarsBillInfoForm();
billf.setBillid(billinfo.getBillId().toString());
//创建货物集合对象
Vector vccg=new Vector();
//获取货票货物集合
Set cargovs=billinfo.getCargoVectors();
if(cargovs!=null||!cargovs.isEmpty())
{
Iterator it=cargovs.iterator();
//获取货票货物对象
while(it.hasNext())
{
CargoVector cargovc=(CargoVector)it.next();
CargoInfo cargo=cargovc.getCargoInfo();
MarsCargoInfoForm cargof=new MarsCargoInfoForm();
cargof.setCargoid(cargo.getCargoId().toString());
cargof.setCargoname(cargo.getCargoName());
cargof.setCargoweight(cargo.getCargoWeight());
cargof.setCargobulk(cargo.getCargoBulk());
cargof.setCargonum(cargo.getCargoNum());
cargof.setCargounit(cargo.getCargoUnit());
cargof.setCargovalue(cargo.getCargoValue());
cargof.setCargofreight(cargo.getCargoFreight());
cargof.setCargoamends(cargo.getCargoAmends());
cargof.setCargomemo(cargo.getCargoMemo());
cargof.setCargostate(cargo.getCargoState().toString());
cargof.setBranchid(cargo.getBranchInfo().getBranchId().toString());
cargof.setBranchname(cargo.getBranchInfo().getBranchName());
cargof.setCargostartdata(cargo.getCargoStartData());
cargof.setCargoenddata(cargo.getCargoEndData());
vccg.add(cargof);
}
}
//获取发货用户信息
billf.setSendid(billinfo.getCustomerInfoBySendId().getCustomerId().toString());
billf.setSendcusname(billinfo.getCustomerInfoBySendId().getCustomerName());
billf.setReceiveid(billinfo.getCustomerInfoByReceiveId().getCustomerId().toString());
//获取收货用户信息
billf.setReceivecusname(billinfo.getCustomerInfoByReceiveId().getCustomerName());
billf.setTruckline(billinfo.getTruckLine());
billf.setPayername(billinfo.getPayerName());
billf.setUserid(billinfo.getUserInfo().getUserId().toString());
billf.setUsername(billinfo.getUserInfo().getUserName());
billf.setBilldata(billinfo.getBillData());
billf.setBillstateid(billinfo.getBillState().getBillStateId().toString());
billf.setBillstatename(billinfo.getBillState().getBillStateName());
billf.setBillmemo(billinfo.getBillMemo());
//获取发货分公司信息
billf.setSendbranchname(billinfo.getBranchInfoBySendBranchId().getBranchName());
//获取收货分公司信息
billf.setReceivebranchname(billinfo.getBranchInfoByReceiveBranchId().getBranchName());
billf.setCgvcs(vccg);
billvc.add(billf);
}
return billvc;
}
//按公司(收货),制单时间查收货的货票
public Vector findByReceiveBranch(String branchid,String billstartdata,String billenddata)
{
BranchInfo branch=daos.getBranchinfodao().findById(new Integer(branchid));
Vector billvc=new Vector();
List ls=daos.getBillinfodao().findByReceiveBranch(branch, billstartdata, billenddata);
for (Object object : ls) {
BillInfo billinfo=(BillInfo)object;
MarsBillInfoForm billf=new MarsBillInfoForm();
billf.setBillid(billinfo.getBillId().toString());
//创建货物集合对象
Vector vccg=new Vector();
//获取货票货物集合
Set cargovs=billinfo.getCargoVectors();
if(cargovs!=null||!cargovs.isEmpty())
{
Iterator it=cargovs.iterator();
//获取货票货物对象
while(it.hasNext())
{
CargoVector cargovc=(CargoVector)it.next();
CargoInfo cargo=cargovc.getCargoInfo();
MarsCargoInfoForm cargof=new MarsCargoInfoForm();
cargof.setCargoid(cargo.getCargoId().toString());
cargof.setCargoname(cargo.getCargoName());
cargof.setCargoweight(cargo.getCargoWeight());
cargof.setCargobulk(cargo.getCargoBulk());
cargof.setCargonum(cargo.getCargoNum());
cargof.setCargounit(cargo.getCargoUnit());
cargof.setCargovalue(cargo.getCargoValue());
cargof.setCargofreight(cargo.getCargoFreight());
cargof.setCargoamends(cargo.getCargoAmends());
cargof.setCargomemo(cargo.getCargoMemo());
cargof.setCargostate(cargo.getCargoState().toString());
cargof.setBranchid(cargo.getBranchInfo().getBranchId().toString());
cargof.setBranchname(cargo.getBranchInfo().getBranchName());
cargof.setCargostartdata(cargo.getCargoStartData());
cargof.setCargoenddata(cargo.getCargoEndData());
vccg.add(cargof);
}
}
//获取发货用户信息
billf.setSendid(billinfo.getCustomerInfoBySendId().getCustomerId().toString());
billf.setSendcusname(billinfo.getCustomerInfoBySendId().getCustomerName());
billf.setReceiveid(billinfo.getCustomerInfoByReceiveId().getCustomerId().toString());
//获取收货用户信息
billf.setReceivecusname(billinfo.getCustomerInfoByReceiveId().getCustomerName());
billf.setTruckline(billinfo.getTruckLine());
billf.setPayername(billinfo.getPayerName());
billf.setUserid(billinfo.getUserInfo().getUserId().toString());
billf.setUsername(billinfo.getUserInfo().getUserName());
billf.setBilldata(billinfo.getBillData());
billf.setBillstateid(billinfo.getBillState().getBillStateId().toString());
billf.setBillstatename(billinfo.getBillState().getBillStateName());
billf.setBillmemo(billinfo.getBillMemo());
//获取发货分公司信息
billf.setSendbranchname(billinfo.getBranchInfoBySendBranchId().getBranchName());
//获取收货分公司信息
billf.setReceivebranchname(billinfo.getBranchInfoByReceiveBranchId().getBranchName());
billf.setCgvcs(vccg);
billvc.add(billf);
}
return billvc;
}
//按公司(收货),制单时间,货票状态,查收货的货票
public Vector findByReceiveBranch(String branchid,String billstartdata,String billenddata,String billstateid)
{
BranchInfo branch=daos.getBranchinfodao().findById(new Integer(branchid));
BillState billstate=daos.getBillstatedao().findById(new Integer(billstateid));
Vector billvc=new Vector();
List ls=daos.getBillinfodao().findByReceiveBranch(branch, billstartdata, billenddata, billstate);
for (Object object : ls) {
BillInfo billinfo=(BillInfo)object;
MarsBillInfoForm billf=new MarsBillInfoForm();
billf.setBillid(billinfo.getBillId().toString());
//创建货物集合对象
Vector vccg=new Vector();
//获取货票货物集合
Set cargovs=billinfo.getCargoVectors();
if(cargovs!=null||!cargovs.isEmpty())
{
Iterator it=cargovs.iterator();
//获取货票货物对象
while(it.hasNext())
{
CargoVector cargovc=(CargoVector)it.next();
CargoInfo cargo=cargovc.getCargoInfo();
MarsCargoInfoForm cargof=new MarsCargoInfoForm();
cargof.setCargoid(cargo.getCargoId().toString());
cargof.setCargoname(cargo.getCargoName());
cargof.setCargoweight(cargo.getCargoWeight());
cargof.setCargobulk(cargo.getCargoBulk());
cargof.setCargonum(cargo.getCargoNum());
cargof.setCargounit(cargo.getCargoUnit());
cargof.setCargovalue(cargo.getCargoValue());
cargof.setCargofreight(cargo.getCargoFreight());
cargof.setCargoamends(cargo.getCargoAmends());
cargof.setCargomemo(cargo.getCargoMemo());
cargof.setCargostate(cargo.getCargoState().toString());
cargof.setBranchid(cargo.getBranchInfo().getBranchId().toString());
cargof.setBranchname(cargo.getBranchInfo().getBranchName());
cargof.setCargostartdata(cargo.getCargoStartData());
cargof.setCargoenddata(cargo.getCargoEndData());
vccg.add(cargof);
}
}
//获取发货用户信息
billf.setSendid(billinfo.getCustomerInfoBySendId().getCustomerId().toString());
billf.setSendcusname(billinfo.getCustomerInfoBySendId().getCustomerName());
billf.setReceiveid(billinfo.getCustomerInfoByReceiveId().getCustomerId().toString());
//获取收货用户信息
billf.setReceivecusname(billinfo.getCustomerInfoByReceiveId().getCustomerName());
billf.setTruckline(billinfo.getTruckLine());
billf.setPayername(billinfo.getPayerName());
billf.setUserid(billinfo.getUserInfo().getUserId().toString());
billf.setUsername(billinfo.getUserInfo().getUserName());
billf.setBilldata(billinfo.getBillData());
billf.setBillstateid(billinfo.getBillState().getBillStateId().toString());
billf.setBillstatename(billinfo.getBillState().getBillStateName());
billf.setBillmemo(billinfo.getBillMemo());
//获取发货分公司信息
billf.setSendbranchname(billinfo.getBranchInfoBySendBranchId().getBranchName());
//获取收货分公司信息
billf.setReceivebranchname(billinfo.getBranchInfoByReceiveBranchId().getBranchName());
billf.setCgvcs(vccg);
billvc.add(billf);
}
return billvc;
}
//按客户,制单时间查所有货票信息
public Vector findByCustomer(String customerid,String billstartdata,String billenddata,String branchid)
{
BranchInfo branch=daos.getBranchinfodao().findById(new Integer(branchid));
CustomerInfo customer=daos.getCustomerinfodao().findById(new Integer(customerid));
Vector billvc=new Vector();
List ls=daos.getBillinfodao().findByCustomer(customer, billstartdata, billenddata,branch);
for (Object object : ls) {
BillInfo billinfo=(BillInfo)object;
MarsBillInfoForm billf=new MarsBillInfoForm();
billf.setBillid(billinfo.getBillId().toString());
//创建货物集合对象
Vector vccg=new Vector();
//获取货票货物集合
Set cargovs=billinfo.getCargoVectors();
if(cargovs!=null||!cargovs.isEmpty())
{
Iterator it=cargovs.iterator();
//获取货票货物对象
while(it.hasNext())
{
CargoVector cargovc=(CargoVector)it.next();
CargoInfo cargo=cargovc.getCargoInfo();
MarsCargoInfoForm cargof=new MarsCargoInfoForm();
cargof.setCargoid(cargo.getCargoId().toString());
cargof.setCargoname(cargo.getCargoName());
cargof.setCargoweight(cargo.getCargoWeight());
cargof.setCargobulk(cargo.getCargoBulk());
cargof.setCargonum(cargo.getCargoNum());
cargof.setCargounit(cargo.getCargoUnit());
cargof.setCargovalue(cargo.getCargoValue());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -