产品增删改入日志1部分, 日志表--(PRODUCT_LOG)
This commit is contained in:
parent
321696abb7
commit
4b319e71ce
@ -15,7 +15,7 @@
|
||||
String serialNo = Sqlca.getString("select serialno from prd_specific_library where businesstype = '" + typeNo + "'");
|
||||
serialNo = serialNo == null ? "" : serialNo;
|
||||
String catalogNo = (String)map.get("SortNo");
|
||||
ASObjectWindow dwTemp =ObjectWindowHelper.createObjectWindow_Info("PRD_ProductInfo", inputParameter, CurPage, request);
|
||||
ASObjectWindow dwTemp =ObjectWindowHelper.createObjectWindow_Info("PRD_ProductInfo", inputParameter, CurPage, request);//模板左边
|
||||
ASDataObject doTemp=dwTemp.getDataObject();
|
||||
//将ParaID作为参数传给显示模板
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
@ -31,10 +31,19 @@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
if(!iV_all(0)) return;
|
||||
var typeNo = getItemValue(0,getRow(),"TypeNo");
|
||||
var sortNo = getItemValue(0,getRow(),"SortNo");
|
||||
var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","getSortNo","newProductID="+typeNo+",catalogNo=<%=catalogNo%>,type=<%=type%>,sortNo="+sortNo + ",usesrId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>");
|
||||
var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","getSortNo","newProductID="+typeNo+",catalogNo=<%=catalogNo%>,type=<%=type%>,sortNo="+sortNo + ",userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>");
|
||||
var results = result.split('@');
|
||||
setItemValue(0,getRow(),"sortno",results[1]);
|
||||
as_save(0);
|
||||
as_save(0,"specificInfo();");
|
||||
}
|
||||
|
||||
function checkTypeNo(){
|
||||
//这个方法被模板配置,给两个单选按钮配置事件,意义在于先进行新增产品的时候,先进行数据库查找产品的编号,有,则执行下面的显示方法,无,不显示,简单说就是判断新增产品的时候保存按钮的点击与否
|
||||
var typeNo = getItemValue(0,getRow(),"TypeNo");
|
||||
var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","checkSave","typeNo="+typeNo);
|
||||
if(result){//如果框架方法返回值不为空,说明有数据,是点击过保存按钮的,否则不调用specificInfo()方法,不显示下面的页面
|
||||
specificInfo();
|
||||
}
|
||||
}
|
||||
|
||||
function specificInfo(){
|
||||
|
||||
@ -24,6 +24,8 @@
|
||||
include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function saveRecord(){
|
||||
var productID = parent.getItemValue(0,getRow(),"TypeNo");
|
||||
var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","judgeAddOrUpdateLog","productID="+productID+",userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>");
|
||||
as_save(0,"openComponentDef();");
|
||||
}
|
||||
|
||||
@ -41,7 +43,7 @@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
function openComponentDef(){
|
||||
var serialNo = getItemValue(0,getRow(),"SerialNo");
|
||||
var versionID = getItemValue(0,getRow(),"VERSIONID");
|
||||
if(typeof(serialNo) != "undefined" && serialNo != "" && typeof(versionID) != "undefined" && versionID != "")
|
||||
if(typeof(serialNo) != "undefined" && serialNo != "")
|
||||
{
|
||||
AsControl.OpenView("/ProductManage/ProductConfig/ProductComponentDef.jsp","SpecificSerialNo="+serialNo+"&ProductID=<%=productID%>","sys_sub_page_frame_GGCS","");
|
||||
}else if(typeof(serialNo) != "undefined" && serialNo != "" && typeof(versionID) != "undefined" && versionID != "" && '<%=productType2%>'=='2' )
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.amarsoft.app.als.prd.manager;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -22,10 +24,13 @@ import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.io.FileTool;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.reckon.util.UUIDUtil;
|
||||
|
||||
@ -41,7 +46,17 @@ public class ProductManager{
|
||||
private String productName;
|
||||
private String userId;
|
||||
private String orgId;
|
||||
private String serialno;
|
||||
|
||||
|
||||
public String getSerialno() {
|
||||
return serialno;
|
||||
}
|
||||
|
||||
public void setSerialno(String serialno) {
|
||||
this.serialno = serialno;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
@ -145,11 +160,60 @@ public class ProductManager{
|
||||
return "success";
|
||||
}
|
||||
|
||||
/**
|
||||
* KKK判断对产品的操作,增加对应日志
|
||||
* @param tx
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @author Z and K
|
||||
*/
|
||||
public String getSortNo(JBOTransaction tx) throws Exception {
|
||||
addProductDataLog(tx, newProductID, "A", "A", "data", userId, orgId);
|
||||
|
||||
Transaction tran = Transaction.createTransaction(tx);
|
||||
String oper = "A";
|
||||
//这里通过Transaction对象获取一个字符串,从一段sql结果里,如果不是null,说明是进行的修改操作,否则为新增操作
|
||||
if(tran.getString(new SqlObject("select typeno from business_type where typeno = '" + newProductID + "'"))!=null) {
|
||||
oper = "U";
|
||||
}
|
||||
addProductDataLog(tx, newProductID, oper, oper, "data", userId, orgId);
|
||||
return this.checkTypeNo(tx);
|
||||
}
|
||||
|
||||
/**
|
||||
* KKK判断产品配置信息是新增还是修改,而后入日志
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
public String judgeAddOrUpdateLog(JBOTransaction tx) throws Exception {
|
||||
Transaction tran = Transaction.createTransaction(tx);
|
||||
String oper = "A";
|
||||
//这里通过Transaction对象获取一个字符串,从一段sql结果里,如果不是null,说明是进行的修改操作,否则为新增操作
|
||||
if(tran.getString(new SqlObject("select productid from prd_specific_library where productid='" + productID + "'"))!=null) {
|
||||
oper = "U";
|
||||
}
|
||||
//这里无论是新增还是修改产品配置信息,都需要根据PRODUCTID入日志
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(BUSINESS_TYPE.CLASS_NAME, tx);
|
||||
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);
|
||||
return "OK";
|
||||
}
|
||||
|
||||
/**
|
||||
* checkSaveButtonClickTrueOrFalse
|
||||
* @param tx
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String checkSave(JBOTransaction tx) throws Exception {//判断是否点击保存按钮
|
||||
Transaction tran = Transaction.createTransaction(tx);
|
||||
if(tran.getString(new SqlObject("select productid from prd_specific_library where productid='" + productID + "'"))!=null) {
|
||||
return "OK";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tx
|
||||
|
||||
@ -13,6 +13,7 @@ import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import jbo.app.BUSINESS_TYPE;
|
||||
import jbo.prd.PRD_SPECIFIC_LIBRARY;
|
||||
import jbo.sys.LB_PRODUCT_INFO;
|
||||
|
||||
@ -24,10 +25,13 @@ import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.io.FileTool;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.lang.StringX;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.reckon.util.UUIDUtil;
|
||||
|
||||
|
||||
@ -91,6 +95,7 @@ public class ProductSpecificManager extends WebBusinessProcessor{
|
||||
public void setOrgID(String orgID) {
|
||||
this.orgID = orgID;
|
||||
}
|
||||
|
||||
/**
|
||||
* ɾ³ýÒ»¸ö²úÆ·¹æ¸ñ
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user