|
@@ -118,11 +118,19 @@ public class PushOtherOutAction extends AbstractAction{
|
|
OrderOtheroutVO outvo = outvos[i];
|
|
OrderOtheroutVO outvo = outvos[i];
|
|
//校验已执行数量等于主数量不让再执行生单操作
|
|
//校验已执行数量等于主数量不让再执行生单操作
|
|
UFDouble exenumvo=outvo.getExecnum()==null?UFDouble.ZERO_DBL: new UFDouble (outvo.getExecnum());//已执行数量
|
|
UFDouble exenumvo=outvo.getExecnum()==null?UFDouble.ZERO_DBL: new UFDouble (outvo.getExecnum());//已执行数量
|
|
- if(new UFDouble (outvo.getNum()).sub(exenumvo).compareTo(UFDouble.ZERO_DBL)<=0) {
|
|
|
|
- MessageDialog.showErrorDlg(frameUI, "失败", "已经生成其他入库单,不允许重复生成!");
|
|
|
|
- return;
|
|
|
|
|
|
+ if(!outvo.getCmaterialcode().startsWith("MA")) {
|
|
|
|
+ if(new UFDouble (outvo.getNum()).sub(exenumvo).compareTo(UFDouble.ZERO_DBL)<=0) {
|
|
|
|
+ MessageDialog.showErrorDlg(frameUI, "失败", "已经生成其他出库单,不允许重复生成!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ UFDouble execnastnum=outvo.getExecnastnum()==null?UFDouble.ZERO_DBL: new UFDouble (outvo.getExecnastnum());//已执行辅数量
|
|
|
|
+ if(new UFDouble (outvo.getNastnum()).sub(execnastnum).compareTo(UFDouble.ZERO_DBL)<=0) {
|
|
|
|
+ MessageDialog.showErrorDlg(frameUI, "失败", "已经生成其他出库单,不允许重复生成!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
GeneralBillItemVO itemvo = new GeneralBillItemVO();
|
|
GeneralBillItemVO itemvo = new GeneralBillItemVO();
|
|
String cmaterialcode = outvo.getCmaterialcode();
|
|
String cmaterialcode = outvo.getCmaterialcode();
|
|
String pk_invbasdoc = "";//存货pk
|
|
String pk_invbasdoc = "";//存货pk
|
|
@@ -158,11 +166,14 @@ public class PushOtherOutAction extends AbstractAction{
|
|
itemvo.setBzgflag(UFBoolean.FALSE);
|
|
itemvo.setBzgflag(UFBoolean.FALSE);
|
|
itemvo.setCbodybilltypecode("4I");
|
|
itemvo.setCbodybilltypecode("4I");
|
|
// itemvo.setCbodywarehouseid("1001V5100000000003A1");
|
|
// itemvo.setCbodywarehouseid("1001V5100000000003A1");
|
|
|
|
+ String storcode="";
|
|
//仓库ID
|
|
//仓库ID
|
|
if("工装".equals(billtype)) {
|
|
if("工装".equals(billtype)) {
|
|
icheadvo.setCwarehouseid(GetBaseDAOUtil.getstordocpk("GZ001"));//仓库必填
|
|
icheadvo.setCwarehouseid(GetBaseDAOUtil.getstordocpk("GZ001"));//仓库必填
|
|
|
|
+ storcode="GZ001";
|
|
}else if("家装".equals(billtype)) {
|
|
}else if("家装".equals(billtype)) {
|
|
icheadvo.setCwarehouseid(GetBaseDAOUtil.getstordocpk("JZ002"));//仓库必填
|
|
icheadvo.setCwarehouseid(GetBaseDAOUtil.getstordocpk("JZ002"));//仓库必填
|
|
|
|
+ storcode="JZ002";
|
|
}
|
|
}
|
|
itemvo.setCfirstbillhid(pk_order);
|
|
itemvo.setCfirstbillhid(pk_order);
|
|
itemvo.setCfirstbillbid(outvo.getPrimaryKey());
|
|
itemvo.setCfirstbillbid(outvo.getPrimaryKey());
|
|
@@ -194,7 +205,7 @@ public class PushOtherOutAction extends AbstractAction{
|
|
if(cmaterialcode.startsWith("MA")) {
|
|
if(cmaterialcode.startsWith("MA")) {
|
|
InvbasdocVO invbasvo = GetBaseDAOUtil.getInvVO(cmaterialcode);
|
|
InvbasdocVO invbasvo = GetBaseDAOUtil.getInvVO(cmaterialcode);
|
|
String pk_invbasdoc2 = invbasvo.getPrimaryKey();
|
|
String pk_invbasdoc2 = invbasvo.getPrimaryKey();
|
|
- Object objbdef6 =getHandNum("1001", billtype, pk_invbasdoc2, vbatcode,
|
|
|
|
|
|
+ Object objbdef6 =getHandNum("1001", storcode, pk_invbasdoc2, vbatcode,
|
|
outvo.getColor(), outvo.getSizing(), outvo.getAlloy(), outvo.getStandard());//现存量换算率
|
|
outvo.getColor(), outvo.getSizing(), outvo.getAlloy(), outvo.getStandard());//现存量换算率
|
|
if(null==objbdef6 || "".equals(objbdef6.toString())) {
|
|
if(null==objbdef6 || "".equals(objbdef6.toString())) {
|
|
MessageDialog.showErrorDlg(frameUI, "错误", "MA开头的现存量未查询到!无法计算换算率!");
|
|
MessageDialog.showErrorDlg(frameUI, "错误", "MA开头的现存量未查询到!无法计算换算率!");
|