佣金设置修改
This commit is contained in:
parent
3e95164443
commit
a3e54422a4
@ -93,29 +93,37 @@ public class commissionSet {
|
||||
Transaction Sqlca=null;
|
||||
tx= JBOFactory.createJBOTransaction();
|
||||
Sqlca=Transaction.createTransaction(tx);
|
||||
String endDate = this.getEndDate();
|
||||
endDate = endDate.replaceAll("/", "");
|
||||
int end = Integer.parseInt(endDate);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
if(rs.next()){
|
||||
String effectStart = rs.getString(1);
|
||||
if(effectStart==null || "".equals(effectStart)){
|
||||
return "success";
|
||||
}else{
|
||||
|
||||
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