From 0dcb369d64aa6b8fd613d65a63593a277fcdfe74 Mon Sep 17 00:00:00 2001 From: liuzhao Date: Wed, 10 Apr 2019 09:47:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E8=BD=AC=E5=87=BA=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E5=B7=B2=E5=AD=98=E5=9C=A8=E7=9A=84=E4=B8=8D?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tenwa/apzl/discount/AssetsOffCallBack.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src_tenwa/com/tenwa/apzl/discount/AssetsOffCallBack.java b/src_tenwa/com/tenwa/apzl/discount/AssetsOffCallBack.java index 4b771f5c1..6a2c5b0d4 100644 --- a/src_tenwa/com/tenwa/apzl/discount/AssetsOffCallBack.java +++ b/src_tenwa/com/tenwa/apzl/discount/AssetsOffCallBack.java @@ -14,7 +14,6 @@ import com.tenwa.comm.exception.BusinessException; import com.tenwa.officetempalte.importcallback.impl.BaseImportExcelCallBack; public class AssetsOffCallBack extends BaseImportExcelCallBack{ - @Override public void run(ASUser CurUser, BizObject importObject, Map model, Integer rowIndex, JBOTransaction tx, @@ -93,15 +92,19 @@ public class AssetsOffCallBack extends BaseImportExcelCallBack{ throw new BusinessException(e.getMessage()); } - //importObject.setAttributeValue("stores_day", stores_day); - //查询该合同号是否存在 BizObjectManager contractInfoManager = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME,tx); BizObject contractInfo = contractInfoManager.createQuery("CONTRACT_NO=:CONTRACT_NO").setParameter("CONTRACT_NO", contractNo).getSingleResult(true); if (contractInfo==null) { throw new BusinessException("该合同号 "+contractNo+" 不存在!"); - } + } + //已经存在资产转出方的不允许导入 + String ass = contractInfo.getAttribute("ASSETTRANSFERER")==null? "" : contractInfo.getAttribute("ASSETTRANSFERER").toString(); + if (!"".equals(ass)) { + throw new BusinessException("该合同号 "+contractNo+" 已存在<<资产转出方>> 请勿重复导入!"); + } + contractInfo.setAttributeValue("ASSETTRANSFERER", assettransferer); contractInfo.setAttributeValue("TRANSFERDATE", transferdate); contractInfo.setAttributeValue("TURNOUTREMARKS", turnoutremarks);