Merge remote-tracking branch 'origin/main'

This commit is contained in:
李正@用友 2025-05-08 16:27:31 +08:00
commit d58c28ea49
1 changed files with 234 additions and 220 deletions

View File

@ -5,12 +5,6 @@
package nccloud.web.sscivm.ivsale.application.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import nc.bs.framework.common.NCLocator;
import nc.bs.framework.exception.ComponentException;
import nc.bs.sscivm.logger.SSCIVMLogger;
@ -22,11 +16,7 @@ import nc.itf.bd.cust.freecust.IFreeCustQueryService;
import nc.itf.bd.material.baseinfo.IMaterialBaseInfoQueryService;
import nc.itf.uap.IUAPQueryBS;
import nc.pubitf.para.SysInitQuery;
import nc.pubitf.uapbd.IAddressPubService;
import nc.pubitf.uapbd.ICustomerPubService;
import nc.pubitf.uapbd.IMaterialPubService;
import nc.pubitf.uapbd.ISupplierPubService;
import nc.pubitf.uapbd.TaxcodeUtil;
import nc.pubitf.uapbd.*;
import nc.pubitf.uapbd.taxcode.TaxcodeTaxrateQueryVO;
import nc.pubitf.uapbd.taxcode.TaxrateQueryVO;
import nc.vo.bd.address.AddressVO;
@ -65,6 +55,7 @@ import nccloud.framework.web.ui.pattern.billcard.CardBodyAfterEditEvent;
import nccloud.framework.web.ui.pattern.billcard.CardHeadAfterEditEvent;
import nccloud.framework.web.ui.pattern.form.Form;
import nccloud.framework.web.ui.pattern.form.FormAfterEditEvent;
import nccloud.framework.web.ui.pattern.grid.ChangedRow;
import nccloud.framework.web.ui.pattern.grid.Grid;
import nccloud.framework.web.ui.pattern.grid.GridAfterEditEvent;
import nccloud.itf.sscivm.ivsale.service.IVApplicationQueryService;
@ -73,10 +64,14 @@ import nccloud.web.sscivm.invoice.util.InvoiceMainUtil;
import org.apache.commons.lang3.StringUtils;
import uap.json.JSONObject;
import java.util.*;
public class DataChangeLogic {
public DataChangeLogic() {
}
private static List<Row> rowArr = new ArrayList<>();
public static void setViewScala(BillCard card) throws Exception {
Form hTable = card.getHead();
Grid bTable = card.getBody();
@ -348,7 +343,16 @@ public class DataChangeLogic {
bTable = bodyEvent.getCard().getBody();
field = bodyEvent.getAttrcode();
newValue = bodyEvent.getChangedrows()[0].getNewvalue() == null ? "" : bodyEvent.getChangedrows()[0].getNewvalue().getValue();
row = bodyEvent.getRow(bodyEvent.getChangedrows()[0]);
ChangedRow[] changedrows = bodyEvent.getChangedrows();
if (changedrows.length > 1) {
for (ChangedRow changedrow : changedrows) {
Row row1 = bodyEvent.getRow(changedrow);
rowArr.add(row1);
}
} else {
rowArr.clear();
row = bodyEvent.getRow(changedrows[0]);
}
} else if ("form".equals(changeType)) {
FormAfterEditEvent formEvent = (FormAfterEditEvent) afterEditEvent;
hTable = formEvent.getForm();
@ -420,7 +424,22 @@ public class DataChangeLogic {
String pk_freeCustom = String.valueOf(newValue);
afterEditHeadFreeCustom(hTable, bTable, pk_freeCustom);
}
if (rowArr != null && rowArr.size() > 1) {
// 如果改变了多行循环处理
for (Row row1 : rowArr) {
setBodySpecField(tableID, field, hTable, bTable, row1, vo, pageCode);
}
} else {
setBodySpecField(tableID, field, hTable, bTable, row, vo, pageCode);
}
BillCard billcard = new BillCard();
billcard.setHead(hTable);
billcard.setBody(bTable);
return billcard;
}
private static void setBodySpecField(String tableID, String field, Form hTable, Grid bTable, Row row, IVApplicationAggVO vo, String pageCode) throws Exception {
if ("body".equals(tableID) && field.equals("xmdj")) {
afterEditBodyMoney(hTable, bTable, row, field);
totalBodyMoney(hTable, bTable);
@ -449,11 +468,6 @@ public class DataChangeLogic {
} else if ("body".equals(tableID) && field.equals("taxcode")) {
afterEditBodyTaxcode(hTable, bTable, row, field);
}
BillCard billcard = new BillCard();
billcard.setHead(hTable);
billcard.setBody(bTable);
return billcard;
}
private static void afterEditHeadGMFYHZHH(Form hTable, String gmf_yh, String gmf_zhh) {