提交
This commit is contained in:
parent
d02f0684dc
commit
7308db48bd
@ -23,6 +23,13 @@
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");
|
||||
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgName()%>");
|
||||
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
|
||||
setItemValue(0,0,"UpdateUserID","<%=CurUser.getUserName()%>");
|
||||
setItemValue(0,0,"UpdateOrgID","<%=CurUser.getOrgName()%>");
|
||||
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
|
||||
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -14,11 +14,17 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author liuzhao
|
||||
*
|
||||
*/
|
||||
public class commissionSet {
|
||||
|
||||
public String effectStart;
|
||||
public String leasForm;
|
||||
public String endDate;
|
||||
public String startDate;
|
||||
|
||||
public String getEffectStart() {
|
||||
return effectStart;
|
||||
@ -36,15 +42,28 @@ public class commissionSet {
|
||||
this.leasForm = leasForm;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String commissionSet() throws Exception{
|
||||
JBOTransaction tx=null;
|
||||
Transaction Sqlca=null;
|
||||
tx= JBOFactory.createJBOTransaction();
|
||||
Sqlca=Transaction.createTransaction(tx);
|
||||
|
||||
/*BizObjectManager lpsManager = JBOFactory.getBizObjectManager(LB_PRODUCT_SALVAGE.CLASS_NAME);
|
||||
BizObject lpsObject = lpsManager.createQuery("id=:id").setParameter("id", this.getId()).getSingleResult(false);
|
||||
String leasForm = lpsObject.getAttribute("product_id").toString();*/
|
||||
int end = 0;
|
||||
String sql="SELECT MAX(effect_end) AS effect_end FROM LB_PRODUCT_SALVAGE where product_id=:product_id";
|
||||
SqlObject asql = new SqlObject(sql).setParameter("product_id", leasForm);
|
||||
@ -68,4 +87,35 @@ public class commissionSet {
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
|
||||
public String editEnd() throws Exception{
|
||||
JBOTransaction tx=null;
|
||||
Transaction Sqlca=null;
|
||||
tx= JBOFactory.createJBOTransaction();
|
||||
Sqlca=Transaction.createTransaction(tx);
|
||||
|
||||
int start = 0;
|
||||
String sql="SELECT MIN(effect_start) AS effect_start FROM LB_PRODUCT_SALVAGE WHERE product_id=:product_id AND effect_start>:effect_start";
|
||||
SqlObject asql = new SqlObject(sql).setParameter("product_id", leasForm).setParameter("effect_start", startDate);
|
||||
try {
|
||||
ASResultSet rs = Sqlca.getResultSet(asql);
|
||||
if(rs.next()){
|
||||
String effectStart = rs.getString(1);
|
||||
effectStart = effectStart.replaceAll("/", "");
|
||||
start = Integer.parseInt(effectStart);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
String endDate = this.getEndDate();
|
||||
endDate = endDate.replaceAll("/", "");
|
||||
int end = Integer.parseInt(endDate);
|
||||
|
||||
if(end>=start){
|
||||
return "fail";
|
||||
}else{
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user