|
|
@@ -63,6 +63,7 @@ public class salogis extends PaoCust {
|
|
|
String[] faddress = getDistinctString(paoset, "faddress", true);
|
|
|
String[] fcontact = getDistinctString(paoset, "fcontact", true);
|
|
|
String[] fphonenumber = getDistinctString(paoset, "fphonenumber", true);
|
|
|
+ String[] fsignbacknum = getDistinctString(paoset, "fsignbacknum", true);
|
|
|
if (ffreightstatuss.length > 1) {
|
|
|
throw new P2AppException("", "不可同时添加两种运费状态的发货单");
|
|
|
}
|
|
|
@@ -84,9 +85,12 @@ public class salogis extends PaoCust {
|
|
|
if (fphonenumber.length > 1) {
|
|
|
throw new P2AppException("", "不可同时添加两个不同联系方式的发货单");
|
|
|
}
|
|
|
+ if (fsignbacknum.length > 1) {
|
|
|
+ throw new P2AppException("", "不可同时添加两个回签单的发货单");
|
|
|
+ }
|
|
|
if (!salogisdetailSet.isEmpty()) {
|
|
|
DBConnect dbConnect = new DBConnect();
|
|
|
- Rows rows = dbConnect.runSqlQuery("select t1.faddress,t1.fcontact,t1.fphonenumber from SALOGISDETAIL t1 inner join sainvoice t2 on t1.fsourceid=t2.sainvoiceid and t1.FSOURCEOBJECT='sainvoice'and t1.fparentid=" + getUniqueIDValue());
|
|
|
+ Rows rows = dbConnect.runSqlQuery("select t2.faddress,t2.fcontact,t2.fphonenumber,t2.fsignbacknum from SALOGISDETAIL t1 inner join sainvoice t2 on t1.fsourceid=t2.sainvoiceid and t1.FSOURCEOBJECT='sainvoice'and t1.fparentid=" + getUniqueIDValue());
|
|
|
for (Row row : rows) {
|
|
|
if (faddress.length == 1 && !faddress[0].equals(row.getString("faddress"))) {
|
|
|
throw new P2AppException("", "不可同时添加两个不同收货地址的发货单");
|
|
|
@@ -97,9 +101,11 @@ public class salogis extends PaoCust {
|
|
|
if (fphonenumber.length == 1 && !fphonenumber[0].equals(row.getString("fphonenumber"))) {
|
|
|
throw new P2AppException("", "不可同时添加两个不同联系方式的发货单");
|
|
|
}
|
|
|
+ if (fsignbacknum.length == 1 && !fsignbacknum[0].equals(row.getString("fsignbacknum"))) {
|
|
|
+ throw new P2AppException("", "不可同时添加两个回签单的发货单");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
BatchAdd(paoset, new String[]{"sainvoiceid", "$SAINVOICE"}, salogisdetailSet, new String[]{"fsourceid", "fsourceobject"}, true);
|
|
|
|
|
|
if (!salogisdetailSet.isEmpty()) {
|
|
|
@@ -113,6 +119,7 @@ public class salogis extends PaoCust {
|
|
|
setValue("fprovince", sainvoiceSet.getPao(0).getString("fprovince"), 11L);
|
|
|
setValue("fcity", sainvoiceSet.getPao(0).getString("fcity"), 11L);
|
|
|
setValue("fcounty", sainvoiceSet.getPao(0).getString("fcounty"), 11L);
|
|
|
+ setValue("fsignbacknum", sainvoiceSet.getPao(0).getString("fsignbacknum"), 11L);
|
|
|
}
|
|
|
}
|
|
|
String[] sainvocieids = getStrings(salogisdetailSet, "fsourceid");
|