From 6bd17f7921c6175c0377541e19ed50c283f37bd4 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Sun, 26 Aug 2018 16:56:50 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=BF=AE=E6=94=B9=E4=BA=BA=E5=B8=A6=E4=B8=8D=E5=87=BA?= =?UTF-8?q?=E6=9D=A5=E3=80=82=202.=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=B8=AD=E6=89=A7=E8=A1=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=90=8E=E4=BA=A7=E5=93=81=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductConfig/CopyProductCatalogInfo.jsp | 2 +- .../ProductConfig/ProductCatalogList.jsp | 3 ++- WebContent/WEB-INF/etc/jbo/jbo_sys.xml | 3 ++- .../app/als/prd/manager/ProductManager.java | 26 ++++++++++++------- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/WebContent/ProductManage/ProductConfig/CopyProductCatalogInfo.jsp b/WebContent/ProductManage/ProductConfig/CopyProductCatalogInfo.jsp index 2b75d052a..a460dca40 100644 --- a/WebContent/ProductManage/ProductConfig/CopyProductCatalogInfo.jsp +++ b/WebContent/ProductManage/ProductConfig/CopyProductCatalogInfo.jsp @@ -32,7 +32,7 @@ include file="/Frame/resources/include/ui/include_info.jspf"%> var productName = getItemValue(0, getRow(), "ProductName"); var id = getItemValue(0, getRow(), "ID"); if(catalogName != null && catalogName != ""){ - var res = RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","copyProductCatalog","catalogName="+catalogName+",productName="+productName+",productID=<%=productId%>,id="+id + ",usesrId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>"); + var res = RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","copyProductCatalog","catalogName="+catalogName+",productName="+productName+",productID=<%=productId%>,id="+id + ",userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>"); if(res == "SUCCESS"){ alert("复制成功"); AsDialog.ClosePage(); diff --git a/WebContent/ProductManage/ProductConfig/ProductCatalogList.jsp b/WebContent/ProductManage/ProductConfig/ProductCatalogList.jsp index 43e6b6410..e3de57dd9 100644 --- a/WebContent/ProductManage/ProductConfig/ProductCatalogList.jsp +++ b/WebContent/ProductManage/ProductConfig/ProductCatalogList.jsp @@ -113,7 +113,8 @@ return ; } if(confirm('确实要删除吗?')){ - var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","deleteProduct","ProductID="+typeNo + ",usesrId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>"); + var productName = getItemValue(0, getRow(), "TypeName"); + var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","deleteProduct","ProductID="+typeNo + ",userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>,productName="+productName); if(result.split("@")[0] == "false"){ openDWDialog(result.split("@")[1]); return; diff --git a/WebContent/WEB-INF/etc/jbo/jbo_sys.xml b/WebContent/WEB-INF/etc/jbo/jbo_sys.xml index f0aa119cb..bdbc99ad0 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_sys.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_sys.xml @@ -2203,7 +2203,8 @@ - + + diff --git a/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java b/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java index 93321fdf7..90b03b19a 100644 --- a/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java +++ b/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java @@ -143,8 +143,13 @@ public class ProductManager{ public void setSortNo(String sortNo) { this.sortNo = sortNo; } - - public String addProductDataLog(JBOTransaction tx, String name, String operation, String opNumber, String target, String userId, String orgid) throws Exception { + public String getProductNameByProductID(String productID) throws JBOException{ + BizObject bo = JBOFactory.createBizObjectQuery(BUSINESS_TYPE.CLASS_NAME,"TYPENO=:projectId") + .setParameter("projectId",productID).getSingleResult(false); + String productNameByID = (bo==null)?"":bo.getAttribute("TYPENAME").getString(); + return productNameByID; + } + public String addProductDataLog(JBOTransaction tx, String name, String operation, String opNumber, String target, String userId, String orgid, String productName) throws Exception { //增加产品编辑日志 BizObjectManager bomPL = JBOFactory.getBizObjectManager(PRODUCT_LOG.CLASS_NAME, tx); String info = userId + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + opNumber; @@ -156,6 +161,7 @@ public class ProductManager{ boPL.setAttributeValue("inputuserid", userId); boPL.setAttributeValue("inputorgid", orgid); boPL.setAttributeValue("inputtime", StringFunction.getTodayNow()); + boPL.setAttributeValue("product_name", productName); bomPL.saveObject(boPL); return "success"; } @@ -175,7 +181,8 @@ public class ProductManager{ if(tran.getString(new SqlObject("select typeno from business_type where typeno = '" + newProductID + "'"))!=null) { oper = "U"; } - addProductDataLog(tx, newProductID, oper, oper, "data", userId, orgId); + String productNameByID = getProductNameByProductID(newProductID); + addProductDataLog(tx, newProductID, oper, oper, "data", userId, orgId ,productNameByID); return this.checkTypeNo(tx); } @@ -196,7 +203,8 @@ public class ProductManager{ BizObjectQuery boq = bom.createQuery("select typeno,inputuser,inputorg from O where typeno=:typeno"); boq.setParameter("typeno", productID); BizObject bo = boq.getSingleResult(); - addProductDataLog(tx, productID, oper, oper, "data", userId, orgId); + String productNameByID = getProductNameByProductID(productID); + addProductDataLog(tx, productID, oper, oper, "data", userId, orgId ,productNameByID); return "OK"; } @@ -344,7 +352,7 @@ public class ProductManager{ bomPN.createQuery("delete from O where prdid = '" + productID + "'").executeUpdate(); //增加产品编辑日志 - addProductDataLog(tx, productID, "D", "D", "data", userId, orgId); + addProductDataLog(tx, productID, "D", "D", "data", userId, orgId,productName); for(BusinessObject ps:psl){ String configFile = ps.getString("ConfigFile"); @@ -402,7 +410,7 @@ public class ProductManager{ bomanager.updateDB(); //增加产品编辑日志 - addProductDataLog(tx, "Cata"+sortNo, "A", "A", "catalog", userId, orgId); + addProductDataLog(tx, "Cata"+sortNo, "A", "A", "catalog", userId, orgId,catalogName); return "true"; } @@ -480,12 +488,12 @@ public class ProductManager{ bomanager.deleteBusinessObject(bo); //增加产品编辑日志 - addProductDataLog(tx, typeNo, "D", "D", "data", userId, orgId); + addProductDataLog(tx, typeNo, "D", "D", "data", userId, orgId,productName); } bomanager.updateDB(); //增加产品编辑日志 - addProductDataLog(tx, catalogNo, "D", "D", "catalog", userId, orgId); + addProductDataLog(tx, catalogNo, "D", "D", "catalog", userId, orgId,productName); return "true"; } @@ -577,7 +585,7 @@ public class ProductManager{ DataOperatorUtil.copyJBOSet(PRD_NODECONFIG.CLASS_NAME, fromCondition, PRD_NODECONFIG.CLASS_NAME, new HashMap(), otherProperty, null, tx); //增加产品编辑日志 - addProductDataLog(tx, id, "A", "A", "data", userId, orgId); + addProductDataLog(tx, id, "A", "A", "data", userId, orgId,productName); return "SUCCESS"; }