| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- package hyconfirmationorder;
- import baseclass.PaoCust;
- import p2.p2server.P2Server;
- import p2.pao.PaoRemote;
- import p2.pao.PaoSet;
- import p2.pao.PaoSetRemote;
- import p2.util.P2Exception;
- import tmaxbillnum.tmaxbillnum;
- import java.util.Date;
- public class hyconfirmationorder extends PaoCust {
- /**
- * ¹¹Ô캯Êý
- *
- * @param arg0
- */
- public hyconfirmationorder(PaoSet arg0) {
- super(arg0);
- }
- @Override
- protected void save() throws P2Exception {
- super.save();
- }
- @Override
- public void init() throws P2Exception {
- super.init();
- }
- @Override
- public void add() throws P2Exception {
- super.add();
- PaoSetRemote hyordernode = getOwner().getPaoSet("HYORDERNODE");
- hyordernode.setWhere("ischilden=0");
- hyordernode.setOrderBy("FROWNUM desc");
- hyordernode.reset();
- if(!hyordernode.isEmpty())
- setValue("fnotes",hyordernode.getPao(0).getString("fnotes"),11l);
- setValue("fbillnum",getbillnum(),11l);
- setValue("fstatus","н¨",11l);
- }
- public String getbillnum() throws P2Exception {
- PaoSetRemote maxbill = P2Server.getP2Server().getPaoSet("tmaxbillnum",
- getUserInfo());
- maxbill.setInsertSite(getSite());
- maxbill.setWhere("app='hyconfirmationorder' and siteid='" + getString("siteid") + "'");
- maxbill.reset();
- PaoRemote pao = null;
- if (maxbill.isEmpty()) {
- pao = maxbill.addAtEnd();
- pao.setValue("FSERIALNUM", 1);
- pao.setValue("APP", "hyconfirmationorder");
- pao.setValue("FLENGTH", 10);
- } else {
- pao = maxbill.getPao(0);
- }
- String billnum = ((tmaxbillnum) pao).getBillNum();
- maxbill.save();
- return billnum;
- }
- @Override
- public void fieldAction(Object paoField, String fieldname) throws P2Exception {
- super.fieldAction(paoField, fieldname);
- }
- @Override
- public void fieldValidate(Object paoField, String fieldname) throws P2Exception {
- super.fieldValidate(paoField, fieldname);
- }
- @Override
- public void delete() throws P2Exception {
- super.delete();
- }
- public void submit(boolean issubmit,String hrid) throws P2Exception {
- super.submit(issubmit);
- if(issubmit){
- setValue("fstatus","Ìá½»",11l);
- setValue("submitdate",new Date(),11l);
- setValue("submitby",hrid,11l);
- }
- }
- }
|