From 5dbb6a27de21c34a710d85e46fe267f5792bc585 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Thu, 27 Aug 2020 16:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=B8=85=E5=8D=95=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=88=A0=E9=99=A4=E6=97=B6=EF=BC=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FileListConfigUrationList.jsp | 10 ++++++++-- .../group/CustomerGroupCompanyController.java | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileListConfigUrationList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileListConfigUrationList.jsp index 333f66924..740a88c5f 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileListConfigUrationList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/FileListConfigUrationList.jsp @@ -92,10 +92,15 @@ return ; } if(confirm('确实要删除吗?')){ - as_delete(0); + as_delete(0,"deleteCorrelationFile('"+ownNumber+"')"); + } + } + function deleteCorrelationFile(itemno){ + var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","deleteCorrelationFile","ITEMNO="+itemno); + if("success"==sReturnInfo){ + window.location.reload(); } } - function copyData(){ var ownNumber = getItemValue(0,getRow(),'ITEMNO'); if(typeof(ownNumber)=="undefined" || ownNumber.length==0 ){ @@ -106,6 +111,7 @@ AsDialog.PopView("/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/DataFileCopy.jsp",'ownNumber=' +ownNumber+"&itemName="+itemName,"dialogWidth=600px;dialogHeight=200px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sReturn){ reloadSelf(); + window.location.reload(); },"复制资料清单"); } diff --git a/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java b/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java index 12fecc14d..ce9e19d8e 100644 --- a/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java +++ b/src_tenwa/com/tenwa/customer/controller/group/CustomerGroupCompanyController.java @@ -344,4 +344,24 @@ public class CustomerGroupCompanyController { otherProperty.put("INPUTTIME", DateUtil.getSystemTimeByFormat("yyyy/MM/dd HH:mm:ss")); DataOperatorUtil.copyJBOSet(LB_DOCCONFIG.CLASS_NAME, fromCondtion, LB_DOCCONFIG.CLASS_NAME, null, otherProperty,null, tx); } + + //删除关联数据 + public String deleteCorrelationFile(JBOTransaction tx) throws Exception{ + Conn conn = new Conn(tx); + if(ITEMNO != null && ITEMNO.length()>4){ + String deleteSql = "DELETE FROM LB_DOCCONFIG WHERE DOC_CLASS_ITEMNO=?"; + conn.executeUpdate(deleteSql,ITEMNO); + }else{ + String selectSql = "SELECT itemno FROM CODE_LIBRARY WHERE CodeNo='DocList' AND IsInUse='1' AND itemno LIKE ? AND LENGTH(itemno)>4"; + List> dataList = conn.executeQuery(selectSql, ITEMNO+"%"); + for (Map map : dataList) { + String inemno = map.get("itemno"); + String deleteSql = "DELETE FROM LB_DOCCONFIG WHERE DOC_CLASS_ITEMNO=?"; + conn.executeUpdate(deleteSql,inemno); + String codeSql = "DELETE FROM CODE_LIBRARY WHERE CodeNo='DocList' AND IsInUse='1' AND itemno=?"; + conn.executeUpdate(codeSql,inemno); + } + } + return "success"; + } } \ No newline at end of file