开票申请价税合计必须和销售发票中价税合计一致
This commit is contained in:
parent
a199fc926f
commit
020adbf51d
|
@ -34,6 +34,7 @@ import nc.itf.bd.bankacc.subinfo.IBankAccSubInfoQueryService;
|
|||
import nc.itf.bd.bankdoc.IBankdocQueryService;
|
||||
import nc.itf.bd.banktype.IBankTypeQueryService;
|
||||
import nc.itf.bd.defdoc.IDefdocQryService;
|
||||
import nc.itf.bd.supplier.baseinfo.ISupplierBaseInfoQryService;
|
||||
import nc.itf.cmp.informer.IInformerManageService;
|
||||
import nc.itf.cmp.informer.IInformerQueryService;
|
||||
import nc.md.persist.framework.IMDPersistenceQueryService;
|
||||
|
@ -235,6 +236,10 @@ public class InformerManageListener implements IBusinessListener {
|
|||
if (existedSrcVOMap.containsKey(((InformerVO)informers.get(k)).getPk_src())) {
|
||||
InformerVO informerVOCreate = (InformerVO)informers.get(k);
|
||||
InformerVO informerVODB = (InformerVO)existedSrcVOMap.get(((InformerVO)informers.get(k)).getPk_src());
|
||||
|
||||
String def01=informerVODB.getDef01();
|
||||
|
||||
informerVOCreate.setDef01(def01);
|
||||
informerVOCreate.setPk_informer(informerVODB.getPk_informer());
|
||||
informerVOCreate.setGenerateflag(informerVODB.getGenerateflag());
|
||||
informerVOCreate.setAssociateflag(informerVODB.getAssociateflag());
|
||||
|
@ -768,19 +773,123 @@ public class InformerManageListener implements IBusinessListener {
|
|||
}
|
||||
|
||||
private void setSuppType(String pk_oppunit, InformerVO informer) throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
SupplierVersionVO supVersionVO = (SupplierVersionVO)this.supplierVersionMap.get(pk_oppunit);
|
||||
CustomerVersionVO custVersionVO = (CustomerVersionVO)this.customerVersionMap.get(pk_oppunit);
|
||||
if (supVersionVO != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.SUPP.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(supVersionVO, "name", (String)null));
|
||||
} else {
|
||||
String vid = this.getSupVidByOidAndDate(pk_oppunit, informer.getInfodate());
|
||||
ISupplierBaseInfoQryService baseQryService = (ISupplierBaseInfoQryService)NCLocator.getInstance().lookup(ISupplierBaseInfoQryService.class);
|
||||
if (vid != null) {
|
||||
SupplierVersionVO supplierVersionVO = baseQryService.querySupplierVersionByVID(vid);
|
||||
if (supplierVersionVO != null && supplierVersionVO.getPk_supplier_v() != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.SUPP.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(supplierVersionVO, "name", (String)null));
|
||||
this.supplierVersionMap.put(pk_oppunit, supplierVersionVO);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (custVersionVO != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.CUST.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(custVersionVO, "name", (String)null));
|
||||
} else {
|
||||
vid = this.getCustVidByOidAndDate(pk_oppunit, informer.getInfodate());
|
||||
if (vid != null) {
|
||||
ICustomerPubService custService = (ICustomerPubService)NCLocator.getInstance().lookup(ICustomerPubService.class);
|
||||
String[] vids = new String[]{vid};
|
||||
CustomerVersionVO[] customerVersionVOs = custService.getCustomerVersionVosByVid(vids, new String[]{"name"});
|
||||
if (customerVersionVOs != null && customerVersionVOs[0].getPk_customer_v() != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.CUST.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(customerVersionVOs[0], "name", (String)null));
|
||||
this.customerVersionMap.put(pk_oppunit, customerVersionVOs[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
informer.setOppunittype(UnitTypeEnum.SUPP.getUnittype());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setCustType(String pk_oppunit, InformerVO informer) throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
SupplierVersionVO supVersionVO = (SupplierVersionVO)this.supplierVersionMap.get(pk_oppunit);
|
||||
CustomerVersionVO custVersionVO = (CustomerVersionVO)this.customerVersionMap.get(pk_oppunit);
|
||||
if (custVersionVO != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.CUST.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(custVersionVO, "name", (String)null));
|
||||
} else {
|
||||
String vid = this.getCustVidByOidAndDate(pk_oppunit, informer.getInfodate());
|
||||
if (vid != null) {
|
||||
ICustomerPubService custService = (ICustomerPubService)NCLocator.getInstance().lookup(ICustomerPubService.class);
|
||||
String[] vids = new String[]{vid};
|
||||
CustomerVersionVO[] customerVersionVOs = custService.getCustomerVersionVosByVid(vids, new String[]{"name"});
|
||||
if (customerVersionVOs != null && customerVersionVOs.length >= 1 && customerVersionVOs[0] != null && customerVersionVOs[0].getPk_customer_v() != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.CUST.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(customerVersionVOs[0], "name", (String)null));
|
||||
this.customerVersionMap.put(pk_oppunit, customerVersionVOs[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (supVersionVO != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.SUPP.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(supVersionVO, "name", (String)null));
|
||||
} else {
|
||||
vid = this.getSupVidByOidAndDate(pk_oppunit, informer.getInfodate());
|
||||
if (vid != null) {
|
||||
ISupplierBaseInfoQryService baseQryService = (ISupplierBaseInfoQryService)NCLocator.getInstance().lookup(ISupplierBaseInfoQryService.class);
|
||||
SupplierVersionVO supplierVersionVO = baseQryService.querySupplierVersionByVID(vid);
|
||||
if (supplierVersionVO != null && supplierVersionVO.getPk_supplier_v() != null) {
|
||||
informer.setOppunittype(UnitTypeEnum.SUPP.getUnittype());
|
||||
informer.setOppunitname(MultiLangUtil.getSuperVONameOfCurrentLang(supplierVersionVO, "name", (String)null));
|
||||
this.supplierVersionMap.put(pk_oppunit, supplierVersionVO);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
informer.setOppunittype(UnitTypeEnum.SUPP.getUnittype());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private BankAccbasVO[] queryBankAcc(String skacc) throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
if (org.apache.commons.lang3.StringUtils.isBlank(skacc)) {
|
||||
return null;
|
||||
} else {
|
||||
ArrayList<BankAccbasVO> list = (ArrayList)this.bankVOMap.get(skacc);
|
||||
if (list != null && list.size() != 0) {
|
||||
return (BankAccbasVO[])list.toArray(new BankAccbasVO[0]);
|
||||
} else {
|
||||
String where = "accnum = '" + skacc + "' and enablestate=2";
|
||||
Collection<BankAccbasVO> col = this.getMDQueryService().queryBillOfVOByCond(BankAccbasVO.class, where, false);
|
||||
ArrayList<BankAccbasVO> newlist = new ArrayList(col);
|
||||
this.bankVOMap.put(skacc, newlist);
|
||||
return col != null && col.size() != 0 ? (BankAccbasVO[])col.toArray(new BankAccbasVO[0]) : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getSubAccPk(BankAccbasVO bankAccbasVO, String pkCurrtype) throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
BankAccSubVO[] subs = bankAccbasVO.getBankaccsub();
|
||||
if (subs == null) {
|
||||
return null;
|
||||
} else {
|
||||
int i = 0;
|
||||
|
||||
for(int len = subs.length; i < len; ++i) {
|
||||
if (subs[i].getAcctype() != null) {
|
||||
if (subs[i].getPk_currtype().equals(pkCurrtype) && subs[i].getAcctype() == 0) {
|
||||
return subs[i].getPk_bankaccsub();
|
||||
}
|
||||
} else if (subs[i].getPk_currtype().equals(pkCurrtype)) {
|
||||
return subs[i].getPk_bankaccsub();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private IMDPersistenceQueryService getMDQueryService() {
|
||||
|
@ -788,19 +897,68 @@ public class InformerManageListener implements IBusinessListener {
|
|||
}
|
||||
|
||||
private String queryCustPkByAcc(Integer accclass, String pk_acc_sub) throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
String pk_cust = (String)this.custPkMap.get(pk_acc_sub);
|
||||
if (pk_cust == null) {
|
||||
CustSupplierVO retVO = this.getCustsupQueryService().queryOuterCustSupByBankAccSub(pk_acc_sub);
|
||||
if (retVO == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
this.custPkMap.put(pk_acc_sub, retVO.getPk_cust_sup());
|
||||
pk_cust = retVO.getPk_cust_sup();
|
||||
}
|
||||
|
||||
return pk_cust;
|
||||
}
|
||||
|
||||
private String queryCustPkByAcc(String pk_financeorg) throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
String Pk_cust_sup = (String)this.custPkMap.get(pk_financeorg);
|
||||
if (Pk_cust_sup == null) {
|
||||
String Pk_cust_sups = this.getCustsupQueryService().queryCustsupPkByOrgPk(pk_financeorg, false);
|
||||
if (Pk_cust_sups == null) {
|
||||
Pk_cust_sups = this.getCustsupQueryService().queryCustsupPkByOrgPk(pk_financeorg, true);
|
||||
if (Pk_cust_sups == null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
this.custPkMap.put(pk_financeorg, Pk_cust_sups);
|
||||
return Pk_cust_sups;
|
||||
} else {
|
||||
return Pk_cust_sup;
|
||||
}
|
||||
}
|
||||
|
||||
private String querySupPkByAcc(String pk_financeorg) throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
String Pk_cust_sup = (String)this.custPkMap.get(pk_financeorg);
|
||||
if (Pk_cust_sup == null) {
|
||||
String Pk_cust_sups = this.getCustsupQueryService().queryCustsupPkByOrgPk(pk_financeorg, true);
|
||||
if (Pk_cust_sups == null) {
|
||||
Pk_cust_sups = this.getCustsupQueryService().queryCustsupPkByOrgPk(pk_financeorg, false);
|
||||
if (Pk_cust_sups == null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
this.custPkMap.put(pk_financeorg, Pk_cust_sups);
|
||||
return Pk_cust_sups;
|
||||
} else {
|
||||
return Pk_cust_sup;
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, BalaTypeVO> getBalaTypeMap() throws BusinessException {
|
||||
// $FF: Couldn't be decompiled
|
||||
if (this.balaTypeMap == null) {
|
||||
this.balaTypeMap = new HashMap();
|
||||
BalaTypeVO[] balaTypeVOs = ((IBalaTypeQueryService)NCLocator.getInstance().lookup(IBalaTypeQueryService.class)).queryAllBalaTypeVOs(false);
|
||||
if (balaTypeVOs != null && balaTypeVOs.length > 0) {
|
||||
for(int i = 0; i < balaTypeVOs.length; ++i) {
|
||||
this.balaTypeMap.put(balaTypeVOs[i].getCode(), balaTypeVOs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this.balaTypeMap;
|
||||
}
|
||||
|
||||
private ICustsupPubService getCustsupQueryService() {
|
||||
|
@ -849,7 +1007,11 @@ public class InformerManageListener implements IBusinessListener {
|
|||
}
|
||||
|
||||
private BaseDAO getBaseDao() {
|
||||
// $FF: Couldn't be decompiled
|
||||
if (this.dao == null) {
|
||||
this.dao = new BaseDAO();
|
||||
}
|
||||
|
||||
return this.dao;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue