文件清单配置删除时,删除关联数据
This commit is contained in:
parent
5ceeabfb09
commit
5dbb6a27de
@ -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();
|
||||
},"复制资料清单");
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -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<Map<String, String>> dataList = conn.executeQuery(selectSql, ITEMNO+"%");
|
||||
for (Map<String, String> 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";
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user