往来核销处理-为借方和贷方列表增加币种字段
This commit is contained in:
parent
056f5780af
commit
4be53545da
|
@ -0,0 +1,789 @@
|
||||||
|
/*336L/tOhma6VzKP3mxHcEkAXkBRqJpb8XsF1elPHMJ2c/NcdtKK6mxZmzuL3bjcU*/
|
||||||
|
package nccloud.pubimpl.gl.lightgl.verify;
|
||||||
|
|
||||||
|
import nc.bs.dao.BaseDAO;
|
||||||
|
import nc.bs.framework.common.InvocationInfoProxy;
|
||||||
|
import nc.bs.framework.common.NCLocator;
|
||||||
|
import nc.bs.gl.voucher.DetailServiceBO;
|
||||||
|
import nc.gl.utils.GLMultiLangUtil;
|
||||||
|
import nc.itf.gl.pub.IFreevaluePub;
|
||||||
|
import nc.itf.gl.voucher.IVoucher;
|
||||||
|
import nc.jdbc.framework.processor.MapListProcessor;
|
||||||
|
import nc.md.MDBaseQueryFacade;
|
||||||
|
import nc.md.model.IBean;
|
||||||
|
import nc.md.model.MetaDataException;
|
||||||
|
import nc.vo.bd.accassitem.AccAssItemVO;
|
||||||
|
import nc.vo.bd.accessor.IBDData;
|
||||||
|
import nc.vo.fipub.freevalue.Module;
|
||||||
|
import nc.vo.fipub.freevalue.accountbook.proxy.AccountBookUtil;
|
||||||
|
import nc.vo.fipub.timecontrol.TimeUnit;
|
||||||
|
import nc.vo.fipub.utils.AccountCalendarUtils;
|
||||||
|
import nc.vo.fipub.utils.StrTools;
|
||||||
|
import nc.vo.gateway60.accountbook.GlOrgUtils;
|
||||||
|
import nc.vo.gateway60.itfs.AccountUtilGL;
|
||||||
|
import nc.vo.gateway60.itfs.Currency;
|
||||||
|
import nc.vo.gateway60.pub.GlBusinessException;
|
||||||
|
import nc.vo.gl.ageanalysis.AgeAnalysisVO;
|
||||||
|
import nc.vo.gl.pubvoucher.DetailVO;
|
||||||
|
import nc.vo.gl.pubvoucher.VoucherVO;
|
||||||
|
import nc.vo.gl.verbalance.BalanceFilterVO;
|
||||||
|
import nc.vo.gl.verbalance.VerBalanceVO;
|
||||||
|
import nc.vo.gl.verbalance.VerDetailFilterVO;
|
||||||
|
import nc.vo.glcom.ass.AssVO;
|
||||||
|
import nc.vo.glcom.tools.GLPubProxy;
|
||||||
|
import nc.vo.glrp.pub.ParaVO;
|
||||||
|
import nc.vo.glrp.pub.VerifyMsg;
|
||||||
|
import nc.vo.glrp.verify.FilterCondVO;
|
||||||
|
import nc.vo.glrp.verify.GlVerifyDisplogVO;
|
||||||
|
import nc.vo.glrp.verify.VerifyDetailVO;
|
||||||
|
import nc.vo.glrp.verifyobj.ObjQryVO;
|
||||||
|
import nc.vo.glrp.verifyobj.VerifyObjHeaderVO;
|
||||||
|
import nc.vo.glrp.verifyobj.VerifyObjItemVO;
|
||||||
|
import nc.vo.glrp.verifyobj.VerifyObjVO;
|
||||||
|
import nc.vo.jcom.lang.StringUtil;
|
||||||
|
import nc.vo.ml.NCLangRes4VoTransl;
|
||||||
|
import nc.vo.pub.BusinessException;
|
||||||
|
import nc.vo.pub.CircularlyAccessibleValueObject;
|
||||||
|
import nc.vo.pub.lang.UFBoolean;
|
||||||
|
import nc.vo.pub.lang.UFDate;
|
||||||
|
import nccloud.baseapp.core.log.NCCForUAPLogger;
|
||||||
|
import nccloud.dto.gl.verify.VerifyDetailWebVO;
|
||||||
|
import nccloud.dto.gl.verify.VerifyDisplogWebVO;
|
||||||
|
import nccloud.dto.gl.verify.VerifyInfoWebVO;
|
||||||
|
import nccloud.pub.gl.lightgl.IColumnInfo;
|
||||||
|
import nccloud.pubimpl.gl.account.AccountRepUtil;
|
||||||
|
import nccloud.pubitf.gl.lightgl.verify.IVerifyWebService;
|
||||||
|
import nccloud.pubitf.gl.lightgl.voucher.IVoucherWebQryService;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class VerifyWebServiceImpl implements IVerifyWebService {
|
||||||
|
|
||||||
|
public static int COLUMNNAME = 0; // 显示名称
|
||||||
|
public static int COLUMNCODE = 1; // 显示编码
|
||||||
|
public static int COLUMNALL = 2; // 显示编码+名称
|
||||||
|
|
||||||
|
public final static String PROPERTYID = "PROPERTYID";
|
||||||
|
public final static String STARTUNIT = "STARTUNIT";
|
||||||
|
public final static String ENDUNIT = "ENDUNIT";
|
||||||
|
public final static String UNIT = "UNIT";
|
||||||
|
public final static String DESCR = "DESCR";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryRtVerifyData(String pk_voucher, String pk_detail, String date) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
VoucherVO voucher = NCLocator.getInstance().lookup(IVoucher.class).findByPrimaryKey(pk_voucher);
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook(voucher.getPk_accountingbook());
|
||||||
|
|
||||||
|
if (voucher != null) {
|
||||||
|
DetailVO rtdetail = null;
|
||||||
|
for (DetailVO detailvo : voucher.getDetails()) {
|
||||||
|
if (detailvo.getPrimaryKey().equals(pk_detail)) {
|
||||||
|
rtdetail = detailvo;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rtdetail != null) {
|
||||||
|
Object[] bizzData = new DetailServiceBO().getRtVerifyData(rtdetail, verifyModel.getFilterVOEx(rtdetail, date));
|
||||||
|
if (bizzData == null)
|
||||||
|
throw new BusinessException(nc.vo.glrp.pub.VerifyMsg.getMSG_CANNTVERIFY());
|
||||||
|
else if (verifyModel.isDataLegal((VerifyDetailVO) bizzData[0], (VerifyObjVO) bizzData[1])) {
|
||||||
|
VerifyDetailVO verifyDetailVO = (VerifyDetailVO) bizzData[0];
|
||||||
|
verifyModel.setVerifyDetailVO(verifyDetailVO);
|
||||||
|
resultMap = getReusltMap(rtdetail, verifyModel, bizzData, true);
|
||||||
|
} else {
|
||||||
|
throw new GlBusinessException(nc.vo.glrp.pub.VerifyMsg.getMSG_CANNTVERIFY());
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
throw new GlBusinessException(nc.vo.glrp.pub.VerifyMsg.getMSG_CANNTVERIFY());
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, Object> getReusltMap(DetailVO detail, GlVerifyWebModel verifyModel,
|
||||||
|
Object[] bizzData, Boolean rtVerify) throws BusinessException, MetaDataException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
nc.vo.glrp.com.verify.IVerifyVO[][] v = (nc.vo.glrp.com.verify.IVerifyVO[][]) bizzData[3];
|
||||||
|
Map[][] webvo = new Map[][]{verifyModel.appendDetailInfo((VerifyDetailVO[]) v[0]),
|
||||||
|
verifyModel.appendDetailInfo((VerifyDetailVO[]) v[1])};
|
||||||
|
VerifyObjVO verifyObjVO = (VerifyObjVO) bizzData[1];
|
||||||
|
VerifyObjHeaderVO headvo = (VerifyObjHeaderVO) verifyObjVO.getParentVO();
|
||||||
|
IBDData[] data = AccountUtilGL.getAccDocByPks(new String[]{headvo.getPk_accsubj()},
|
||||||
|
(new UFDate(InvocationInfoProxy.getInstance().getBizDateTime())).toStdString());
|
||||||
|
if (data != null && data.length > 0) {
|
||||||
|
headvo.setAccSubjCode(data[0].getCode());
|
||||||
|
headvo.setAccSubjName(GLMultiLangUtil.getMultiName(AccountUtilGL.findByPrimaryKey(detail.getPk_accasoa())));
|
||||||
|
}
|
||||||
|
FilterCondVO conVO = (FilterCondVO) bizzData[2];
|
||||||
|
if (conVO.getAssvos() != null) {
|
||||||
|
AssVO[] assvos = conVO.getAssvos();
|
||||||
|
for (AssVO assVO : assvos) {
|
||||||
|
IBean bean = MDBaseQueryFacade.getInstance().getBeanByID(assVO.getM_classid());
|
||||||
|
String fullName = bean.getFullName();
|
||||||
|
// 参照的refcode临时放入userdata
|
||||||
|
assVO.setUserData(fullName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (conVO.getCreditCond().getAssvos() != null) {
|
||||||
|
AssVO[] assvos = conVO.getCreditCond().getAssvos();
|
||||||
|
for (AssVO assVO : assvos) {
|
||||||
|
IBean bean = MDBaseQueryFacade.getInstance().getBeanByID(assVO.getM_classid());
|
||||||
|
String fullName = bean.getFullName();
|
||||||
|
// 参照的refcode临时放入userdata
|
||||||
|
assVO.setUserData(fullName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (conVO.getDebitCond().getAssvos() != null) {
|
||||||
|
AssVO[] assvos = conVO.getDebitCond().getAssvos();
|
||||||
|
for (AssVO assVO : assvos) {
|
||||||
|
IBean bean = MDBaseQueryFacade.getInstance().getBeanByID(assVO.getM_classid());
|
||||||
|
String fullName = bean.getFullName();
|
||||||
|
// 参照的refcode临时放入userdata
|
||||||
|
assVO.setUserData(fullName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rtVerify) {
|
||||||
|
Map<String, Object> condMap = new LinkedHashMap<String, Object>();
|
||||||
|
condMap.put("pk_accountingbook", detail.getPk_accountingbook());
|
||||||
|
condMap.put("accountingbookName", AccountBookUtil.getAccountingBookNameByPk(detail.getPk_accountingbook()));
|
||||||
|
condMap.put("pk_units", new String[]{detail.getPk_unit()});
|
||||||
|
condMap.put("pk_unitName", GLMultiLangUtil.getMultiName(GlOrgUtils.getOrgByPk(detail.getPk_unit())));
|
||||||
|
condMap.put("pk_accasoa", ((VerifyObjHeaderVO) verifyObjVO.getParentVO()).getPk_accsubj());
|
||||||
|
condMap.put("accountName", ((VerifyObjHeaderVO) verifyObjVO.getParentVO()).getAccSubjName());
|
||||||
|
|
||||||
|
ParaVO paraVO = GLPubProxy.getRemoteVerifyobj().initEnvirment(detail.getPk_accountingbook());
|
||||||
|
if (paraVO.getDateName().equalsIgnoreCase("VoucherDate")) {
|
||||||
|
condMap.put("dateType", "prepareddate");
|
||||||
|
condMap.put("end_date", verifyModel.getVerifyDetailvo().getPrepareddate().toStdString());
|
||||||
|
} else {
|
||||||
|
condMap.put("dateType", "Businessdate");
|
||||||
|
condMap.put("end_date", verifyModel.getVerifyDetailvo().getBusinessdate().toStdString());
|
||||||
|
}
|
||||||
|
condMap.put("cmbMnyType", VerifyMsg.getDISP_ORIGIN());
|
||||||
|
String pk_currency = detail.getPk_currtype();
|
||||||
|
condMap.put("pk_currency", pk_currency);
|
||||||
|
condMap.put("currName", GLMultiLangUtil.getMultiName(Currency.getCurrInfo(pk_currency)));
|
||||||
|
condMap.put("hasTally", "Y");
|
||||||
|
condMap.put("pk_detail", detail.getPk_detail());
|
||||||
|
|
||||||
|
AccAssItemVO[] assItems = NCLocator.getInstance().lookup(IVoucherWebQryService.class).queryAssItemByAsoaPk(
|
||||||
|
((VerifyObjHeaderVO) verifyObjVO.getParentVO()).getPk_accsubj(),
|
||||||
|
AccountCalendarUtils.getStdDate());
|
||||||
|
Map<String, AccAssItemVO> accassMap = new HashMap<String, AccAssItemVO>();
|
||||||
|
if (assItems != null && assItems.length > 0) {
|
||||||
|
for (AccAssItemVO accAssItemVO : assItems) {
|
||||||
|
accassMap.put(accAssItemVO.getPk_accassitem(), accAssItemVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AssVO[] assvos = detail.getAss();
|
||||||
|
List<Map<String, Object>> asslist = new ArrayList<Map<String, Object>>();
|
||||||
|
if (assvos != null && assvos.length > 0) {
|
||||||
|
for (AssVO vo : assvos) {
|
||||||
|
Map<String, Object> assMap = new HashMap<String, Object>();
|
||||||
|
assMap.put("checktypecode", vo.getChecktypecode());
|
||||||
|
assMap.put("checktypename", vo.getChecktypename());
|
||||||
|
assMap.put("checkvaluecode", vo.getCheckvaluecode());
|
||||||
|
assMap.put("checkvaluename", vo.getCheckvaluename());
|
||||||
|
assMap.put("innerCode", vo.getInnerCode());
|
||||||
|
assMap.put("note1", vo.getnote1());
|
||||||
|
assMap.put("note2", vo.getnote2());
|
||||||
|
assMap.put("pk_Checktype", vo.getPk_Checktype());
|
||||||
|
assMap.put("pk_Checkvalue", vo.getPk_Checkvalue());
|
||||||
|
assMap.put("m_metaClassid", vo.getM_metaClassid());
|
||||||
|
assMap.put("userData", vo.getUserData());
|
||||||
|
assMap.put("m_classid", vo.getM_classid());
|
||||||
|
assMap.put("refnodename", accassMap.get(vo.getPk_Checktype()) == null ? null : accassMap.get(vo.getPk_Checktype()).getRefnodename());
|
||||||
|
asslist.add(assMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
condMap.put("ass", asslist.toArray());
|
||||||
|
if (detail.getDirection()) {
|
||||||
|
condMap.put("cmbDirect", "1");
|
||||||
|
} else {
|
||||||
|
condMap.put("cmbDirect", "0");
|
||||||
|
}
|
||||||
|
condMap.put("type", nc.vo.glrp.pub.VerifyMsg.TYPE_TIMELY);
|
||||||
|
resultMap.put("conVO", condMap);
|
||||||
|
}
|
||||||
|
Map<String, String> accountingbookMap = new HashMap<String, String>();
|
||||||
|
accountingbookMap.put("name", AccountBookUtil.getAccountingBookNameByPk(detail.getPk_accountingbook()));
|
||||||
|
accountingbookMap.put("pk_accountingbook", detail.getPk_accountingbook());
|
||||||
|
resultMap.put("accountingBook", accountingbookMap);
|
||||||
|
resultMap.put("verifyObj", bizzData[1]);
|
||||||
|
resultMap.put("debit", webvo[0]);
|
||||||
|
resultMap.put("credit", webvo[1]);
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryVerifyDatas(Map<String, Object> varMap) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook((String) varMap.get("pk_accountingbook"));
|
||||||
|
verifyModel.checkQryCond(varMap);
|
||||||
|
verifyModel.onQuery(verifyModel.getFilterVO(varMap));
|
||||||
|
Map<String, Map<String, Object>>[] creditInfo = verifyModel.getCreditVerifyWebInfo();
|
||||||
|
Map<String, Map<String, Object>>[] debitInfo = verifyModel.getDebitVerifyWebInfo();
|
||||||
|
setCurrTypeNameForVerify(creditInfo, debitInfo);
|
||||||
|
resultMap.put("credit", creditInfo);
|
||||||
|
resultMap.put("debit", debitInfo);
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> onVerify(VerifyInfoWebVO verifyInfoWebVO) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook((String) verifyInfoWebVO.getCondition().get("pk_accountingbook"));
|
||||||
|
verifyModel.checkVerifyObj(verifyInfoWebVO.getCondition());
|
||||||
|
VerifyDetailVO[] creditVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getCredit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
VerifyDetailVO[] debitVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getDebit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
verifyModel.setCreditVerify(creditVerifyVOs);
|
||||||
|
verifyModel.setDebitVerify(debitVerifyVOs);
|
||||||
|
verifyModel.onVerify();
|
||||||
|
verifyModel.onQuery(verifyModel.getFilterVO(verifyInfoWebVO.getCondition()));
|
||||||
|
resultMap.put("credit", verifyModel.getCreditVerifyWebInfo());
|
||||||
|
resultMap.put("debit", verifyModel.getDebitVerifyWebInfo());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> onAutoVerify(VerifyInfoWebVO verifyInfoWebVO) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook((String) verifyInfoWebVO.getCondition().get("pk_accountingbook"));
|
||||||
|
verifyModel.checkVerifyObj(verifyInfoWebVO.getCondition());
|
||||||
|
VerifyDetailVO[] creditVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getCredit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
VerifyDetailVO[] debitVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getDebit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
verifyModel.setCreditVerify(creditVerifyVOs);
|
||||||
|
verifyModel.setDebitVerify(debitVerifyVOs);
|
||||||
|
verifyModel.setVerifyStandardVO(verifyModel.getStandardVO(verifyInfoWebVO.getStandard()));
|
||||||
|
verifyModel.onAutoVerify();
|
||||||
|
verifyModel.onQuery(verifyModel.getFilterVO(verifyInfoWebVO.getCondition()));
|
||||||
|
resultMap.put("credit", verifyModel.getCreditVerifyWebInfo());
|
||||||
|
resultMap.put("debit", verifyModel.getDebitVerifyWebInfo());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryHistoryDatas(Map<String, Object> varMap) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook((String) varMap.get("pk_accountingbook"));
|
||||||
|
verifyModel.checkHistoryCondition(varMap);
|
||||||
|
verifyModel.onQueryHisRecord(verifyModel.getCondVO(varMap));
|
||||||
|
verifyModel.setSumLogs(verifyModel.appendLogInfo(verifyModel.getHistroySumData()));
|
||||||
|
verifyModel.setDetailLogsWeb(verifyModel.appendLogInfo(verifyModel.getHistroyData()));
|
||||||
|
resultMap.put("historySumData", verifyModel.getSumLogs());
|
||||||
|
resultMap.put("historyData", verifyModel.getDetailLogsWeb());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> unVerify(VerifyInfoWebVO verifyInfoWebVO) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook((String) verifyInfoWebVO.getCondition().get("pk_accountingbook"));
|
||||||
|
VerifyDisplogWebVO[] displogWebVOs = verifyInfoWebVO.getDisplogVO().toArray(new VerifyDisplogWebVO[0]);
|
||||||
|
GlVerifyDisplogVO[] verifyDisplogVOs = verifyModel.transferWebToDispLogVO(displogWebVOs);
|
||||||
|
verifyModel.setHistroyData(verifyDisplogVOs);
|
||||||
|
verifyModel.unVerify();
|
||||||
|
verifyModel.onQueryHisRecord(verifyModel.getCondVO(verifyInfoWebVO.getCondition()));
|
||||||
|
verifyModel.setSumLogs(verifyModel.appendLogInfo(verifyModel.getHistroySumData()));
|
||||||
|
verifyModel.setDetailLogsWeb(verifyModel.appendLogInfo(verifyModel.getHistroyData()));
|
||||||
|
resultMap.put("historySumData", verifyModel.getSumLogs());
|
||||||
|
resultMap.put("historyData", verifyModel.getDetailLogsWeb());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> onRedBlue(VerifyInfoWebVO verifyInfoWebVO)
|
||||||
|
throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook((String) verifyInfoWebVO.getCondition().get("pk_accountingbook"));
|
||||||
|
VerifyDetailVO[] creditVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getCredit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
VerifyDetailVO[] debitVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getDebit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
verifyModel.setCreditVerify(creditVerifyVOs);
|
||||||
|
verifyModel.setDebitVerify(debitVerifyVOs);
|
||||||
|
verifyModel.onRedBlue(verifyInfoWebVO.getCondition());
|
||||||
|
verifyModel.onQuery(verifyModel.getFilterVO(verifyInfoWebVO.getCondition()));
|
||||||
|
resultMap.put("credit", verifyModel.getCreditVerifyWebInfo());
|
||||||
|
resultMap.put("debit", verifyModel.getDebitVerifyWebInfo());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> onAutoRedBlue(VerifyInfoWebVO verifyInfoWebVO)
|
||||||
|
throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook((String) verifyInfoWebVO.getCondition().get("pk_accountingbook"));
|
||||||
|
verifyModel.checkVerifyObj(verifyInfoWebVO.getCondition());
|
||||||
|
VerifyDetailVO[] creditVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getCredit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
VerifyDetailVO[] debitVerifyVOs = verifyModel.transferWebToVO(verifyInfoWebVO.getDebit().toArray(new VerifyDetailWebVO[0]));
|
||||||
|
verifyModel.setCreditVerify(creditVerifyVOs);
|
||||||
|
verifyModel.setDebitVerify(debitVerifyVOs);
|
||||||
|
verifyModel.setVerifyStandardVO(verifyModel.getStandardVO(verifyInfoWebVO.getStandard()));
|
||||||
|
if (debitVerifyVOs != null && debitVerifyVOs.length > 0)
|
||||||
|
verifyModel.onAutoRedBlue(true);
|
||||||
|
if (creditVerifyVOs != null && creditVerifyVOs.length > 0)
|
||||||
|
verifyModel.onAutoRedBlue(false);
|
||||||
|
verifyModel.onQuery(verifyModel.getFilterVO(verifyInfoWebVO.getCondition()));
|
||||||
|
resultMap.put("credit", verifyModel.getCreditVerifyWebInfo());
|
||||||
|
resultMap.put("debit", verifyModel.getDebitVerifyWebInfo());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> verBalanceQuery(Map<String, Object> varMap) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
VerBalanceWebModel balanceModel = new VerBalanceWebModel();
|
||||||
|
String pk_accountingbook = (String) varMap.get("pk_accountingbook");
|
||||||
|
String pagecode = (String) varMap.get("pagecode");
|
||||||
|
balanceModel.setPk_accountingbook(pk_accountingbook);
|
||||||
|
BalanceFilterVO balanceFilterVO = balanceModel.getFilterVO(varMap);
|
||||||
|
balanceModel.getHeadData(balanceFilterVO, resultMap);
|
||||||
|
Map<String, Object>[] balanceVOs = null;
|
||||||
|
if (balanceFilterVO.getDirect() == BalanceFilterVO.DIRECTION_BOTH) {
|
||||||
|
balanceVOs = balanceModel.onQueryTwo(balanceFilterVO);
|
||||||
|
} else {
|
||||||
|
balanceVOs = balanceModel.onQuery(balanceFilterVO);
|
||||||
|
}
|
||||||
|
resultMap.put("balanceVO", balanceVOs);
|
||||||
|
if (balanceVOs != null) {
|
||||||
|
for (Map<String, Object> verBalanceWebVO : balanceVOs) {
|
||||||
|
verBalanceWebVO.put("link", new HashMap<String, Object>());
|
||||||
|
if (verBalanceWebVO.get("m_Pk_verifydetail") != null) {
|
||||||
|
((Map<String, Object>) verBalanceWebVO.get("link")).put("m_Pk_verifydetail", verBalanceWebVO.get("m_Pk_verifydetail"));
|
||||||
|
verBalanceWebVO.remove("m_Pk_verifydetail");
|
||||||
|
}
|
||||||
|
verBalanceWebVO.remove("m_Flag");
|
||||||
|
verBalanceWebVO.remove("assid");
|
||||||
|
verBalanceWebVO.remove("m_VouchTypepk");
|
||||||
|
verBalanceWebVO.remove("m_Balancecreditamount");
|
||||||
|
verBalanceWebVO.remove("m_Balancecreditquantity");
|
||||||
|
verBalanceWebVO.remove("m_Balancelocalcreditamount");
|
||||||
|
verBalanceWebVO.remove("m_Balancedebitamount");
|
||||||
|
verBalanceWebVO.remove("m_Balancedebitquantity");
|
||||||
|
verBalanceWebVO.remove("m_Balancelocaldebitamount");
|
||||||
|
verBalanceWebVO.remove("m_Businessdate");
|
||||||
|
if (verBalanceWebVO.get("m_Creditamount") != null) {
|
||||||
|
((Map<String, Object>) verBalanceWebVO.get("link")).put("m_Creditamount", verBalanceWebVO.get("m_Creditamount"));
|
||||||
|
verBalanceWebVO.remove("m_Creditamount");
|
||||||
|
}
|
||||||
|
if (verBalanceWebVO.get("m_Debitamount") != null) {
|
||||||
|
((Map<String, Object>) verBalanceWebVO.get("link")).put("m_Debitamount", verBalanceWebVO.get("m_Debitamount"));
|
||||||
|
verBalanceWebVO.remove("m_Debitamount");
|
||||||
|
}
|
||||||
|
if (verBalanceWebVO.get("m_Explanation") != null)
|
||||||
|
((Map<String, Object>) verBalanceWebVO.get("link")).put("m_Explanation", verBalanceWebVO.get("m_Explanation"));
|
||||||
|
if (verBalanceWebVO.get("m_Localcreditamount") != null) {
|
||||||
|
((Map<String, Object>) verBalanceWebVO.get("link")).put("m_Localcreditamount", verBalanceWebVO.get("m_Localcreditamount"));
|
||||||
|
verBalanceWebVO.remove("m_Localcreditamount");
|
||||||
|
}
|
||||||
|
if (verBalanceWebVO.get("m_Localdebitamount") != null) {
|
||||||
|
((Map<String, Object>) verBalanceWebVO.get("link")).put("m_Localdebitamount", verBalanceWebVO.get("m_Localdebitamount"));
|
||||||
|
verBalanceWebVO.remove("m_Localdebitamount");
|
||||||
|
}
|
||||||
|
verBalanceWebVO.remove("groupcreditamount");
|
||||||
|
verBalanceWebVO.remove("groupdebitamount");
|
||||||
|
verBalanceWebVO.remove("globalcreditamount");
|
||||||
|
verBalanceWebVO.remove("globaldebitamount");
|
||||||
|
if (verBalanceWebVO.get("m_Pk_accsubj") != null) {
|
||||||
|
((Map<String, Object>) verBalanceWebVO.get("link")).put("m_Pk_accsubj", verBalanceWebVO.get("m_Pk_accsubj"));
|
||||||
|
verBalanceWebVO.remove("m_Pk_accsubj");
|
||||||
|
}
|
||||||
|
verBalanceWebVO.remove("m_Pk_corp");
|
||||||
|
verBalanceWebVO.remove("m_Pk_currtype");
|
||||||
|
verBalanceWebVO.remove("m_Pk_detail");
|
||||||
|
verBalanceWebVO.remove("m_Pk_manager");
|
||||||
|
verBalanceWebVO.remove("m_Pk_prepared");
|
||||||
|
verBalanceWebVO.remove("m_Pk_sob");
|
||||||
|
verBalanceWebVO.remove("m_Pk_voucher");
|
||||||
|
verBalanceWebVO.remove("m_Pk_vouchertype");
|
||||||
|
verBalanceWebVO.remove("m_Prepareddate");
|
||||||
|
verBalanceWebVO.remove("m_userData");
|
||||||
|
verBalanceWebVO.remove("m_Balanceamount");
|
||||||
|
verBalanceWebVO.remove("m_Balancequantity");
|
||||||
|
verBalanceWebVO.remove("m_Balancelocalamount");
|
||||||
|
verBalanceWebVO.remove("m_Balancebalanceamount");
|
||||||
|
verBalanceWebVO.remove("m_Balancebalancequantity");
|
||||||
|
verBalanceWebVO.remove("m_Balancelocalbalanceamount");
|
||||||
|
verBalanceWebVO.remove("pk_unit");
|
||||||
|
verBalanceWebVO.remove("pk_unit_v");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Map<String, IColumnInfo> columnMap = balanceModel.getColumnName(balanceFilterVO, VerifyWebServiceImpl.COLUMNNAME);
|
||||||
|
Map<String, IColumnInfo> column1Map = balanceModel.getColumnName(balanceFilterVO, VerifyWebServiceImpl.COLUMNCODE);
|
||||||
|
Map<String, IColumnInfo> column2Map = balanceModel.getColumnName(balanceFilterVO, VerifyWebServiceImpl.COLUMNALL);
|
||||||
|
if (!StrTools.isEmptyStr(pagecode)) {
|
||||||
|
AccountRepUtil.resetColumnWidth(columnMap.values(), pagecode);
|
||||||
|
AccountRepUtil.resetColumnWidth(column1Map.values(), pagecode);
|
||||||
|
AccountRepUtil.resetColumnWidth(column2Map.values(), pagecode);
|
||||||
|
}
|
||||||
|
resultMap.put("columnInfo", columnMap.values());
|
||||||
|
resultMap.put("columnInfo1", column1Map.values());
|
||||||
|
resultMap.put("columnInfo2", column2Map.values());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> verDetailQuery(Map<String, Object> varMap) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
VerDetailWebModel detailModel = new VerDetailWebModel();
|
||||||
|
String pk_accountingbook = (String) varMap.get("pk_accountingbook");
|
||||||
|
String pagecode = (String) varMap.get("pagecode");
|
||||||
|
detailModel.setPk_accountingbook(pk_accountingbook);
|
||||||
|
VerDetailFilterVO detailFilterVO = detailModel.getFilterVO(varMap);
|
||||||
|
detailModel.getHeadData(detailFilterVO, resultMap);
|
||||||
|
Map[] detailVOs = null;
|
||||||
|
detailVOs = detailModel.onQuery(detailFilterVO);
|
||||||
|
resultMap.put("detailVO", detailVOs);
|
||||||
|
Map<String, IColumnInfo> columnMap = detailModel.getColumnName(detailFilterVO, VerifyWebServiceImpl.COLUMNNAME);
|
||||||
|
Map<String, IColumnInfo> column1Map = detailModel.getColumnName(detailFilterVO, VerifyWebServiceImpl.COLUMNCODE);
|
||||||
|
Map<String, IColumnInfo> column2Map = detailModel.getColumnName(detailFilterVO, VerifyWebServiceImpl.COLUMNALL);
|
||||||
|
if (!StrTools.isEmptyStr(pagecode)) {
|
||||||
|
AccountRepUtil.resetColumnWidth(columnMap.values(), pagecode);
|
||||||
|
AccountRepUtil.resetColumnWidth(column1Map.values(), pagecode);
|
||||||
|
AccountRepUtil.resetColumnWidth(column2Map.values(), pagecode);
|
||||||
|
}
|
||||||
|
resultMap.put("columnInfo", columnMap.values());
|
||||||
|
resultMap.put("columnInfo1", column1Map.values());
|
||||||
|
resultMap.put("columnInfo2", column2Map.values());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> verDetailLinkQuery(VerifyInfoWebVO verifyInfoWebVO) throws BusinessException {
|
||||||
|
VerBalanceVO verBalanceVO = verifyInfoWebVO.getVerBalanceVO();
|
||||||
|
if (verBalanceVO.getExplanation().indexOf(
|
||||||
|
NCLangRes4VoTransl.getNCLangRes().getStrByID("2002365804", "UPP2002365804-000046")/*
|
||||||
|
* @res "小计"
|
||||||
|
*/) >= 0
|
||||||
|
|| verBalanceVO.getExplanation().equals(
|
||||||
|
NCLangRes4VoTransl.getNCLangRes().getStrByID("2002365804", "UPP2002365804-000047")/*
|
||||||
|
* @res "科目小计"
|
||||||
|
*/)
|
||||||
|
|| verBalanceVO.getExplanation().equals(
|
||||||
|
NCLangRes4VoTransl.getNCLangRes().getStrByID("2002365804", "UPP2002365804-000048")/*
|
||||||
|
* @res "总计"
|
||||||
|
*/)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
VerBalanceWebModel balanceModel = new VerBalanceWebModel();
|
||||||
|
String pk_accountingbook = (String) verifyInfoWebVO.getCondition().get("pk_accountingbook");
|
||||||
|
balanceModel.setPk_accountingbook(pk_accountingbook);
|
||||||
|
BalanceFilterVO balanceFilterVO = balanceModel.getFilterVO(verifyInfoWebVO.getCondition());
|
||||||
|
VerDetailFilterVO detailFilterVO = balanceModel.transferVerDetailFilterVO(balanceFilterVO, verBalanceVO);
|
||||||
|
|
||||||
|
VerDetailWebModel detailModel = new VerDetailWebModel();
|
||||||
|
detailModel.setPk_accountingbook(pk_accountingbook);
|
||||||
|
detailModel.getHeadData(detailFilterVO, resultMap);
|
||||||
|
Map[] detailVOs = detailModel.onQueryDetail(detailFilterVO, verBalanceVO.getPk_verifydetail());
|
||||||
|
resultMap.put("detailVO", detailVOs);
|
||||||
|
Map<String, IColumnInfo> columnMap = detailModel.getColumnName(detailFilterVO, VerifyWebServiceImpl.COLUMNNAME);
|
||||||
|
Map<String, IColumnInfo> column1Map = detailModel.getColumnName(detailFilterVO, VerifyWebServiceImpl.COLUMNCODE);
|
||||||
|
Map<String, IColumnInfo> column2Map = detailModel.getColumnName(detailFilterVO, VerifyWebServiceImpl.COLUMNALL);
|
||||||
|
resultMap.put("columnInfo", columnMap.values());
|
||||||
|
resultMap.put("columnInfo1", column1Map.values());
|
||||||
|
resultMap.put("columnInfo2", column2Map.values());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> onQuery(Map<String, Object> varMap) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
AccountAgeAnalysisWebModel accountAgeModel = new AccountAgeAnalysisWebModel();
|
||||||
|
String pagecode = (String) varMap.get("pagecode");
|
||||||
|
Object[] objPk_accountbooks = ((List) varMap.get("pk_accountingbook")).toArray();
|
||||||
|
String pk_accountingbook = (String) objPk_accountbooks[0];
|
||||||
|
accountAgeModel.setPk_accountingbook(pk_accountingbook);
|
||||||
|
CircularlyAccessibleValueObject[] vo = accountAgeModel.onQuery(false, varMap);
|
||||||
|
accountAgeModel.getHeadData(resultMap);
|
||||||
|
resultMap.put("totalVO", accountAgeModel.transferDynamicData(vo));
|
||||||
|
if (vo != null && vo.length > 0) {
|
||||||
|
Map<String, IColumnInfo> columnMap = accountAgeModel.getColumnName(((AgeAnalysisVO) vo[0]).getColumnCodes(), VerifyWebServiceImpl.COLUMNNAME);
|
||||||
|
Map<String, IColumnInfo> column1Map = accountAgeModel.getColumnName(((AgeAnalysisVO) vo[0]).getColumnCodes(), VerifyWebServiceImpl.COLUMNCODE);
|
||||||
|
Map<String, IColumnInfo> column2Map = accountAgeModel.getColumnName(((AgeAnalysisVO) vo[0]).getColumnCodes(), VerifyWebServiceImpl.COLUMNALL);
|
||||||
|
if (!StrTools.isEmptyStr(pagecode)) {
|
||||||
|
AccountRepUtil.resetColumnWidth(columnMap.values(), pagecode);
|
||||||
|
AccountRepUtil.resetColumnWidth(column1Map.values(), pagecode);
|
||||||
|
AccountRepUtil.resetColumnWidth(column2Map.values(), pagecode);
|
||||||
|
}
|
||||||
|
resultMap.put("columnInfo", columnMap.values());
|
||||||
|
resultMap.put("columnInfo1", column1Map.values());
|
||||||
|
resultMap.put("columnInfo2", column2Map.values());
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> onDetailed(Map<String, Object> varMap) throws BusinessException {
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
AccountAgeAnalysisWebModel accountAgeModel = new AccountAgeAnalysisWebModel();
|
||||||
|
Object[] objPk_accountbooks = ((List<?>) varMap.get("pk_accountingbook")).toArray();
|
||||||
|
String pk_accountingbook = (String) objPk_accountbooks[0];
|
||||||
|
accountAgeModel.setPk_accountingbook(pk_accountingbook);
|
||||||
|
CircularlyAccessibleValueObject[] vo = accountAgeModel.onDetailed(varMap);
|
||||||
|
accountAgeModel.getHeadData(resultMap);
|
||||||
|
resultMap.put("detailVO", accountAgeModel.transferDynamicData(vo));
|
||||||
|
if (vo != null && vo.length > 0) {
|
||||||
|
Map<String, IColumnInfo> columnMap = accountAgeModel.getColumnName(((AgeAnalysisVO) vo[0]).getColumnCodes(), VerifyWebServiceImpl.COLUMNNAME);
|
||||||
|
Map<String, IColumnInfo> column1Map = accountAgeModel.getColumnName(((AgeAnalysisVO) vo[0]).getColumnCodes(), VerifyWebServiceImpl.COLUMNCODE);
|
||||||
|
Map<String, IColumnInfo> column2Map = accountAgeModel.getColumnName(((AgeAnalysisVO) vo[0]).getColumnCodes(), VerifyWebServiceImpl.COLUMNALL);
|
||||||
|
resultMap.put("columnInfo", columnMap.values());
|
||||||
|
resultMap.put("columnInfo1", column1Map.values());
|
||||||
|
resultMap.put("columnInfo2", column2Map.values());
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> refVerify(DetailVO selDetail, String busidate) throws BusinessException {
|
||||||
|
Map<String, Object> reusltMap = new HashMap<String, Object>();
|
||||||
|
// DetailVO selDetail = voucher.getDetail(selectIndex);
|
||||||
|
if (selDetail.getPk_accasoa() == null) {
|
||||||
|
throw new BusinessException(nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("20021005",
|
||||||
|
"UPT2002100573-900063")/*
|
||||||
|
* @ res "当前分录科目尚未选择,不能进行参照核销!"
|
||||||
|
*/);
|
||||||
|
}
|
||||||
|
if (selDetail.getIsmatched() != null && selDetail.getIsmatched().equals(UFBoolean.TRUE)) {
|
||||||
|
throw new BusinessException(nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("20021005",
|
||||||
|
"UPT2002100573-900070")/*
|
||||||
|
* @ res "当前分录已有后续业务,不能进行参照核销!"
|
||||||
|
*/);
|
||||||
|
}
|
||||||
|
String pks[] = AccountUtilGL.findAccountPathToRootPks(selDetail.getPk_accountingbook(), selDetail.getPk_accasoa(), selDetail.getPrepareddate().toString());
|
||||||
|
ArrayList<String> l = new ArrayList<String>();
|
||||||
|
l.add(selDetail.getPk_accasoa());
|
||||||
|
if (pks != null)
|
||||||
|
for (String pk : pks)
|
||||||
|
l.add(pk);
|
||||||
|
DetailVO detail = (DetailVO) selDetail.clone();
|
||||||
|
ObjQryVO qryVO = new ObjQryVO();
|
||||||
|
qryVO.setPk_glorgbook(selDetail.getPk_accountingbook());
|
||||||
|
qryVO.setPk_accSubjs(l.toArray(new String[0]));
|
||||||
|
VerifyObjVO verifyObj = GLPubProxy.getRemoteVerifyobj().findObjbyCond(qryVO);
|
||||||
|
if (verifyObj == null || verifyObj.getParentVO() == null) {
|
||||||
|
throw new BusinessException(nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("20021005",
|
||||||
|
"UPT2002100573-900064")/* @res"当前分录科目不是核销对象,不能进行参照核销!" */);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!StringUtil.isEmptyWithTrim(detail.getAssid())) {
|
||||||
|
String assid = detail.getAssid();
|
||||||
|
AssVO[] assvos = NCLocator.getInstance().lookup(IFreevaluePub.class).queryAssvosByid(assid, Module.GL);
|
||||||
|
detail.setAss(assvos);
|
||||||
|
}
|
||||||
|
|
||||||
|
VerifyObjHeaderVO voHead = (VerifyObjHeaderVO) verifyObj.getParentVO();
|
||||||
|
if (voHead.getBcontrol().booleanValue()) { /* 严格按照辅助核算控制 */
|
||||||
|
VerifyObjItemVO[] items = (VerifyObjItemVO[]) verifyObj.getChildrenVO();
|
||||||
|
if (items != null && items.length > 0) {
|
||||||
|
if (StringUtil.isEmptyWithTrim(detail.getAssid()))
|
||||||
|
throw new GlBusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("20021005",
|
||||||
|
"UPT2002100573-900065")/*
|
||||||
|
* @res
|
||||||
|
* "当前分录科目的核销对象已设置辅助核算严格控制,请先录入辅助核算!"
|
||||||
|
*/);
|
||||||
|
|
||||||
|
for (AssVO assvo : detail.getAss()) {
|
||||||
|
if (assvo.getPk_Checkvalue() == null)
|
||||||
|
assvo.setPk_Checkvalue("~");
|
||||||
|
}
|
||||||
|
// 下面代码处理多个辅助核算中的一部分严格控制时,查询数据。
|
||||||
|
List<AssVO> assvolist = new ArrayList<AssVO>();
|
||||||
|
for (int i = 0; i < items.length; i++) {
|
||||||
|
for (AssVO ass : detail.getAss()) {
|
||||||
|
if (ass.getPk_Checktype().equals(items[i].getPk_subjass())) {
|
||||||
|
assvolist.add(ass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
detail.setAss(assvolist.toArray(new AssVO[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FilterCondVO voCond = new FilterCondVO();
|
||||||
|
FilterCondVO debitCond = new FilterCondVO();
|
||||||
|
FilterCondVO creditCond = new FilterCondVO();
|
||||||
|
|
||||||
|
creditCond.setPkuser(InvocationInfoProxy.getInstance().getUserId());
|
||||||
|
creditCond.setPk_glorgbook(detail.getPk_accountingbook());
|
||||||
|
creditCond.setPkSob(null);
|
||||||
|
creditCond.setLogonDate(new UFDate(busidate).asEnd().toString());
|
||||||
|
creditCond.setCurPk(detail.getPk_currtype());
|
||||||
|
|
||||||
|
AssVO[] assvos = detail.getAss();
|
||||||
|
if (assvos != null && assvos.length > 0) {
|
||||||
|
creditCond.setAssvos(assvos);
|
||||||
|
} else {
|
||||||
|
creditCond.setAssvos(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
creditCond.setBeginDate(null);
|
||||||
|
creditCond.setEndDate(new UFDate(busidate).asEnd().toString());
|
||||||
|
creditCond.setDateType("Businessdate");
|
||||||
|
creditCond.setMnyType("原币");/* -=notranslate=- */
|
||||||
|
creditCond.setDigest(null);
|
||||||
|
creditCond.setVerifyNo(null);
|
||||||
|
creditCond.sethasTally(true);
|
||||||
|
|
||||||
|
debitCond.setPkuser(InvocationInfoProxy.getInstance().getUserId());
|
||||||
|
debitCond.setPk_glorgbook(detail.getPk_accountingbook());
|
||||||
|
debitCond.setPkSob(null);
|
||||||
|
debitCond.setLogonDate(new UFDate(busidate).asEnd().toString());
|
||||||
|
debitCond.setCurPk(detail.getPk_currtype());
|
||||||
|
|
||||||
|
if (assvos != null && assvos.length > 0) {
|
||||||
|
debitCond.setAssvos(assvos);
|
||||||
|
} else {
|
||||||
|
debitCond.setAssvos(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
debitCond.setBeginDate(null);
|
||||||
|
debitCond.setEndDate(new UFDate(busidate).asEnd().toString());
|
||||||
|
debitCond.setDateType("Businessdate");
|
||||||
|
debitCond.setMnyType("原币");/* -=notranslate=- */
|
||||||
|
debitCond.setDigest(null);
|
||||||
|
debitCond.setVerifyNo(null);
|
||||||
|
debitCond.sethasTally(true);
|
||||||
|
voCond.setCreditCond(creditCond);
|
||||||
|
voCond.setDebitCond(debitCond);
|
||||||
|
VoucherVO voucher = new VoucherVO();
|
||||||
|
voucher.setPk_voucher(detail.getPk_voucher());
|
||||||
|
voucher.setPk_accountingbook(detail.getPk_accountingbook());
|
||||||
|
voucher.setPrepareddate(detail.getPrepareddate());
|
||||||
|
Object[] refVerifyData = new DetailServiceBO().getRefVerifyData(detail, voCond, voucher);
|
||||||
|
if (refVerifyData != null && refVerifyData.length > 0) {
|
||||||
|
GlVerifyWebModel verifyModel = new GlVerifyWebModel();
|
||||||
|
verifyModel.setPk_accountingbook(detail.getPk_accountingbook());
|
||||||
|
verifyModel.setRslt((FilterCondVO) refVerifyData[2],
|
||||||
|
(nc.vo.glrp.verify.VerifyDetailVO[][]) refVerifyData[3]);
|
||||||
|
|
||||||
|
reusltMap = getReusltMap(detail, verifyModel, refVerifyData, false);
|
||||||
|
}
|
||||||
|
return reusltMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Object> queryBadAccountRate(String pk_accountAgePeriod) throws BusinessException {
|
||||||
|
List<Object> rslist = new ArrayList<Object>();
|
||||||
|
StringBuffer sbSQL = new StringBuffer();
|
||||||
|
sbSQL.append(" select propertyid,startunit,endunit,b.unit,descr from fipub_timecontrol_b pub_timecontrol_a" +
|
||||||
|
" join fipub_timecontrol b on b.pk_timectrl =pub_timecontrol_a.pk_timectrl where pub_timecontrol_a .pk_timectrl = '");
|
||||||
|
sbSQL.append(pk_accountAgePeriod);
|
||||||
|
sbSQL.append("' and pub_timecontrol_a.dr = 0 order by pub_timecontrol_a.propertyid ");
|
||||||
|
nc.vo.pub.rs.MemoryResultSet accountPeriod = null;
|
||||||
|
try {
|
||||||
|
accountPeriod = GLPubProxy.getRemoteAccountAgeAnalysis().queryPeriod(sbSQL.toString());
|
||||||
|
while (accountPeriod.next()) {
|
||||||
|
// startvalue
|
||||||
|
Object objStart = accountPeriod.getInt(STARTUNIT);
|
||||||
|
// endvalue
|
||||||
|
Object objEnd = accountPeriod.getInt(ENDUNIT);
|
||||||
|
// 是年、月、日
|
||||||
|
Object objUnit = accountPeriod.getInt(UNIT);
|
||||||
|
// 账龄区间描述
|
||||||
|
Object objDescr = accountPeriod.getString(DESCR);
|
||||||
|
if (StrTools.isEmptyStr((String) objDescr)) {
|
||||||
|
if (objEnd == null || Integer.parseInt(objEnd.toString()) == 0) {
|
||||||
|
if (objDescr == null) {
|
||||||
|
if (objUnit != null && objUnit == TimeUnit.valueOfInt(TimeUnit.DAY)) {
|
||||||
|
objDescr = objStart.toString() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("subjverify_0", "02002004-0001")/*@res "天以上"*/;
|
||||||
|
} else if (objUnit != null && objUnit == TimeUnit.valueOfInt(TimeUnit.MONTH)) {
|
||||||
|
objDescr = objStart.toString() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("subjverify_0", "02002004-0002")/*@res "月以上"*/;
|
||||||
|
} else {
|
||||||
|
objDescr = objStart.toString() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("subjverify_0", "02002004-0003")/*@res "年以上"*/;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (objUnit != null && objUnit == TimeUnit.valueOfInt(TimeUnit.DAY)) {
|
||||||
|
objDescr = objStart.toString() + "-" + objEnd.toString() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("subjverify_0", "02002004-0004")/*@res "天"*/;
|
||||||
|
} else if (objUnit != null && objUnit == TimeUnit.valueOfInt(TimeUnit.MONTH)) {
|
||||||
|
objDescr = objStart.toString() + "-" + objEnd.toString() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0002494")/*@res "月"*/;
|
||||||
|
} else {
|
||||||
|
objDescr = objStart.toString() + "-" + objEnd.toString() + nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0001787")/*@res "年"*/;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rslist.add(objDescr);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new BusinessException(e);
|
||||||
|
}
|
||||||
|
return rslist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为借方和贷方列表增加币种字段
|
||||||
|
*
|
||||||
|
* @param creditInfo
|
||||||
|
* @param creditInfo
|
||||||
|
*/
|
||||||
|
private void setCurrTypeNameForVerify(Map<String, Map<String, Object>>[] creditInfo, Map<String, Map<String, Object>>[] debitInfo) {
|
||||||
|
Map<String, String> resMap = new HashMap<>();
|
||||||
|
Set<String> pk_currtypes = new HashSet<>();
|
||||||
|
try {
|
||||||
|
// 提取币种主键
|
||||||
|
processCurrencyTypes(creditInfo, pk_currtypes);
|
||||||
|
processCurrencyTypes(debitInfo, pk_currtypes);
|
||||||
|
|
||||||
|
// 查询币种名称
|
||||||
|
String pk_currtypeStr = String.join("','", pk_currtypes);
|
||||||
|
// NCCForUAPLogger.debug("pk_currtypeStr:" + pk_currtypeStr);
|
||||||
|
String sql = "select pk_currtype, name from bd_currtype where pk_currtype in ('" + pk_currtypeStr + "') and dr = 0";
|
||||||
|
List<Map> results = (List<Map>) new BaseDAO().executeQuery(sql, new MapListProcessor());
|
||||||
|
|
||||||
|
for (Map result : results) {
|
||||||
|
String pk_currtype = result.getOrDefault("pk_currtype", "") + "";
|
||||||
|
String name = result.getOrDefault("name", "") + "";
|
||||||
|
if (pk_currtype.isEmpty() || name.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
resMap.put(pk_currtype, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置币种名称
|
||||||
|
setCurrencyNameInArr(creditInfo, resMap);
|
||||||
|
setCurrencyNameInArr(debitInfo, resMap);
|
||||||
|
} catch (Exception e) {
|
||||||
|
NCCForUAPLogger.debug("setCurrTypeNameForVerify-exp:" + e.getMessage());
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void processCurrencyTypes(Map<String, Map<String, Object>>[] infoArray, Set<String> pk_currtypes) {
|
||||||
|
for (Map<String, Map<String, Object>> map : infoArray) {
|
||||||
|
Map<String, Object> currtypeMap = map.get("m_pk_currtype");
|
||||||
|
// NCCForUAPLogger.debug("infoArray-m_pk_currtype= " + currtypeMap);
|
||||||
|
if (!"".equals(currtypeMap.getOrDefault("value", ""))) {
|
||||||
|
String pk_currtype = currtypeMap.getOrDefault("value", "") + "";
|
||||||
|
pk_currtypes.add(pk_currtype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setCurrencyNameInArr(Map<String, Map<String, Object>>[] infoArray, Map<String, String> resMap) {
|
||||||
|
for (Map<String, Map<String, Object>> map : infoArray) {
|
||||||
|
Map<String, Object> currtypeMap = map.get("m_pk_currtype");
|
||||||
|
String pk_currtype = currtypeMap.getOrDefault("value", "") + "";
|
||||||
|
String m_currtypeName = resMap.get(pk_currtype);
|
||||||
|
|
||||||
|
Map<String, Object> currtypeNameMap = new HashMap<>();
|
||||||
|
currtypeNameMap.put("value", m_currtypeName);
|
||||||
|
currtypeNameMap.put("display", m_currtypeName);
|
||||||
|
map.put("m_currtypeName", currtypeNameMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*336L/tOhma6VzKP3mxHcEkAXkBRqJpb8XsF1elPHMJ2c/NcdtKK6mxZmzuL3bjcU*/
|
Loading…
Reference in New Issue