Browse Source

生单优化2

zthwr 1 year ago
parent
commit
0649918100

+ 17 - 0
mmpac/mmpac/src/client/u8c/ui/mmpac/action/PushOtherInAction.java

@@ -18,6 +18,7 @@ import nc.vo.hr.tools.pub.HRAggVO;
 import nc.vo.ic.pub.bill.GeneralBillHeaderVO;
 import nc.vo.ic.pub.bill.GeneralBillItemVO;
 import nc.vo.ic.pub.bill.GeneralBillVO;
+import nc.vo.pub.BusinessException;
 import nc.vo.pub.CircularlyAccessibleValueObject;
 import nc.vo.pub.ValidationException;
 import nc.vo.pub.lang.UFBoolean;
@@ -91,6 +92,8 @@ public class PushOtherInAction extends AbstractAction{
 				icheadvo.setAttributeValue("pk_defdoc10", prjcode);
 				//加工单号pk_defdoc2
 				icheadvo.setAttributeValue("pk_defdoc2", headvo.getDef1());
+				//收发类别
+				icheadvo.setCdispatcherid(getpkrdcl("06"));
 				aggvo.setParentVO(icheadvo);
 				GeneralBillItemVO[] itemvos = new GeneralBillItemVO[invos.length];
 //				List<GeneralBillItemVO> lisbillvos=new ArrayList<GeneralBillItemVO>();
@@ -273,4 +276,18 @@ public class PushOtherInAction extends AbstractAction{
 	        }
 	        return pk_jobbasfil;
 	    }
+	 
+	 //收发类别
+	 private String getpkrdcl(String rdcode ) throws BusinessException {
+	  String sql="select pk_rdcl from bd_rdcl where rdcode='"+rdcode+"'  ";
+	  IUAPQueryBS iuap=(IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
+	  
+	  String pk_rdcl = (String) iuap.executeQuery(sql, new ColumnProcessor());
+      if (pk_rdcl == null) {
+          return "";
+      }
+      return pk_rdcl;
+		
+	}
+		
 }

+ 18 - 0
mmpac/mmpac/src/client/u8c/ui/mmpac/action/PushOtherOutAction.java

@@ -5,7 +5,9 @@ import java.util.List;
 
 import nc.bs.framework.common.NCLocator;
 import nc.hr.utils.PubEnv;
+import nc.itf.uap.IUAPQueryBS;
 import nc.itf.uap.IVOPersistence;
+import nc.jdbc.framework.processor.ColumnProcessor;
 import nc.ui.hr.frame.FrameUI;
 import nc.ui.hr.frame.action.AbstractAction;
 import nc.ui.hr.frame.impl.MainBillMgrPanel;
@@ -16,6 +18,7 @@ import nc.vo.hr.tools.pub.HRAggVO;
 import nc.vo.ic.pub.bill.GeneralBillHeaderVO;
 import nc.vo.ic.pub.bill.GeneralBillItemVO;
 import nc.vo.ic.pub.bill.GeneralBillVO;
+import nc.vo.pub.BusinessException;
 import nc.vo.pub.CircularlyAccessibleValueObject;
 import nc.vo.pub.ValidationException;
 import nc.vo.pub.lang.UFBoolean;
@@ -82,6 +85,8 @@ public class PushOtherOutAction extends AbstractAction{
 				icheadvo.setFbillflag(2);
 				icheadvo.setFreplenishflag(UFBoolean.FALSE);
 				icheadvo.setCoperatoridnow(PubEnv.getPk_user());
+				//收发类别
+				icheadvo.setCdispatcherid(getpkrdcl("07"));
 				
 				//项目编码 pk_defdoc9
 				icheadvo.setAttributeValue("pk_defdoc9", prjcode);
@@ -233,4 +238,17 @@ public class PushOtherOutAction extends AbstractAction{
 		return outArrays;
 	}
 
+	
+	//收发类别
+	private String getpkrdcl(String rdcode ) throws BusinessException {
+	  String sql="select pk_rdcl from bd_rdcl where rdcode='"+rdcode+"'  ";
+	  IUAPQueryBS iuap=(IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
+	  
+	  String pk_rdcl = (String) iuap.executeQuery(sql, new ColumnProcessor());
+      if (pk_rdcl == null) {
+          return "";
+      }
+      return pk_rdcl;
+		
+	}
 }

+ 17 - 0
mmpac/mmpac/src/client/u8c/ui/mmpac/action/ToMaterialOutDialog.java

@@ -421,6 +421,9 @@ public class ToMaterialOutDialog extends UIDialog implements ActionListener,Bill
 				icheadvo.setAttributeValue("pk_defdoc10", prjcode);
 				//加工单号pk_defdoc2
 				icheadvo.setAttributeValue("pk_defdoc2", headvo.getDef1());
+				//收发类别
+				icheadvo.setCdispatcherid(getpkrdcl("03"));
+//				icheadvo.setCdispatchername("");
 				//仓库ID
 				if("工装".equals(billtype)) {
 				//	icheadvo.setCwarehouseid("1001V51000000000039Z");//仓库必填
@@ -640,6 +643,20 @@ public class ToMaterialOutDialog extends UIDialog implements ActionListener,Bill
       return pk_measdoc;
 		
 	}
+	
+	//收发类别
+	private String getpkrdcl(String rdcode ) throws BusinessException {
+	  String sql="select pk_rdcl from bd_rdcl where rdcode='"+rdcode+"'  ";
+	  IUAPQueryBS iuap=(IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
+	  
+	  String pk_rdcl = (String) iuap.executeQuery(sql, new ColumnProcessor());
+      if (pk_rdcl == null) {
+          return "";
+      }
+      return pk_rdcl;
+		
+	}
+	
 
 }