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

📄 productsecbean.java~3~

📁 这也是师兄的毕业设计,具体的功能我也不清楚,因为我才大一,请见谅!!!!!!!不过是可以用来答辩的,完整的毕业设计,有源代码,可爱执行文件,文档资料.
💻 JAVA~3~
📖 第 1 页 / 共 2 页
字号:
    return col;
  }

  public java.util.Collection find_prod_search(int operation, String type, String content) {
    /**@todo Complete this method*/
    final int name=10,spec=20,id=30,model=40;
    Collection col=null;
 /*   switch(operation){
        case id:
          try{
            productBasicInfoEntRemoteHome home = lookupBasicHome();
           col=home.find_id(type,content);
           prod_pb_infoEntRemoteHome home2=lookupPbInfo();
           //home2.
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

      break;

        case name:
          try{
            productBasicInfoEntRemoteHome home = lookupBasicHome();
           col=home.find_pname(type,content);
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

      break;
        case spec:
          try{
            productBasicInfoEntRemoteHome home = lookupBasicHome();
           col=home.find_spec(type,content);
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

      break;
        case model:
          try{
            productBasicInfoEntRemoteHome home = lookupBasicHome();
           col=home.find_model(type,content);
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

          break;
    }*/
 switch(operation){
        case id:
          try{
            prod_view_searchRemoteHome home = lookupPbview();
           col=home.find_id(type,content);
          // prod_pb_infoEntRemoteHome home2=lookupPbInfo();
           //home2.
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

      break;

        case name:
          try{
            prod_view_searchRemoteHome home = lookupPbview();
           col=home.find_name(type,content);
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

      break;
        case spec:
          try{
           prod_view_searchRemoteHome home = lookupPbview();
           col=home.find_spec(type,content);
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

      break;
        case model:
          try{
            prod_view_searchRemoteHome home = lookupPbview();
           col=home.find_model(type,content);
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.find_prod_search(..):"+e);
           }

          break;
    }



    return col;
  }
  public void del_prod_pk(String pk) {
    /**@todo Complete this method*/
    try{
            productBasicInfoEntPK ppk=new productBasicInfoEntPK(pk);
            productBasicInfoEntRemoteHome home = lookupBasicHome();
            productBasicInfoEntRemote prod=home.findByPrimaryKey(ppk);
            prod.remove();
           }
        catch(Exception e){
           System.out.println("err at product.productSecBean.del_prod(..):"+e);
           }

  }
  public void mod_prod_pk(String p_id, String p_type_id, String p_name, String p_spec, String p_model, String p_unit, Image p_image, String p_remark) {
    /**@todo Complete this method*/
    try{
         productBasicInfoEntPK ppk=new productBasicInfoEntPK(p_id);
         productBasicInfoEntRemoteHome home = lookupBasicHome();
         productBasicInfoEntRemote prod=home.findByPrimaryKey(ppk);
         prod.setP_type_id(p_type_id);
         prod.setP_name(p_name);
         prod.setP_spec(p_spec);
         prod.setP_model(p_model);
         prod.setP_unit(p_unit);
         prod.setP_image(p_image);
         prod.setP_remark(p_remark);
    }
    catch(Exception e){
         System.out.println("err at product.productSecBean.mod_prod_pk(..):"+e);
    }
  }
  public void in_prod_pb(String p_id, float p_tax, int p_amount, int p_maxlow, float p_bprice, float p_sprice, String p_state, String p_depositary) {
    /**@todo Complete this method*/
    try{
      prod_pb_infoEntRemoteHome homedd=lookupPbInfo();
      homedd.create( p_id, p_tax,  p_amount,  p_maxlow,  p_bprice,  p_sprice,  p_state,  p_depositary);
    }
    catch(Exception e){
    System.out.println("err at product.productSecBean.in_prod_pb(..):"+e);
    }
  }
  public void mod_prod_pb(String pid, float tax, int amount, int maxlow, float bprice, float sprice, String state, String depositary) {
    /**@todo Complete this method*/
    try{
      prod_pb_infoEntPK pk=new prod_pb_infoEntPK(pid);
      prod_pb_infoEntRemoteHome homedd=lookupPbInfo();
      prod_pb_infoEntRemote pb=homedd.findByPrimaryKey(pk);
      pb.setP_tax(tax);
      pb.setP_amount(amount);
      pb.setP_maxlow(maxlow);
      pb.setP_bprice(bprice);
      pb.setP_sprice(sprice);
      pb.setP_state(state);
      pb.setP_depositary(depositary);
    }
    catch(Exception e){
    System.out.println("err at product.productSecBean.mod_prod_pb(..):"+e);
    }

  }
  public void del_prod_pb(String pid) {
    /**@todo Complete this method*/
    try{
      prod_pb_infoEntPK pk=new prod_pb_infoEntPK(pid);
      prod_pb_infoEntRemoteHome homedd=lookupPbInfo();
      prod_pb_infoEntRemote pb=homedd.findByPrimaryKey(pk);
      pb.remove();
    }
    catch(Exception e){
    System.out.println("err at product.productSecBean.del_prod_pb(..):"+e);
    }

  }
  public java.util.Collection find_prod_pb_search(String type, String condition, String content) {
    /**@todo Complete this method*/
    //产品编号 1 ,入货日期 2 ,有效日期 3 ,大于 1 ,等于 0 ,小于 -1
    Collection col=null;
    try{
      prod_in_stockRemoteHome home= lookupPbInStock();
      if (type.equals("1")) {
        //if (condition.equals("1")) {col=home.find_bid(content);}
        //else if (condition.equals("0")) {col=home.find_id(content);}
        //else if (condition.equals("-1")) {col=home.find_sid(content);}
      }

   /*   else if (type.equals("2")) {

       if (condition.equals("1")) {col=home.find_bbdate(DateFormat.getInstance().parse(content));}
       else if (condition.equals("0")) {col=home.find_bdate(DateFormat.getInstance().parse(content));}
        else if (condition.equals("-1")) {col=home.find_sbdate(DateFormat.getInstance().parse(content));}

      }
      else if (type.equals("3")) {
       // if (condition.equals("1")) {col=home.find_bvali(DateFormat.getInstance().parse(content));}
        //else if (condition.equals("0")) {col=home.find_vali(DateFormat.getInstance().parse(content));}
        //else if (condition.equals("-1")) {col=home.find_svali(DateFormat.getInstance().parse(content));}
      }*/
    }
    catch(Exception e){
      System.out.println("err at product.productSecBean.find_prod_pb_search(..):"+e);
    }
    return col;
  }
  public void in_prod_in_stock(String pid, int serno, int num, float buyprice, String buydate, String batchno, String validity, String area, String state) {
    /**@todo Complete this method*/
    try{
     prod_in_stockRemoteHome home =lookupPbInStock();
     home.create( pid, serno, num, buyprice,  buydate,  batchno,  validity,  area,  state);
    }
    catch(Exception e){
    System.out.println("err at product.productSecBean.in_prod_in_stock(..):"+e);
  }
  }
  public void mod_prod_in_stock(String pid, int serno, int num, float buyprice, String buydate, String batchno, String validity, String area, String state) {
    /**@todo Complete this method*/
    try{
     prod_in_stockRemoteHome home =lookupPbInStock();
     prod_in_stockPK pk=new prod_in_stockPK(pid,serno);
     prod_in_stockRemote pin=home.findByPrimaryKey(pk);
     pin.setNum(num);
     pin.setBuyprice(buyprice);
     pin.setBuydate(buydate);
     pin.setBatchno(batchno);
     pin.setValidity(validity);
     pin.setArea(area);
    }
    catch(Exception e){
    System.out.println("err at product.productSecBean.mod_prod_in_stock(..):"+e);
  }

  }
  public void del_prod_in_stock(String pid,int serno) {
    /**@todo Complete this method*/
    try{
     prod_in_stockRemoteHome home =lookupPbInStock();
     prod_in_stockPK pk=new prod_in_stockPK(pid,serno);
     prod_in_stockRemote pin=home.findByPrimaryKey(pk);
     pin.remove();
    }
    catch(Exception e){
    System.out.println("err at product.productSecBean.del_prod_in_stock(..):"+e);
  }


  }
  public void find_prod_in_stock(String type, String condition, String content) {
    /**@todo Complete this method*/
  }
  public String   find_prod_in_stock_maxpk() {
    /**@todo Complete this method*/
    return null;
  }
  public void ejbCreate() throws CreateException {
    /**@todo Complete this method*/
  }

}

⌨️ 快捷键说明

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