修改代码字符编码
This commit is contained in:
@@ -106,7 +106,7 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关键词返回城市
|
||||
* 根据关键词返回城市
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
@@ -123,9 +123,9 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关键词返回城市
|
||||
* 根据关键词返回城市
|
||||
* @param keyword
|
||||
* @param limit 限制最多返回数据条数
|
||||
* @param limit 限制最多返回数据条数
|
||||
* @return
|
||||
*/
|
||||
public List<Cities> matchCities(String keyword, int limit) {
|
||||
@@ -144,7 +144,7 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据城市名或城市别名对关键词进行匹配
|
||||
* 根据城市名或城市别名对关键词进行匹配
|
||||
* @param keyword
|
||||
* @param matchAlias
|
||||
* @return
|
||||
@@ -153,14 +153,14 @@ public class CityFactory {
|
||||
List<Cities> result = Lists.newArrayList();
|
||||
if(StringUtils.isNotBlank(keyword)) {
|
||||
if(!matchAlias) {
|
||||
//不搜索别名
|
||||
//不搜索别名
|
||||
for (Cities cities : citiesList) {
|
||||
if (cities.getName().startsWith(keyword) || cities.getSpell().startsWith(keyword)) {
|
||||
result.add(cities);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//搜索别名
|
||||
//搜索别名
|
||||
for (Cities cities : citiesList) {
|
||||
if (cities.getName().startsWith(keyword) || cities.getSpell().startsWith(keyword)
|
||||
|| (CollectionUtils.isNotEmpty(cities.getAliasList()) && cities.getAliasList().contains(keyword))) {
|
||||
@@ -173,9 +173,9 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关键词返回城市
|
||||
* 根据关键词返回城市
|
||||
* @param keyword
|
||||
* @param limit 限制最多返回数据条数
|
||||
* @param limit 限制最多返回数据条数
|
||||
* @return
|
||||
*/
|
||||
public List<Cities> matchCities(String keyword, int limit, boolean matchAlias) {
|
||||
@@ -206,7 +206,7 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据keyword查询是否城市是否存在
|
||||
* 根据keyword查询是否城市是否存在
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
@@ -224,7 +224,7 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否默认所有城市都开通
|
||||
* 是否默认所有城市都开通
|
||||
* @param isAllOpen
|
||||
* @return
|
||||
*/
|
||||
@@ -244,10 +244,10 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取以城市拼音首字母为分组的城市列表,默认全部不开通
|
||||
* 如:
|
||||
* A -> [安阳, 鞍山...]
|
||||
* B -> [北京, 宝鸡...]
|
||||
* 获取以城市拼音首字母为分组的城市列表,默认全部不开通
|
||||
* 如:
|
||||
* A -> [安阳, 鞍山...]
|
||||
* B -> [北京, 宝鸡...]
|
||||
* @return
|
||||
*/
|
||||
public Map<String, List<Cities>> getPinyinCitiesMap() {
|
||||
@@ -256,7 +256,7 @@ public class CityFactory {
|
||||
|
||||
|
||||
public Map<String, List<Cities>> getProvinceCitiesMap(){
|
||||
String[] spCitys = {"上海","天津","北京","重庆"};
|
||||
String[] spCitys = {"上海","天津","北京","重庆"};
|
||||
List<Cities> spList = new ArrayList<Cities>();
|
||||
Map<String, List<Cities>> result = Maps.newHashMap();
|
||||
for(Cities cities : citiesList) {
|
||||
@@ -272,13 +272,13 @@ public class CityFactory {
|
||||
}
|
||||
}
|
||||
|
||||
//中文拼音排序
|
||||
//中文拼音排序
|
||||
Comparator<Object> com = Collator.getInstance(java.util.Locale.CHINA);
|
||||
List<String> list = new ArrayList<String>(result.keySet());
|
||||
Collections.sort(list, com);
|
||||
Map<String, List<Cities>> rMap = Maps.newLinkedHashMap();
|
||||
if(spList.size()>0){
|
||||
rMap.put("直辖市", spList);
|
||||
rMap.put("直辖市", spList);
|
||||
}
|
||||
for(String key : list){
|
||||
rMap.put(key, result.get(key));
|
||||
@@ -289,8 +289,8 @@ public class CityFactory {
|
||||
|
||||
|
||||
/**
|
||||
* 获取以城市拼音首字母为分组的城市列表
|
||||
* @param openedCities 开通的城市列表
|
||||
* 获取以城市拼音首字母为分组的城市列表
|
||||
* @param openedCities 开通的城市列表
|
||||
* @return
|
||||
*/
|
||||
public Map<String, List<Cities>> getPinyinCitiesMap(List<String> openedCities) {
|
||||
@@ -314,7 +314,7 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有区域
|
||||
* 获取所有区域
|
||||
* @param city
|
||||
* @return
|
||||
*/
|
||||
@@ -331,7 +331,7 @@ public class CityFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据区域匹配城市名
|
||||
* 根据区域匹配城市名
|
||||
* @param region
|
||||
* @param level
|
||||
* @return
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* 后台员工角色配置
|
||||
* 后台员工角色配置
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -18,20 +18,20 @@ public class EmployeeRoleConfig {
|
||||
public static final Map<String, String> roleAuthConfig = new ConcurrentHashMap<String, String>();
|
||||
|
||||
static {
|
||||
roleConfig.put("超级管理员", Arrays.asList("bkoffEnterprise/add", "bkoffEnterprise", "bkoffRole", "bkoffUser", "algorithmRule", "bkoffEmployee","collRate", "bkoffPeopleInquiry", "bkoffManualInquiry", "bkoffCollInfo"));
|
||||
roleConfig.put("销售经理", Arrays.asList("bkoffEnterprise/add", "bkoffEnterprise", "bkoffRole", "bkoffUser", "bkoffPeopleInquiry", "bkoffManualInquiry", "bkoffCollInfo"));
|
||||
roleConfig.put("产品管理", Arrays.asList("algorithmRule", "collRate", "bkoffPeopleInquiry", "bkoffManualInquiry", "bkoffCollInfo"));
|
||||
roleConfig.put("超级管理员", Arrays.asList("bkoffEnterprise/add", "bkoffEnterprise", "bkoffRole", "bkoffUser", "algorithmRule", "bkoffEmployee","collRate", "bkoffPeopleInquiry", "bkoffManualInquiry", "bkoffCollInfo"));
|
||||
roleConfig.put("销售经理", Arrays.asList("bkoffEnterprise/add", "bkoffEnterprise", "bkoffRole", "bkoffUser", "bkoffPeopleInquiry", "bkoffManualInquiry", "bkoffCollInfo"));
|
||||
roleConfig.put("产品管理", Arrays.asList("algorithmRule", "collRate", "bkoffPeopleInquiry", "bkoffManualInquiry", "bkoffCollInfo"));
|
||||
|
||||
roleAuthConfig.put("bkoffEnterprise/add", "注册企业");
|
||||
roleAuthConfig.put("bkoffEnterprise", "企业列表");
|
||||
roleAuthConfig.put("bkoffRole", "角色管理");
|
||||
roleAuthConfig.put("bkoffUser", "用户列表");
|
||||
roleAuthConfig.put("bkoffEmployee", "员工列表");
|
||||
roleAuthConfig.put("algorithmRule", "算法参数");
|
||||
roleAuthConfig.put("collRate", "最大抵押率系数");
|
||||
roleAuthConfig.put("bkoffPeopleInquiry", "demo人工询价管理");
|
||||
roleAuthConfig.put("bkoffManualInquiry", "人工询价管理");
|
||||
roleAuthConfig.put("bkoffCollInfo", "押品列表");
|
||||
roleAuthConfig.put("bkoffEnterprise/add", "注册企业");
|
||||
roleAuthConfig.put("bkoffEnterprise", "企业列表");
|
||||
roleAuthConfig.put("bkoffRole", "角色管理");
|
||||
roleAuthConfig.put("bkoffUser", "用户列表");
|
||||
roleAuthConfig.put("bkoffEmployee", "员工列表");
|
||||
roleAuthConfig.put("algorithmRule", "算法参数");
|
||||
roleAuthConfig.put("collRate", "最大抵押率系数");
|
||||
roleAuthConfig.put("bkoffPeopleInquiry", "demo人工询价管理");
|
||||
roleAuthConfig.put("bkoffManualInquiry", "人工询价管理");
|
||||
roleAuthConfig.put("bkoffCollInfo", "押品列表");
|
||||
}
|
||||
|
||||
public static List<String> getRoleAuths(List<String> roles) {
|
||||
|
||||
@@ -7,64 +7,64 @@ import com.fangjia.pds.PdsConfig;
|
||||
*/
|
||||
public enum PdsAPIs {
|
||||
/**
|
||||
* 小区月度均价走势接口
|
||||
* 小区月度均价走势接口
|
||||
*/
|
||||
DISTRICT_AVG_TREND("/property/avgPrice", "小区月度均价走势接口"),
|
||||
DISTRICT_AVG_TREND("/property/avgPrice", "小区月度均价走势接口"),
|
||||
/**
|
||||
* 小区自动完成接口
|
||||
* 小区自动完成接口
|
||||
*/
|
||||
DISTRICT_AUTO_COMPLETE("/property/autoComplete", "小区自动完成接口"),
|
||||
DISTRICT_AUTO_COMPLETE("/property/autoComplete", "小区自动完成接口"),
|
||||
/**
|
||||
* 小区估价接口
|
||||
* 小区估价接口
|
||||
*/
|
||||
EVALUATION("/property/evaluate", "小区估价接口"),
|
||||
EVALUATION("/property/evaluate", "小区估价接口"),
|
||||
/**
|
||||
* 城市自动补全接口
|
||||
* 城市自动补全接口
|
||||
*/
|
||||
CITY_AUTO_COMPLETE("/city/list", "城市自动补全接口"),
|
||||
CITY_AUTO_COMPLETE("/city/list", "城市自动补全接口"),
|
||||
/**
|
||||
*城市均价走势接口
|
||||
*城市均价走势接口
|
||||
*/
|
||||
CITY_AVG_TREND("/city/avgPrice2", "城市均价走势接口"),
|
||||
CITY_AVG_TREND("/city/avgPrice2", "城市均价走势接口"),
|
||||
/**
|
||||
* 获取城市的区域
|
||||
* 获取城市的区域
|
||||
*/
|
||||
REGIONS_AUTO_COMPLETE("/city/regions", "获取城市区域接口"),
|
||||
REGIONS_AUTO_COMPLETE("/city/regions", "获取城市区域接口"),
|
||||
|
||||
|
||||
COLLATERAL_EVALUATION_INFO("/pds/collateralEvaluationInfo", "PDS押品分析接口"),
|
||||
COLLATERAL_EVALUATION_INFO("/pds/collateralEvaluationInfo", "PDS押品分析接口"),
|
||||
|
||||
AVG_PRICE_EXISTS("/price/propertyAvgPrice", "判断小区是否存在均价"),
|
||||
AVG_PRICE_EXISTS("/price/propertyAvgPrice", "判断小区是否存在均价"),
|
||||
|
||||
CHECK_DISTRICT_ANALY_DATA("/pds/checkDistrictAnalyData", "判断小区是否有半年涨幅、季度涨幅"),
|
||||
CHECK_DISTRICT_ANALY_DATA("/pds/checkDistrictAnalyData", "判断小区是否有半年涨幅、季度涨幅"),
|
||||
|
||||
DISTRICT_AVG_PRICE_CITY_RANK("/property/rank", "查看小区均价排名"),
|
||||
DISTRICT_AVG_PRICE_CITY_RANK("/property/rank", "查看小区均价排名"),
|
||||
|
||||
DISTRICT_HOUSE("/property/house", "房源接口"),
|
||||
DISTRICT_HOUSE("/property/house", "房源接口"),
|
||||
|
||||
DISTRICT_DETAIL("/property/detail","小区详情"),
|
||||
DISTRICT_DETAIL("/property/detail","小区详情"),
|
||||
|
||||
NOTICE_INFO("/pds/appointNews", "公告详情接口"),
|
||||
NOTICE_INFO("/pds/appointNews", "公告详情接口"),
|
||||
|
||||
NOTICE_LIST_INFO("/pds/news", "公告top5列表接口"),
|
||||
NOTICE_LIST_INFO("/pds/news", "公告top5列表接口"),
|
||||
|
||||
BUILDING_NUMBERS("/pds/building", "获取楼号数据"),
|
||||
BUILDING_NUMBERS("/pds/building", "获取楼号数据"),
|
||||
|
||||
ROOM_NUMBERS("/pds/roomNumber", "获取室号数据"),
|
||||
ROOM_NUMBERS("/pds/roomNumber", "获取室号数据"),
|
||||
|
||||
ADDRESS_MATCH("/address/match", "小区匹配"),
|
||||
ADDRESS_MATCH("/address/match", "小区匹配"),
|
||||
|
||||
ADDRESS_STANDARDIZE("/address/standardize", "地址标准化"),
|
||||
ADDRESS_STANDARDIZE("/address/standardize", "地址标准化"),
|
||||
|
||||
ASSERTINFO("/pds/assertInfo","资产排名信息"),
|
||||
ASSERTINFO("/pds/assertInfo","资产排名信息"),
|
||||
|
||||
CITY_SELL_PRICE("/pds/citySellPrice", "获取城市的相对最低和最高价"),
|
||||
CITY_SELL_PRICE("/pds/citySellPrice", "获取城市的相对最低和最高价"),
|
||||
|
||||
DINGDING_SEND("/dingMessage/send", "钉钉发送信息接口"),
|
||||
DINGDING_SEND("/dingMessage/send", "钉钉发送信息接口"),
|
||||
|
||||
UPLOAD_PIC("/files/upload","图片保存到图片服务器"),
|
||||
UPLOAD_PIC("/files/upload","图片保存到图片服务器"),
|
||||
|
||||
HOUSE_INFO("/pds/getDistrictHouseInfo", "获取小区的房号信息");
|
||||
HOUSE_INFO("/pds/getDistrictHouseInfo", "获取小区的房号信息");
|
||||
|
||||
private String uri;
|
||||
private String name;
|
||||
|
||||
@@ -10,54 +10,54 @@ public class PdsConstants {
|
||||
public static String DINGDING_URL = "https://oapi.dingtalk.com/robot/send?access_token=379fa9f4f8e4a67dccb2ea09f687d47fe97628783eabaa9ac2083b6f60444d9b";
|
||||
|
||||
public static Integer NOT_HIT = 0;
|
||||
// 高风险
|
||||
public static Integer HIGH_HIT = -40;// 击中高风险
|
||||
public static Integer HIGHT_OTHER = -10;// 其他
|
||||
// 高风险
|
||||
public static Integer HIGH_HIT = -40;// 击中高风险
|
||||
public static Integer HIGHT_OTHER = -10;// 其他
|
||||
|
||||
// 中风险 黑名单信息查询服务
|
||||
public static Integer MIDDLE_BLACKINFO_LAW_HIT = -30;// 黑名单信息查询服务,法律方面原因(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_INTERNET_HIT = -24;// 黑名单信息查询服务,网络不良行为(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_VENTURE_HIT = -30;// 黑名单信息查询服务,因为风险信息被机构拒绝(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_ECONOMIC_HIT = -20;// 黑名单信息查询服务,共享经济黑名单(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_OTHER = -8;// 黑名单信息查询服务 其它
|
||||
// 中风险 黑名单信息查询服务
|
||||
public static Integer MIDDLE_BLACKINFO_LAW_HIT = -30;// 黑名单信息查询服务,法律方面原因(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_INTERNET_HIT = -24;// 黑名单信息查询服务,网络不良行为(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_VENTURE_HIT = -30;// 黑名单信息查询服务,因为风险信息被机构拒绝(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_ECONOMIC_HIT = -20;// 黑名单信息查询服务,共享经济黑名单(击中)
|
||||
public static Integer MIDDLE_BLACKINFO_OTHER = -8;// 黑名单信息查询服务 其它
|
||||
|
||||
// 中风险 多平台借贷黑名单验证服务
|
||||
public static Integer MIDDLE_BORR_BLACK_HIT = -30;// 多平台借贷黑名单验证服务 多头借贷(击中)
|
||||
public static Integer MIDDLE_BORR_BLACK_OTHER = -8;// 多平台借贷黑名单验证服务 其它
|
||||
// 中风险 多平台借贷黑名单验证服务
|
||||
public static Integer MIDDLE_BORR_BLACK_HIT = -30;// 多平台借贷黑名单验证服务 多头借贷(击中)
|
||||
public static Integer MIDDLE_BORR_BLACK_OTHER = -8;// 多平台借贷黑名单验证服务 其它
|
||||
|
||||
// 低风险 多平台借贷黑名单验证服务
|
||||
public static Integer LOW_INVEST_HIT = -20;// 个人对外投资查询 失信对外投资(击中)
|
||||
public static Integer LOW_INVEST_OTHER = -5;// 个人对外投资查询 其它
|
||||
// 低风险 多平台借贷黑名单验证服务
|
||||
public static Integer LOW_INVEST_HIT = -20;// 个人对外投资查询 失信对外投资(击中)
|
||||
public static Integer LOW_INVEST_OTHER = -5;// 个人对外投资查询 其它
|
||||
|
||||
// 低风险 被执行人信息查询服务
|
||||
public static Integer LOW_EXECUTOR_HIT = -20;// 被执行人(击中)
|
||||
public static Integer LOW_EXECUTOR_OTHER = -5;// 其它
|
||||
// 低风险 被执行人信息查询服务
|
||||
public static Integer LOW_EXECUTOR_HIT = -20;// 被执行人(击中)
|
||||
public static Integer LOW_EXECUTOR_OTHER = -5;// 其它
|
||||
|
||||
// 非风险项 三大运营商手机入网在时长
|
||||
// 移动
|
||||
public static Integer TELE_NO_GET = 6;// 未查的
|
||||
public static Integer TELE_LARGE_TWOFOUR = 20;// >24个月
|
||||
public static Integer TELE_LARGE_ONETWO_LESS_TWOFOUR = 15;// 12-24个月
|
||||
public static Integer TELE_LARGE_SIX_LESS_ONETWO = 8;// 6-12个月
|
||||
public static Integer TELE_LARGE_THREE_LESS_SIX = 6;// 3-6个月
|
||||
public static Integer TELE_LESS_THREE = 2;// 0-3个月
|
||||
// 电信
|
||||
public static Integer MOBILE_NO_GET = 6;// 未查得
|
||||
public static Integer MOBILE_LARGE_SIXZERO = 20;// 60个月及以上
|
||||
public static Integer MOBILE_LARGE_THREESIX_LESS_SIXZERO = 20;// 36-60个月
|
||||
public static Integer MOBILE_LARGE_ONETWO_LESS_THREESIX = 12;// 12-36个月
|
||||
public static Integer MOBILE_LARGE_SIX_LESS_ONETWO = 8;// 6-12个月
|
||||
public static Integer MOBILE_LESS_SXI = 4;// 0-6个月
|
||||
// 非风险项 三大运营商手机入网在时长
|
||||
// 移动
|
||||
public static Integer TELE_NO_GET = 6;// 未查的
|
||||
public static Integer TELE_LARGE_TWOFOUR = 20;// >24个月
|
||||
public static Integer TELE_LARGE_ONETWO_LESS_TWOFOUR = 15;// 12-24个月
|
||||
public static Integer TELE_LARGE_SIX_LESS_ONETWO = 8;// 6-12个月
|
||||
public static Integer TELE_LARGE_THREE_LESS_SIX = 6;// 3-6个月
|
||||
public static Integer TELE_LESS_THREE = 2;// 0-3个月
|
||||
// 电信
|
||||
public static Integer MOBILE_NO_GET = 6;// 未查得
|
||||
public static Integer MOBILE_LARGE_SIXZERO = 20;// 60个月及以上
|
||||
public static Integer MOBILE_LARGE_THREESIX_LESS_SIXZERO = 20;// 36-60个月
|
||||
public static Integer MOBILE_LARGE_ONETWO_LESS_THREESIX = 12;// 12-36个月
|
||||
public static Integer MOBILE_LARGE_SIX_LESS_ONETWO = 8;// 6-12个月
|
||||
public static Integer MOBILE_LESS_SXI = 4;// 0-6个月
|
||||
|
||||
// 联通
|
||||
public static Integer UNICOM_NO_GET = 6;// 未查得
|
||||
public static Integer UNICOM_LARGE_THREESIX = 20;// 36个月及以上
|
||||
public static Integer UNICOM_LARGE_TWOFOUR_LESS_THREESIX = 20;// 24-36个月
|
||||
public static Integer UNICOM_LARGE_ONETWO_LESS_TWOFOUR = 15;// 12-24个月
|
||||
public static Integer UNICOM_LARGE_SIX_LESS_ONETWO = 8;// 6-12个月
|
||||
public static Integer UNICOM_LARGE_THREE_LESS_SIX = 6;// 3-6个月
|
||||
public static Integer UNICOM_LARGE_ONE_LESS_THREE = 2;// 1-3个月
|
||||
public static Integer UNICOM_LESS_ONE = 1;// 0-1个月
|
||||
// 联通
|
||||
public static Integer UNICOM_NO_GET = 6;// 未查得
|
||||
public static Integer UNICOM_LARGE_THREESIX = 20;// 36个月及以上
|
||||
public static Integer UNICOM_LARGE_TWOFOUR_LESS_THREESIX = 20;// 24-36个月
|
||||
public static Integer UNICOM_LARGE_ONETWO_LESS_TWOFOUR = 15;// 12-24个月
|
||||
public static Integer UNICOM_LARGE_SIX_LESS_ONETWO = 8;// 6-12个月
|
||||
public static Integer UNICOM_LARGE_THREE_LESS_SIX = 6;// 3-6个月
|
||||
public static Integer UNICOM_LARGE_ONE_LESS_THREE = 2;// 1-3个月
|
||||
public static Integer UNICOM_LESS_ONE = 1;// 0-1个月
|
||||
|
||||
public static final String LOGIN_ERROR = "LOGIN_ERROR";
|
||||
public static final String SUCCESS = "SUCCESS";
|
||||
|
||||
@@ -12,24 +12,24 @@ import com.mongodb.DBObject;
|
||||
*/
|
||||
public class PdsPersonInfoUtils {
|
||||
|
||||
//违约风险
|
||||
//违约风险
|
||||
public static Integer getBleakRisk(Borrower borr){
|
||||
int blackInfo = 0;//黑名单信息查询服务
|
||||
int blackInfo = 0;//黑名单信息查询服务
|
||||
BasicDBList blackL = borr.getBlackList();
|
||||
if(blackL!=null&&blackL.size()>0){
|
||||
for (Object object : blackL) {
|
||||
DBObject obj = (DBObject)object;
|
||||
if("0".equals(obj.get("reason"))||"3".equals(obj.get("reason"))){
|
||||
blackInfo =1;//命中
|
||||
blackInfo =1;//命中
|
||||
}
|
||||
}
|
||||
}else if(blackL==null){
|
||||
blackInfo = 0;//未知
|
||||
blackInfo = 0;//未知
|
||||
}else{
|
||||
blackInfo = 2;//为命中
|
||||
blackInfo = 2;//为命中
|
||||
}
|
||||
|
||||
//失信被执行人查询服务
|
||||
//失信被执行人查询服务
|
||||
int loseCreditInfo = 0;
|
||||
BasicDBList loseCreditJudicialL = borr.getLoseCreditJudicialList();
|
||||
if(loseCreditJudicialL!=null&&loseCreditJudicialL.size()>0){
|
||||
@@ -39,7 +39,7 @@ public class PdsPersonInfoUtils {
|
||||
}else{
|
||||
loseCreditInfo = 2;
|
||||
}
|
||||
//多平台借贷黑名单验证服务
|
||||
//多平台借贷黑名单验证服务
|
||||
int borrPInfo = 0;
|
||||
Integer borrowPlatCount = borr.getBorrowPlatCount();
|
||||
if(borrowPlatCount==null){
|
||||
@@ -50,7 +50,7 @@ public class PdsPersonInfoUtils {
|
||||
borrPInfo = 2;
|
||||
}
|
||||
|
||||
//个人对外投资查询
|
||||
//个人对外投资查询
|
||||
int badEnterpriseInfo = 0;
|
||||
BasicDBList badEnterpriseInvestments = borr.getBadEnterpriseInvestments();
|
||||
if(badEnterpriseInvestments!=null&&badEnterpriseInvestments.size()>0){
|
||||
@@ -61,7 +61,7 @@ public class PdsPersonInfoUtils {
|
||||
badEnterpriseInfo = 2;
|
||||
}
|
||||
|
||||
//被执行人信息查询服务
|
||||
//被执行人信息查询服务
|
||||
int defendantJInfo = 0;
|
||||
BasicDBList defendantJudicialList = borr.getDefendantJudicialList();
|
||||
if(defendantJudicialList==null){
|
||||
@@ -73,52 +73,52 @@ public class PdsPersonInfoUtils {
|
||||
}
|
||||
|
||||
if(blackInfo==1||loseCreditInfo==1||borrPInfo==1||badEnterpriseInfo==1){
|
||||
return 2;//欺诈高风险
|
||||
return 2;//欺诈高风险
|
||||
}else if(blackInfo==2&&loseCreditInfo==2&&borrPInfo==2&&badEnterpriseInfo==2&&defendantJInfo==2){
|
||||
return 0;// 欺诈中风险
|
||||
return 0;// 欺诈中风险
|
||||
}else{
|
||||
return 1;//欺诈中风险
|
||||
return 1;//欺诈中风险
|
||||
}
|
||||
}
|
||||
|
||||
//欺诈风险
|
||||
//欺诈风险
|
||||
public static Integer getCheatRisk(Borrower borr){
|
||||
int cheatRisk = 0;
|
||||
BasicDBObject phoneOnlineTimes = borr.getPhoneOnlineTimes();
|
||||
int mobileInfo = 0;//
|
||||
if(phoneOnlineTimes!=null){
|
||||
String type = (String)phoneOnlineTimes.get("type");
|
||||
if("中国移动".equals(type)){
|
||||
if("中国移动".equals(type)){
|
||||
String time = (String)phoneOnlineTimes.get("inTimesDesc");
|
||||
if("0-3个月".equals(time)){
|
||||
if("0-3个月".equals(time)){
|
||||
mobileInfo = 1;
|
||||
}else if("3-6个月".equals(time)){
|
||||
}else if("3-6个月".equals(time)){
|
||||
mobileInfo = 1;
|
||||
}else if(!("未知".equals(time))){
|
||||
}else if(!("未知".equals(time))){
|
||||
mobileInfo = 2;
|
||||
}
|
||||
}else if("中国联通".equals(type)){
|
||||
}else if("中国联通".equals(type)){
|
||||
String time = (String)phoneOnlineTimes.get("inTimesDesc");
|
||||
if("0-1个月".equals(time)){
|
||||
if("0-1个月".equals(time)){
|
||||
mobileInfo = 1;
|
||||
}else if("1-3个月".equals(time)){
|
||||
}else if("1-3个月".equals(time)){
|
||||
mobileInfo = 1;
|
||||
}else if("3-6个月".equals(time)){
|
||||
}else if("3-6个月".equals(time)){
|
||||
mobileInfo = 1;
|
||||
}else if(!("未知".equals(time))){
|
||||
}else if(!("未知".equals(time))){
|
||||
mobileInfo = 2;
|
||||
}
|
||||
}else if("中国电信".equals(type)){
|
||||
}else if("中国电信".equals(type)){
|
||||
String time = (String)phoneOnlineTimes.get("inTimesDesc");
|
||||
if("0-6个月".equals(time)){
|
||||
if("0-6个月".equals(time)){
|
||||
mobileInfo = 1;
|
||||
}else if(!("未知".equals(time))){
|
||||
}else if(!("未知".equals(time))){
|
||||
mobileInfo = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int idInfo = 0;//身份信息验证服务
|
||||
int idInfo = 0;//身份信息验证服务
|
||||
Integer isRight = borr.getCompareResult();
|
||||
if(isRight!=null&&isRight==2){
|
||||
idInfo = 1;
|
||||
@@ -128,32 +128,32 @@ public class PdsPersonInfoUtils {
|
||||
idInfo = 0;
|
||||
}
|
||||
|
||||
int blackInfo = 0;//黑名单信息查询服务
|
||||
int blackInfo = 0;//黑名单信息查询服务
|
||||
BasicDBList blackL = borr.getBlackList();
|
||||
if(blackL!=null&&blackL.size()>0){
|
||||
for (Object object : blackL) {
|
||||
DBObject obj = (DBObject)object;
|
||||
if("1".equals(obj.get("reason"))||"2".equals(obj.get("reason"))||"4".equals(obj.get("reason"))){
|
||||
blackInfo =1;//命中
|
||||
blackInfo =1;//命中
|
||||
}
|
||||
}
|
||||
}else if(blackL==null){
|
||||
blackInfo = 0;//未知
|
||||
blackInfo = 0;//未知
|
||||
}else{
|
||||
blackInfo = 2;//为命中
|
||||
blackInfo = 2;//为命中
|
||||
}
|
||||
|
||||
|
||||
if(idInfo==1){
|
||||
cheatRisk = 2;//欺诈高风险
|
||||
cheatRisk = 2;//欺诈高风险
|
||||
}else if(mobileInfo==1||blackInfo!=2||idInfo==0){
|
||||
cheatRisk = 1;//欺诈中风险
|
||||
cheatRisk = 1;//欺诈中风险
|
||||
}else{
|
||||
cheatRisk = 0;//欺诈低风险
|
||||
cheatRisk = 0;//欺诈低风险
|
||||
}
|
||||
return cheatRisk;
|
||||
}
|
||||
//人物得分
|
||||
//人物得分
|
||||
public static Integer getScore(Borrower borr){
|
||||
int score = 0;
|
||||
int high = highRiskStatus(borr);
|
||||
@@ -195,7 +195,7 @@ public class PdsPersonInfoUtils {
|
||||
}
|
||||
|
||||
|
||||
//判断黑名单是中风险还是高风险0中 1高 -1其他
|
||||
//判断黑名单是中风险还是高风险0中 1高 -1其他
|
||||
public static boolean blackStatus(BasicDBList blackL){
|
||||
if(blackL!=null&&blackL.size()>0){
|
||||
for (Object object : blackL) {
|
||||
@@ -208,7 +208,7 @@ public class PdsPersonInfoUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
//中风险黑名单信息查询服务得分
|
||||
//中风险黑名单信息查询服务得分
|
||||
public static Integer blackListScore(Borrower borr){
|
||||
BasicDBList blackL = borr.getBlackList();
|
||||
if(blackStatus(blackL)){
|
||||
@@ -247,7 +247,7 @@ public class PdsPersonInfoUtils {
|
||||
return blackLScore;
|
||||
}
|
||||
|
||||
//击中中风险项得分
|
||||
//击中中风险项得分
|
||||
public static Integer middleRiskItemScore(Borrower borr){
|
||||
int score = PdsConstants.MIDDLE_BORR_BLACK_HIT;
|
||||
int middSta = middleRiskStatus(borr);
|
||||
@@ -262,7 +262,7 @@ public class PdsPersonInfoUtils {
|
||||
return score;
|
||||
}
|
||||
|
||||
//低风险项
|
||||
//低风险项
|
||||
public static Integer lowRiskStatus(Borrower borr){
|
||||
BasicDBList defendantJudicialList = borr.getDefendantJudicialList();
|
||||
int defendantJudicialSta = 0;
|
||||
@@ -292,7 +292,7 @@ public class PdsPersonInfoUtils {
|
||||
}
|
||||
}
|
||||
|
||||
//高风险击中情况
|
||||
//高风险击中情况
|
||||
public static Integer highRiskStatus(Borrower borr){
|
||||
BasicDBList blackL = borr.getBlackList();
|
||||
int blackLSta = 1;
|
||||
@@ -315,27 +315,27 @@ public class PdsPersonInfoUtils {
|
||||
}
|
||||
|
||||
if(borr.getCompareResult()!=null&&borr.getCompareResult()==1&&blackLSta==1&&loseCreditJudicialLStatus ==1){
|
||||
return 1; //未击中
|
||||
return 1; //未击中
|
||||
}else if((borr.getCompareResult()!=null&&borr.getCompareResult()==2)||blackLSta==2&&loseCreditJudicialLStatus==2){
|
||||
return 2; //击中
|
||||
return 2; //击中
|
||||
}else{
|
||||
return 3; //其他
|
||||
return 3; //其他
|
||||
}
|
||||
}
|
||||
|
||||
//中风险击中情况
|
||||
//中风险击中情况
|
||||
public static Integer middleRiskStatus(Borrower borr){
|
||||
BasicDBList blackL = borr.getBlackList();
|
||||
Integer blackSta = 0;
|
||||
if(blackStatus(blackL)){
|
||||
blackSta = 0;//属于高风险
|
||||
blackSta = 0;//属于高风险
|
||||
}else{
|
||||
if(blackL==null){
|
||||
blackSta = 3;//其他
|
||||
blackSta = 3;//其他
|
||||
}else if(blackL.size()>0){
|
||||
blackSta = 2;//击中
|
||||
blackSta = 2;//击中
|
||||
}else{
|
||||
blackSta = 1;//未击中
|
||||
blackSta = 1;//未击中
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,57 +360,57 @@ public class PdsPersonInfoUtils {
|
||||
}
|
||||
|
||||
|
||||
//非风险项目得分
|
||||
//非风险项目得分
|
||||
public static Integer noRiskItemScore(Borrower borr){
|
||||
int noRiskScore = PdsConstants.TELE_NO_GET;
|
||||
BasicDBObject phoneOnlineTimes = borr.getPhoneOnlineTimes();
|
||||
if(phoneOnlineTimes!=null){
|
||||
String type = (String)phoneOnlineTimes.get("type");
|
||||
if("中国移动".equals(type)){
|
||||
if("中国移动".equals(type)){
|
||||
String time = (String)phoneOnlineTimes.get("inTimesDesc");
|
||||
if("0-3个月".equals(time)){
|
||||
if("0-3个月".equals(time)){
|
||||
noRiskScore = PdsConstants.TELE_LESS_THREE;
|
||||
}else if("3-6个月".equals(time)){
|
||||
}else if("3-6个月".equals(time)){
|
||||
noRiskScore = PdsConstants.TELE_LARGE_THREE_LESS_SIX;
|
||||
}else if("6-12个月".equals(time)){
|
||||
}else if("6-12个月".equals(time)){
|
||||
noRiskScore = PdsConstants.TELE_LARGE_SIX_LESS_ONETWO;
|
||||
}else if("12-24个月".equals(time)){
|
||||
}else if("12-24个月".equals(time)){
|
||||
noRiskScore = PdsConstants.TELE_LARGE_ONETWO_LESS_TWOFOUR;
|
||||
}else if("24月以上".equals(time)){
|
||||
}else if("24月以上".equals(time)){
|
||||
noRiskScore = PdsConstants.TELE_LARGE_TWOFOUR;
|
||||
}else{
|
||||
noRiskScore = PdsConstants.TELE_NO_GET;
|
||||
}
|
||||
}else if("中国联通".equals(type)){
|
||||
}else if("中国联通".equals(type)){
|
||||
String time = (String)phoneOnlineTimes.get("inTimesDesc");
|
||||
if("0-1个月".equals(time)){
|
||||
if("0-1个月".equals(time)){
|
||||
noRiskScore = PdsConstants.UNICOM_LESS_ONE;
|
||||
}else if("1-3个月".equals(time)){
|
||||
}else if("1-3个月".equals(time)){
|
||||
noRiskScore = PdsConstants.UNICOM_LARGE_ONE_LESS_THREE;
|
||||
}else if("3-6个月".equals(time)){
|
||||
}else if("3-6个月".equals(time)){
|
||||
noRiskScore = PdsConstants.UNICOM_LARGE_THREE_LESS_SIX;
|
||||
}else if("6-12个月".equals(time)){
|
||||
}else if("6-12个月".equals(time)){
|
||||
noRiskScore = PdsConstants.UNICOM_LARGE_SIX_LESS_ONETWO;
|
||||
}else if("12-24个月".equals(time)){
|
||||
}else if("12-24个月".equals(time)){
|
||||
noRiskScore = PdsConstants.UNICOM_LARGE_ONETWO_LESS_TWOFOUR;
|
||||
}else if("24-36个月".equals(time)){
|
||||
}else if("24-36个月".equals(time)){
|
||||
noRiskScore = PdsConstants.UNICOM_LARGE_TWOFOUR_LESS_THREESIX;
|
||||
}else if("36个月以上".equals(time)){
|
||||
}else if("36个月以上".equals(time)){
|
||||
noRiskScore = PdsConstants.UNICOM_LARGE_THREESIX;
|
||||
}else{
|
||||
noRiskScore = PdsConstants.UNICOM_NO_GET;
|
||||
}
|
||||
}else if("中国电信".equals(type)){
|
||||
}else if("中国电信".equals(type)){
|
||||
String time = (String)phoneOnlineTimes.get("inTimesDesc");
|
||||
if("0-6个月".equals(time)){
|
||||
if("0-6个月".equals(time)){
|
||||
noRiskScore = PdsConstants.MOBILE_LESS_SXI;
|
||||
}else if("6-12个月".equals(time)){
|
||||
}else if("6-12个月".equals(time)){
|
||||
noRiskScore = PdsConstants.MOBILE_LARGE_SIX_LESS_ONETWO;
|
||||
}else if("12-36个月".equals(time)){
|
||||
}else if("12-36个月".equals(time)){
|
||||
noRiskScore = PdsConstants.MOBILE_LARGE_ONETWO_LESS_THREESIX;
|
||||
}else if("36-60个月".equals(time)){
|
||||
}else if("36-60个月".equals(time)){
|
||||
noRiskScore = PdsConstants.MOBILE_LARGE_THREESIX_LESS_SIXZERO;
|
||||
}else if("60月以上".equals(time)){
|
||||
}else if("60月以上".equals(time)){
|
||||
noRiskScore = PdsConstants.MOBILE_LARGE_SIXZERO;
|
||||
}else{
|
||||
noRiskScore = PdsConstants.MOBILE_NO_GET;
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by luoxf on 2018/11/6.
|
||||
* 地址评级
|
||||
* 地址评级
|
||||
*/
|
||||
public class AddressController {
|
||||
|
||||
@@ -49,18 +49,18 @@ public class AddressController {
|
||||
|
||||
private boolean showFall(JsonModel jsonModel, AddressModel model) {
|
||||
if (StringUtils.isEmpty(model.getCityName())) {
|
||||
jsonModel.setJsonModel(new ReponseData(201, "请输入城市"));
|
||||
jsonModel.setJsonModel(new ReponseData(201, "请输入城市"));
|
||||
return false;
|
||||
}
|
||||
if (StringUtils.isEmpty(model.getKeyword())) {
|
||||
jsonModel.setJsonModel(new ReponseData(201, "请输入地址"));
|
||||
jsonModel.setJsonModel(new ReponseData(201, "请输入地址"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市列表
|
||||
* 获取城市列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
+2
-2
@@ -70,7 +70,7 @@ public class AlgorithmRuleController {
|
||||
data.put("status", 0);
|
||||
if(StringUtils.isBlank(model.getRuleName()) || CollectionUtils.isEmpty(model.getCities()) || CollectionUtils.isEmpty(model.getValues())) {
|
||||
data.put("status", 1);
|
||||
data.put("msg", "信息没有录入完整!");
|
||||
data.put("msg", "信息没有录入完整!");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class AlgorithmRuleController {
|
||||
}
|
||||
}catch (Exception e) {
|
||||
data.put("status", 1);
|
||||
data.put("msg", "请输入数字类型的分值!");
|
||||
data.put("msg", "请输入数字类型的分值!");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -37,7 +37,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
/**
|
||||
*自动完成
|
||||
*自动完成
|
||||
*/
|
||||
public class AutoController {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(EnterpriseController.class);
|
||||
@@ -84,7 +84,7 @@ public class AutoController {
|
||||
String city = model.getCityName();
|
||||
String district = model.getSuggestRegion();
|
||||
String keyword = model.getKeywords();
|
||||
//拆分地址,如果输入纯字母或数字组合,不进行拆分
|
||||
//拆分地址,如果输入纯字母或数字组合,不进行拆分
|
||||
Map<String, Object> resultMap = assetAutoService.assetAutoByKeyword(city, district, keyword, 20);
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
jsonModel.setJsonModel(resultMap);
|
||||
@@ -118,7 +118,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 输入的地址进行拆分
|
||||
* 输入的地址进行拆分
|
||||
* @param city
|
||||
* @param keyword
|
||||
* @return
|
||||
@@ -143,7 +143,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(city)) {
|
||||
city = "全国";
|
||||
city = "全国";
|
||||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<String,Object>();
|
||||
@@ -259,12 +259,12 @@ public class AutoController {
|
||||
"exists", existsAvgPrice));
|
||||
} else {
|
||||
jsonModel.setJsonModel(ImmutableMap.of("credit", credit));
|
||||
//对匹配的结局进行检测
|
||||
//对匹配的结局进行检测
|
||||
mmd = monitorMatchDistirct(credit, null, null, null, null, params,request);
|
||||
}
|
||||
if(StringUtils.isBlank(icon)){
|
||||
if(mmd!=null&&StringUtils.isNotBlank(mmd.getEnterpriseId())){
|
||||
LOGGER.warn("企业为空来源:autoController"+mmd.getCity()+"========"+mmd.getRegion()+"============"+mmd.getAddress());
|
||||
LOGGER.warn("企业为空来源:autoController"+mmd.getCity()+"========"+mmd.getRegion()+"============"+mmd.getAddress());
|
||||
}
|
||||
houseInfoMonitorService.save(mmd);
|
||||
}
|
||||
@@ -279,7 +279,7 @@ public class AutoController {
|
||||
if(StringUtils.isBlank(cityName)) {
|
||||
result.put("valid", true);
|
||||
}else {
|
||||
List<Cities> citys = CityFactory.getInstance().matchCitiesByRegion(cityName, "县级市");
|
||||
List<Cities> citys = CityFactory.getInstance().matchCitiesByRegion(cityName, "县级市");
|
||||
if(CollectionUtils.isNotEmpty(citys)) {
|
||||
result.put("valid", true);
|
||||
} else {
|
||||
@@ -319,7 +319,7 @@ public class AutoController {
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
User user = pdsUserService.getUser(userId);
|
||||
String cityParam = city;
|
||||
if(StringUtils.isNotBlank(cityParam) && cityParam.endsWith("市")) {
|
||||
if(StringUtils.isNotBlank(cityParam) && cityParam.endsWith("市")) {
|
||||
cityParam = cityParam.substring(0, cityParam.length()-1);
|
||||
}
|
||||
|
||||
@@ -332,8 +332,8 @@ public class AutoController {
|
||||
citiesList.addAll(CityFactory.getInstance().matchCities(cityParam, true));
|
||||
}
|
||||
if (CollectionUtils.isEmpty(citiesList)) {
|
||||
//看是不是县级市
|
||||
citiesList.addAll(CityFactory.getInstance().matchCitiesByRegion(cityParam, "县级市"));
|
||||
//看是不是县级市
|
||||
citiesList.addAll(CityFactory.getInstance().matchCitiesByRegion(cityParam, "县级市"));
|
||||
if (CollectionUtils.isNotEmpty(citiesList)) {
|
||||
result.put("isCityLevel", false);
|
||||
}
|
||||
@@ -386,7 +386,7 @@ public class AutoController {
|
||||
}
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
jsonModel.setJsonModel(ImmutableMap.of("support", isSupport));
|
||||
//押品评级监控
|
||||
//押品评级监控
|
||||
monitorInfo(model.getInputName(), model.getCityName(), model.getSuggestRegion(), model.getKeywords(), userId, enterpriseId, isSupport);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -412,7 +412,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否存在均价
|
||||
* 判断是否存在均价
|
||||
* @param city
|
||||
* @param region
|
||||
* @param name
|
||||
@@ -437,7 +437,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 对匹配的结果进行检测
|
||||
* 对匹配的结果进行检测
|
||||
*/
|
||||
private HouseInfoMonitor monitorMatchDistirct(Double credit,Boolean exist,String matchCity,String matchRegion,String matchName,Map<String, Object> params,HttpServletRequest request ){
|
||||
HouseInfoMonitor him = new HouseInfoMonitor();
|
||||
|
||||
+16
-16
@@ -40,13 +40,13 @@ import com.fangjia.service.pds.OnceCollateralEvaluationInfoService;
|
||||
import com.fangjia.service.pds.PdsUserService;
|
||||
|
||||
/**
|
||||
* PDS后台角色管理控制器
|
||||
* PDS后台角色管理控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
public class BkoffCollInfoController {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(BkoffCollInfoController.class);
|
||||
private static final String[] titles = {"用户名", "城市", "小区", "地址", "评分", "总价", "评估时间", "来源"};
|
||||
private static final String[] titles = {"用户名", "城市", "小区", "地址", "评分", "总价", "评估时间", "来源"};
|
||||
private OnceCollateralEvaluationInfoService onceCollateralEvaluationInfoService;
|
||||
private EquipmentInfoService equipmentInfoService;
|
||||
private EnterpriseService enterpriseService;
|
||||
@@ -67,7 +67,7 @@ public class BkoffCollInfoController {
|
||||
this.pdsUserService = pdsUserService;
|
||||
}
|
||||
/**
|
||||
* 怕平列表页
|
||||
* 怕平列表页
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -94,12 +94,12 @@ public class BkoffCollInfoController {
|
||||
String enterpriseId = onceColl.getEnterpriseId();
|
||||
String userId = onceColl.getUserId();
|
||||
try {
|
||||
//企业信息
|
||||
//企业信息
|
||||
if(StringUtils.isNotBlank(enterpriseId)){
|
||||
Enterprise enterprise = enterpriseService.getEnterprise(enterpriseId);
|
||||
onceCollInfo.setEnterprise(enterprise);
|
||||
}
|
||||
//user信息
|
||||
//user信息
|
||||
if(StringUtils.isNotBlank(userId)){
|
||||
User user = pdsUserService.getUser(userId);
|
||||
if(user!=null){
|
||||
@@ -131,7 +131,7 @@ public class BkoffCollInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* 导出数据
|
||||
* @param model
|
||||
* @param response
|
||||
* @return
|
||||
@@ -153,12 +153,12 @@ public class BkoffCollInfoController {
|
||||
String enterpriseId = onceColl.getEnterpriseId();
|
||||
String userId = onceColl.getUserId();
|
||||
try {
|
||||
//企业信息
|
||||
//企业信息
|
||||
if(StringUtils.isNotBlank(enterpriseId)){
|
||||
Enterprise enterprise = enterpriseService.getEnterprise(enterpriseId);
|
||||
onceCollInfo.setEnterprise(enterprise);
|
||||
}
|
||||
//user信息
|
||||
//user信息
|
||||
if(StringUtils.isNotBlank(userId)){
|
||||
User user = pdsUserService.getUser(userId);
|
||||
if(user!=null){
|
||||
@@ -176,17 +176,17 @@ public class BkoffCollInfoController {
|
||||
}
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
String fileName = "评估记录.xls";
|
||||
String fileName = "评估记录.xls";
|
||||
Workbook wb = creatExcel(list, fileName);
|
||||
try {
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/x-download;charset=UTF-8");
|
||||
fileName = new String(fileName.getBytes("GBK"),"ISO-8859-1");
|
||||
if(fileName.length()>150){//解决IE 6.0 bug
|
||||
if(fileName.length()>150){//解决IE 6.0 bug
|
||||
fileName = new String(fileName.getBytes("GBK"),"ISO-8859-1");
|
||||
}
|
||||
response.setHeader( "Content-Disposition", "attachment;filename=" + fileName);
|
||||
os = response.getOutputStream();// 取得输出流
|
||||
os = response.getOutputStream();// 取得输出流
|
||||
wb.write(os);
|
||||
os.flush();
|
||||
|
||||
@@ -208,7 +208,7 @@ public class BkoffCollInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建excel
|
||||
* 创建excel
|
||||
* @param datas
|
||||
* @return
|
||||
*/
|
||||
@@ -216,7 +216,7 @@ public class BkoffCollInfoController {
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
HSSFSheet sheet = workbook.createSheet(fileName);
|
||||
createHeader(sheet);
|
||||
//"用户名", "城市", "小区", "地址", "评分", "总价", "评估时间", "来源"
|
||||
//"用户名", "城市", "小区", "地址", "评分", "总价", "评估时间", "来源"
|
||||
if(datas!=null&&datas.size()>0){
|
||||
for(OnceCollInfo collInfo:datas){
|
||||
String userName = collInfo.getUserName();
|
||||
@@ -226,13 +226,13 @@ public class BkoffCollInfoController {
|
||||
double totalScore = collInfo.getOnceColl().getTotalScore();
|
||||
int totalPrice = collInfo.getOnceColl().getTotalPrice();
|
||||
String evalDate = DateUtil.formatByPattern(collInfo.getOnceColl().getCreatDate(), "yyyy-MM-dd HH:mm");;
|
||||
String from = "业务评估";
|
||||
String from = "业务评估";
|
||||
if(StringUtils.isNotBlank(collInfo.getOnceColl().getFrom())){
|
||||
if("eam".equals(collInfo.getOnceColl().getFrom())) {
|
||||
from = "资产管理";
|
||||
from = "资产管理";
|
||||
}
|
||||
if("hk".equals(collInfo.getOnceColl().getFrom())) {
|
||||
from = "客户申请";
|
||||
from = "客户申请";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ import com.fangjia.pds.model.EmployeeShowModel;
|
||||
import com.fangjia.pds.model.JsonResultModel;
|
||||
import com.fangjia.service.pds.PdsEmployeeService;
|
||||
/**
|
||||
* 员工管理
|
||||
* 员工管理
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public class BkoffEmployeeController {
|
||||
} else {
|
||||
Employee old = pdsEmployeeService.get(model.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "要修改的员工不存在");
|
||||
return new JsonResultModel(false, "要修改的员工不存在");
|
||||
}
|
||||
model.setCreateDate(old.getCreateDate());
|
||||
model.setModifyDate(date);
|
||||
|
||||
+32
-32
@@ -27,7 +27,7 @@ import com.fangjia.service.pds.ApiCallLimitService;
|
||||
import com.fangjia.service.pds.EnterpriseService;
|
||||
import com.fangjia.service.pds.PdsUserService;
|
||||
/**
|
||||
* PDS后台管理企业控制器
|
||||
* PDS后台管理企业控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -59,7 +59,7 @@ public class BkoffEnterpriseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业管理页面
|
||||
* 企业管理页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -79,9 +79,9 @@ public class BkoffEnterpriseController {
|
||||
int huoKeTotal = 0;
|
||||
int evaluatingTotal = 0;
|
||||
for(ApiCallLimit call:callLimitAList){
|
||||
if("hk/evaluate".equals(call.getUri())){ //营销货客
|
||||
if("hk/evaluate".equals(call.getUri())){ //营销货客
|
||||
huoKeTotal = call.getCount();
|
||||
}else if("evaluation/overView".equals(call.getUri())){ //我要评估
|
||||
}else if("evaluation/overView".equals(call.getUri())){ //我要评估
|
||||
evaluatingTotal = call.getCount();
|
||||
}
|
||||
}
|
||||
@@ -92,15 +92,15 @@ public class BkoffEnterpriseController {
|
||||
|
||||
PageBean<EnterpriseShowModel> showPageBean = new PageBean<EnterpriseShowModel>(pageBean.getStart(), pageBean.getLimit(), showModelList, pageBean.getTotalRecords());
|
||||
model.setPageBean(showPageBean);
|
||||
request.getSession().setAttribute("pds_menu", "企业模块");
|
||||
request.getSession().setAttribute("pds_menu", "企业模块");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("企业管理页面查询异常", e);
|
||||
LOGGER.error("企业管理页面查询异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入添加企业页面
|
||||
* 进入添加企业页面
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
@@ -120,7 +120,7 @@ public class BkoffEnterpriseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入充值页面
|
||||
* 进入充值页面
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
@@ -133,31 +133,31 @@ public class BkoffEnterpriseController {
|
||||
}
|
||||
List<ApiCallLimit> callLimitAList = apiCallLimitService.findAllCountByEid(model.getId());
|
||||
for(ApiCallLimit call:callLimitAList){
|
||||
if("uploaddata".equals(call.getUri())){ //客户分类
|
||||
if("uploaddata".equals(call.getUri())){ //客户分类
|
||||
model.setCustomerTypeTotal(call.getCount());
|
||||
model.setCustomerTypeSumTotal(call.getSumCount());
|
||||
}else if("demo/detail".equals(call.getUri())){ //客户评级
|
||||
}else if("demo/detail".equals(call.getUri())){ //客户评级
|
||||
model.setCustomerLevelTotal(call.getCount());
|
||||
model.setCustomerLevelSumTotal(call.getSumCount());
|
||||
}else if("zichan/saveevaluation".equals(call.getUri())){ //我的房产
|
||||
}else if("zichan/saveevaluation".equals(call.getUri())){ //我的房产
|
||||
model.setMyHouseTotal(call.getCount());
|
||||
model.setMyHouseSumTotal(call.getSumCount());
|
||||
}else if("prevaluation/saveevalinfo".equals(call.getUri())){ //贷前估值
|
||||
}else if("prevaluation/saveevalinfo".equals(call.getUri())){ //贷前估值
|
||||
model.setPrevaluationTotal(call.getCount());
|
||||
model.setPrevaluationSumTotal(call.getSumCount());
|
||||
}else if("uploaddatabatch".equals(call.getUri())){ //批量评估
|
||||
}else if("uploaddatabatch".equals(call.getUri())){ //批量评估
|
||||
model.setEvaluationBatchTotal(call.getCount());
|
||||
model.setEvaluationBatchSumTotal(call.getSumCount());
|
||||
}else if("hk/evaluate".equals(call.getUri())){ //营销货客
|
||||
}else if("hk/evaluate".equals(call.getUri())){ //营销货客
|
||||
model.setHuoKeTotal(call.getCount());
|
||||
model.setHuoKeSumTotal(call.getSumCount());
|
||||
}else if("lenderquery".equals(call.getUri())){ //贷款人查询
|
||||
}else if("lenderquery".equals(call.getUri())){ //贷款人查询
|
||||
model.setLenderQueryTotal(call.getCount());
|
||||
model.setLenderQuerySumTotal(call.getSumCount());
|
||||
}else if("evaluation/overView".equals(call.getUri())){ //我要评估
|
||||
}else if("evaluation/overView".equals(call.getUri())){ //我要评估
|
||||
model.setEvaluatingTotal(call.getCount());
|
||||
model.setEvaluatingSumTotal(call.getSumCount());
|
||||
}else if("report/evaltution".equals(call.getUri())){ //评估报告
|
||||
}else if("report/evaltution".equals(call.getUri())){ //评估报告
|
||||
model.setReportListTotal(call.getCount());
|
||||
model.setReportListSumTotal(call.getSumCount());
|
||||
}
|
||||
@@ -183,17 +183,17 @@ public class BkoffEnterpriseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存充值信息
|
||||
* 保存充值信息
|
||||
* @param enterprise
|
||||
* @return
|
||||
*/
|
||||
public Object saveDetailAction(@Param(name = "uri")String uri, @Param(name = "count")String count,@Param(name = "eid")String eid,
|
||||
@Param(name = "rechargeWay")String rechargeWay,HttpServletRequest request) {
|
||||
try {
|
||||
//判断充值类型有没有开通
|
||||
//判断充值类型有没有开通
|
||||
boolean flag = apiCallLimitService.checkStatus(eid, uri);
|
||||
if(!flag){
|
||||
return new JsonResultModel(false, "该种类型还没有开通!");
|
||||
return new JsonResultModel(false, "该种类型还没有开通!");
|
||||
}
|
||||
String userName = (String) request.getSession().getAttribute("login_name");
|
||||
ApiCallLimitDetail apiCallLimitDetail = new ApiCallLimitDetail();
|
||||
@@ -203,28 +203,28 @@ public class BkoffEnterpriseController {
|
||||
apiCallLimitDetail.setRechargeWay(Integer.parseInt(rechargeWay));
|
||||
apiCallLimitDetail.setUserName(userName);
|
||||
apiCallLimitDetail.setCreateDate(new Date());
|
||||
//保存
|
||||
//保存
|
||||
apiCallLimitDetailService.saveDetail(apiCallLimitDetail);
|
||||
//修改剩余次数
|
||||
//修改剩余次数
|
||||
apiCallLimitService.recharge(eid, uri, Integer.parseInt(count));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("保存充值记录异常", e);
|
||||
LOGGER.error("保存充值记录异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者修改企业信息
|
||||
* 保存或者修改企业信息
|
||||
* @param enterprise
|
||||
* @return
|
||||
*/
|
||||
public Object saveOrUpdateAction(Enterprise enterprise) {
|
||||
try {
|
||||
|
||||
//保存
|
||||
//保存
|
||||
enterprise.setModifyDate(new Date());
|
||||
//结束时间为 当天的最后一秒
|
||||
//结束时间为 当天的最后一秒
|
||||
if(enterprise.getEndDateLimit() != null) {
|
||||
long endDateTimeMillis = enterprise.getEndDateLimit().getTime() + (1000*3600*24-1);
|
||||
enterprise.setEndDateLimit(new Date(endDateTimeMillis));
|
||||
@@ -232,7 +232,7 @@ public class BkoffEnterpriseController {
|
||||
|
||||
if (StringUtils.isBlank(enterprise.getId())) {
|
||||
if (enterpriseService.getEnterpriseByName(enterprise.getEnterpriseName()) != null) {
|
||||
return new JsonResultModel(false, "该企业名称已经被注册");
|
||||
return new JsonResultModel(false, "该企业名称已经被注册");
|
||||
}
|
||||
enterprise.setId(null);
|
||||
enterprise.setCreateDate(new Date());
|
||||
@@ -240,11 +240,11 @@ public class BkoffEnterpriseController {
|
||||
} else {
|
||||
Enterprise old = enterpriseService.getEnterprise(enterprise.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "修改的企业不存在");
|
||||
return new JsonResultModel(false, "修改的企业不存在");
|
||||
}
|
||||
enterprise.setCreateDate(old.getCreateDate());
|
||||
|
||||
//去掉空字符串的IP
|
||||
//去掉空字符串的IP
|
||||
List<String> ips = new ArrayList<String>();
|
||||
if (enterprise.getWhiteIps() != null ) {
|
||||
for (String ip : enterprise.getWhiteIps()) {
|
||||
@@ -257,21 +257,21 @@ public class BkoffEnterpriseController {
|
||||
|
||||
updateEnterpriseCitys(enterprise);
|
||||
|
||||
//企业名称有修改,需要修改企业下所有用户的企业名称
|
||||
//企业名称有修改,需要修改企业下所有用户的企业名称
|
||||
if (!old.getEnterpriseName().equals(enterprise.getEnterpriseName())) {
|
||||
pdsUserService.updateUserEnterpriseName(enterprise.getId(), enterprise.getEnterpriseName());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("保存或者修改企业信息异常", e);
|
||||
LOGGER.error("保存或者修改企业信息异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业开通的城市减少,企业下用户的城市也要跟着减少,用户的城市必须在企业中存在
|
||||
* 企业开通的城市减少,企业下用户的城市也要跟着减少,用户的城市必须在企业中存在
|
||||
* @param enterprise
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
+33
-33
@@ -41,7 +41,7 @@ import com.fangjia.service.pds.PdsNoticeService;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
/**
|
||||
* 人工询价
|
||||
* 人工询价
|
||||
*
|
||||
*/
|
||||
public class BkoffManualInquiryController {
|
||||
@@ -74,7 +74,7 @@ public class BkoffManualInquiryController {
|
||||
model.setReplyCount(manualInquiryService.countByStatus(1));
|
||||
model.setNoReplyCount(manualInquiryService.countByStatus(0));
|
||||
|
||||
//等回复
|
||||
//等回复
|
||||
PageBean<ManualInquiry> ret = manualInquiryService.listForPage(0, model.getReplyBean().getCurrentPage(), 10);
|
||||
PageBean<ManualInquiry> ret1 = manualInquiryService.listForPage(1, model.getReplyedBean().getCurrentPage(), 10);
|
||||
|
||||
@@ -84,7 +84,7 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入人工询价页面
|
||||
* 进入人工询价页面
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
@@ -102,7 +102,7 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装ManualInquiry信息
|
||||
* 封装ManualInquiry信息
|
||||
* @param model
|
||||
* @param inquiry
|
||||
*/
|
||||
@@ -129,7 +129,7 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装HouseInfo信息
|
||||
* 封装HouseInfo信息
|
||||
* @param model
|
||||
* @param inquiry
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工询价 可评估
|
||||
* 人工询价 可评估
|
||||
* manualInquiryModel
|
||||
* @param houseInfoModels
|
||||
* @return
|
||||
@@ -161,7 +161,7 @@ public class BkoffManualInquiryController {
|
||||
String sid = manualInquiryModel.getSid();
|
||||
String id = manualInquiryModel.getId();
|
||||
String replyContent = manualInquiryModel.getReplyContent();
|
||||
//model转换,并保存数据
|
||||
//model转换,并保存数据
|
||||
boolean needManual = false;
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("cityDisplay", CommonUtil.formatCity(manualInquiryModel.getCityName()));
|
||||
@@ -195,15 +195,15 @@ public class BkoffManualInquiryController {
|
||||
String userName = PdsSessionContent.getLoginBkoffUsername(request);
|
||||
if(StringUtils.isNotBlank(id)){
|
||||
ManualInquiry inquiry = manualInquiryService.findById(id);
|
||||
inquiry.setStatus(1); //已回价
|
||||
inquiry.setStatus(1); //已回价
|
||||
inquiry.setReplyTime(new Date());
|
||||
if(StringUtils.isNotBlank(replyContent)){
|
||||
inquiry.setReplyContent(replyContent);
|
||||
}
|
||||
inquiry.setReplyUser(userName);
|
||||
inquiry.setReplyType(1); //可评估
|
||||
inquiry.setReplyType(1); //可评估
|
||||
manualInquiryService.updateManualInquiry(inquiry);
|
||||
//首页通知
|
||||
//首页通知
|
||||
List<HouseInfo> houseInfos = houseInfoService.findBySid(inquiry.getSid());
|
||||
HouseInfo houseInfo = null;
|
||||
if(null != houseInfos && houseInfos.size()>=1){
|
||||
@@ -211,7 +211,7 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
PdsNotice notice = new PdsNotice();
|
||||
notice.setType(1);
|
||||
String content = "收到【";
|
||||
String content = "收到【";
|
||||
if(StringUtils.isNotBlank(houseInfo.getCityDisplay())){
|
||||
content += houseInfo.getCityDisplay();
|
||||
}
|
||||
@@ -222,7 +222,7 @@ public class BkoffManualInquiryController {
|
||||
if(houseInfo.getArea()!=0){
|
||||
content += " "+houseInfo.getArea();
|
||||
}
|
||||
content += "】人工评估的回复";
|
||||
content += "】人工评估的回复";
|
||||
notice.setContent(content);
|
||||
notice.setCreateDate(new Date());
|
||||
notice.setEid(inquiry.getEid());
|
||||
@@ -239,7 +239,7 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工询价 修改
|
||||
* 人工询价 修改
|
||||
* manualInquiryModel
|
||||
* @param houseInfoModels
|
||||
* @return
|
||||
@@ -249,7 +249,7 @@ public class BkoffManualInquiryController {
|
||||
String sid = manualInquiryModel.getSid();
|
||||
String id = manualInquiryModel.getId();
|
||||
String replyContent = manualInquiryModel.getReplyContent();
|
||||
//model转换,并保存数据
|
||||
//model转换,并保存数据
|
||||
boolean needManual = false;
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("cityDisplay", CommonUtil.formatCity(manualInquiryModel.getCityName()));
|
||||
@@ -290,7 +290,7 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工询价 - 不可评估
|
||||
* 人工询价 - 不可评估
|
||||
* @param ManualInquiry
|
||||
* @throws Exception
|
||||
*/
|
||||
@@ -298,11 +298,11 @@ public class BkoffManualInquiryController {
|
||||
try {
|
||||
String userName = PdsSessionContent.getLoginBkoffUsername(request);
|
||||
ManualInquiry inquiry = manualInquiryService.findById(model.getId());
|
||||
inquiry.setStatus(1); //已回价
|
||||
inquiry.setStatus(1); //已回价
|
||||
inquiry.setReplyTime(new Date());
|
||||
inquiry.setReplyContent(model.getReplyContent());
|
||||
inquiry.setReplyUser(userName);
|
||||
inquiry.setReplyType(2); //不可评估
|
||||
inquiry.setReplyType(2); //不可评估
|
||||
inquiry.setNoEvalReason(model.getNoEvalReason());
|
||||
manualInquiryService.updateManualInquiry(inquiry);
|
||||
|
||||
@@ -313,37 +313,37 @@ public class BkoffManualInquiryController {
|
||||
}
|
||||
PdsNotice notice = new PdsNotice();
|
||||
notice.setType(1);
|
||||
String content = "您的【";
|
||||
String content = "您的【";
|
||||
if(StringUtils.isNotBlank(houseInfo.getCityDisplay())){
|
||||
content += "城市:"+houseInfo.getCityDisplay();
|
||||
content += "城市:"+houseInfo.getCityDisplay();
|
||||
}
|
||||
if(StringUtils.isNotBlank(houseInfo.getOriDistrict())){
|
||||
content += "、小区名称:"+houseInfo.getOriDistrict();
|
||||
content += "、小区名称:"+houseInfo.getOriDistrict();
|
||||
}
|
||||
if(StringUtils.isNotBlank(houseInfo.getEstateType())){
|
||||
content += "、物业类型:"+houseInfo.getEstateType();
|
||||
content += "、物业类型:"+houseInfo.getEstateType();
|
||||
}
|
||||
|
||||
if(houseInfo.getArea()!=0){
|
||||
content += "、建筑面积:"+houseInfo.getArea();
|
||||
content += "、建筑面积:"+houseInfo.getArea();
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(houseInfo.getHouseNumber())){
|
||||
content += "、楼栋:"+houseInfo.getHouseNumber();
|
||||
content += "、楼栋:"+houseInfo.getHouseNumber();
|
||||
}
|
||||
if(StringUtils.isNotBlank(houseInfo.getFitment())){
|
||||
content += "、装修:"+houseInfo.getFitment();
|
||||
content += "、装修:"+houseInfo.getFitment();
|
||||
}
|
||||
if(StringUtils.isNotBlank(houseInfo.getDirection())){
|
||||
content += "、朝向:"+houseInfo.getDirection();
|
||||
content += "、朝向:"+houseInfo.getDirection();
|
||||
}
|
||||
content += "】无法评估,原因:";
|
||||
content += "】无法评估,原因:";
|
||||
if(model.getNoEvalReason()==1){
|
||||
content += "小区不存在";
|
||||
content += "小区不存在";
|
||||
}else if(model.getNoEvalReason()==2){
|
||||
content += "无法获取价格";
|
||||
content += "无法获取价格";
|
||||
}else if(model.getNoEvalReason()==3){
|
||||
content += "非住宅,不支持估价";
|
||||
content += "非住宅,不支持估价";
|
||||
}
|
||||
notice.setContent(content);
|
||||
notice.setCreateDate(new Date());
|
||||
@@ -354,7 +354,7 @@ public class BkoffManualInquiryController {
|
||||
notice.setExt(ext);*/
|
||||
pdsNoticeService.save(notice);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("保存人工询价信息失败", e);
|
||||
LOGGER.error("保存人工询价信息失败", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
@@ -452,14 +452,14 @@ public class BkoffManualInquiryController {
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
}
|
||||
return new JsonResultModel(false, "输入信息不完整");
|
||||
return new JsonResultModel(false, "输入信息不完整");
|
||||
}
|
||||
|
||||
private void saveNotice(HouseInfo houseInfo, ManualInquiry inquiry){
|
||||
PdsNotice notice = new PdsNotice();
|
||||
notice.setType(2);
|
||||
String content = "收到【"+houseInfo.getCityDisplay()+" "+houseInfo.getOriDistrict();
|
||||
content += " "+houseInfo.getArea()+"平】价格纠错的回复";
|
||||
String content = "收到【"+houseInfo.getCityDisplay()+" "+houseInfo.getOriDistrict();
|
||||
content += " "+houseInfo.getArea()+"平】价格纠错的回复";
|
||||
|
||||
notice.setContent(content);
|
||||
notice.setCreateDate(new Date());
|
||||
|
||||
+7
-7
@@ -12,7 +12,7 @@ import com.fangjia.service.sms.SmsException;
|
||||
import com.fangjia.service.sms.SmsService;
|
||||
|
||||
/**
|
||||
* 人工询价管理
|
||||
* 人工询价管理
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ public class BkoffPeopleInquiryController {
|
||||
private PeopleInquiryService peopleInquiryService;
|
||||
|
||||
/**
|
||||
* 短信Service
|
||||
* 短信Service
|
||||
*/
|
||||
private SmsService smsService;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class BkoffPeopleInquiryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复价格
|
||||
* 回复价格
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
@@ -54,21 +54,21 @@ public class BkoffPeopleInquiryController {
|
||||
peopleInquiryService.save(inquiry);
|
||||
String content = null;
|
||||
if (model.getType() == 1) {
|
||||
content = "您在PDS中申请的人工询价已回价,询价地址:" + inquiry.getAddress() + ",价格为:" + model.getReplyPrice();
|
||||
content = "您在PDS中申请的人工询价已回价,询价地址:" + inquiry.getAddress() + ",价格为:" + model.getReplyPrice();
|
||||
} else {
|
||||
content = model.getReplyContent();
|
||||
}
|
||||
try {
|
||||
if (StringUtils.isNotBlank(content)) {
|
||||
smsService.send(inquiry.getMobile(), content + " 【房价网】");
|
||||
smsService.send(inquiry.getMobile(), content + " 【房价网】");
|
||||
}
|
||||
} catch (SmsException e) {
|
||||
return new JsonResultModel(false, "短信发送失败");
|
||||
return new JsonResultModel(false, "短信发送失败");
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
}
|
||||
return new JsonResultModel(false, "输入信息不完整");
|
||||
return new JsonResultModel(false, "输入信息不完整");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+20
-20
@@ -21,7 +21,7 @@ import com.fangjia.service.pds.PdsRoleService;
|
||||
import org.sothis.web.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* PDS后台角色管理控制器
|
||||
* PDS后台角色管理控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -58,13 +58,13 @@ public class BkoffRoleController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色管理页面
|
||||
* 角色管理页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object indexAction(RoleModel model) {
|
||||
try {
|
||||
//角色信息
|
||||
//角色信息
|
||||
PageBean<Role> pageBean = pdsRoleService.queryRolesByPage(model.getEnterpriseId(),
|
||||
model.getPageBean().getCurrentPage(), 10);
|
||||
List<Role> roles = pageBean.getList();
|
||||
@@ -77,7 +77,7 @@ public class BkoffRoleController {
|
||||
}
|
||||
model.setPageBean(new PageBean<RoleInfo>(pageBean.getStart(), pageBean.getLimit(), list, pageBean.getTotalRecords()));
|
||||
|
||||
//设置权限信息
|
||||
//设置权限信息
|
||||
List<AuthorityGroupInfo> groupInfos = new ArrayList<AuthorityGroupInfo>();
|
||||
List<AuthorityGroup> groups = pdsAuthorityGroupService.queryGroups();
|
||||
for (AuthorityGroup group : groups) {
|
||||
@@ -88,31 +88,31 @@ public class BkoffRoleController {
|
||||
}
|
||||
model.setGroupInfos(groupInfos);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("角色管理页面查询异常", e);
|
||||
LOGGER.error("角色管理页面查询异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业下的角色信息
|
||||
* 查询企业下的角色信息
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
public Object queryRolesAction(Role role) {
|
||||
if (StringUtils.isBlank(role.getEnterpriseId())) {
|
||||
return new JsonResultModel(false, "enterpriseId不能为空");
|
||||
return new JsonResultModel(false, "enterpriseId不能为空");
|
||||
}
|
||||
try {
|
||||
List<Role> roles = pdsRoleService.queryRoleByenterpriseId(role.getEnterpriseId());
|
||||
return new JsonResultModel(true, roles);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("查询企业下的角色信息异常", e);
|
||||
LOGGER.error("查询企业下的角色信息异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色
|
||||
* 保存角色
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@@ -120,24 +120,24 @@ public class BkoffRoleController {
|
||||
try {
|
||||
Enterprise enterprise = enterpriseService.getEnterprise(role.getEnterpriseId());
|
||||
if (enterprise == null) {
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
}
|
||||
|
||||
try {
|
||||
role.setCreateDate(new Date());
|
||||
pdsRoleService.saveRole(role);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("保存角色异常", e);
|
||||
LOGGER.error("保存角色异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改角色
|
||||
* 修改角色
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@@ -145,28 +145,28 @@ public class BkoffRoleController {
|
||||
try {
|
||||
Enterprise enterprise = enterpriseService.getEnterprise(role.getEnterpriseId());
|
||||
if (enterprise == null) {
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
return new JsonResultModel(false, "输入的企业编号错误");
|
||||
}
|
||||
|
||||
try {
|
||||
Role old = pdsRoleService.getRole(role.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "要修改的角色不存在");
|
||||
return new JsonResultModel(false, "要修改的角色不存在");
|
||||
}
|
||||
role.setCreateDate(old.getCreateDate());
|
||||
pdsRoleService.updateRole(role);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("修改角色异常", e);
|
||||
LOGGER.error("修改角色异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询角色下的权限
|
||||
* 查询角色下的权限
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@@ -174,11 +174,11 @@ public class BkoffRoleController {
|
||||
try {
|
||||
Role old = pdsRoleService.getRole(role.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "角色不存在");
|
||||
return new JsonResultModel(false, "角色不存在");
|
||||
}
|
||||
return new JsonResultModel(true, pdsAuthorityService.queryAuthoritys(old.getAuthoritys()));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("查询角色下的权限异常", e);
|
||||
LOGGER.error("查询角色下的权限异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
+17
-17
@@ -24,7 +24,7 @@ import com.fangjia.service.pds.PdsEmployeeService;
|
||||
import com.fangjia.service.pds.PdsRoleService;
|
||||
import com.fangjia.service.pds.PdsUserService;
|
||||
/**
|
||||
* PDS后台用户管理控制器
|
||||
* PDS后台用户管理控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class BkoffUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入登录页面
|
||||
* 进入登录页面
|
||||
* @return
|
||||
*/
|
||||
public Object loginAction() {
|
||||
@@ -63,16 +63,16 @@ public class BkoffUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户登录后台
|
||||
* 用户登录后台
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
public Object userLoginAction(User user, HttpServletRequest request) {
|
||||
if (StringUtils.isBlank(user.getName())) {
|
||||
return new JsonResultModel(false, "用户名不能为空");
|
||||
return new JsonResultModel(false, "用户名不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(user.getPass())) {
|
||||
return new JsonResultModel(false, "用户名不能为空");
|
||||
return new JsonResultModel(false, "用户名不能为空");
|
||||
}
|
||||
Employee employee = pdsEmployeeService.login(user.getName(), user.getPass());
|
||||
if (employee != null) {
|
||||
@@ -83,11 +83,11 @@ public class BkoffUserController {
|
||||
request.getSession().setAttribute("login_name", employee.getName());
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
return new JsonResultModel(false, "用户名密码错误");
|
||||
return new JsonResultModel(false, "用户名密码错误");
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户管理页面
|
||||
* 用户管理页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -108,13 +108,13 @@ public class BkoffUserController {
|
||||
}
|
||||
model.setPageBean(new PageBean<UserInfo>(pageBean.getStart(), pageBean.getLimit(), list, pageBean.getTotalRecords()));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("用户管理页面查询异常", e);
|
||||
LOGGER.error("用户管理页面查询异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出系统
|
||||
* 退出系统
|
||||
* @param request
|
||||
* @param model
|
||||
* @return
|
||||
@@ -126,7 +126,7 @@ public class BkoffUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入添加用户页面
|
||||
* 进入添加用户页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -145,25 +145,25 @@ public class BkoffUserController {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("进入添加用户页面异常", e);
|
||||
LOGGER.error("进入添加用户页面异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者修改用户信息
|
||||
* 保存或者修改用户信息
|
||||
* @param enterprise
|
||||
* @return
|
||||
*/
|
||||
public Object saveOrUpdateAction(User user) {
|
||||
try {
|
||||
//保存
|
||||
//保存
|
||||
user.setUpdateDate(new Date());
|
||||
|
||||
if (StringUtils.isBlank(user.getId())) {
|
||||
User mobileUser = pdsUserService.getUserByMobile(user.getMobile());
|
||||
if (mobileUser != null) {
|
||||
String msg = "手机号已在" + mobileUser.getEnterpriseName() + "使用";
|
||||
String msg = "手机号已在" + mobileUser.getEnterpriseName() + "使用";
|
||||
return new JsonResultModel(false, msg);
|
||||
}
|
||||
user.setId(null);
|
||||
@@ -173,7 +173,7 @@ public class BkoffUserController {
|
||||
} else {
|
||||
User old = pdsUserService.getUser(user.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "修改的用户不存在");
|
||||
return new JsonResultModel(false, "修改的用户不存在");
|
||||
}
|
||||
user.setCreateDate(old.getCreateDate());
|
||||
user.setEnterpriseId(old.getEnterpriseId());
|
||||
@@ -188,14 +188,14 @@ public class BkoffUserController {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("保存或者修改用户信息异常", e);
|
||||
LOGGER.error("保存或者修改用户信息异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取企业下的用户
|
||||
* 获取企业下的用户
|
||||
* @param eid
|
||||
* @return
|
||||
*/
|
||||
|
||||
+4
-4
@@ -32,7 +32,7 @@ public class CollRateController {
|
||||
List<CollRate> colls = collRateService.findByUsage(enterpriseId,null);
|
||||
for (CollRate collRate : colls) {
|
||||
Double usageRate = collRate.getUsageRate();
|
||||
if(collRate.getUsage().equals("ĎűˇŃ")){
|
||||
if(collRate.getUsage().equals("消费")){
|
||||
if(ur!=null&&ur.getConsumeRate()!=null){
|
||||
usageRate = ur.getConsumeRate();
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class CollRateController {
|
||||
collRate.setScoreMin(model.getScoreMin());
|
||||
collRate.setRate(model.getRate());
|
||||
Double usageRate = 0d;
|
||||
if(model.getUsage().equals("ĎűˇŃ")){
|
||||
if(model.getUsage().equals("消费")){
|
||||
usageRate = 0.6d;
|
||||
if(ur!=null){
|
||||
usageRate = ur.getConsumeRate();
|
||||
@@ -83,7 +83,7 @@ public class CollRateController {
|
||||
collRateService.saveColl(collRate);
|
||||
|
||||
}catch(Exception e){
|
||||
return new JsonResultModel(false,"ąŁ´ćʧ°Ü");
|
||||
return new JsonResultModel(false,"保存失败");
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class CollRateController {
|
||||
if(collR!=null){
|
||||
collR.setUsage(model.getUsage());
|
||||
Double usageRate = 0d;
|
||||
if(model.getUsage().equals("ĎűˇŃ")){
|
||||
if(model.getUsage().equals("消费")){
|
||||
usageRate = 0.6d;
|
||||
if(ur!=null&&ur.getConsumeRate()!=null){
|
||||
usageRate = ur.getConsumeRate();
|
||||
|
||||
+20
-20
@@ -43,12 +43,12 @@ import com.google.common.collect.Lists;
|
||||
import org.sothis.web.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* 客户分类
|
||||
* 客户分类
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
public class CustomerClassifyController {
|
||||
private static final String[] titles = {"物业地址", "城市", "均价(元/㎡)", "资产等级", "当前城市排名", "当前城市资产排名指数"};
|
||||
private static final String[] titles = {"物业地址", "城市", "均价(元/㎡)", "资产等级", "当前城市排名", "当前城市资产排名指数"};
|
||||
|
||||
private FileDataTotalityService fileDataTotalityService;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
|
||||
public Object classifyAction(CustomerClassifyModel model, HttpServletRequest request) {
|
||||
//查询文件
|
||||
//查询文件
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
List<SortParam> fileSort = new ArrayList<SortParam>();
|
||||
fileSort.add(new SortParam("createDate", false));
|
||||
@@ -85,7 +85,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
model.setFileMap(map);
|
||||
|
||||
//查询城市
|
||||
//查询城市
|
||||
List<QueryParam> cityQuery = new ArrayList<QueryParam>();
|
||||
List<String> cityList = new ArrayList<String>();
|
||||
if(StringUtils.isNotBlank(model.getFileId()) || list.size()>0){
|
||||
@@ -143,7 +143,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图数据查询
|
||||
* 地图数据查询
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -153,14 +153,14 @@ public class CustomerClassifyController {
|
||||
model.setCityName(null);
|
||||
List<QueryParam> queryParams = convertToQueryParams(model);
|
||||
List<FileDataDetail> list = fileDataDetailService.findAllFileDataDetail(queryParams);
|
||||
//构建地图数据
|
||||
//构建地图数据
|
||||
List<ClassifyMapModel> mapModels = convertToMapModels(list);
|
||||
//计算级别占比
|
||||
//计算级别占比
|
||||
// Map<String, String> levelRatioMap = buildLevelRatioMap(list, city);
|
||||
Map<String, String> levelRatioMap = buildLevelRatioMap2(mapModels, city);
|
||||
//计算每个城市的数据量
|
||||
//计算每个城市的数据量
|
||||
Map<String, Integer> cityDataCountMap = buildCityDataCount(mapModels);
|
||||
//查询默认城市
|
||||
//查询默认城市
|
||||
String defaultCity = null;
|
||||
/*try {
|
||||
User user = pdsUserService.getUser(userId);
|
||||
@@ -182,7 +182,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件中的所有城市
|
||||
* 获取文件中的所有城市
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
@@ -197,7 +197,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改地图的默认城市
|
||||
* 修改地图的默认城市
|
||||
* @param city
|
||||
* @param isSet
|
||||
* @return
|
||||
@@ -225,7 +225,7 @@ public class CustomerClassifyController {
|
||||
|
||||
|
||||
/**
|
||||
* 计算地图上每个城市中的数据量
|
||||
* 计算地图上每个城市中的数据量
|
||||
* @param mapModels
|
||||
* @return
|
||||
*/
|
||||
@@ -328,7 +328,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是有效的经纬度
|
||||
* 是否是有效的经纬度
|
||||
* @param lat
|
||||
* @param lng
|
||||
* @return
|
||||
@@ -344,7 +344,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询参数
|
||||
* 构建查询参数
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -371,7 +371,7 @@ public class CustomerClassifyController {
|
||||
return queryParams;
|
||||
}
|
||||
/**
|
||||
* 导出数据
|
||||
* 导出数据
|
||||
* @param model
|
||||
* @param response
|
||||
* @return
|
||||
@@ -381,17 +381,17 @@ public class CustomerClassifyController {
|
||||
List<FileDataDetail> list = fileDataDetailService.findAllFileDataDetail(queryParams);
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
String fileName = "客户分类.xls";
|
||||
String fileName = "客户分类.xls";
|
||||
Workbook wb = creatExcel(list, fileName);
|
||||
try {
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/x-download;charset=UTF-8");
|
||||
fileName = new String(fileName.getBytes("GBK"),"ISO-8859-1");
|
||||
if(fileName.length()>150){//解决IE 6.0 bug
|
||||
if(fileName.length()>150){//解决IE 6.0 bug
|
||||
fileName = new String(fileName.getBytes("GBK"),"ISO-8859-1");
|
||||
}
|
||||
response.setHeader( "Content-Disposition", "attachment;filename=" + fileName);
|
||||
os = response.getOutputStream();// 取得输出流
|
||||
os = response.getOutputStream();// 取得输出流
|
||||
wb.write(os);
|
||||
os.flush();
|
||||
|
||||
@@ -413,7 +413,7 @@ public class CustomerClassifyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
* 排序字段
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -432,7 +432,7 @@ public class CustomerClassifyController {
|
||||
return sortParams;
|
||||
}
|
||||
/**
|
||||
* 创建excel
|
||||
* 创建excel
|
||||
* @param datas
|
||||
* @return
|
||||
*/
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ import com.fangjia.service.pds.FileDataDetailBatchService;
|
||||
import com.fangjia.service.pds.FileDataTotalityBatchService;
|
||||
|
||||
/**
|
||||
* 客户分类数据-批量评估控制器
|
||||
* 客户分类数据-批量评估控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ public class CustomerClassifyDataBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据导入页面
|
||||
* 数据导入页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ public class CustomerClassifyDataBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件的失败信息
|
||||
* 查询文件的失败信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ import com.fangjia.service.pds.FileDataDetailService;
|
||||
import com.fangjia.service.pds.FileDataTotalityService;
|
||||
|
||||
/**
|
||||
* 客户分类数据控制器
|
||||
* 客户分类数据控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ public class CustomerClassifyDataController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据导入页面
|
||||
* 数据导入页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ public class CustomerClassifyDataController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件的失败信息
|
||||
* 查询文件的失败信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
|
||||
+4
-4
@@ -25,7 +25,7 @@ import com.fangjia.service.pds.UploadDataTotalityService;
|
||||
import com.fangjia.service.pds.UploadErrorDetailService;
|
||||
|
||||
/**
|
||||
* 数据导入
|
||||
* 数据导入
|
||||
* @author gaojuan
|
||||
*
|
||||
*/
|
||||
@@ -40,7 +40,7 @@ public class DataImportController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//获取最新上传记录
|
||||
//获取最新上传记录
|
||||
public Object getNewUploadTotalInfoAction(UploadDataModel model, HttpServletRequest request){
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
UploadDataTotality uploadDataTotality = uploadDataTotalityService.findLastUploadRows(userId);
|
||||
@@ -51,7 +51,7 @@ public class DataImportController {
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
//获取历史上传成功记录
|
||||
//获取历史上传成功记录
|
||||
public Object getUploadTotalInfoAction(UploadDataModel model, HttpServletRequest request) throws Exception{
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
@@ -84,7 +84,7 @@ public class DataImportController {
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
//获取上传失败的错误记录
|
||||
//获取上传失败的错误记录
|
||||
public Object getUploadErrorInfoAction(UploadDataModel model, HttpServletRequest request){
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
UploadDataTotality uploadDataTotality = uploadDataTotalityService.findLastUploadRows(userId);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class DemoController {
|
||||
model.setCityName(city);
|
||||
model.setDetailAddress(detailAddress);
|
||||
houseLevelInfoService.save(hli);
|
||||
//¼à¿Ø
|
||||
//监控
|
||||
monitorInfo(hli);
|
||||
return model;
|
||||
}
|
||||
|
||||
+25
-25
@@ -31,7 +31,7 @@ import com.fangjia.service.pds.EnterpriseService;
|
||||
import com.fangjia.service.pds.PdsUserService;
|
||||
|
||||
/**
|
||||
* 企业控制器
|
||||
* 企业控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ public class EnterpriseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业信息页面
|
||||
* 企业信息页面
|
||||
* @return
|
||||
*/
|
||||
public Object infoAction(HttpServletRequest request, EnterpriseModel model) {
|
||||
@@ -72,34 +72,34 @@ public class EnterpriseController {
|
||||
model.setEnterpriseUserCount(pdsUserService.queryUserCountByEnterprise(enterpriseId));
|
||||
List<ApiCallLimit> callLimitAList = apiCallLimitService.findAllCountByEid(enterpriseId);
|
||||
for(ApiCallLimit call:callLimitAList){
|
||||
if("uploaddata".equals(call.getUri())){ //客户分类
|
||||
if("uploaddata".equals(call.getUri())){ //客户分类
|
||||
model.setCustomerTypeTotal(call.getCount());
|
||||
}else if("demo/detail".equals(call.getUri())){ //客户评级
|
||||
}else if("demo/detail".equals(call.getUri())){ //客户评级
|
||||
model.setCustomerLevelTotal(call.getCount());
|
||||
}else if("zichan/saveevaluation".equals(call.getUri())){ //我的房产
|
||||
}else if("zichan/saveevaluation".equals(call.getUri())){ //我的房产
|
||||
model.setMyHouseTotal(call.getCount());
|
||||
}else if("prevaluation/saveevalinfo".equals(call.getUri())){ //贷前估值
|
||||
}else if("prevaluation/saveevalinfo".equals(call.getUri())){ //贷前估值
|
||||
model.setPrevaluationTotal(call.getCount());
|
||||
}else if("uploaddatabatch".equals(call.getUri())){ //批量评估
|
||||
}else if("uploaddatabatch".equals(call.getUri())){ //批量评估
|
||||
model.setEvaluationBatchTotal(call.getCount());
|
||||
}else if("hk/evaluate".equals(call.getUri())){ //营销货客
|
||||
}else if("hk/evaluate".equals(call.getUri())){ //营销货客
|
||||
model.setHuoKeTotal(call.getCount());
|
||||
}else if("lenderquery".equals(call.getUri())){ //贷款人查询
|
||||
}else if("lenderquery".equals(call.getUri())){ //贷款人查询
|
||||
model.setLenderQueryTotal(call.getCount());
|
||||
}else if("evaluation/overView".equals(call.getUri())){ //我要评估
|
||||
}else if("evaluation/overView".equals(call.getUri())){ //我要评估
|
||||
model.setEvaluatingTotal(call.getCount());
|
||||
}else if("report/evaltution".equals(call.getUri())){ //评估报告
|
||||
}else if("report/evaltution".equals(call.getUri())){ //评估报告
|
||||
model.setReportListTotal(call.getCount());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("企业信息页面异常", e);
|
||||
LOGGER.error("企业信息页面异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看充值记录
|
||||
* 查看充值记录
|
||||
* @return
|
||||
*/
|
||||
public JsonModel getRechargeDetailAction(HttpServletRequest request) {
|
||||
@@ -118,41 +118,41 @@ public class EnterpriseController {
|
||||
model.setCount(detail.getCount());
|
||||
model.setRechargeTime(DateUtil.formatByPattern(detail.getCreateDate(), "yyyy/MM/dd HH:mm"));
|
||||
model.setRechargeType(getRechargeType(detail.getUri()));
|
||||
model.setRechargeWay(detail.getRechargeWay()==1?"购买":"赠送");
|
||||
model.setRechargeWay(detail.getRechargeWay()==1?"购买":"赠送");
|
||||
modelList.add(model);
|
||||
}
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
jsonModel.setJsonModel(modelList);
|
||||
return jsonModel;
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("企业信息页面异常", e);
|
||||
LOGGER.error("企业信息页面异常", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充值类型
|
||||
* 获取充值类型
|
||||
* @return
|
||||
*/
|
||||
private String getRechargeType(String uri){
|
||||
if("evaluation/overView".equals(uri)){
|
||||
return "我要评估";
|
||||
return "我要评估";
|
||||
}else if("lenderquery".equals(uri)){
|
||||
return "贷款人查询";
|
||||
return "贷款人查询";
|
||||
}else if("hk/evaluate".equals(uri)){
|
||||
return "营销货客";
|
||||
return "营销货客";
|
||||
}else if("demo/detail".equals(uri)){
|
||||
return "客户评级";
|
||||
return "客户评级";
|
||||
}else if("uploaddata".equals(uri)){
|
||||
return "客户分类";
|
||||
return "客户分类";
|
||||
}else if("zichan/saveevaluation".equals(uri)){
|
||||
return "我的房产";
|
||||
return "我的房产";
|
||||
}else if("prevaluation/saveevalinfo".equals(uri)){
|
||||
return "贷前估值";
|
||||
return "贷前估值";
|
||||
}else if("uploaddatabatch".equals(uri)){
|
||||
return "批量复估";
|
||||
return "批量复估";
|
||||
}else if("report/evaltution".equals(uri)){
|
||||
return "评估报告";
|
||||
return "评估报告";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
+21
-21
@@ -35,12 +35,12 @@ import com.google.common.collect.Lists;
|
||||
|
||||
|
||||
/**
|
||||
* 批量评估
|
||||
* 批量评估
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
public class EvaluationBatchController {
|
||||
private static final String[] titles = {"物业地址", "城市", "均价(元/㎡)", "资产等级", "当前城市排名", "当前城市资产排名指数"};
|
||||
private static final String[] titles = {"物业地址", "城市", "均价(元/㎡)", "资产等级", "当前城市排名", "当前城市资产排名指数"};
|
||||
|
||||
private FileDataTotalityBatchService fileDataTotalityBatchService;
|
||||
|
||||
@@ -68,7 +68,7 @@ public class EvaluationBatchController {
|
||||
}
|
||||
|
||||
public Object indexAction(EvaluationBatchModel model, HttpServletRequest request) {
|
||||
//查询文件
|
||||
//查询文件
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
List<SortParam> fileSort = new ArrayList<SortParam>();
|
||||
fileSort.add(new SortParam("createDate", false));
|
||||
@@ -83,7 +83,7 @@ public class EvaluationBatchController {
|
||||
}
|
||||
model.setFileMap(map);
|
||||
|
||||
//查询城市
|
||||
//查询城市
|
||||
List<QueryParam> cityQuery = new ArrayList<QueryParam>();
|
||||
List<String> cityList = new ArrayList<String>();
|
||||
if(StringUtils.isNotBlank(model.getFileId()) || list.size()>0){
|
||||
@@ -138,14 +138,14 @@ public class EvaluationBatchController {
|
||||
}else{
|
||||
pager.setTotalRows(0);
|
||||
}
|
||||
//封装汇总信息
|
||||
//封装汇总信息
|
||||
model.setFileDataDetailBatchList(batchList);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询参数
|
||||
* 构建查询参数
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -162,7 +162,7 @@ public class EvaluationBatchController {
|
||||
queryParams.add(new QueryParam("region", model.getRegion()));
|
||||
}
|
||||
|
||||
//评估总价
|
||||
//评估总价
|
||||
if(StringUtils.isNotBlank(model.getMinTotalPrice())){
|
||||
queryParams.add(new QueryParam("totalPrice", QueryParam.GREATER_THAN_EQUAL_OPERATOR, Integer.parseInt(model.getMinTotalPrice())*10000));
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public class EvaluationBatchController {
|
||||
queryParams.add(new QueryParam("totalPrice", QueryParam.LESS_THAN_EQUAL_OPERATOR, Integer.parseInt(model.getMaxTotalPrice())*10000));
|
||||
}
|
||||
|
||||
//评估单价
|
||||
//评估单价
|
||||
if(StringUtils.isNotBlank(model.getMinPrice())){
|
||||
queryParams.add(new QueryParam("price", QueryParam.GREATER_THAN_EQUAL_OPERATOR, Integer.parseInt(model.getMinPrice())));
|
||||
}
|
||||
@@ -178,12 +178,12 @@ public class EvaluationBatchController {
|
||||
queryParams.add(new QueryParam("price", QueryParam.LESS_THAN_EQUAL_OPERATOR, Integer.parseInt(model.getMaxPrice())));
|
||||
}
|
||||
|
||||
//物业类型
|
||||
//物业类型
|
||||
if(StringUtils.isNotBlank(model.getEstateType())){
|
||||
queryParams.add(new QueryParam("estateType", model.getEstateType()));
|
||||
}
|
||||
|
||||
//房龄
|
||||
//房龄
|
||||
if(StringUtils.isNotBlank(model.getMinHouseYear())){
|
||||
queryParams.add(new QueryParam("houseYear", QueryParam.GREATER_THAN_EQUAL_OPERATOR, Integer.parseInt(model.getMinHouseYear())));
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class EvaluationBatchController {
|
||||
queryParams.add(new QueryParam("houseYear", QueryParam.LESS_THAN_EQUAL_OPERATOR, Integer.parseInt(model.getMaxHouseYear())));
|
||||
}
|
||||
|
||||
//面积
|
||||
//面积
|
||||
if(StringUtils.isNotBlank(model.getMinArea())){
|
||||
queryParams.add(new QueryParam("area", QueryParam.GREATER_THAN_EQUAL_OPERATOR, Double.parseDouble(model.getMinArea())));
|
||||
}
|
||||
@@ -204,7 +204,7 @@ public class EvaluationBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
* 排序字段
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -224,7 +224,7 @@ public class EvaluationBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市下的区域(ajax用)
|
||||
* 获取城市下的区域(ajax用)
|
||||
*/
|
||||
public JsonModel getRegionsAction(@Param(name = "city")String city) {
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
@@ -241,7 +241,7 @@ public class EvaluationBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装汇总信息
|
||||
* 封装汇总信息
|
||||
*/
|
||||
private void wrapSumDetail(List<FileDataDetailBatch> detailList,EvaluationBatchModel model){
|
||||
int totalNum = 0;
|
||||
@@ -273,11 +273,11 @@ public class EvaluationBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载城市数据
|
||||
* 加载城市数据
|
||||
* @return
|
||||
*/
|
||||
public Object getMapDataAction(EvaluationBatchModel model, HttpServletRequest request) {
|
||||
//查询文件
|
||||
//查询文件
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
List<QueryParam> fileParams = new ArrayList<QueryParam>();
|
||||
fileParams.add(new QueryParam("userId", userId));
|
||||
@@ -287,7 +287,7 @@ public class EvaluationBatchController {
|
||||
list.add(fileData.getId());
|
||||
}
|
||||
|
||||
//查询城市
|
||||
//查询城市
|
||||
List<QueryParam> cityQuery = new ArrayList<QueryParam>();
|
||||
List<String> cityList = new ArrayList<String>();
|
||||
if(StringUtils.isNotBlank(model.getFileId()) || list.size()>0){
|
||||
@@ -309,10 +309,10 @@ public class EvaluationBatchController {
|
||||
}
|
||||
// model.setFileDataDetailBatchList(detailList);
|
||||
|
||||
//计算每个城市的数据量
|
||||
//计算每个城市的数据量
|
||||
Map<String, Integer> cityDataCountMap = buildCityDataCount(detailList);
|
||||
|
||||
//封装汇总信息
|
||||
//封装汇总信息
|
||||
wrapSumDetail(detailList, model);
|
||||
Map<String, Object> aggr = convertToAggregate(model);
|
||||
|
||||
@@ -342,7 +342,7 @@ public class EvaluationBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤无经纬度的数据
|
||||
* 过滤无经纬度的数据
|
||||
* @param detailList
|
||||
*/
|
||||
private void filterDetailList(List<FileDataDetailBatch> detailList) {
|
||||
@@ -359,7 +359,7 @@ public class EvaluationBatchController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算每个城市的数量
|
||||
* 计算每个城市的数量
|
||||
* @param detailList
|
||||
* @return
|
||||
*/
|
||||
|
||||
+49
-49
@@ -30,7 +30,7 @@ import com.fangjia.service.pds.SmartInputService;
|
||||
import com.mongodb.BasicDBObject;
|
||||
|
||||
/**
|
||||
* 贷前估值
|
||||
* 贷前估值
|
||||
*/
|
||||
public class EvaluationBeforeLoanController {
|
||||
|
||||
@@ -58,11 +58,11 @@ public class EvaluationBeforeLoanController {
|
||||
}
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
EvaluationBeforeLoan eval = evaluationBeforeLoanService.get(model.getEid());
|
||||
//显示评估结果信息
|
||||
//显示评估结果信息
|
||||
if (eval != null) {
|
||||
showDetailResult(model, eval, enterpriseId);
|
||||
} else {
|
||||
//进行评估操作
|
||||
//进行评估操作
|
||||
SmartInput input = smartInputService.findById(model.getEid());
|
||||
if (input == null) {
|
||||
return model.redirect("/index");
|
||||
@@ -80,13 +80,13 @@ public class EvaluationBeforeLoanController {
|
||||
calendar.setTime(eval.getCreateDate());
|
||||
model.setTopMonth(calendar.get(Calendar.MONTH));
|
||||
|
||||
//设置各大门户小区均价
|
||||
//设置各大门户小区均价
|
||||
ArrayList<List<SiteDistrictAvgPriceInfo>> siteDistrict = new ArrayList<List<SiteDistrictAvgPriceInfo>>();
|
||||
List<SiteDistrictAvgPriceInfo> otherSiteInfo = getOtherSiteInfo(eval);
|
||||
siteDistrict.add(otherSiteInfo);
|
||||
model.setSitePrices(siteDistrict);
|
||||
|
||||
//正负因素设置
|
||||
//正负因素设置
|
||||
Enterprise enterprise = null;
|
||||
try {
|
||||
enterprise = enterpriseService.getEnterprise(enterpriseId);
|
||||
@@ -119,20 +119,20 @@ public class EvaluationBeforeLoanController {
|
||||
if(colls==null||colls.size()<1){
|
||||
return fs;
|
||||
}
|
||||
ArrayList<String> priceTrendHigh = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> priceTrendLow = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> totalPriceBLow = new ArrayList<String>();//押品总价B
|
||||
ArrayList<String> totalPriceALow = new ArrayList<String>();//押品总价A
|
||||
ArrayList<String> totalPriceHigh = new ArrayList<String>();//押品总价
|
||||
ArrayList<String> handleHigh = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> handleLow = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> quoteHigh = new ArrayList<String>();//发布量
|
||||
ArrayList<String> quoteLow = new ArrayList<String>();//发布量
|
||||
ArrayList<String> trafficHigh = new ArrayList<String>();//交通
|
||||
ArrayList<String> trafficLow = new ArrayList<String>();//交通
|
||||
ArrayList<String> agencyHigh = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> agencyLow = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> houseAge = new ArrayList<String>();//房龄
|
||||
ArrayList<String> priceTrendHigh = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> priceTrendLow = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> totalPriceBLow = new ArrayList<String>();//押品总价B
|
||||
ArrayList<String> totalPriceALow = new ArrayList<String>();//押品总价A
|
||||
ArrayList<String> totalPriceHigh = new ArrayList<String>();//押品总价
|
||||
ArrayList<String> handleHigh = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> handleLow = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> quoteHigh = new ArrayList<String>();//发布量
|
||||
ArrayList<String> quoteLow = new ArrayList<String>();//发布量
|
||||
ArrayList<String> trafficHigh = new ArrayList<String>();//交通
|
||||
ArrayList<String> trafficLow = new ArrayList<String>();//交通
|
||||
ArrayList<String> agencyHigh = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> agencyLow = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> houseAge = new ArrayList<String>();//房龄
|
||||
for (EvaluationBeforeLoan coll : colls) {
|
||||
if(coll.getPriceStability()!=null&&coll.getPriceStability()>75){
|
||||
priceTrendHigh.add(coll.getName());
|
||||
@@ -231,7 +231,7 @@ public class EvaluationBeforeLoanController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房产价格走势数据
|
||||
* 获取房产价格走势数据
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -242,12 +242,12 @@ public class EvaluationBeforeLoanController {
|
||||
}
|
||||
|
||||
int endDate = Integer.parseInt(DateUtil.formatToTightYYYYMMDD(eval.getCreateDate()));
|
||||
int monthNum = 24; //2年
|
||||
if (model.getType() == 1) { //季度
|
||||
int monthNum = 24; //2年
|
||||
if (model.getType() == 1) { //季度
|
||||
monthNum = 3;
|
||||
} else if (model.getType() == 2) { //半年
|
||||
} else if (model.getType() == 2) { //半年
|
||||
monthNum = 6;
|
||||
} else if (model.getType() == 3) { //1年
|
||||
} else if (model.getType() == 3) { //1年
|
||||
monthNum = 12;
|
||||
}
|
||||
int startDate = Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getDateOfLastMonth(eval.getCreateDate(), -monthNum)));
|
||||
@@ -271,43 +271,43 @@ public class EvaluationBeforeLoanController {
|
||||
List<SiteDistrictAvgPriceInfo> sitePrices = new ArrayList<SiteDistrictAvgPriceInfo>();
|
||||
BasicDBObject averageStatistics = eval.getAverageStatistics();
|
||||
if(averageStatistics!=null){
|
||||
if(averageStatistics.containsKey("房天下")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("房天下"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("房天下", div));
|
||||
if(averageStatistics.containsKey("房天下")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("房天下"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("房天下", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("房天下", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("房天下", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("安居客")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("安居客"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", div));
|
||||
if(averageStatistics.containsKey("安居客")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("安居客"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("中原")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("中原"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("中原", div));
|
||||
if(averageStatistics.containsKey("中原")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("中原"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("中原", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("中原", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("中原", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("链家")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("链家"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", div));
|
||||
if(averageStatistics.containsKey("链家")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("链家"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("赶集")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("赶集"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", div));
|
||||
if(averageStatistics.containsKey("赶集")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("赶集"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
}
|
||||
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("房天下", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("中原", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("房天下", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("中原", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
}
|
||||
return sitePrices;
|
||||
}
|
||||
|
||||
+76
-76
@@ -63,7 +63,7 @@ import com.mongodb.BasicDBList;
|
||||
import com.mongodb.BasicDBObject;
|
||||
|
||||
/**
|
||||
* 贷前评估
|
||||
* 贷前评估
|
||||
*/
|
||||
public class EvaluationGeneralController {
|
||||
private HouseInfoService houseInfoService;
|
||||
@@ -88,13 +88,13 @@ public class EvaluationGeneralController {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(EvaluationGeneralController.class);
|
||||
|
||||
//评估概况pds1.2
|
||||
//评估概况pds1.2
|
||||
public Object overViewAction(HttpServletRequest request, final EvaluationGeneralModel model) {
|
||||
if (model.getSid() == null || !ObjectId.isValid(model.getSid())) {
|
||||
return model.redirect("/index");
|
||||
}
|
||||
if(model.getSid().equals(request.getSession().getAttribute(model.getSid()))){
|
||||
System.out.println("二次进入");
|
||||
System.out.println("二次进入");
|
||||
while(model.getSid().equals(request.getSession().getAttribute(model.getSid()))){
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
@@ -135,11 +135,11 @@ public class EvaluationGeneralController {
|
||||
}
|
||||
}
|
||||
}
|
||||
//人物评分相关
|
||||
//人物评分相关
|
||||
List<Borrower> borrows = borrowerService.findBySid(model.getSid());
|
||||
Borrower mainBorr = null;
|
||||
if(borrows!=null&&borrows.size()>0){
|
||||
//主贷人是否需要进行评估
|
||||
//主贷人是否需要进行评估
|
||||
mainBorr = borrows.get(0);
|
||||
if(mainBorr!=null){
|
||||
if(mainBorr.getCurrentNeedPerson()==null&&mainBorr.getPersonIsColl()==null){
|
||||
@@ -150,7 +150,7 @@ public class EvaluationGeneralController {
|
||||
onceCollateralEvaluationInfoService.saveCollateralEvaluationInfo(onceCo);
|
||||
}
|
||||
}
|
||||
if(mainBorr.getCurrentNeedPerson()!=null&&mainBorr.getCurrentNeedPerson()){//判断评估时候是否是关闭状态
|
||||
if(mainBorr.getCurrentNeedPerson()!=null&&mainBorr.getCurrentNeedPerson()){//判断评估时候是否是关闭状态
|
||||
if(mainBorr.getCurrentLendQueryCount()==null||mainBorr.getCurrentLendQueryCount()){
|
||||
model.setMainBorrower(mainBorr);
|
||||
model.setBorrower(mainBorr);
|
||||
@@ -171,11 +171,11 @@ public class EvaluationGeneralController {
|
||||
model.setMainBorrower(mainBorr);
|
||||
model.setBorrowers(borrows);
|
||||
}*/
|
||||
//判断是都需要将mainBorrower在页面上展示
|
||||
//判断是都需要将mainBorrower在页面上展示
|
||||
|
||||
}
|
||||
}
|
||||
//获取房屋年限的上线
|
||||
//获取房屋年限的上线
|
||||
FactorStat factorStat = getFactorStat(colls,mainBorr,houseAgeLimit);
|
||||
model.setHouseAgeLimit(houseAgeLimit);
|
||||
model.setFactorStat(factorStat);
|
||||
@@ -183,7 +183,7 @@ public class EvaluationGeneralController {
|
||||
model.setCollateralEvaluationInfos(colls);
|
||||
}else {
|
||||
int limitCount = apiCallLimitService.getCount(enterpriseId, ApiCallLimitEnum.WO_YAO_PING_GU.getUri());
|
||||
// limitCount不能判断<1, 过滤器先减一了
|
||||
// limitCount不能判断<1, 过滤器先减一了
|
||||
if (limitCount < 0) {
|
||||
return model.redirect("/index");
|
||||
}
|
||||
@@ -203,9 +203,9 @@ public class EvaluationGeneralController {
|
||||
Double totalScore = 0.0;
|
||||
Double priceStability = 0.0;
|
||||
Double handleLevel = 0.0;
|
||||
String usage = "经营";
|
||||
String usage = "经营";
|
||||
int count = 0;
|
||||
System.out.println(model.getSid()+"开始调用pdsController");
|
||||
System.out.println(model.getSid()+"开始调用pdsController");
|
||||
for (HouseInfo houseInfo : houseInfos) {
|
||||
onceColl.setFrom(houseInfo.getFrom());
|
||||
AlgorithmRule algorithmRule = algorithmRuleService.findAlgorithmRuleByCity(houseInfo.getCityDisplay());
|
||||
@@ -227,7 +227,7 @@ public class EvaluationGeneralController {
|
||||
allInfo.setPurchaseDate(purchaseDate);
|
||||
}
|
||||
allInfo.setUsage(usage);
|
||||
//设置最大抵押率
|
||||
//设置最大抵押率
|
||||
Double maxCollRate = collRateService.findByEnterpriseId(enterpriseId, usage, allInfo.getTotalScore());
|
||||
if(maxCollRate!=null){
|
||||
maxCollRate = MathUtils.formatDouble(maxCollRate);
|
||||
@@ -256,10 +256,10 @@ public class EvaluationGeneralController {
|
||||
onceColl.setCity(allInfo.getCity());
|
||||
onceColl.setAddress(allInfo.getAddress());
|
||||
onceColl.setName(allInfo.getDistrictName());
|
||||
//各大门户小区均价未显示3个及3个以上的次数监控
|
||||
//各大门户小区均价未显示3个及3个以上的次数监控
|
||||
HouseInfoMonitor him = monitorMatchDistirct(houseInfo, allInfo, onceColl.getSid(), PdsSessionContent.getLoginUserId(request),enterpriseId);
|
||||
if(him!=null&&StringUtils.isNotBlank(him.getEnterpriseId())){
|
||||
logger.warn("企业为空来源:EvaluationGeneralController"+him.getCity()+"========"+him.getRegion()+"============"+him.getAddress());
|
||||
logger.warn("企业为空来源:EvaluationGeneralController"+him.getCity()+"========"+him.getRegion()+"============"+him.getAddress());
|
||||
}
|
||||
houseInfoMonitorService.save(him);
|
||||
}
|
||||
@@ -276,17 +276,17 @@ public class EvaluationGeneralController {
|
||||
onceColl.setHandleLevel(MathUtils.formatDouble(MathUtils.div(handleLevel, (double)(count))));
|
||||
onceColl.setStatus(0);
|
||||
List<String> deputyIdCodes = new ArrayList<String>();
|
||||
logger.warn(model.getSid()+"调用结束pdsController");
|
||||
logger.warn(model.getSid()+"调用结束pdsController");
|
||||
Borrower mainBorr = null;
|
||||
if (apiCallLimitService.checkStatus(enterpriseId, ApiCallLimitEnum.DAI_KUANG.getUri())) {
|
||||
logger.warn(model.getSid()+"开始调用人物信息接口");
|
||||
//人物相关信息 调取接口等信息
|
||||
logger.warn(model.getSid()+"开始调用人物信息接口");
|
||||
//人物相关信息 调取接口等信息
|
||||
borrowerColl(model, borrowers, deputyIdCodes, onceColl,enterprise);
|
||||
|
||||
if(borrowers!=null&&borrowers.size()>0){
|
||||
mainBorr = borrowers.get(0);
|
||||
}
|
||||
//判断主贷款人是否能显示在页面上
|
||||
//判断主贷款人是否能显示在页面上
|
||||
if(mainBorr!=null){
|
||||
if(enterprise.getLenderQueryStatus()){
|
||||
if(mainBorr.getCurrentLendQueryCount()==null||mainBorr.getCurrentLendQueryCount()){
|
||||
@@ -300,7 +300,7 @@ public class EvaluationGeneralController {
|
||||
if (deputyIdCodes.size() > 0) {
|
||||
onceColl.setDeputyIdCodes(deputyIdCodes);
|
||||
}
|
||||
//评估次数减1
|
||||
//评估次数减1
|
||||
//updateUseTime(enterpriseId);
|
||||
onceColl.setEnterpriseId(enterpriseId);
|
||||
onceColl.setUserId(PdsSessionContent.getLoginUserId(request));
|
||||
@@ -314,13 +314,13 @@ public class EvaluationGeneralController {
|
||||
isNeedColl = 1;
|
||||
}
|
||||
onceColl.setNeedAdvise(isNeedColl);
|
||||
// 根据企业id去获取
|
||||
logger.warn(model.getSid()+"保存once");
|
||||
// 根据企业id去获取
|
||||
logger.warn(model.getSid()+"保存once");
|
||||
onceCollateralEvaluationInfoService.saveCollateralEvaluationInfo(onceColl);
|
||||
logger.warn(model.getSid()+"保存结束once");
|
||||
logger.warn(model.getSid()+"保存结束once");
|
||||
model.setOnceCollateralEvaluationInfo(onceColl);
|
||||
model.setCollateralEvaluationInfos(colls);
|
||||
//记录访问设备信息
|
||||
//记录访问设备信息
|
||||
getEquipmentInfo(request,model.getSid());
|
||||
FactorStat factorStat = getFactorStat(colls,mainBorr,houseAgeLimit);
|
||||
model.setFactorStat(factorStat);
|
||||
@@ -356,20 +356,20 @@ public class EvaluationGeneralController {
|
||||
for (final Borrower borrower : borrowers) {
|
||||
borrower.setCurrentNeedPerson(enterprise.getLenderQueryStatus());
|
||||
int limitCount = apiCallLimitService.getCount(enterprise.getId(), ApiCallLimitEnum.DAI_KUANG.getUri());
|
||||
if(limitCount > 0){//判断企业是否还有对人物信息评估的次数
|
||||
if(limitCount > 0){//判断企业是否还有对人物信息评估的次数
|
||||
borrower.setCurrentLendQueryCount(true);
|
||||
}else{
|
||||
borrower.setCurrentLendQueryCount(false);
|
||||
}
|
||||
if(borrower.getPersonIsColl()==null){//判断borr是不是已经评估了
|
||||
if(borrower.getPersonIsColl()==null){//判断borr是不是已经评估了
|
||||
borrower.setPersonIsColl(1);
|
||||
if(enterprise.getLenderQueryStatus()!=null&&enterprise.getLenderQueryStatus()){//判断公司是不是已经关闭了人物评估
|
||||
if(limitCount > 0){//判断是否还有评估次数
|
||||
if(limitCount > 0){//减少一次评估次数
|
||||
if(enterprise.getLenderQueryStatus()!=null&&enterprise.getLenderQueryStatus()){//判断公司是不是已经关闭了人物评估
|
||||
if(limitCount > 0){//判断是否还有评估次数
|
||||
if(limitCount > 0){//减少一次评估次数
|
||||
apiCallLimitService.decrCount(enterprise.getId(), ApiCallLimitEnum.DAI_KUANG.getUri());
|
||||
}
|
||||
|
||||
logger.warn(model.getSid()+"进方法了-----");
|
||||
logger.warn(model.getSid()+"进方法了-----");
|
||||
ExecutorService fixedThreadPool = Executors.newFixedThreadPool(11);
|
||||
fixedThreadPool.submit(new Runnable() {
|
||||
public void run() {
|
||||
@@ -378,14 +378,14 @@ public class EvaluationGeneralController {
|
||||
});
|
||||
fixedThreadPool.submit(new Runnable() {
|
||||
public void run() {
|
||||
logger.warn(model.getSid()+"正在调用中-----");
|
||||
logger.warn(model.getSid()+"正在调用中-----");
|
||||
BasicDBList loseCreditJudicialList = talkingDataApiService.queryDishonest(borrower.getIdcode(), borrower.getName());
|
||||
borrower.setLoseCreditJudicialList(loseCreditJudicialList);
|
||||
}
|
||||
});
|
||||
fixedThreadPool.submit(new Runnable() {
|
||||
public void run() {
|
||||
logger.warn(model.getSid()+"正在调用中-----");
|
||||
logger.warn(model.getSid()+"正在调用中-----");
|
||||
BasicDBList handle = talkingDataApiService.personExecuted(borrower.getIdcode());
|
||||
borrower.setDefendantJudicialList(handle);
|
||||
}
|
||||
@@ -398,7 +398,7 @@ public class EvaluationGeneralController {
|
||||
});
|
||||
fixedThreadPool.submit(new Runnable() {
|
||||
public void run() {
|
||||
//查询手机号入网时长
|
||||
//查询手机号入网时长
|
||||
BasicDBObject phoneOnlineTimes = talkingDataApiService.queryPhoneOnlineTimes(borrower.getPhoneNumber());
|
||||
borrower.setPhoneOnlineTimes(phoneOnlineTimes);
|
||||
}
|
||||
@@ -435,7 +435,7 @@ public class EvaluationGeneralController {
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
logger.warn(model.getSid()+"调用人物信息接口结束");
|
||||
logger.warn(model.getSid()+"调用人物信息接口结束");
|
||||
if (borrower.getIsMainBorrower() != null && borrower.getIsMainBorrower()) {
|
||||
onceColl.setMianIdCode(borrower.getId());
|
||||
} else {
|
||||
@@ -450,7 +450,7 @@ public class EvaluationGeneralController {
|
||||
borrower.setCheatRisk(cheatRisk);
|
||||
}
|
||||
borrowerService.saveByid(borrower);
|
||||
//人物相关的查询监控
|
||||
//人物相关的查询监控
|
||||
BorrowerInfoMonitor bim = getBorrowerMoniter(borrower,enterprise.getId());
|
||||
borrowerInfoMonitorService.save(bim);
|
||||
}
|
||||
@@ -531,7 +531,7 @@ public class EvaluationGeneralController {
|
||||
}
|
||||
colls.add(collateralEvaluationInfo);
|
||||
}
|
||||
//设置各大门户小区均价
|
||||
//设置各大门户小区均价
|
||||
ArrayList<List<SiteDistrictAvgPriceInfo>> siteDistrict = new ArrayList<List<SiteDistrictAvgPriceInfo>>();
|
||||
for (CollateralEvaluationInfo collateralEvaluationInfo : colls) {
|
||||
List<SiteDistrictAvgPriceInfo> otherSiteInfo = getOtherSiteInfo(collateralEvaluationInfo);
|
||||
@@ -566,8 +566,8 @@ public class EvaluationGeneralController {
|
||||
Map<Integer, Double> citySellStats = coll.getCitySellStats();
|
||||
|
||||
Map<String, Object> trendMap = new HashMap<String, Object>();
|
||||
trendMap.put("存量押品市值走势", districtSellStats);
|
||||
trendMap.put("CPDB押品市值走势", citySellStats);
|
||||
trendMap.put("存量押品市值走势", districtSellStats);
|
||||
trendMap.put("CPDB押品市值走势", citySellStats);
|
||||
|
||||
json.setJsonModel(ImmutableMap.of("trend", trendMap));
|
||||
return json;
|
||||
@@ -590,20 +590,20 @@ public class EvaluationGeneralController {
|
||||
if(colls==null||colls.size()<1){
|
||||
return fs;
|
||||
}
|
||||
ArrayList<String> priceTrendHigh = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> priceTrendLow = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> totalPriceBLow = new ArrayList<String>();//押品总价B
|
||||
ArrayList<String> totalPriceALow = new ArrayList<String>();//押品总价A
|
||||
ArrayList<String> totalPriceHigh = new ArrayList<String>();//押品总价
|
||||
ArrayList<String> handleHigh = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> handleLow = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> quoteHigh = new ArrayList<String>();//发布量
|
||||
ArrayList<String> quoteLow = new ArrayList<String>();//发布量
|
||||
ArrayList<String> trafficHigh = new ArrayList<String>();//交通
|
||||
ArrayList<String> trafficLow = new ArrayList<String>();//交通
|
||||
ArrayList<String> agencyHigh = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> agencyLow = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> houseAge = new ArrayList<String>();//房龄
|
||||
ArrayList<String> priceTrendHigh = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> priceTrendLow = new ArrayList<String>();//押品价格指数
|
||||
ArrayList<String> totalPriceBLow = new ArrayList<String>();//押品总价B
|
||||
ArrayList<String> totalPriceALow = new ArrayList<String>();//押品总价A
|
||||
ArrayList<String> totalPriceHigh = new ArrayList<String>();//押品总价
|
||||
ArrayList<String> handleHigh = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> handleLow = new ArrayList<String>();//押品处置
|
||||
ArrayList<String> quoteHigh = new ArrayList<String>();//发布量
|
||||
ArrayList<String> quoteLow = new ArrayList<String>();//发布量
|
||||
ArrayList<String> trafficHigh = new ArrayList<String>();//交通
|
||||
ArrayList<String> trafficLow = new ArrayList<String>();//交通
|
||||
ArrayList<String> agencyHigh = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> agencyLow = new ArrayList<String>();//周边中介
|
||||
ArrayList<String> houseAge = new ArrayList<String>();//房龄
|
||||
for (CollateralEvaluationInfo coll : colls) {
|
||||
if(coll.getPriceStability()!=null&&coll.getPriceStability()>75){
|
||||
priceTrendHigh.add(coll.getDistrictName());
|
||||
@@ -722,43 +722,43 @@ public class EvaluationGeneralController {
|
||||
List<SiteDistrictAvgPriceInfo> sitePrices = new ArrayList<SiteDistrictAvgPriceInfo>();
|
||||
BasicDBObject averageStatistics = collateralEvaluationInfo.getAverageStatistics();
|
||||
if(averageStatistics!=null){
|
||||
if(averageStatistics.containsKey("搜房")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("搜房"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("搜房", div));
|
||||
if(averageStatistics.containsKey("搜房")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("搜房"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("搜房", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("搜房", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("搜房", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("安居客")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("安居客"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", div));
|
||||
if(averageStatistics.containsKey("安居客")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("安居客"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("赶集")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("赶集"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", div));
|
||||
if(averageStatistics.containsKey("赶集")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("赶集"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("链家")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("链家"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", div));
|
||||
if(averageStatistics.containsKey("链家")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("链家"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
}
|
||||
if(averageStatistics.containsKey("新浪")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("新浪"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("新浪", div));
|
||||
if(averageStatistics.containsKey("新浪")){
|
||||
Double div = MathUtils.formatDouble(MathUtils.div((double)(Integer)averageStatistics.get("新浪"),10000d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("新浪", div));
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("新浪", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("新浪", 0d));
|
||||
}
|
||||
|
||||
}else{
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("搜房", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("新浪", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("搜房", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("安居客", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("赶集", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("链家", 0d));
|
||||
sitePrices.add(new SiteDistrictAvgPriceInfo("新浪", 0d));
|
||||
}
|
||||
return sitePrices;
|
||||
}
|
||||
|
||||
+13
-13
@@ -35,7 +35,7 @@ import com.fangjia.service.pds.PdsUserService;
|
||||
|
||||
|
||||
/**
|
||||
* 评估历史
|
||||
* 评估历史
|
||||
* @author gaojuan
|
||||
*
|
||||
*/
|
||||
@@ -68,14 +68,14 @@ public class EvaluationHistoryController {
|
||||
public void setHouseInfoService(HouseInfoService houseInfoService) {
|
||||
this.houseInfoService = houseInfoService;
|
||||
}
|
||||
//列表页
|
||||
//列表页
|
||||
|
||||
public Object listAction(CollateralEvaluationInfoModel model, HttpServletRequest request){
|
||||
try {
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
List<String> userIds = getHaveAuthorityUserIds(userId);
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
//城市列表查询
|
||||
//城市列表查询
|
||||
List<String> citys = onceCollateralEvaluationInfoService.findAllAuthorityCitys(userIds, enterpriseId);
|
||||
model.setCitys(citys);
|
||||
Date startDate = model.getStartDate();
|
||||
@@ -116,14 +116,14 @@ public class EvaluationHistoryController {
|
||||
/*List<String> collateralIds = info.getCollateralIds();
|
||||
List<String> addresses = getMortgageAddress(collateralIds);
|
||||
if(null != addresses){
|
||||
bo.setMortgageAddress(StringUtils.join(addresses, "、"));
|
||||
bo.setMortgageAddress(StringUtils.join(addresses, "、"));
|
||||
}*/
|
||||
//查询人的信息
|
||||
//查询人的信息
|
||||
User user = pdsUserService.getUser(info.getUserId());
|
||||
if(user!=null){
|
||||
bo.setEvalPersonName(user.getName());
|
||||
}
|
||||
/*//房产信息
|
||||
/*//房产信息
|
||||
List<String> collIds = info.getCollateralIds();
|
||||
CollateralEvaluationInfo coll = getAddressList(collIds);
|
||||
if(coll!=null){
|
||||
@@ -179,7 +179,7 @@ public class EvaluationHistoryController {
|
||||
}
|
||||
|
||||
|
||||
//获取贷款人信息
|
||||
//获取贷款人信息
|
||||
public JsonModel getAlllenderAction(CollateralEvaluationInfoModel model){
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String, Object> data = new HashMap<String,Object>();
|
||||
@@ -199,7 +199,7 @@ public class EvaluationHistoryController {
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
//获取押品房产
|
||||
//获取押品房产
|
||||
public JsonModel getAlllHouseAddressAction(CollateralEvaluationInfoModel model){
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String, Object> data = new HashMap<String,Object>();
|
||||
@@ -220,7 +220,7 @@ public class EvaluationHistoryController {
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
//添加房产到抵押库
|
||||
//添加房产到抵押库
|
||||
public Object doAddAction(CollateralEvaluationInfoModel model, HttpServletRequest request){
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
@@ -242,7 +242,7 @@ public class EvaluationHistoryController {
|
||||
detail.setEnterpriseId(enterpriseId);
|
||||
detail.setCreateDate(new Date());
|
||||
detail.setRepaymentWay(model.getRepaymentWay());
|
||||
detail.setSource("贷前评估");
|
||||
detail.setSource("贷前评估");
|
||||
mortgageDetailService.save(detail, PdsConstants.FANGJIA_API_TOKEN);
|
||||
|
||||
if(StringUtils.isNotBlank(detail.getId())){
|
||||
@@ -261,7 +261,7 @@ public class EvaluationHistoryController {
|
||||
model.redirect("/evaluationHistory/list");
|
||||
return model;
|
||||
}
|
||||
//获取共同贷款人
|
||||
//获取共同贷款人
|
||||
private List<String> getTogetherLenders(List<String> deputyIdCodes){
|
||||
if(null != deputyIdCodes){
|
||||
List<String> names = new ArrayList<String>();
|
||||
@@ -300,10 +300,10 @@ public class EvaluationHistoryController {
|
||||
if(null != collateralInfo){
|
||||
String address = collateralInfo.getDistrictName();
|
||||
if(StringUtils.isNotBlank(collateralInfo.getHouseNumber())){
|
||||
address += collateralInfo.getHouseNumber()+"号";
|
||||
address += collateralInfo.getHouseNumber()+"号";
|
||||
}
|
||||
if(StringUtils.isNotBlank(collateralInfo.getRoomNumber())){
|
||||
address += collateralInfo.getRoomNumber()+"室";
|
||||
address += collateralInfo.getRoomNumber()+"室";
|
||||
}
|
||||
return address;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* PDS 获客页面Controller
|
||||
* PDS 获客页面Controller
|
||||
*/
|
||||
public class HkController {
|
||||
|
||||
@@ -52,7 +52,7 @@ public class HkController {
|
||||
private ApiCallLimitService apiCallLimitService;
|
||||
|
||||
/**
|
||||
* 获客类型选择页面
|
||||
* 获客类型选择页面
|
||||
* @param model
|
||||
* @param response
|
||||
* @return
|
||||
@@ -65,17 +65,17 @@ public class HkController {
|
||||
|
||||
}
|
||||
if(enterprise == null){
|
||||
model.setMsg("无效的企业编码");
|
||||
model.setMsg("无效的企业编码");
|
||||
return model;
|
||||
}
|
||||
if((enterprise.getEnterpriseStatus() != null && !enterprise.getEnterpriseStatus())
|
||||
|| (enterprise.getHuoKeStatus() != null && !enterprise.getHuoKeStatus())){
|
||||
model.setMsg("账号已关闭");
|
||||
model.setMsg("账号已关闭");
|
||||
return model;
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(model.getSource())){
|
||||
model.setSource("未知");
|
||||
model.setSource("未知");
|
||||
}
|
||||
CookieUtils.setCookie(CODE_LABEL, model.getCode(),"/", MAX_AGE, response);
|
||||
CookieUtils.setCookie(FROM_LABEL, URLEncoder.encode(model.getSource(), "UTF-8"),"/", MAX_AGE, response);
|
||||
@@ -83,7 +83,7 @@ public class HkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获客城市选择页面
|
||||
* 获客城市选择页面
|
||||
* @param model
|
||||
* @param response
|
||||
* @return
|
||||
@@ -110,7 +110,7 @@ public class HkController {
|
||||
}
|
||||
|
||||
/**
|
||||
*房屋信息录入页面
|
||||
*房屋信息录入页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -133,7 +133,7 @@ public class HkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 估价页面
|
||||
* 估价页面
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
@@ -146,7 +146,7 @@ public class HkController {
|
||||
try {
|
||||
source = URLDecoder.decode(CookieUtils.getCookieValue(request, FROM_LABEL),"UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
source = "未知";
|
||||
source = "未知";
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(StringUtil.hasBlank(model.getAddress(), model.getCityName(), model.getHouseOwner(), model.getHouseType(), enterpriseId, category)
|
||||
@@ -169,7 +169,7 @@ public class HkController {
|
||||
JSONObject resp = pdsApiProxyService.invoke(PdsAPIs.EVALUATION.getUri(), params);
|
||||
HouseInfoMonitor him = hkHouseInfoMonitor(model.getCityName(), model.getRegion(), model.getName(),model.getAddress(),enterpriseId);
|
||||
if(!existsAvgPrice(model.getCityName(), model.getRegion(), model.getName())){
|
||||
//监控匹配
|
||||
//监控匹配
|
||||
him.setReason(2);
|
||||
houseInfoMonitorService.save(him);
|
||||
return model;
|
||||
@@ -209,13 +209,13 @@ public class HkController {
|
||||
houseInfo.setEstateType(loanApply.getHouseType());
|
||||
houseInfo.setFrom("hk");
|
||||
if("personal".equals(loanApply.getCategory())){
|
||||
houseInfo.setUsage("消费");
|
||||
houseInfo.setUsage("消费");
|
||||
}else{
|
||||
houseInfo.setUsage("经营");
|
||||
houseInfo.setUsage("经营");
|
||||
}
|
||||
houseInfoService.save(houseInfo.getSid(), Arrays.asList(houseInfo));
|
||||
request.getSession(true).setAttribute(HK_LOAN_APPLY_SESSION_KEY, loanApply);
|
||||
/*获客估价次数减一*/
|
||||
/*获客估价次数减一*/
|
||||
/* Enterprise enterprise = getEnterpriseFromCookie(request);
|
||||
if(enterprise.getHoukeCount() != null){
|
||||
enterprise.setHoukeCount(enterprise.getHoukeCount() -1);
|
||||
@@ -244,7 +244,7 @@ public class HkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 贷款申请页面
|
||||
* 贷款申请页面
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
@@ -261,7 +261,7 @@ public class HkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 贷款申请结果页面
|
||||
* 贷款申请结果页面
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
@@ -278,9 +278,9 @@ public class HkController {
|
||||
sessionLoanApply.setCardId(loanApply.getCardId());
|
||||
int genderNumber = Integer.valueOf(loanApply.getCardId().charAt(16) + "");
|
||||
if(genderNumber % 2 == 0){
|
||||
sessionLoanApply.setGender("女");
|
||||
sessionLoanApply.setGender("女");
|
||||
}else{
|
||||
sessionLoanApply.setGender("男");
|
||||
sessionLoanApply.setGender("男");
|
||||
}
|
||||
|
||||
sessionLoanApply.setMobile(loanApply.getMobile());
|
||||
@@ -317,7 +317,7 @@ public class HkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否存在均价
|
||||
* 判断是否存在均价
|
||||
* @param city
|
||||
* @param region
|
||||
* @param name
|
||||
|
||||
@@ -65,15 +65,15 @@ public class HomeController {
|
||||
request.getSession().setAttribute("notice_msg", Message.PDS_EXPIRED);
|
||||
return model;
|
||||
}
|
||||
//临近到期:<=30天
|
||||
//临近到期:<=30天
|
||||
if((endLimitDate.getTime()-now.getTime())/(1000*3600*24) <= 30) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
||||
model.setMsg(MessageFormat.format(Message.PDS_EXPIRING, sdf.format(endLimitDate)));
|
||||
request.getSession().setAttribute("notice_msg", MessageFormat.format(Message.PDS_EXPIRING, sdf.format(endLimitDate)));
|
||||
return model;
|
||||
}
|
||||
}
|
||||
//评估总次数<=50
|
||||
//评估总次数<=50
|
||||
int limitCount = apiCallLimitService.getCount(enterprise.getId(), ApiCallLimitEnum.WO_YAO_PING_GU.getUri());
|
||||
if(limitCount <= 50) {
|
||||
model.setMsg(MessageFormat.format(Message.INSUFFICIENT, limitCount));
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ public class LoanManageController {
|
||||
data.put("success", Boolean.FALSE);
|
||||
json.setJsonModel(data);
|
||||
if(!ObjectId.isValid(model.getId())){
|
||||
data.put("msg", "更新失败");
|
||||
data.put("msg", "更新失败");
|
||||
return json;
|
||||
}
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
@@ -77,7 +77,7 @@ public class LoanManageController {
|
||||
loanApply.setOperator(user.getName());
|
||||
loanApply.setOperatorId(user.getId());
|
||||
loanApplyService.save(loanApply);
|
||||
data.put("msg", "已处理成功");
|
||||
data.put("msg", "已处理成功");
|
||||
data.put("success", Boolean.TRUE);
|
||||
data.put("finishDate", DateUtil.formatByPattern(loanApply.getFinishDate(), "yyyy.MM.dd HH:mm"));
|
||||
data.put("operator", loanApply.getOperator());
|
||||
|
||||
+13
-13
@@ -29,7 +29,7 @@ import com.fangjia.service.pds.PdsLoanRateService;
|
||||
import com.fangjia.service.pds.RiskWarnService;
|
||||
|
||||
/**
|
||||
* PDS�零왠齡포
|
||||
* PDS设置控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class ManagerController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 꽝鑒�零(덞운적쪽�零)
|
||||
* 参数设置(贷款利率设置)
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -72,13 +72,13 @@ public class ManagerController {
|
||||
}
|
||||
model.setInfos(infos);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("꽝鑒�零(덞운적쪽�零)嫩끽", e);
|
||||
LOGGER.error("参数设置(贷款利率设置)异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 괏닸덞운적쪽
|
||||
* 保存贷款利率
|
||||
* @param loanRate
|
||||
* @param request
|
||||
* @return
|
||||
@@ -100,14 +100,14 @@ public class ManagerController {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("괏닸덞운적쪽嫩끽", e);
|
||||
LOGGER.error("保存贷款利率异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 루麴渡쒸瓊今꿴璂
|
||||
* 风险预警提醒查询
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
@@ -118,13 +118,13 @@ public class ManagerController {
|
||||
List<RiskWarn> riskWarns = riskWarnService.queryRiskWarns(enterpriseId);
|
||||
model.setRiskWarns(riskWarns);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("루麴渡쒸瓊今꿴璂嫩끽", e);
|
||||
LOGGER.error("风险预警提醒查询异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* �뇜루麴渡쒸
|
||||
* 删除风险预警
|
||||
* @param riskWarn
|
||||
* @return
|
||||
*/
|
||||
@@ -133,14 +133,14 @@ public class ManagerController {
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
riskWarnService.remove(riskWarn.getId(), enterpriseId);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("�뇜루麴渡쒸嫩끽", e);
|
||||
LOGGER.error("删除风险预警异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 警속루麴渡쒸
|
||||
* 添加风险预警
|
||||
* @param riskWarn
|
||||
* @param request
|
||||
* @return
|
||||
@@ -156,7 +156,7 @@ public class ManagerController {
|
||||
for (String email : emails) {
|
||||
if (!email.trim().equals("")) {
|
||||
if (!CommonUtil.isEmail(email.trim())) {
|
||||
return new JsonResultModel(false, email + "목駕꼇攣횅");
|
||||
return new JsonResultModel(false, email + "格式不正确");
|
||||
}
|
||||
newEmails.add(email.trim());
|
||||
}
|
||||
@@ -164,13 +164,13 @@ public class ManagerController {
|
||||
riskWarn.setEmails(newEmails);
|
||||
riskWarnService.save(riskWarn);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("警속루麴渡쒸嫩끽", e);
|
||||
LOGGER.error("添加风险预警异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
//속潼적쪽
|
||||
//加载利率
|
||||
public JsonModel loadRatesAction(RiskWarn riskWarn, HttpServletRequest request) throws Exception {
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
List<BankLoanRate> bankLoanRates = bankLoanRateService.queryBankLoans();
|
||||
|
||||
+4
-4
@@ -42,12 +42,12 @@ public class ManualInquiryController {
|
||||
|
||||
public Object saveAction(ManualInquiry manualInquiry, HttpServletRequest request) throws Exception {
|
||||
try {
|
||||
//已有 sid,type,evalPrice,myPrice
|
||||
//已有 sid,type,evalPrice,myPrice
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
String uid = PdsSessionContent.getLoginUserId(request);
|
||||
//得到企业信息以填充ManualInquiry
|
||||
//得到企业信息以填充ManualInquiry
|
||||
Enterprise enterprise = enterpriseService.getEnterprise(enterpriseId);
|
||||
//得到用户信息以填充ManualInquiry
|
||||
//得到用户信息以填充ManualInquiry
|
||||
User user = pdsUserService.getUser(uid);
|
||||
|
||||
manualInquiry.setEid(enterpriseId);
|
||||
@@ -61,7 +61,7 @@ public class ManualInquiryController {
|
||||
manualInquiry.setType(2);
|
||||
manualInquiryService.save(manualInquiry);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("价格纠正保存异常", e);
|
||||
LOGGER.error("价格纠正保存异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
|
||||
+3
-3
@@ -3,14 +3,14 @@ package com.fangjia.pds.controllers;
|
||||
import com.fangjia.pds.model.BaseModel;
|
||||
|
||||
/**
|
||||
* PC页面上嵌入手机版页面
|
||||
* PC页面上嵌入手机版页面
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
public class MobileController {
|
||||
|
||||
/**
|
||||
* 我的房产页面
|
||||
* 我的房产页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ public class MobileController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 营销货客页面
|
||||
* 营销货客页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
|
||||
+3
-3
@@ -28,7 +28,7 @@ public class MortgagesController {
|
||||
* @return
|
||||
*/
|
||||
public Object indexAction(MortgagesModel model, HttpServletRequest request) {
|
||||
LOG.debug("押品评估开始");
|
||||
LOG.debug("押品评估开始");
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
Map<String, List<Cities>> cities = getAllCities(userId);
|
||||
model.setCitiesMap(cities);
|
||||
@@ -36,7 +36,7 @@ public class MortgagesController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市列表
|
||||
* 获取城市列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public class MortgagesController {
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取城市列表 (带权限)
|
||||
* 获取城市列表 (带权限)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import com.fangjia.pds.model.NoticeModel;
|
||||
import com.fangjia.service.pds.PdsApiProxyService;
|
||||
|
||||
/**
|
||||
* 公告控制器
|
||||
* 公告控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
|
||||
+26
-26
@@ -22,7 +22,7 @@ import com.fangjia.service.pds.PdsRiskMapService;
|
||||
import com.fangjia.service.pds.RiskWarnService;
|
||||
|
||||
/**
|
||||
* 风险预警
|
||||
* 风险预警
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -48,27 +48,27 @@ public class PdsRiskMapController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送预警邮件
|
||||
* 发送预警邮件
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object sendRiskEmailAction(RiskMapModel model) {
|
||||
if (model == null) {
|
||||
return new JsonResultModel(false, "请填写参数");
|
||||
return new JsonResultModel(false, "请填写参数");
|
||||
}
|
||||
if (StringUtils.isBlank(model.getToken())) {
|
||||
return new JsonResultModel(false, "Token不能为空");
|
||||
return new JsonResultModel(false, "Token不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(model.getCountDate())) {
|
||||
return new JsonResultModel(false, "CountDate不能为空");
|
||||
return new JsonResultModel(false, "CountDate不能为空");
|
||||
}
|
||||
if (!model.getToken().toString().equals("5850cf09fe432a5effe58fcb")) {
|
||||
return new JsonResultModel(false, "无操作权限");
|
||||
return new JsonResultModel(false, "无操作权限");
|
||||
}
|
||||
LOGGER.info("开始发送预警邮件:" + model.getCountDate());
|
||||
//得到所有分析后的押品信息
|
||||
LOGGER.info("开始发送预警邮件:" + model.getCountDate());
|
||||
//得到所有分析后的押品信息
|
||||
try {
|
||||
//key:邮箱 value:押品编号集合
|
||||
//key:邮箱 value:押品编号集合
|
||||
Map<String, List<String>> riskMap = new HashMap<String, List<String>>();
|
||||
List<PdsRiskMap> risks = pdsRiskMapService.findAllByCountDate(model.getCountDate());
|
||||
for (PdsRiskMap risk : risks) {
|
||||
@@ -76,7 +76,7 @@ public class PdsRiskMapController {
|
||||
}
|
||||
sendEmail(riskMap);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("发送预警邮件异常", e);
|
||||
LOGGER.error("发送预警邮件异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
@@ -89,9 +89,9 @@ public class PdsRiskMapController {
|
||||
List<String> riskList = riskMap.get(email);
|
||||
for (String riskId : riskList) {
|
||||
PdsRiskMap risk = pdsRiskMapService.getPdsRiskMap(riskId);
|
||||
emailStr.append("贷款人:" + risk.getName());
|
||||
emailStr.append("贷款人:" + risk.getName());
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("手机号:" + risk.getPhone());
|
||||
emailStr.append("手机号:" + risk.getPhone());
|
||||
emailStr.append("<br/>\n");
|
||||
StringBuilder name = new StringBuilder();
|
||||
StringBuilder addr = new StringBuilder();
|
||||
@@ -100,35 +100,35 @@ public class PdsRiskMapController {
|
||||
name.append(map.get("name") + ",");
|
||||
addr.append(map.get("addr") + ",");
|
||||
}
|
||||
emailStr.append("押品房产:" + name.delete(name.length() -1, name.length()));
|
||||
emailStr.append("押品房产:" + name.delete(name.length() -1, name.length()));
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("房产地址:" + addr.delete(addr.length() -1, addr.length()));
|
||||
emailStr.append("房产地址:" + addr.delete(addr.length() -1, addr.length()));
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("贷款金额:" + risk.getMortgagePrice());
|
||||
emailStr.append("贷款金额:" + risk.getMortgagePrice());
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("放贷日期:" + DateUtil.formatToYYYYMMDD(risk.getMortgageDate()));
|
||||
emailStr.append("放贷日期:" + DateUtil.formatToYYYYMMDD(risk.getMortgageDate()));
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("贷款期限:" + risk.getMonths() + "个月");
|
||||
emailStr.append("贷款期限:" + risk.getMonths() + "个月");
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("贷款利率:" + risk.getRate() + "%");
|
||||
emailStr.append("贷款利率:" + risk.getRate() + "%");
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("还款方式:");
|
||||
emailStr.append(risk.getRepaymentWay() != null && risk.getRepaymentWay().equals(1) ? "等额本息" : "等额本金");
|
||||
emailStr.append("还款方式:");
|
||||
emailStr.append(risk.getRepaymentWay() != null && risk.getRepaymentWay().equals(1) ? "等额本息" : "等额本金");
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("放贷时估价:" + risk.getOriPrice());
|
||||
emailStr.append("放贷时估价:" + risk.getOriPrice());
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("抵押率:" + risk.getMortgageRate() + "%");
|
||||
emailStr.append("抵押率:" + risk.getMortgageRate() + "%");
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("即时抵押率CLTV:" + risk.getCurMortgageRate() + "%("+DateUtil.formatToYYYYMMDD(risk.getCreateDate())+"更新)");
|
||||
emailStr.append("即时抵押率CLTV:" + risk.getCurMortgageRate() + "%("+DateUtil.formatToYYYYMMDD(risk.getCreateDate())+"更新)");
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("风险指数:" + risk.getRiskRate() + "("+DateUtil.formatToYYYYMMDD(risk.getCreateDate())+"更新)");
|
||||
emailStr.append("风险指数:" + risk.getRiskRate() + "("+DateUtil.formatToYYYYMMDD(risk.getCreateDate())+"更新)");
|
||||
emailStr.append("<br/>\n");
|
||||
emailStr.append("==============================================================<br>\n");
|
||||
}
|
||||
LOGGER.info("send email to:" + email);
|
||||
LOGGER.info(emailStr.toString());
|
||||
Mail mail = new Mail();
|
||||
mail.setSubject("PDS贷款风险指数监控");
|
||||
mail.setSubject("PDS贷款风险指数监控");
|
||||
mail.setContent(emailStr.toString());
|
||||
mail.setReceiver(new MailUser(email));
|
||||
emailService.sendMail(mail);
|
||||
@@ -140,7 +140,7 @@ public class PdsRiskMapController {
|
||||
List<RiskWarn> riskWarns = riskWarnService.queryRiskWarns(risk.getEnterpriseId());
|
||||
Double rate = risk.getRiskRate();
|
||||
for (RiskWarn riskWarn : riskWarns) {
|
||||
//大于指定风险指数存起来
|
||||
//大于指定风险指数存起来
|
||||
if (rate * 100 > riskWarn.getNumber()){
|
||||
List<String> emails = riskWarn.getEmails();
|
||||
for (String email : emails) {
|
||||
|
||||
+62
-62
@@ -59,23 +59,23 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
/**
|
||||
* 贷前评估-填表
|
||||
* 贷前评估-填表
|
||||
* Created by linxsh on 2016/12/6.
|
||||
*/
|
||||
public class PreassessController {
|
||||
private static final Logger logger = Logger.getLogger(PreassessController.class);
|
||||
private static final List<String> ESTATE_TYPE = ImmutableList.of("公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅", "其它");
|
||||
private static final List<String> ESTATE_TYPE = ImmutableList.of("公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅", "其它");
|
||||
private static final MessageFormat markdownTemplate = new MessageFormat(
|
||||
"## 人工评估信息\n\n" +
|
||||
"- sid:{0}\n- 联系电话:{1}\n" +
|
||||
"- 联系人:{15}\n- 企业:{16}\n" +
|
||||
"- 城市:{2}\n- 区域:{3}\n" +
|
||||
"- 小区名称:{4}\n- 地址:{5}\n" +
|
||||
"- 物业类型:{6}\n- 建筑面积:{7}\n" +
|
||||
"- 楼栋:{8}\n- 单元:{9}\n" +
|
||||
"- 室号:{10}\n- 楼层:{11}\n" +
|
||||
"- 总楼层:{12}\n- 装修:{13}\n" +
|
||||
"- 朝向:{14}");
|
||||
"## 人工评估信息\n\n" +
|
||||
"- sid:{0}\n- 联系电话:{1}\n" +
|
||||
"- 联系人:{15}\n- 企业:{16}\n" +
|
||||
"- 城市:{2}\n- 区域:{3}\n" +
|
||||
"- 小区名称:{4}\n- 地址:{5}\n" +
|
||||
"- 物业类型:{6}\n- 建筑面积:{7}\n" +
|
||||
"- 楼栋:{8}\n- 单元:{9}\n" +
|
||||
"- 室号:{10}\n- 楼层:{11}\n" +
|
||||
"- 总楼层:{12}\n- 装修:{13}\n" +
|
||||
"- 朝向:{14}");
|
||||
|
||||
private HouseInfoService houseInfoService;
|
||||
private BorrowerService borrowerService;
|
||||
@@ -88,7 +88,7 @@ public class PreassessController {
|
||||
private PicUploadAndDownloadService picUploadAndDownloadService;
|
||||
|
||||
/**
|
||||
* 上传房产证件
|
||||
* 上传房产证件
|
||||
*/
|
||||
public Object uploadImgAction(HttpServletRequest request){
|
||||
JsonModel json = new JsonModel();
|
||||
@@ -122,7 +122,7 @@ public class PreassessController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开押品房产信息页
|
||||
* 打开押品房产信息页
|
||||
* @return
|
||||
*/
|
||||
public Object houseinfoAction(HttpServletRequest request, PreassessModel model) {
|
||||
@@ -163,7 +163,7 @@ public class PreassessController {
|
||||
|
||||
|
||||
/**
|
||||
* 跳转到贷款人信息页
|
||||
* 跳转到贷款人信息页
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -198,7 +198,7 @@ public class PreassessController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击“下一步”时保存押品房产信息
|
||||
* 点击“下一步”时保存押品房产信息
|
||||
* @param houseInfoModels
|
||||
* @return
|
||||
*/
|
||||
@@ -212,12 +212,12 @@ public class PreassessController {
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
Enterprise enterprise = null;
|
||||
//检验参数
|
||||
//检验参数
|
||||
try {
|
||||
enterprise = enterpriseService.getEnterprise(enterpriseId);
|
||||
User user = pdsUserService.getUser(userId);
|
||||
validateHouseInfoParams(houseInfoModels, user);
|
||||
//评估次数、开通城市等校验
|
||||
//评估次数、开通城市等校验
|
||||
validateAuthority(userId, enterprise);
|
||||
validateOpenCity(houseInfoModels, user.getCitys());
|
||||
} catch (PdsException e) {
|
||||
@@ -229,7 +229,7 @@ public class PreassessController {
|
||||
result.setJsonModel(msg);
|
||||
return result;
|
||||
}
|
||||
//model转换,并保存数据
|
||||
//model转换,并保存数据
|
||||
List<HouseInfo> houseInfos = new ArrayList<HouseInfo>();
|
||||
boolean needManual = false;
|
||||
for(HouseInfoModel houseInfoModel : houseInfoModels) {
|
||||
@@ -274,15 +274,15 @@ public class PreassessController {
|
||||
}
|
||||
for(HouseInfoModel houseInfoModel : houseInfoModels) {
|
||||
if(StringUtils.isBlank(houseInfoModel.getCityDisplay())) {
|
||||
// throw new PdsException("“所在城市”不能为空", 2);
|
||||
// throw new PdsException("“所在城市”不能为空", 2);
|
||||
} else if(CollectionUtils.isEmpty(citys) || !citys.contains(houseInfoModel.getCityDisplay())) {
|
||||
throw new PdsException("“所在城市["+houseInfoModel.getCityDisplay()+"]”尚未开通", 2);
|
||||
throw new PdsException("“所在城市["+houseInfoModel.getCityDisplay()+"]”尚未开通", 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存贷款人信息
|
||||
* 保存贷款人信息
|
||||
* @param request
|
||||
* @param borrowerModels
|
||||
* @return
|
||||
@@ -292,7 +292,7 @@ public class PreassessController {
|
||||
String sid = request.getParameter("sid");
|
||||
|
||||
if(StringUtils.isBlank(sid)) {
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 1, "msg", "不能重复保存");
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 1, "msg", "不能重复保存");
|
||||
result.setJsonModel(msg);
|
||||
return result;
|
||||
}
|
||||
@@ -300,10 +300,10 @@ public class PreassessController {
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
|
||||
try {
|
||||
//校验参数
|
||||
//校验参数
|
||||
validateBorrowerInfoParams(borrowerModels);
|
||||
Enterprise enterprise = enterpriseService.getEnterprise(enterpriseId);
|
||||
//评估次数、开通城市等校验
|
||||
//评估次数、开通城市等校验
|
||||
validateAuthority(userId, enterprise);
|
||||
} catch (PdsException e) {
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 2, "msg", e.getMessage());
|
||||
@@ -315,7 +315,7 @@ public class PreassessController {
|
||||
return result;
|
||||
}
|
||||
|
||||
//model转换,并保存数据
|
||||
//model转换,并保存数据
|
||||
List<Borrower> borrowers = new ArrayList<Borrower>();
|
||||
for(BorrowerModel borrowerModel : borrowerModels) {
|
||||
borrowerModel.setWorkCity(CommonUtil.formatCity(borrowerModel.getWorkCity()));
|
||||
@@ -336,21 +336,21 @@ public class PreassessController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存联系人电话
|
||||
* 保存联系人电话
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object saveContactNumberAction(PreassessModel model) throws Exception {
|
||||
JsonModel result = new JsonModel();
|
||||
/*if(StringUtils.isBlank(model.getSid()) || StringUtils.isBlank(model.getPhone())) {
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 0, "msg", "保存失败,请重试");
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 0, "msg", "保存失败,请重试");
|
||||
result.setJsonModel(msg);
|
||||
return result;
|
||||
}*/
|
||||
//更新库里的字段
|
||||
//更新库里的字段
|
||||
List<HouseInfo> houseInfos = houseInfoService.findBySid(model.getSid());
|
||||
if(CollectionUtils.isEmpty(houseInfos)) {
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 0, "msg", "房产信息不存在");
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 0, "msg", "房产信息不存在");
|
||||
result.setJsonModel(msg);
|
||||
return result;
|
||||
}
|
||||
@@ -359,10 +359,10 @@ public class PreassessController {
|
||||
}
|
||||
|
||||
|
||||
//发送信息到钉钉
|
||||
//发送信息到钉钉
|
||||
sendMsgToDingding(model.getSid(), model.getPhone(), houseInfos);
|
||||
|
||||
//保存人工询价信息
|
||||
//保存人工询价信息
|
||||
saveInquiryInfo(houseInfos.get(0),model.getLinks());
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 200, "msg", model.getSid());
|
||||
result.setJsonModel(msg);
|
||||
@@ -392,7 +392,7 @@ public class PreassessController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送信息到钉钉
|
||||
* 发送信息到钉钉
|
||||
* @param sid
|
||||
* @param phone
|
||||
*
|
||||
@@ -427,7 +427,7 @@ public class PreassessController {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("msgtype", "markdown");
|
||||
JSONObject markdown = new JSONObject();
|
||||
markdown.put("title", "人工评估信息");
|
||||
markdown.put("title", "人工评估信息");
|
||||
markdown.put("text", sendMsg);
|
||||
jsonBody.put("markdown", markdown);
|
||||
JSONObject jo = pdsApiProxyService.invoke(PdsConstants.DINGDING_URL, jsonBody, null, "UTF-8", false);
|
||||
@@ -435,7 +435,7 @@ public class PreassessController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市列表
|
||||
* 获取城市列表
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@@ -479,21 +479,21 @@ public class PreassessController {
|
||||
|
||||
private void validateAuthority(String userId, Enterprise enterprise) throws PdsException {
|
||||
if(enterprise == null) {
|
||||
throw new PdsException("当前企业不存在");
|
||||
throw new PdsException("当前企业不存在");
|
||||
}
|
||||
if(isExpire(enterprise)) {
|
||||
throw new PdsException("评估权限已过期");
|
||||
throw new PdsException("评估权限已过期");
|
||||
}
|
||||
if(isOverMaxLimit(enterprise)) {
|
||||
throw new PdsException("已达到最大评估次数限制,无法继续评估");
|
||||
throw new PdsException("已达到最大评估次数限制,无法继续评估");
|
||||
}
|
||||
if(isOverDayLimit(userId, enterprise)) {
|
||||
throw new PdsException("已达到每天最大评估次数限制,无法继续评估");
|
||||
throw new PdsException("已达到每天最大评估次数限制,无法继续评估");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 每天最大次数
|
||||
* 每天最大次数
|
||||
* @param enterprise
|
||||
* @return
|
||||
*/
|
||||
@@ -511,7 +511,7 @@ public class PreassessController {
|
||||
|
||||
private boolean isOverMaxLimit(Enterprise enterprise) {
|
||||
int limitCount = apiCallLimitService.getCount_(enterprise.getId(), ApiCallLimitEnum.WO_YAO_PING_GU.getUri());
|
||||
// 过滤器先减一, 这里应该是为零也可以
|
||||
// 过滤器先减一, 这里应该是为零也可以
|
||||
if(limitCount < 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -519,7 +519,7 @@ public class PreassessController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否过期
|
||||
* 是否过期
|
||||
* @param enterprise
|
||||
* @return
|
||||
*/
|
||||
@@ -536,7 +536,7 @@ public class PreassessController {
|
||||
|
||||
private void validateBorrowerInfoParams(List<BorrowerModel> borrowerModels) throws PdsException {
|
||||
/*if(borrowerModels.size() > 6) {
|
||||
throw new Exception("贷款人不能超过6位");
|
||||
throw new Exception("贷款人不能超过6位");
|
||||
}*/
|
||||
for(int i=0; borrowerModels != null && i<borrowerModels.size(); ++i) {
|
||||
BorrowerModel borrowerModel = borrowerModels.get(i);
|
||||
@@ -552,71 +552,71 @@ public class PreassessController {
|
||||
String workAddress = borrowerModel.getWorkAddress();
|
||||
|
||||
if(StringUtils.isBlank(name)) {
|
||||
throw new PdsException("姓名不能为空");
|
||||
throw new PdsException("姓名不能为空");
|
||||
}
|
||||
if(StringUtils.isNotBlank(idcode) && !CommonUtil.isValidIdCardNumber(idcode)) {
|
||||
throw new PdsException("身份证号格式错误");
|
||||
throw new PdsException("身份证号格式错误");
|
||||
}
|
||||
if((StringUtils.isNotBlank(phone1) && !CommonUtil.isMobile(phone1))
|
||||
||(StringUtils.isNotBlank(phone2) && !CommonUtil.isMobile(phone2))) {
|
||||
throw new PdsException("手机号格式错误");
|
||||
throw new PdsException("手机号格式错误");
|
||||
}
|
||||
/*if(StringUtils.isBlank(resCity) || StringUtils.isBlank(resRegion) || StringUtils.isBlank(resAddress)) {
|
||||
throw new PdsException("居住地址不能为空");
|
||||
throw new PdsException("居住地址不能为空");
|
||||
}
|
||||
if(StringUtils.isBlank(workCity)|| StringUtils.isBlank(workRegion) || StringUtils.isBlank(workAddress)) {
|
||||
throw new PdsException("工作地址不能为空");
|
||||
throw new PdsException("工作地址不能为空");
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证参数合法性
|
||||
* 验证参数合法性
|
||||
* @param houseInfoModels
|
||||
* @return
|
||||
*/
|
||||
private void validateHouseInfoParams(List<HouseInfoModel> houseInfoModels, User user) throws PdsException {
|
||||
if(houseInfoModels.size() > 6) {
|
||||
throw new PdsException("押品房产不能超过6套");
|
||||
throw new PdsException("押品房产不能超过6套");
|
||||
}
|
||||
for(int i=0; i<houseInfoModels.size(); ++i) {
|
||||
HouseInfoModel houseInfoModel = houseInfoModels.get(i);
|
||||
if(StringUtils.isBlank(houseInfoModel.getEstateType()) || !ESTATE_TYPE.contains(houseInfoModel.getEstateType())) {
|
||||
throw new PdsException("“房产类型”不合法");
|
||||
throw new PdsException("“房产类型”不合法");
|
||||
}
|
||||
/*if(StringUtils.isBlank(houseInfoModel.getCityDisplay())) {
|
||||
throw new PdsException("“所在城市”不能为空");
|
||||
throw new PdsException("“所在城市”不能为空");
|
||||
} else if(CollectionUtils.isEmpty(user.getCitys()) || !user.getCitys().contains(houseInfoModel.getCityDisplay())) {
|
||||
throw new PdsException("“所在城市["+houseInfoModel.getCityDisplay()+"]”尚未开通");
|
||||
throw new PdsException("“所在城市["+houseInfoModel.getCityDisplay()+"]”尚未开通");
|
||||
}*/
|
||||
if(StringUtils.isBlank(houseInfoModel.getDistrict())) {
|
||||
throw new PdsException("“楼盘/地址”不能为空");
|
||||
throw new PdsException("“楼盘/地址”不能为空");
|
||||
}
|
||||
|
||||
/*if(StringUtils.isBlank(houseInfoModel.getHouseNumber())) {
|
||||
throw new PdsException("“楼栋号”不能为空");
|
||||
throw new PdsException("“楼栋号”不能为空");
|
||||
}*/
|
||||
|
||||
if(houseInfoModel.getEstateType().indexOf("别墅") == -1) {
|
||||
if(houseInfoModel.getEstateType().indexOf("别墅") == -1) {
|
||||
if(houseInfoModel.getFloor() != null) {
|
||||
if(houseInfoModel.getFloor() <=0 || houseInfoModel.getFloor()>59) {
|
||||
throw new PdsException("“楼层”不合法");
|
||||
throw new PdsException("“楼层”不合法");
|
||||
}
|
||||
}
|
||||
if(houseInfoModel.getHeight() != null) {
|
||||
if(houseInfoModel.getHeight() <=0 || houseInfoModel.getHeight() > 59) {
|
||||
throw new PdsException("“楼层”不合法");
|
||||
throw new PdsException("“楼层”不合法");
|
||||
}
|
||||
}
|
||||
/*if (houseInfoModel.getFloor() == null || houseInfoModel.getHeight() == null || houseInfoModel.getFloor() <= 0 || houseInfoModel.getFloor() > houseInfoModel.getHeight()
|
||||
|| houseInfoModel.getFloor() > 50 || houseInfoModel.getHeight() > 50) {
|
||||
|
||||
throw new PdsException("“楼层”不合法");
|
||||
throw new PdsException("“楼层”不合法");
|
||||
}*/
|
||||
}
|
||||
if(houseInfoModel.getArea() == null || houseInfoModel.getArea() <= 0 ||
|
||||
("公寓".equals(houseInfoModel.getEstateType()) && houseInfoModel.getArea() > 600)) {
|
||||
throw new PdsException("“建筑面积”不合法");
|
||||
("公寓".equals(houseInfoModel.getEstateType()) && houseInfoModel.getArea() > 600)) {
|
||||
throw new PdsException("“建筑面积”不合法");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -644,7 +644,7 @@ public class PreassessController {
|
||||
him.setReason(2);
|
||||
}
|
||||
if(him!=null&&StringUtils.isBlank(him.getEnterpriseId())){
|
||||
logger.warn("企业为空来源:PreassessController"+him.getCity()+"========"+him.getRegion()+"============"+him.getAddress());
|
||||
logger.warn("企业为空来源:PreassessController"+him.getCity()+"========"+him.getRegion()+"============"+him.getAddress());
|
||||
}
|
||||
houseInfoMonitorService.save(him);
|
||||
}
|
||||
|
||||
+24
-24
@@ -37,13 +37,13 @@ import java.util.*;
|
||||
* Created by linxsh on 2017/6/29.
|
||||
*/
|
||||
public class PrevaluationController {
|
||||
private static final List<String> ESTATE_TYPE = ImmutableList.of("公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅", "其它");
|
||||
private static final List<String> ESTATE_TYPE = ImmutableList.of("公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅", "其它");
|
||||
|
||||
private static final MessageFormat markdownTemplate = new MessageFormat(
|
||||
"## 人工评估信息 - 房产贷前估值\n\n" +
|
||||
"- 联系电话:{0}\n" +
|
||||
"- 联系人:{1}\n- 企业:{2}\n" +
|
||||
"- 输入:{3}");
|
||||
"## 人工评估信息 - 房产贷前估值\n\n" +
|
||||
"- 联系电话:{0}\n" +
|
||||
"- 联系人:{1}\n- 企业:{2}\n" +
|
||||
"- 输入:{3}");
|
||||
|
||||
private PdsUserService pdsUserService;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PrevaluationController {
|
||||
private HouseInfoMonitorService houseInfoMonitorService;
|
||||
|
||||
/**
|
||||
* 贷前估值
|
||||
* 贷前估值
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ public class PrevaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市列表
|
||||
* 获取城市列表
|
||||
* @return
|
||||
*/
|
||||
private Map<String, List<Cities>> getAllCities() {
|
||||
@@ -87,7 +87,7 @@ public class PrevaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存评估信息
|
||||
* 保存评估信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ public class PrevaluationController {
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
|
||||
//检验参数
|
||||
//检验参数
|
||||
try {
|
||||
validateEvalInfoParams(model);
|
||||
} catch (PdsException e) {
|
||||
@@ -110,7 +110,7 @@ public class PrevaluationController {
|
||||
return result;
|
||||
}
|
||||
|
||||
//model转换,并保存数据
|
||||
//model转换,并保存数据
|
||||
SmartInput smartInput = new SmartInput();
|
||||
BeanUtils.copyProperties(model, smartInput);
|
||||
smartInput.setCity(CommonUtil.formatCity(model.getCityDisplay()));
|
||||
@@ -121,7 +121,7 @@ public class PrevaluationController {
|
||||
|
||||
boolean supportEvaluate = supportEvaluate(smartInput.getCity(), smartInput.getRegion(), smartInput.getDistrictName());
|
||||
boolean hasLocation = hasLocation(smartInput.getCity(), smartInput.getRegion(), smartInput.getDistrictName());
|
||||
//监控估价
|
||||
//监控估价
|
||||
monitorInfo(smartInput, supportEvaluate,smartInput.getId());
|
||||
Map<String, Object> msg = ImmutableMap.<String, Object>of("status", 200, "support", supportEvaluate && hasLocation, "msg", smartInput.getId());
|
||||
result.setJsonModel(msg);
|
||||
@@ -148,7 +148,7 @@ public class PrevaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存联系人电话
|
||||
* 保存联系人电话
|
||||
* @return
|
||||
*/
|
||||
public Object saveContactNumberAction(PrevaluationModel model, HttpServletRequest request) {
|
||||
@@ -165,7 +165,7 @@ public class PrevaluationController {
|
||||
peopleInquiry.setInquiryDate(new Date());
|
||||
peopleInquiryService.save(peopleInquiry);
|
||||
|
||||
//发送信息到钉钉
|
||||
//发送信息到钉钉
|
||||
sendMsgToDingding(peopleInquiry);
|
||||
|
||||
msg.put("status", 200);
|
||||
@@ -204,40 +204,40 @@ public class PrevaluationController {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("msgtype", "markdown");
|
||||
JSONObject markdown = new JSONObject();
|
||||
markdown.put("title", "人工评估信息");
|
||||
markdown.put("title", "人工评估信息");
|
||||
markdown.put("text", sendMsg);
|
||||
jsonBody.put("markdown", markdown);
|
||||
pdsApiProxyService.invoke(PdsConstants.DINGDING_URL, jsonBody, null, "UTF-8", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证参数合法性
|
||||
* 验证参数合法性
|
||||
* @param evalInfoModel
|
||||
* @return
|
||||
*/
|
||||
private void validateEvalInfoParams(PrevaluationModel evalInfoModel) throws PdsException {
|
||||
if(StringUtils.isBlank(evalInfoModel.getEstateType()) || !ESTATE_TYPE.contains(evalInfoModel.getEstateType())) {
|
||||
throw new PdsException("“房产类型”不合法");
|
||||
throw new PdsException("“房产类型”不合法");
|
||||
}
|
||||
if(StringUtils.isBlank(evalInfoModel.getAddress())) {
|
||||
throw new PdsException("“楼盘/地址”不能为空");
|
||||
throw new PdsException("“楼盘/地址”不能为空");
|
||||
}
|
||||
|
||||
if(evalInfoModel.getEstateType().indexOf("别墅") == -1) {
|
||||
if(evalInfoModel.getEstateType().indexOf("别墅") == -1) {
|
||||
if(evalInfoModel.getFloor() != null) {
|
||||
if(evalInfoModel.getFloor() <=0 || evalInfoModel.getFloor()>59) {
|
||||
throw new PdsException("“楼层”不合法");
|
||||
throw new PdsException("“楼层”不合法");
|
||||
}
|
||||
}
|
||||
if(evalInfoModel.getHeight() != null) {
|
||||
if(evalInfoModel.getHeight() <=0 || evalInfoModel.getHeight() > 59) {
|
||||
throw new PdsException("“楼层”不合法");
|
||||
throw new PdsException("“楼层”不合法");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(evalInfoModel.getArea() == null || evalInfoModel.getArea() <= 0 ||
|
||||
("公寓".equals(evalInfoModel.getEstateType()) && evalInfoModel.getArea() > 600)) {
|
||||
throw new PdsException("“建筑面积”不合法");
|
||||
("公寓".equals(evalInfoModel.getEstateType()) && evalInfoModel.getArea() > 600)) {
|
||||
throw new PdsException("“建筑面积”不合法");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ public class PrevaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有经纬度
|
||||
* 是否有经纬度
|
||||
* @param city
|
||||
* @param region
|
||||
* @param name
|
||||
@@ -312,7 +312,7 @@ public class PrevaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取小区的房号信息
|
||||
* 获取小区的房号信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
|
||||
+222
-222
File diff suppressed because it is too large
Load Diff
+17
-17
@@ -27,7 +27,7 @@ import com.fangjia.service.pds.ReportResultService;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
/**
|
||||
* 报告
|
||||
* 报告
|
||||
* @author gaojuan
|
||||
*
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public class ReportResultController {
|
||||
private final String ROOT = CONFIG.isDevelopmentEnvironment() ? "/fangjia-pds" : "";
|
||||
|
||||
/**
|
||||
* 预览
|
||||
* 预览
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -72,32 +72,32 @@ public class ReportResultController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
* 查看详情
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object infoAction(ReportResultModel model) {
|
||||
LOG.warn("****************** 查看报告详情 开始******************");
|
||||
// 通过ReportInput id 构造QueryParam
|
||||
LOG.warn("****************** 查看报告详情 开始******************");
|
||||
// 通过ReportInput id 构造QueryParam
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("reportInputId", model.getReportInputId()));
|
||||
// reportInput的id
|
||||
// reportInput的id
|
||||
ReportInput reportInput = reportInputService.findById(model.getReportInputId());
|
||||
// 根据reportInput的id作为reportResult结果表中关联字段查询
|
||||
// 根据reportInput的id作为reportResult结果表中关联字段查询
|
||||
ReportResult reportResult = reportResultService.findByParams(params);
|
||||
//根据reportInput的id作为reportCheck结果表中关联字段查询
|
||||
//根据reportInput的id作为reportCheck结果表中关联字段查询
|
||||
ReportCheck reportCheck = reportCheckService.findByInputId(model.getReportInputId());
|
||||
// 存入model
|
||||
// 存入model
|
||||
model.setReportResult(reportResult);
|
||||
model.setReportInput(reportInput);
|
||||
model.setReportCheck(reportCheck);
|
||||
LOG.warn("****************** 查看报告详情 结束******************");
|
||||
LOG.warn("****************** 查看报告详情 结束******************");
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成PDF报告
|
||||
* 生成PDF报告
|
||||
*
|
||||
* @param model
|
||||
* @param response
|
||||
@@ -105,29 +105,29 @@ public class ReportResultController {
|
||||
* @throws IOException
|
||||
*/
|
||||
public Object createPdfAction(ReportResultModel model, HttpServletResponse response) throws IOException{
|
||||
LOG.warn("开始下载......");
|
||||
LOG.warn("开始下载......");
|
||||
ReportResult reportResult = reportResultService.findById(model.getId());
|
||||
if(null != reportResult){
|
||||
String htmlUrl = "http://" + CONFIG.getDomainName() + ROOT + "/reportResult/show?id="+model.getId();
|
||||
LOG.warn("要下载的地址:"+htmlUrl);
|
||||
LOG.warn("要下载的地址:"+htmlUrl);
|
||||
String toPdfTool = "wkhtmltopdf";
|
||||
String filename= reportResult.getReportNumber() + ".pdf";
|
||||
String outprintUrl = "e:/" + filename;
|
||||
if(System.getProperty("os.name").indexOf("Windows") == -1){
|
||||
//非windows 系统
|
||||
//非windows 系统
|
||||
outprintUrl = "/home/goojia/pds-pdf/"+filename;
|
||||
}
|
||||
HtmlToPdf.convert(htmlUrl, outprintUrl, toPdfTool);
|
||||
DownloadPdf.download(outprintUrl, response);
|
||||
LOG.warn("下载完成......"+outprintUrl);
|
||||
LOG.warn("下载完成......"+outprintUrl);
|
||||
}else{
|
||||
LOG.warn("报告id为 "+model.getId()+" 不存在");
|
||||
LOG.warn("报告id为 "+model.getId()+" 不存在");
|
||||
}
|
||||
model.setViewType("stream");
|
||||
return model;
|
||||
}
|
||||
|
||||
//更新周边配套信息,用于生成pdf使用
|
||||
//更新周边配套信息,用于生成pdf使用
|
||||
public Object updateResultAction(ReportResultModel model){
|
||||
ReportResult reportResult = reportResultService.findById(model.getId());
|
||||
if(reportResult != null && StringUtils.isNotBlank(model.getPoiString())){
|
||||
|
||||
+53
-53
@@ -31,7 +31,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 押品风控
|
||||
* 押品风控
|
||||
* Created by linxsh on 2016/12/9.
|
||||
*/
|
||||
public class RiskcontrolController {
|
||||
@@ -44,14 +44,14 @@ public class RiskcontrolController {
|
||||
private MortgageInfoService mortgageInfoService;
|
||||
|
||||
/**
|
||||
* 押品风控页
|
||||
* 押品风控页
|
||||
* @param request
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object indexAction(HttpServletRequest request, RiskControlModel model) throws Exception {
|
||||
//获取登陆用户对应的企业ID
|
||||
//获取登陆用户对应的企业ID
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
// User user = pdsUserService.getUser(userId);
|
||||
@@ -65,24 +65,24 @@ public class RiskcontrolController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//有效评估套数
|
||||
//有效评估套数
|
||||
// long availableAssess = riskControlDetailService.countAvailableAssess(enterpriseId);
|
||||
//贷款已结清
|
||||
//贷款已结清
|
||||
// long clearCount = riskControlDetailService.countClearLoan(enterpriseId);
|
||||
/* String defaultCity = user.getRiskMapCity();
|
||||
//风险指数占比
|
||||
//风险指数占比
|
||||
Map<String, Double> riskRateLevelMap = getRiskRateLevelMap(defaultCity);
|
||||
//CLTV占比
|
||||
//CLTV占比
|
||||
Map<String, Double> cltvLevelMap = getCltvLevelMap(defaultCity);*/
|
||||
|
||||
Date countDate = null;
|
||||
long availableCount = 0;//有效评估套数
|
||||
long clearCount = 0;//贷款已结清套数
|
||||
long loanPrice = 0;//贷款总金额
|
||||
double loanBalance = 0;//贷款余额
|
||||
double totalLoanBalance = 0;//剩余本金
|
||||
long totalPrice = 0;//当前押品总市值
|
||||
long totalOriPrice = 0; //原始押品总市值
|
||||
long availableCount = 0;//有效评估套数
|
||||
long clearCount = 0;//贷款已结清套数
|
||||
long loanPrice = 0;//贷款总金额
|
||||
double loanBalance = 0;//贷款余额
|
||||
double totalLoanBalance = 0;//剩余本金
|
||||
long totalPrice = 0;//当前押品总市值
|
||||
long totalOriPrice = 0; //原始押品总市值
|
||||
if(CollectionUtils.isNotEmpty(riskControlDetails)) {
|
||||
for(RiskControlDetail riskControlDetail : riskControlDetails) {
|
||||
RiskControlDetailModel riskControlDetailModel = new RiskControlDetailModel();
|
||||
@@ -99,24 +99,24 @@ public class RiskcontrolController {
|
||||
clearCount++;
|
||||
}
|
||||
|
||||
//累加贷款总金额
|
||||
//累加贷款总金额
|
||||
if(riskControlDetail.getLendingPrice() != null) {
|
||||
loanPrice += riskControlDetail.getLendingPrice();
|
||||
}
|
||||
//累加贷款余额
|
||||
//累加贷款余额
|
||||
if(riskControlDetail.getLoanBalance() != null) {
|
||||
loanBalance += riskControlDetail.getLoanBalance();
|
||||
}
|
||||
//累加押品总市值
|
||||
//累加押品总市值
|
||||
if(riskControlDetail.getCurPrice() != null) {
|
||||
totalPrice += riskControlDetail.getCurPrice();
|
||||
}
|
||||
if(riskControlDetail.getOriPrice() != null) {
|
||||
totalOriPrice += riskControlDetail.getOriPrice();
|
||||
}
|
||||
//累加剩余本金
|
||||
//累加剩余本金
|
||||
String repayWay = riskControlDetail.getRepayWay();
|
||||
totalLoanBalance += LoanUtil.remainInterest(riskControlDetail.getLendingPrice(), riskControlDetail.getLoanMonth(), riskControlDetail.getRate(), "等额本息".equals(repayWay)?1:2, riskControlDetail.getLendingDate());
|
||||
totalLoanBalance += LoanUtil.remainInterest(riskControlDetail.getLendingPrice(), riskControlDetail.getLoanMonth(), riskControlDetail.getRate(), "等额本息".equals(repayWay)?1:2, riskControlDetail.getLendingDate());
|
||||
|
||||
/* results.add(riskControlDetailModel);
|
||||
if(riskControlDetail.getCity() != null) {
|
||||
@@ -133,25 +133,25 @@ public class RiskcontrolController {
|
||||
totalLtv = loanPrice * 1.0 / totalOriPrice;
|
||||
}
|
||||
|
||||
//存量押品总市值
|
||||
//存量押品总市值
|
||||
Double stockHousePrice = new BigDecimal(CommonUtil.formatNumber(totalPrice/10000.0, 2)).doubleValue();
|
||||
//贷款余额
|
||||
//贷款余额
|
||||
Double stockBalance = new BigDecimal(CommonUtil.formatNumber(loanBalance/10000.0, 2)).doubleValue();
|
||||
//原始抵押率LTV
|
||||
//原始抵押率LTV
|
||||
Double oriMortgageRate = new BigDecimal(CommonUtil.formatNumber(totalLtv, 2)).doubleValue();
|
||||
//即时抵押率CLTV
|
||||
//即时抵押率CLTV
|
||||
Double curMortgageRate = new BigDecimal(CommonUtil.formatNumber(totalCltv, 2)).doubleValue();
|
||||
//存量押品平均涨幅
|
||||
//存量押品平均涨幅
|
||||
Double stockHousePriceAvgRate = riskControl.getStockHouseAvgRate();
|
||||
//CPDB押品平均涨幅
|
||||
//CPDB押品平均涨幅
|
||||
Double cpdbHousePriceAvgRate = riskControl.getCpdbHouseAvgRate();
|
||||
//存量押品涨跌比率及对应增长率
|
||||
//存量押品涨跌比率及对应增长率
|
||||
Double stockHousePriceUpRate = CommonUtil.formatNumber(riskControl.getStockUpRate(), 2);
|
||||
Double stockHousePriceDownRate = CommonUtil.formatNumber(riskControl.getStockDownRate(), 2);
|
||||
Double stockHousePriceUpAvgRate = riskControl.getTotalUpAvgRate();
|
||||
Double stockHousePriceDownAvgRate = riskControl.getTotalDownAvgRate();
|
||||
|
||||
//CPDB押品涨跌比率及对应增长率
|
||||
//CPDB押品涨跌比率及对应增长率
|
||||
Double cpdbHousePriceUpRate = CommonUtil.formatNumber(riskControl.getCpdbUpRate(), 2);
|
||||
Double cpdbHousePriceDownRate = CommonUtil.formatNumber(riskControl.getCpdbDownRate(), 2);
|
||||
Double cpdbHousePriceUpAvgRate = riskControl.getCpdbUpAvgRate();
|
||||
@@ -184,7 +184,7 @@ public class RiskcontrolController {
|
||||
|
||||
|
||||
/**
|
||||
* 押品列表页
|
||||
* 押品列表页
|
||||
* @return
|
||||
*/
|
||||
public Object listAction(HttpServletRequest request, RiskControlDetailListModel model) {
|
||||
@@ -206,12 +206,12 @@ public class RiskcontrolController {
|
||||
List<RiskControlDetailModel> results = Lists.newArrayList();
|
||||
|
||||
Date countDate = null;
|
||||
int availableCount = 0;//有效评估套数
|
||||
int clearCount = 0;//贷款已结清套数
|
||||
long loanPrice = 0;//贷款总金额
|
||||
double loanBalance = 0;//贷款余额
|
||||
double totalLoanBalance = 0;//剩余本金
|
||||
long totalPrice = 0;//查询结果的押品总市值
|
||||
int availableCount = 0;//有效评估套数
|
||||
int clearCount = 0;//贷款已结清套数
|
||||
long loanPrice = 0;//贷款总金额
|
||||
double loanBalance = 0;//贷款余额
|
||||
double totalLoanBalance = 0;//剩余本金
|
||||
long totalPrice = 0;//查询结果的押品总市值
|
||||
Set<String> cities = Sets.newHashSet();
|
||||
if(CollectionUtils.isNotEmpty(riskControlDetails)) {
|
||||
for(RiskControlDetail riskControlDetail : riskControlDetails) {
|
||||
@@ -229,21 +229,21 @@ public class RiskcontrolController {
|
||||
clearCount++;
|
||||
}
|
||||
|
||||
//累加贷款总金额
|
||||
//累加贷款总金额
|
||||
if(riskControlDetail.getLendingPrice() != null) {
|
||||
loanPrice += riskControlDetail.getLendingPrice();
|
||||
}
|
||||
//累加贷款余额
|
||||
//累加贷款余额
|
||||
if(riskControlDetail.getLoanBalance() != null) {
|
||||
loanBalance += riskControlDetail.getLoanBalance();
|
||||
}
|
||||
//累加押品总市值
|
||||
//累加押品总市值
|
||||
if(riskControlDetail.getCurPrice() != null) {
|
||||
totalPrice += riskControlDetail.getCurPrice();
|
||||
}
|
||||
//累加剩余本金
|
||||
//累加剩余本金
|
||||
String repayWay = riskControlDetail.getRepayWay();
|
||||
totalLoanBalance += LoanUtil.remainInterest(riskControlDetail.getLendingPrice(), riskControlDetail.getLoanMonth(), riskControlDetail.getRate(), "等额本息".equals(repayWay)?1:2, riskControlDetail.getLendingDate());
|
||||
totalLoanBalance += LoanUtil.remainInterest(riskControlDetail.getLendingPrice(), riskControlDetail.getLoanMonth(), riskControlDetail.getRate(), "等额本息".equals(repayWay)?1:2, riskControlDetail.getLendingDate());
|
||||
|
||||
results.add(riskControlDetailModel);
|
||||
if(riskControlDetail.getCity() != null) {
|
||||
@@ -310,14 +310,14 @@ public class RiskcontrolController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 走势图
|
||||
* 走势图
|
||||
* @param request
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object trendAction(HttpServletRequest request, JsonModel model) throws Exception {
|
||||
//获取登陆用户对应的企业ID
|
||||
//获取登陆用户对应的企业ID
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
RiskControl riskControl = riskControlService.findYearlyTend(enterpriseId);
|
||||
|
||||
@@ -334,15 +334,15 @@ public class RiskcontrolController {
|
||||
}
|
||||
}
|
||||
|
||||
trendMap.put("存量押品市值走势", sortMap(monthlyTotalTrend));
|
||||
trendMap.put("CPDB押品市值走势", sortMap(monthlyTotalCpdbTrend));
|
||||
trendMap.put("存量押品市值走势", sortMap(monthlyTotalTrend));
|
||||
trendMap.put("CPDB押品市值走势", sortMap(monthlyTotalCpdbTrend));
|
||||
|
||||
model.setJsonModel(ImmutableMap.of("trend", trendMap));
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询参数
|
||||
* 构建查询参数
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -425,7 +425,7 @@ public class RiskcontrolController {
|
||||
data.put("defaultRiskMapCity", user.getRiskMapCity());
|
||||
data.put("defaultCltvMapCity", user.getCltvMapCity());
|
||||
if(StringUtils.isNotBlank(model.getCityName())) {
|
||||
String defaultCity = model.getCityName().replace("中国", "");
|
||||
String defaultCity = model.getCityName().replace("中国", "");
|
||||
data.put("riskRateLevelMap", getRiskRateLevelMap(enterpriseId, defaultCity));
|
||||
data.put("cltvLevelMap", getCltvLevelMap(enterpriseId, defaultCity));
|
||||
} else {
|
||||
@@ -490,7 +490,7 @@ public class RiskcontrolController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图数据
|
||||
* 地图数据
|
||||
* @param request
|
||||
* @param model
|
||||
* @return
|
||||
@@ -511,7 +511,7 @@ public class RiskcontrolController {
|
||||
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
List<String> cities = pdsRiskMapService.findAllCities(enterpriseId);
|
||||
//加载详情
|
||||
//加载详情
|
||||
if(loadDetail != null && loadDetail) {
|
||||
List<RiskMapModel> riskMaps = loadMapDetail(enterpriseId, city);
|
||||
result.put("datas", riskMaps);
|
||||
@@ -557,7 +557,7 @@ public class RiskcontrolController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 按区域统计押品数量
|
||||
* 按区域统计押品数量
|
||||
* @param enterpriseId
|
||||
* @param city
|
||||
*/
|
||||
@@ -581,7 +581,7 @@ public class RiskcontrolController {
|
||||
|
||||
|
||||
/**
|
||||
* 地图数据详情
|
||||
* 地图数据详情
|
||||
* @param enterpriseId
|
||||
* @throws Exception
|
||||
*/
|
||||
@@ -589,8 +589,8 @@ public class RiskcontrolController {
|
||||
List<PdsRiskMap> pdsRiskMapDatas = pdsRiskMapService.findAll(enterpriseId, city);
|
||||
/*List<PdsRiskMap> pdsRiskMapDatas = Lists.newArrayList();
|
||||
PdsRiskMap testpdsRiskMap = new PdsRiskMap();
|
||||
testpdsRiskMap.setName("张三");
|
||||
testpdsRiskMap.setCity("上海");
|
||||
testpdsRiskMap.setName("张三");
|
||||
testpdsRiskMap.setCity("上海");
|
||||
testpdsRiskMap.setCountDate("2016.12.03");
|
||||
testpdsRiskMap.setCreateDate(new Date());
|
||||
testpdsRiskMap.setCurMortgageRate(0.3);
|
||||
@@ -632,7 +632,7 @@ public class RiskcontrolController {
|
||||
riskMapModel.setRiskRate(CommonUtil.formatNumber(pdsRiskMap.getRiskRate() * 100, 2));
|
||||
}
|
||||
if(pdsRiskMap.getRepaymentWay() != null) {
|
||||
riskMapModel.setRepaymentWay(pdsRiskMap.getRepaymentWay() == 1 ? "等额本息" : "等额本金");
|
||||
riskMapModel.setRepaymentWay(pdsRiskMap.getRepaymentWay() == 1 ? "等额本息" : "等额本金");
|
||||
}
|
||||
|
||||
riskMaps.add(riskMapModel);
|
||||
@@ -643,7 +643,7 @@ public class RiskcontrolController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当前用户的默认城市
|
||||
* 修改当前用户的默认城市
|
||||
* @return
|
||||
*/
|
||||
public Object changeDefaultCityAction(HttpServletRequest request,
|
||||
|
||||
+12
-12
@@ -43,7 +43,7 @@ public class RoleController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色列表页面
|
||||
* 角色列表页面
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
@@ -53,7 +53,7 @@ public class RoleController {
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
model.setRoles(pdsRoleService.queryRoleByenterpriseId(enterpriseId));
|
||||
|
||||
//设置权限信息
|
||||
//设置权限信息
|
||||
List<AuthorityGroupInfo> groupInfos = new ArrayList<AuthorityGroupInfo>();
|
||||
List<AuthorityGroup> groups = pdsAuthorityGroupService.queryGroups();
|
||||
for (AuthorityGroup group : groups) {
|
||||
@@ -64,13 +64,13 @@ public class RoleController {
|
||||
}
|
||||
model.setGroupInfos(groupInfos);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("角色列表页面异常", e);
|
||||
LOGGER.error("角色列表页面异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询角色下的权限
|
||||
* 查询角色下的权限
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@@ -78,17 +78,17 @@ public class RoleController {
|
||||
try {
|
||||
Role old = pdsRoleService.getRole(role.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "角色不存在");
|
||||
return new JsonResultModel(false, "角色不存在");
|
||||
}
|
||||
return new JsonResultModel(true, pdsAuthorityService.queryAuthoritys(old.getAuthoritys()));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("查询角色下的权限异常", e);
|
||||
LOGGER.error("查询角色下的权限异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色
|
||||
* 保存角色
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@@ -99,14 +99,14 @@ public class RoleController {
|
||||
role.setEnterpriseId(enterpriseId);
|
||||
pdsRoleService.saveRole(role);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("保存角色异常", e);
|
||||
LOGGER.error("保存角色异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改角色
|
||||
* 修改角色
|
||||
* @param role
|
||||
* @return
|
||||
*/
|
||||
@@ -115,16 +115,16 @@ public class RoleController {
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
Role old = pdsRoleService.getRole(role.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "要修改的角色不存在");
|
||||
return new JsonResultModel(false, "要修改的角色不存在");
|
||||
}
|
||||
if (!old.getEnterpriseId().equals(enterpriseId)) {
|
||||
return new JsonResultModel(false, "只能修改本企业的角色");
|
||||
return new JsonResultModel(false, "只能修改本企业的角色");
|
||||
}
|
||||
role.setEnterpriseId(old.getEnterpriseId());
|
||||
role.setCreateDate(old.getCreateDate());
|
||||
pdsRoleService.updateRole(role);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("修改角色异常", e);
|
||||
LOGGER.error("修改角色异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
|
||||
+59
-59
@@ -51,7 +51,7 @@ import com.fangjia.service.sms.SmsException;
|
||||
import com.fangjia.service.sms.SmsService;
|
||||
|
||||
/**
|
||||
* PDS用户控制器
|
||||
* PDS用户控制器
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ public class UserController {
|
||||
private PdsUserService pdsUserService;
|
||||
|
||||
/**
|
||||
* 短信Service
|
||||
* 短信Service
|
||||
*/
|
||||
private SmsService smsService;
|
||||
|
||||
@@ -121,13 +121,13 @@ public class UserController {
|
||||
model.setNotices(notices);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("查询公告信息异常", e);
|
||||
LOGGER.error("查询公告信息异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 链接登录加密链接
|
||||
* 链接登录加密链接
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -139,13 +139,13 @@ public class UserController {
|
||||
String codeToken = URLEncoder.encode(DesUtils.encrypt(model.getCodeToken(), "fangjia_pds_goojia"), "utf-8");
|
||||
return model.getWwwUrl() + "/user/linkLogin?codeToken=" + codeToken;
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("链接请求直接登录异常", e);
|
||||
LOGGER.error("链接请求直接登录异常", e);
|
||||
}
|
||||
return model.redirect("/index");
|
||||
}
|
||||
|
||||
/**
|
||||
* 链接请求直接登录(新需求)
|
||||
* 链接请求直接登录(新需求)
|
||||
* @param model
|
||||
* @param req
|
||||
* @param response
|
||||
@@ -168,14 +168,14 @@ public class UserController {
|
||||
}
|
||||
setUserSessionInfo(req, user);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("链接请求直接登录异常", e);
|
||||
LOGGER.error("链接请求直接登录异常", e);
|
||||
}
|
||||
|
||||
return model.redirect("/index");
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户登录
|
||||
* 用户登录
|
||||
* @param model
|
||||
* @param req
|
||||
* @param response
|
||||
@@ -190,13 +190,13 @@ public class UserController {
|
||||
}
|
||||
String codeToken = StringUtils.trimToNull(model.getCodeToken());
|
||||
if (StringUtils.isBlank(code) || StringUtils.isBlank(username)) {
|
||||
return new JsonResultModel(false, "参数不完整");
|
||||
return new JsonResultModel(false, "参数不完整");
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
User user = pdsUserService.getUserByMobile(username);
|
||||
//不存在继续走流程是为了提示用户账户没注册,后续的流程中有判断
|
||||
//不存在继续走流程是为了提示用户账户没注册,后续的流程中有判断
|
||||
if(user != null) {
|
||||
Enterprise enterprise = enterpriseService.getEnterprise(user.getEnterpriseId());
|
||||
if (enterprise == null || !enterprise.getEnterpriseStatus()) {
|
||||
@@ -208,7 +208,7 @@ public class UserController {
|
||||
if(enterprise.getEndDateLimit() != null && enterprise.getEndDateLimit().before(new Date())) {
|
||||
return new JsonResultModel(false, Message.PDS_EXPIRED);
|
||||
}
|
||||
//验证IP白名单
|
||||
//验证IP白名单
|
||||
List<String> whiteIps = enterprise.getWhiteIps();
|
||||
if(null != whiteIps && whiteIps.size() > 0){
|
||||
String ip = AnalyticsUtil.getIpAddress(req);
|
||||
@@ -220,7 +220,7 @@ public class UserController {
|
||||
}
|
||||
}
|
||||
if(!passed){
|
||||
LOGGER.warn("非法登录IP:" + ip);
|
||||
LOGGER.warn("非法登录IP:" + ip);
|
||||
return new JsonResultModel(false, Message.IP_FORBID);
|
||||
}
|
||||
}
|
||||
@@ -229,10 +229,10 @@ public class UserController {
|
||||
return new JsonResultModel(false, Message.USER_PROHIBIT);
|
||||
}*/
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("用户登录异常", e);
|
||||
LOGGER.error("用户登录异常", e);
|
||||
}
|
||||
|
||||
//密码为空表示短信验证码登录,否则账号密码登录
|
||||
//密码为空表示短信验证码登录,否则账号密码登录
|
||||
if (StringUtils.isBlank(pass)) {
|
||||
return smsCodeLogin(username, code, req);
|
||||
} else {
|
||||
@@ -241,11 +241,11 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 账号登录
|
||||
* @param username 用户名
|
||||
* @param pass 密码
|
||||
* @param code 验证码
|
||||
* @param codeToken 验证码Token
|
||||
* 账号登录
|
||||
* @param username 用户名
|
||||
* @param pass 密码
|
||||
* @param code 验证码
|
||||
* @param codeToken 验证码Token
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@@ -267,14 +267,14 @@ public class UserController {
|
||||
}
|
||||
setUserSessionInfo(req, user);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("账号登录异常", e);
|
||||
LOGGER.error("账号登录异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置登录后的Session信息
|
||||
* 设置登录后的Session信息
|
||||
* @param req
|
||||
* @param user
|
||||
*/
|
||||
@@ -293,14 +293,14 @@ public class UserController {
|
||||
user.setLastLoginDate(new Date());
|
||||
pdsUserService.updateUser(user);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("查询用户权限异常", e);
|
||||
LOGGER.error("查询用户权限异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 短信验证码登录
|
||||
* @param username 用户名
|
||||
* @param code 验证码
|
||||
* 短信验证码登录
|
||||
* @param username 用户名
|
||||
* @param code 验证码
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@@ -321,18 +321,18 @@ public class UserController {
|
||||
}
|
||||
setUserSessionInfo(req, user);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("短信登录异常", e);
|
||||
LOGGER.error("短信登录异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
//验证码登录需要判断是否有密码,无密码则登录后跳转到设置密码页面
|
||||
//验证码登录需要判断是否有密码,无密码则登录后跳转到设置密码页面
|
||||
return new JsonResultModel(true, StringUtils.isBlank(user.getPass()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存的验证码
|
||||
* 获取缓存的验证码
|
||||
* @author yinjihuan
|
||||
* @param mobile 手机
|
||||
* @param type 类型
|
||||
* @param mobile 手机
|
||||
* @param type 类型
|
||||
* @return
|
||||
*/
|
||||
private String getCacheCode(String mobile, String type) {
|
||||
@@ -341,7 +341,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送验证码到指定的手机上
|
||||
* 发送验证码到指定的手机上
|
||||
* @author yinjihuan
|
||||
* @param model
|
||||
* @return
|
||||
@@ -351,7 +351,7 @@ public class UserController {
|
||||
String type = StringUtils.trimToNull(model.getType());
|
||||
String codeToken = StringUtils.trimToNull(model.getCodeToken());
|
||||
String code = StringUtils.trimToNull(model.getCode());
|
||||
//判断是不是被禁用的用户
|
||||
//判断是不是被禁用的用户
|
||||
try{
|
||||
if(!pdsUserService.checkIsLoginEnt(mobile)){
|
||||
return new JsonResultModel(false, Message.ENT_PROHIBIT);
|
||||
@@ -360,7 +360,7 @@ public class UserController {
|
||||
return new JsonResultModel(false, Message.USER_PROHIBIT);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("账号登录异常", e);
|
||||
LOGGER.error("账号登录异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ public class UserController {
|
||||
return new JsonResultModel(false, Message.PDS_EXPIRED);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("发送登录验证码异常", e);
|
||||
LOGGER.error("发送登录验证码异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return sendCode(model, mobile, type);
|
||||
@@ -400,17 +400,17 @@ public class UserController {
|
||||
private Object sendCode(SendCodeModel model, String mobile, String type) {
|
||||
String code = pdsUserService.randomCode();
|
||||
try {
|
||||
smsService.send(model.getMobile(), "【房价网】你的验证码是" + code + ",验证码5分钟内有效,请立即验证。");
|
||||
smsService.send(model.getMobile(), "【房价网】你的验证码是" + code + ",验证码5分钟内有效,请立即验证。");
|
||||
CacheUtils.putValue(CachePolicyEnum.TINY, PdsUserService.class, mobile + "_" + type, code);
|
||||
} catch (SmsException e) {
|
||||
LOGGER.error("发送登录验证码异常", e);
|
||||
LOGGER.error("发送登录验证码异常", e);
|
||||
return new JsonResultModel(false, Message.SMS_CODE_SEND_FAIL);
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 密码设置页面
|
||||
* 密码设置页面
|
||||
* @return
|
||||
*/
|
||||
public Object passAction() {
|
||||
@@ -418,7 +418,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人信息设置页面
|
||||
* 个人信息设置页面
|
||||
* @return
|
||||
*/
|
||||
public Object infoAction() {
|
||||
@@ -426,7 +426,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出系统
|
||||
* 退出系统
|
||||
* @param request
|
||||
* @param model
|
||||
* @return
|
||||
@@ -438,7 +438,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送更换手机号验证码
|
||||
* 发送更换手机号验证码
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -457,7 +457,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 更换手机
|
||||
* 更换手机
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -492,7 +492,7 @@ public class UserController {
|
||||
pdsUserService.updateUser(user);
|
||||
request.getSession().setAttribute("login_mobile", mobile);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("更换手机异常", e);
|
||||
LOGGER.error("更换手机异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* 修改密码
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -520,7 +520,7 @@ public class UserController {
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
try {
|
||||
User user = pdsUserService.getUser(userId);
|
||||
//原始密码为空表示第一次设置密码,无原始密码
|
||||
//原始密码为空表示第一次设置密码,无原始密码
|
||||
if (!StringUtils.isBlank(oldPass) && !user.getPass().equals(oldPass)) {
|
||||
return new JsonResultModel(false, Message.PASS_OLD);
|
||||
}
|
||||
@@ -528,7 +528,7 @@ public class UserController {
|
||||
pdsUserService.updateUser(user);
|
||||
request.getSession().setAttribute("login_user_info", user);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("修改密码异常", e);
|
||||
LOGGER.error("修改密码异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入找回密码页面
|
||||
* 进入找回密码页面
|
||||
* @return
|
||||
*/
|
||||
public Object findPassAction() {
|
||||
@@ -544,7 +544,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 找回密码
|
||||
* 找回密码
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -581,14 +581,14 @@ public class UserController {
|
||||
pdsUserService.updateUser(user);
|
||||
setUserSessionInfo(req, user);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("找回密码异常", e);
|
||||
LOGGER.error("找回密码异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户列表页面
|
||||
* 用户列表页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -609,13 +609,13 @@ public class UserController {
|
||||
}
|
||||
model.setUserInfos(list);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("用户列表页面异常", e);
|
||||
LOGGER.error("用户列表页面异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户添加页面
|
||||
* 用户添加页面
|
||||
* @param model
|
||||
* @param request
|
||||
* @return
|
||||
@@ -633,13 +633,13 @@ public class UserController {
|
||||
model.setProvinceCitys(CityFactory.getInstance().getProvinceCitiesMap());
|
||||
model.setEnterpriseRoles(pdsRoleService.queryRoleByenterpriseId(enterpriseId));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("用户添加页面异常", e);
|
||||
LOGGER.error("用户添加页面异常", e);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者修改用户信息
|
||||
* 保存或者修改用户信息
|
||||
* @param user
|
||||
* @param request
|
||||
* @return
|
||||
@@ -653,29 +653,29 @@ public class UserController {
|
||||
if (citys != null) {
|
||||
for (String city : citys) {
|
||||
if (!enterprise.getEnterpriseCitys().contains(city)) {
|
||||
return new JsonResultModel(false, "企业没开通" + city);
|
||||
return new JsonResultModel(false, "企业没开通" + city);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存
|
||||
//保存
|
||||
user.setUpdateDate(new Date());
|
||||
if (StringUtils.isBlank(user.getId())) {
|
||||
User mobileUser = pdsUserService.getUserByMobile(user.getMobile());
|
||||
if (mobileUser != null) {
|
||||
return new JsonResultModel(false, "此号已注册");
|
||||
return new JsonResultModel(false, "此号已注册");
|
||||
}
|
||||
user.setId(null);
|
||||
user.setCreateDate(new Date());
|
||||
user.setLastLoginDate(new Date());
|
||||
user.setEnterpriseId(enterpriseId);
|
||||
user.setEnterpriseName(enterprise.getEnterpriseName());
|
||||
//2018-11-20新版需求调整前端创建用户默认类型为:普通用户 -- 用户类型(0管理员 1普通用户)
|
||||
//2018-11-20新版需求调整前端创建用户默认类型为:普通用户 -- 用户类型(0管理员 1普通用户)
|
||||
user.setUserType(1);
|
||||
pdsUserService.saveUser(user);
|
||||
} else {
|
||||
User old = pdsUserService.getUser(user.getId());
|
||||
if (old == null) {
|
||||
return new JsonResultModel(false, "修改的用户不存在");
|
||||
return new JsonResultModel(false, "修改的用户不存在");
|
||||
}
|
||||
user.setCreateDate(old.getCreateDate());
|
||||
user.setEnterpriseId(old.getEnterpriseId());
|
||||
@@ -692,7 +692,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("保存或者修改用户信息异常", e);
|
||||
LOGGER.error("保存或者修改用户信息异常", e);
|
||||
return new JsonResultModel(false, e.getMessage());
|
||||
}
|
||||
return new JsonResultModel(true);
|
||||
|
||||
+24
-24
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资产管理Controller
|
||||
* 资产管理Controller
|
||||
*/
|
||||
public class ZichanController {
|
||||
|
||||
@@ -108,10 +108,10 @@ public class ZichanController {
|
||||
loanApply.setTotalPrice(houseInfo.getTotalPrice());
|
||||
if("personal".equalsIgnoreCase(loanApply.getCategory())){
|
||||
loanApply.setAvailableMoney(loanApply.getTotalPrice() * 0.6);
|
||||
houseInfo.setUsage("消费");
|
||||
houseInfo.setUsage("消费");
|
||||
}else{
|
||||
loanApply.setAvailableMoney(loanApply.getTotalPrice() * 0.6);
|
||||
houseInfo.setUsage("经营");
|
||||
houseInfo.setUsage("经营");
|
||||
}
|
||||
houseInfoService.save(houseInfo);
|
||||
loanApplyService.save(loanApply);
|
||||
@@ -162,7 +162,7 @@ public class ZichanController {
|
||||
params.put("unitNumber", houseInfo.getUnitNumber());
|
||||
params.put("roomNumber", houseInfo.getRoomNumber());
|
||||
params.put("size", houseInfo.getArea());
|
||||
if(houseInfo.getEstateType() != null && houseInfo.getEstateType().contains("别墅")){
|
||||
if(houseInfo.getEstateType() != null && houseInfo.getEstateType().contains("别墅")){
|
||||
params.put("propertyType", 1);
|
||||
}else{
|
||||
params.put("propertyType", 2);
|
||||
@@ -278,7 +278,7 @@ public class ZichanController {
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(code)){
|
||||
eamModel.setMsg("企业编码缺失!");
|
||||
eamModel.setMsg("企业编码缺失!");
|
||||
return eamModel;
|
||||
}
|
||||
Enterprise enterprise = null;
|
||||
@@ -288,17 +288,17 @@ public class ZichanController {
|
||||
|
||||
}
|
||||
if(enterprise == null){
|
||||
eamModel.setMsg("无效的企业编码");
|
||||
eamModel.setMsg("无效的企业编码");
|
||||
return eamModel;
|
||||
}
|
||||
if((enterprise.getEnterpriseStatus() != null && !enterprise.getEnterpriseStatus())
|
||||
|| (enterprise.getHuoKeStatus() != null && !enterprise.getHuoKeStatus())){
|
||||
eamModel.setMsg("账号已关闭");
|
||||
eamModel.setMsg("账号已关闭");
|
||||
return eamModel;
|
||||
}
|
||||
CookieUtils.setCookie("code", code, "/", COOKIE_EXPIRES_AGE, response);
|
||||
if(StringUtils.isBlank(eamModel.getSource())){
|
||||
eamModel.setSource("未知");
|
||||
eamModel.setSource("未知");
|
||||
}
|
||||
CookieUtils.setCookie("source", DataUtil.urlEncode(eamModel.getSource()), "/", COOKIE_EXPIRES_AGE, response);
|
||||
EamUser eamUser = getEamUserFromCookie(request);
|
||||
@@ -308,7 +308,7 @@ public class ZichanController {
|
||||
}
|
||||
CookieUtils.setCookie(EAM_USER_ID_COOKIE_NAME, eamUser.getId(), "/", COOKIE_EXPIRES_AGE, response);
|
||||
List<HouseInfo> houseInfos = houseInfoService.findByUserId(eamUser.getId());
|
||||
Map<String, Long> gatherPriceInfo = gatherPriceInfo(houseInfos);//获取用户所有资产信息汇总信息
|
||||
Map<String, Long> gatherPriceInfo = gatherPriceInfo(houseInfos);//获取用户所有资产信息汇总信息
|
||||
eamModel.setAllPurchasePrice(gatherPriceInfo.get("allPurchasePrice"));
|
||||
eamModel.setAllTotalPrice(gatherPriceInfo.get("allTotalPrice"));
|
||||
eamModel.setHouseInfos(houseInfos);
|
||||
@@ -394,7 +394,7 @@ public class ZichanController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否存在均价
|
||||
* 判断是否存在均价
|
||||
* @param city
|
||||
* @param region
|
||||
* @param name
|
||||
@@ -425,23 +425,23 @@ public class ZichanController {
|
||||
BaseAjaxModel result = new BaseAjaxModel();
|
||||
json.setJsonModel(result);
|
||||
if(StringUtils.isBlank(mobile) || StringUtils.isBlank(smsCode)){
|
||||
result.setMsg("参数不完整");
|
||||
result.setMsg("参数不完整");
|
||||
return json;
|
||||
}
|
||||
BasicDBObject smsCodeCacheBean = (BasicDBObject)getCacheCode(mobile, Message.SMS_CODE_TYPE_CI_CHAN);
|
||||
if(smsCodeCacheBean == null){
|
||||
result.setMsg("验证码不正确,请重新输入!");
|
||||
result.setMsg("验证码不正确,请重新输入!");
|
||||
return json;
|
||||
}
|
||||
if(smsCodeCacheBean != null){
|
||||
String cacheSmsCode = smsCodeCacheBean.getString("code");
|
||||
long expireTime = smsCodeCacheBean.getLong("expireTime");
|
||||
if(!smsCode.equals(cacheSmsCode)){
|
||||
result.setMsg("验证码不正确,请重新输入!");
|
||||
result.setMsg("验证码不正确,请重新输入!");
|
||||
return json;
|
||||
}
|
||||
if(expireTime < System.currentTimeMillis()){
|
||||
result.setMsg("短信验证码已过期!");
|
||||
result.setMsg("短信验证码已过期!");
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -470,25 +470,25 @@ public class ZichanController {
|
||||
BaseAjaxModel result = new BaseAjaxModel();
|
||||
json.setJsonModel(result);
|
||||
if(StringUtils.isBlank(code) || StringUtils.isBlank(token) || StringUtils.isBlank(mobile)){
|
||||
result.setMsg("参数非法");
|
||||
result.setMsg("参数非法");
|
||||
return json;
|
||||
}
|
||||
String cacheCode = (String) getCacheCode(token, Message.SMS_CODE_TYPE_LOGIN);
|
||||
LOGGER.info("验证码:{},手机号:{},Cache Code:{}, Token:{}",new String[]{cacheCode, mobile, cacheCode,token});
|
||||
LOGGER.info("验证码:{},手机号:{},Cache Code:{}, Token:{}",new String[]{cacheCode, mobile, cacheCode,token});
|
||||
if(!code.equalsIgnoreCase(cacheCode)){
|
||||
result.setMsg("验证码错误,请重新输入!");
|
||||
result.setMsg("验证码错误,请重新输入!");
|
||||
return json;
|
||||
}
|
||||
|
||||
try {
|
||||
code = pdsUserService.randomCode();
|
||||
smsService.send(mobile, "【房价网】你的验证码是" + code + ",验证码5分钟内有效,请立即验证。");
|
||||
smsService.send(mobile, "【房价网】你的验证码是" + code + ",验证码5分钟内有效,请立即验证。");
|
||||
BasicDBObject smsCode = new BasicDBObject();
|
||||
smsCode.put("code", code);
|
||||
smsCode.put("expireTime", System.currentTimeMillis() + 1000 * 60 * 5);
|
||||
CacheUtils.putValue(CacheUtils.CachePolicyEnum.TINY, PdsUserService.class, mobile + "_" + Message.SMS_CODE_TYPE_CI_CHAN, smsCode);
|
||||
} catch (SmsException e) {
|
||||
result.setMsg("验证码发送失败");
|
||||
result.setMsg("验证码发送失败");
|
||||
return json;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
@@ -497,10 +497,10 @@ public class ZichanController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存的验证码
|
||||
* 获取缓存的验证码
|
||||
* @author yinjihuan
|
||||
* @param mobile 手机
|
||||
* @param type 类型
|
||||
* @param mobile 手机
|
||||
* @param type 类型
|
||||
* @return
|
||||
*/
|
||||
private Object getCacheCode(String mobile, String type) {
|
||||
@@ -522,13 +522,13 @@ public class ZichanController {
|
||||
params.put("unitNumber", houseInfo.getUnitNumber());
|
||||
params.put("roomNumber", houseInfo.getRoomNumber());
|
||||
params.put("size", houseInfo.getArea());
|
||||
if(houseInfo.getEstateType() != null && houseInfo.getEstateType().contains("别墅")){
|
||||
if(houseInfo.getEstateType() != null && houseInfo.getEstateType().contains("别墅")){
|
||||
params.put("propertyType", 1);
|
||||
}else{
|
||||
params.put("propertyType", 2);
|
||||
}
|
||||
JSONObject resp = pdsApiProxyService.invoke(PdsAPIs.EVALUATION.getUri(), params);
|
||||
if(resp.getString("msg").contains("不支持")){
|
||||
if(resp.getString("msg").contains("不支持")){
|
||||
data.setSuccess(false);
|
||||
}
|
||||
return json;
|
||||
|
||||
+6
-6
@@ -12,11 +12,11 @@ import freemarker.template.TemplateException;
|
||||
import freemarker.template.TemplateModel;
|
||||
|
||||
/**
|
||||
* 自定义A标签,控制权限用
|
||||
* 自定义A标签,控制权限用
|
||||
* @author yinjihuan
|
||||
* 用法:<@d_a text="设置" href="/user/info" target="_blank" uri="/user" type="disabled" class="btn" style="color:red;" id="saveBtn"/><br>
|
||||
* text:显示的文字 <br> href:链接地址 <br>target:打开方式 <br> uri:权限地址 <br>
|
||||
* type:取值disabled为禁用操作,无权限点击弹出提示框,取值hidden为隐藏
|
||||
* 用法:<@d_a text="设置" href="/user/info" target="_blank" uri="/user" type="disabled" class="btn" style="color:red;" id="saveBtn"/><br>
|
||||
* text:显示的文字 <br> href:链接地址 <br>target:打开方式 <br> uri:权限地址 <br>
|
||||
* type:取值disabled为禁用操作,无权限点击弹出提示框,取值hidden为隐藏
|
||||
*/
|
||||
public class AuthorityDirective implements TemplateDirectiveModel {
|
||||
|
||||
@@ -24,11 +24,11 @@ public class AuthorityDirective implements TemplateDirectiveModel {
|
||||
@Override
|
||||
public void execute(Environment env, Map params, TemplateModel[] loopVars,
|
||||
TemplateDirectiveBody body) throws TemplateException, IOException {
|
||||
//获取HttpSession
|
||||
//获取HttpSession
|
||||
ActionContext actionContext = ActionContext.getContext();
|
||||
HttpSession session = actionContext.getRequest().getSession();
|
||||
List<String> authoritys = (List<String>) session.getAttribute("authoritys");
|
||||
String message = "无权限访问";
|
||||
String message = "无权限访问";
|
||||
String content = "";
|
||||
if (authoritys != null) {
|
||||
String uri = params.get("uri").toString();
|
||||
|
||||
@@ -2,15 +2,15 @@ package com.fangjia.pds.enums;
|
||||
|
||||
public enum ApiCallLimitEnum {
|
||||
|
||||
WO_YAO_PING_GU("evaluation/overView", "我要评估"),
|
||||
KE_HU_FEN_LEI("uploaddata", "客户分类"),
|
||||
KE_HU_PIN_JI("demo/detail", "客户评级"),
|
||||
WO_DE_FANG_CHAN("zichan/saveevaluation", "我的房产"),
|
||||
DAI_QIAN_GU_ZHI("prevaluation/saveevalinfo", "贷前估值"),
|
||||
PI_LIANG_PING_GU("uploaddatabatch", "批量评估"),
|
||||
HUO_KE("hk/evaluate", "营销货客"),
|
||||
DAI_KUANG("lenderquery", "贷款人查询"),
|
||||
PIONG_GU_BAO_GAO("report/evaltution", "评估报告");
|
||||
WO_YAO_PING_GU("evaluation/overView", "我要评估"),
|
||||
KE_HU_FEN_LEI("uploaddata", "客户分类"),
|
||||
KE_HU_PIN_JI("demo/detail", "客户评级"),
|
||||
WO_DE_FANG_CHAN("zichan/saveevaluation", "我的房产"),
|
||||
DAI_QIAN_GU_ZHI("prevaluation/saveevalinfo", "贷前估值"),
|
||||
PI_LIANG_PING_GU("uploaddatabatch", "批量评估"),
|
||||
HUO_KE("hk/evaluate", "营销货客"),
|
||||
DAI_KUANG("lenderquery", "贷款人查询"),
|
||||
PIONG_GU_BAO_GAO("report/evaltution", "评估报告");
|
||||
|
||||
private String uri;
|
||||
private String desc;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AnalyticsFilter implements Filter {
|
||||
}
|
||||
|
||||
private String createUID(HttpServletRequest request, HttpServletResponse response) {
|
||||
// ÉèÖÃUID
|
||||
// 设置UID
|
||||
String uid = cookieContext.getUid(request);
|
||||
if (StringUtils.isEmpty(uid)) {
|
||||
uid = new ObjectId().toString();
|
||||
@@ -65,7 +65,7 @@ public class AnalyticsFilter implements Filter {
|
||||
}
|
||||
|
||||
private String createSID(HttpServletRequest request, HttpServletResponse response) {
|
||||
// ÉèÖÃSID
|
||||
// 设置SID
|
||||
String sid = cookieContext.getSid(request);
|
||||
if (StringUtils.isEmpty(sid)) {
|
||||
sid = new ObjectId().toString();
|
||||
|
||||
@@ -24,25 +24,25 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* 权限控制过滤器<br>
|
||||
* 需要注意的是目前前台和后台读在一个项目里面<br>
|
||||
* 控制的时候需要对前后台分别控制,目前后台所有的链接都以bkoff开头<br>
|
||||
* 权限控制过滤器<br>
|
||||
* 需要注意的是目前前台和后台读在一个项目里面<br>
|
||||
* 控制的时候需要对前后台分别控制,目前后台所有的链接都以bkoff开头<br>
|
||||
*
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class SecurityFilter implements Filter {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(SecurityFilter.class);
|
||||
private ApiCallLimitService apiCallLimitService;
|
||||
//需要拦截的后台URI
|
||||
//需要拦截的后台URI
|
||||
private List<String> bkoffUris = Arrays.asList("bkoffrole", "bkoffUser", "bkoffIndex", "bkoffEnterprise", "algorithmRule", "bkoffEmployee",
|
||||
"collRate", "bkoffPeopleInquiry", "bkoffManualInquiry", "bkoffCollInfo");
|
||||
|
||||
//白名单URI,不需要拦截的
|
||||
//白名单URI,不需要拦截的
|
||||
private List<String> whiteList = Arrays.asList("/static/", "randomCode", "login", "user/findPass", "user/resetPass", "user/sendSmsCode", "user/logout",
|
||||
"pdsRiskMap/sendRiskEmail", "/hk/", "/auto/", "zichan", "preassess/monitorInfo", "prevaluation/prevaluationInputMonitor", "notice",
|
||||
"preassess/uploadImg", "reportResult/show", "reportResult/createPdf");
|
||||
|
||||
//需要进行登录拦截,但不需要权限拦截的
|
||||
//需要进行登录拦截,但不需要权限拦截的
|
||||
private List<String> noAuthorityList = Arrays.asList("user/sendSmsCode",
|
||||
"user/info",
|
||||
"user/pass",
|
||||
@@ -146,26 +146,26 @@ public class SecurityFilter implements Filter {
|
||||
if (req.getHeader("x-requested-with") != null && "XMLHttpRequest".equalsIgnoreCase(req.getHeader("x-requested-with"))) {
|
||||
resp.setContentType("text/html;charset=UTF-8");
|
||||
resp.setHeader("sessionstatus", "timeout");
|
||||
String json = getJsonResult("非法请求");
|
||||
String json = getJsonResult("非法请求");
|
||||
resp.getWriter().write(json.toString());
|
||||
resp.getWriter().flush();
|
||||
resp.getWriter().close();
|
||||
return;
|
||||
}
|
||||
resp.sendRedirect(getReferer(req, resp, "非法请求"));
|
||||
resp.sendRedirect(getReferer(req, resp, "非法请求"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!apiCallLimitService.checkStatus(loginEid, limitUris.get(limitUri))) {
|
||||
if (req.getHeader("x-requested-with") != null && "XMLHttpRequest".equalsIgnoreCase(req.getHeader("x-requested-with"))) {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
String json = getJsonResult("本功能未开通");
|
||||
String json = getJsonResult("本功能未开通");
|
||||
response.getWriter().write(json.toString());
|
||||
response.getWriter().flush();
|
||||
response.getWriter().close();
|
||||
return;
|
||||
}
|
||||
resp.sendRedirect(getReferer(req, resp, "本功能未开通"));
|
||||
resp.sendRedirect(getReferer(req, resp, "本功能未开通"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -173,13 +173,13 @@ public class SecurityFilter implements Filter {
|
||||
if (count <= 0) {
|
||||
if (req.getHeader("x-requested-with") != null && "XMLHttpRequest".equalsIgnoreCase(req.getHeader("x-requested-with"))) {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
String json = getJsonResult("本功能次数已使用完");
|
||||
String json = getJsonResult("本功能次数已使用完");
|
||||
response.getWriter().write(json.toString());
|
||||
response.getWriter().flush();
|
||||
response.getWriter().close();
|
||||
return;
|
||||
}
|
||||
resp.sendRedirect(getReferer(req, resp, "本功能次数已使用完"));
|
||||
resp.sendRedirect(getReferer(req, resp, "本功能次数已使用完"));
|
||||
return;
|
||||
}
|
||||
apiCallLimitService.decrCount(loginEid, limitUris.get(limitUri));
|
||||
@@ -248,9 +248,9 @@ public class SecurityFilter implements Filter {
|
||||
if (!loginType.equals("bkoff")) {
|
||||
resp.sendRedirect(loginUrl);
|
||||
} else {
|
||||
//后台权限拦截
|
||||
//后台权限拦截
|
||||
if (bkoffRoles != null && !containsBkoffAuthority(uri, bkoffRoles)) {
|
||||
resp.sendRedirect(basePath + path + "/bkoffIndex?msg=" + URLEncoder.encode("无操作权限", "utf-8"));
|
||||
resp.sendRedirect(basePath + path + "/bkoffIndex?msg=" + URLEncoder.encode("无操作权限", "utf-8"));
|
||||
return;
|
||||
}
|
||||
chain.doFilter(req, resp);
|
||||
@@ -258,14 +258,14 @@ public class SecurityFilter implements Filter {
|
||||
}
|
||||
} else {
|
||||
String loginUrl = basePath + path + "/user/login";
|
||||
//进行未登录拦截
|
||||
//进行未登录拦截
|
||||
if (session.getAttribute("login_user_name") == null || !session.getAttribute("login_user_type").toString().equals("web")) {
|
||||
if (req.getHeader("x-requested-with") != null && "XMLHttpRequest".equalsIgnoreCase(req.getHeader("x-requested-with"))) {
|
||||
resp.setHeader("sessionstatus", "timeout");
|
||||
resp.setStatus(401);
|
||||
return;
|
||||
}
|
||||
//有参数跳转时带上参数
|
||||
//有参数跳转时带上参数
|
||||
if (req.getQueryString() != null) {
|
||||
resp.sendRedirect(loginUrl + "?backUrl=" + req.getRequestURL() + "?" + req.getQueryString());
|
||||
} else {
|
||||
@@ -274,21 +274,21 @@ public class SecurityFilter implements Filter {
|
||||
return;
|
||||
}
|
||||
|
||||
//需要进行权限控制
|
||||
//需要进行权限控制
|
||||
if (uri.endsWith("/")) {
|
||||
uri = uri.substring(0, uri.length() - 1);
|
||||
}
|
||||
if (!uri.equals(path) && authoritys != null && !containsAuthority(uri, authoritys)) {
|
||||
//ajax请求返回状态码,前端统一处理
|
||||
//ajax请求返回状态码,前端统一处理
|
||||
if (req.getHeader("x-requested-with") != null && "XMLHttpRequest".equalsIgnoreCase(req.getHeader("x-requested-with"))) {
|
||||
String json = getJsonResult("无权限操作此功能");
|
||||
String json = getJsonResult("无权限操作此功能");
|
||||
resp.setContentType("text/html;charset=UTF-8");
|
||||
resp.getWriter().write(json.toString());
|
||||
resp.getWriter().flush();
|
||||
resp.getWriter().close();
|
||||
return;
|
||||
}
|
||||
//普通请求直接跳转到首页面
|
||||
//普通请求直接跳转到首页面
|
||||
resp.sendRedirect(basePath + path);
|
||||
} else {
|
||||
chain.doFilter(req, resp);
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import org.sothis.web.mvc.Interceptor;
|
||||
|
||||
|
||||
/**
|
||||
* 拦截器
|
||||
* 拦截器
|
||||
*/
|
||||
public class AuthenticationInterceptor implements Interceptor {
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import com.fangjia.dal.mongo.pds.model.MortgageDetail;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
|
||||
/**
|
||||
* 每次增加押品,对新增押品进行统计
|
||||
* 每次增加押品,对新增押品进行统计
|
||||
* Created by linxsh on 2017/1/16.
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
+3
-3
@@ -24,7 +24,7 @@ import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 参数注入拦截器
|
||||
* 参数注入拦截器
|
||||
*
|
||||
* @author velna
|
||||
*
|
||||
@@ -191,7 +191,7 @@ public class ParametersInterceptor implements Interceptor {
|
||||
break;
|
||||
}
|
||||
Type[] types = writeMethod.getGenericParameterTypes();
|
||||
// 如果是泛型,则尽量找到泛型对应的实际类型
|
||||
// 如果是泛型,则尽量找到泛型对应的实际类型
|
||||
if (types != null && types.length > 0 && types[0] instanceof TypeVariable) {
|
||||
TypeVariable typeVariable = (TypeVariable) types[0];
|
||||
Type type = bean.getClass().getGenericSuperclass();
|
||||
@@ -337,7 +337,7 @@ public class ParametersInterceptor implements Interceptor {
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认UTF-8编码
|
||||
* 默认UTF-8编码
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
|
||||
+6
-6
@@ -2,7 +2,7 @@ package com.fangjia.pds.model;
|
||||
|
||||
|
||||
/**
|
||||
* 充值信息Model
|
||||
* 充值信息Model
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@@ -11,27 +11,27 @@ public class ApiCountLimitDetailModel extends BaseModel {
|
||||
private static final long serialVersionUID = 5146641850533025872L;
|
||||
|
||||
/**
|
||||
* 充值时间
|
||||
* 充值时间
|
||||
*/
|
||||
private String rechargeTime;
|
||||
|
||||
/**
|
||||
* 充值类型
|
||||
* 充值类型
|
||||
*/
|
||||
private String rechargeType;
|
||||
|
||||
/**
|
||||
* 充值方式
|
||||
* 充值方式
|
||||
*/
|
||||
private String rechargeWay;
|
||||
|
||||
/**
|
||||
* 充值数量
|
||||
* 充值数量
|
||||
*/
|
||||
private int count;
|
||||
|
||||
/**
|
||||
* 充值人
|
||||
* 充值人
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.fangjia.pds.model;
|
||||
|
||||
/**
|
||||
*Ajax返回数据模型
|
||||
*Ajax返回数据模型
|
||||
*/
|
||||
public class BaseAjaxModel {
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ public class BaseModel extends ModelAndViewSupport {
|
||||
}
|
||||
|
||||
/**
|
||||
* 开发环境
|
||||
* 开发环境
|
||||
* @return
|
||||
*/
|
||||
public boolean isDeveloperEnvironment() {
|
||||
@@ -113,7 +113,7 @@ public class BaseModel extends ModelAndViewSupport {
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成环境
|
||||
* 生成环境
|
||||
* @return
|
||||
*/
|
||||
public boolean isProductionEnvironment() {
|
||||
@@ -121,7 +121,7 @@ public class BaseModel extends ModelAndViewSupport {
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试环境
|
||||
* 测试环境
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
package com.fangjia.pds.model;
|
||||
|
||||
/**
|
||||
* 贷款人model
|
||||
* 贷款人model
|
||||
* Created by linxsh on 2016/12/6.
|
||||
*/
|
||||
public class BorrowerModel extends BaseModel {
|
||||
private static final long serialVersionUID = 418594362199320828L;
|
||||
|
||||
private String sid;
|
||||
/**姓名*/
|
||||
/**姓名*/
|
||||
private String name;
|
||||
/**身份证号*/
|
||||
/**身份证号*/
|
||||
private String idcode;
|
||||
/** 婚姻状况 */
|
||||
/** 婚姻状况 */
|
||||
private String maritalStatus;
|
||||
/** 手机号码1 */
|
||||
/** 手机号码1 */
|
||||
private String phoneNumber;
|
||||
/** 手机号码2,可选 */
|
||||
/** 手机号码2,可选 */
|
||||
private String phoneNumber2;
|
||||
/** 现居住地-市 */
|
||||
/** 现居住地-市 */
|
||||
private String residentialCity;
|
||||
/** 现居住地-区县 */
|
||||
/** 现居住地-区县 */
|
||||
private String residentialRegion;
|
||||
/** 现居住地-详细地址 */
|
||||
/** 现居住地-详细地址 */
|
||||
private String residentialAddress;
|
||||
/** 工作地址-市 */
|
||||
/** 工作地址-市 */
|
||||
private String workCity;
|
||||
/** 工作地址-区县 */
|
||||
/** 工作地址-区县 */
|
||||
private String workRegion;
|
||||
/** 工作地址-详细地址 */
|
||||
/** 工作地址-详细地址 */
|
||||
private String workAddress;
|
||||
/** 是否是主贷人 */
|
||||
/** 是否是主贷人 */
|
||||
private boolean isMainBorrower;
|
||||
|
||||
private boolean lenderQueryStatus = true;
|
||||
|
||||
@@ -4,7 +4,7 @@ package com.fangjia.pds.model;
|
||||
public class CertifiCateImgModel {
|
||||
private static final long serialVersionUID = 2063979794964333858L;
|
||||
/**
|
||||
* 利率信息
|
||||
* 利率信息
|
||||
*/
|
||||
private boolean success;
|
||||
private String link;
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
package com.fangjia.pds.model;
|
||||
|
||||
/**
|
||||
* 客户分类-地图数据model
|
||||
* 客户分类-地图数据model
|
||||
* Created by linxsh on 2017/6/22.
|
||||
*/
|
||||
public class ClassifyMapModel {
|
||||
/**
|
||||
* 物业地址
|
||||
* 物业地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 所在城市
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
/**
|
||||
* 物业最新均价
|
||||
* 物业最新均价
|
||||
*/
|
||||
private String avgPrice;
|
||||
/**
|
||||
* 资产等级
|
||||
* 资产等级
|
||||
*/
|
||||
private Integer level;
|
||||
/**
|
||||
* 排名
|
||||
* 排名
|
||||
*/
|
||||
private Integer rank;
|
||||
/**
|
||||
* 资产排名指数
|
||||
* 资产排名指数
|
||||
*/
|
||||
private String rankIndex;
|
||||
/**
|
||||
* 评估时间
|
||||
* 评估时间
|
||||
*/
|
||||
private String evalDate;
|
||||
/**
|
||||
* 导入时间
|
||||
* 导入时间
|
||||
*/
|
||||
private String importDate;
|
||||
|
||||
|
||||
+6
-6
@@ -29,12 +29,12 @@ public class CollateralEvaluationInfoModel extends BaseModel{
|
||||
|
||||
private List<String> citys;
|
||||
|
||||
private String cardIds;//贷款人集合
|
||||
private String houseIds;//房产集合
|
||||
private Integer loanMonth;//贷款期限
|
||||
private Double rate;//年化利率
|
||||
private Date lendingDate;//放贷时间
|
||||
private Integer repaymentWay;//还款方式 1:等额本息 2:等额本金
|
||||
private String cardIds;//贷款人集合
|
||||
private String houseIds;//房产集合
|
||||
private Integer loanMonth;//贷款期限
|
||||
private Double rate;//年化利率
|
||||
private Date lendingDate;//放贷时间
|
||||
private Integer repaymentWay;//还款方式 1:等额本息 2:等额本金
|
||||
private Integer lendingPrice;
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import java.util.List;
|
||||
import com.fangjia.dal.mongo.pds.model.FileDataTotalityBatch;
|
||||
|
||||
/**
|
||||
* 客户分类数据导入信息-批量评估
|
||||
* 客户分类数据导入信息-批量评估
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
import com.fangjia.dal.mongo.pds.model.FileDataTotality;
|
||||
|
||||
/**
|
||||
* 客户分类数据导入信息
|
||||
* 客户分类数据导入信息
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
|
||||
+13
-13
@@ -6,7 +6,7 @@ import java.util.Map;
|
||||
import com.fangjia.dal.mongo.pds.model.FileDataDetail;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
* 客户编号
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
@@ -15,47 +15,47 @@ public class CustomerClassifyModel extends BaseModel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private List<String> cityList; //城市
|
||||
private String avePrice; //均价
|
||||
private String num; //排名
|
||||
private int index; //指数
|
||||
private int rank; //等级
|
||||
private List<String> cityList; //城市
|
||||
private String avePrice; //均价
|
||||
private String num; //排名
|
||||
private int index; //指数
|
||||
private int rank; //等级
|
||||
|
||||
/**
|
||||
* 文件列表
|
||||
* 文件列表
|
||||
* @return
|
||||
*/
|
||||
private Map<String,String> fileMap;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 查询最小等级
|
||||
* 查询最小等级
|
||||
*/
|
||||
private int minLevel=1;
|
||||
|
||||
/**
|
||||
* 插叙最大等级
|
||||
* 插叙最大等级
|
||||
*/
|
||||
private int maxLevel=10;
|
||||
|
||||
/**
|
||||
* 物业地址
|
||||
* 物业地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
private List<FileDataDetail> fileDataDetailList;
|
||||
|
||||
/**
|
||||
* 排序字段和类型
|
||||
* 排序字段和类型
|
||||
*/
|
||||
private String sort="assetLevel_asc";
|
||||
|
||||
/**
|
||||
* 解析状态
|
||||
* 解析状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ package com.fangjia.pds.model;
|
||||
* Created by linxsh on 2017/6/14.
|
||||
*/
|
||||
public class DemoModel extends BaseModel {
|
||||
private String address; //输入的
|
||||
private String avePrice; //均价
|
||||
private String num; //排名
|
||||
private int index; //指数
|
||||
private int rank; //等级
|
||||
private String searchTime;//查询时间 2017/06/14格式
|
||||
private String detailAddress;//匹配到的详细地址
|
||||
private String address; //输入的
|
||||
private String avePrice; //均价
|
||||
private String num; //排名
|
||||
private int index; //指数
|
||||
private int rank; //等级
|
||||
private String searchTime;//查询时间 2017/06/14格式
|
||||
private String detailAddress;//匹配到的详细地址
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.sf.json.JSONArray;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产管理Model
|
||||
* 资产管理Model
|
||||
*/
|
||||
public class EamModel extends BaseModel {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.fangjia.dal.mongo.pds.model.Enterprise;
|
||||
import com.fangjia.pds.common.Cities;
|
||||
|
||||
/**
|
||||
* 企业展示Model
|
||||
* 企业展示Model
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -18,137 +18,137 @@ public class EnterpriseModel extends BaseModel {
|
||||
private static final long serialVersionUID = 5146641850533025872L;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
* 企业编号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
* 企业名称
|
||||
*/
|
||||
private String enterpriseName;
|
||||
|
||||
/**
|
||||
* 分页数据对象
|
||||
* 分页数据对象
|
||||
*/
|
||||
private PageBean<EnterpriseShowModel> pageBean;
|
||||
|
||||
/**
|
||||
* 分页数据对象
|
||||
* 分页数据对象
|
||||
*/
|
||||
private PageBean<ApiCallLimitDetail> pageDetailBean;
|
||||
|
||||
/**
|
||||
* 拼音城市列表
|
||||
* 拼音城市列表
|
||||
*/
|
||||
private Map<String, List<Cities>> pinYinCitys;
|
||||
|
||||
/**
|
||||
* 操作标识(save,update,detail)
|
||||
* 操作标识(save,update,detail)
|
||||
*/
|
||||
private String op = "save";
|
||||
|
||||
/**
|
||||
* 企业对象
|
||||
* 企业对象
|
||||
*/
|
||||
private Enterprise enterprise;
|
||||
|
||||
/**
|
||||
* 企业用户数
|
||||
* 企业用户数
|
||||
*/
|
||||
private Long enterpriseUserCount;
|
||||
|
||||
/**
|
||||
* 贷款人查询剩余查询次数
|
||||
* 贷款人查询剩余查询次数
|
||||
*/
|
||||
private int lenderQueryTotal;
|
||||
|
||||
/**
|
||||
* 贷款人查询总次数
|
||||
* 贷款人查询总次数
|
||||
*/
|
||||
private long lenderQuerySumTotal;
|
||||
|
||||
/**
|
||||
* 货客剩余查询次数
|
||||
* 货客剩余查询次数
|
||||
*/
|
||||
private int huoKeTotal;
|
||||
|
||||
/**
|
||||
* 货客总查询次数
|
||||
* 货客总查询次数
|
||||
*/
|
||||
private long huoKeSumTotal;
|
||||
|
||||
/**
|
||||
* 客户评级剩余查询次数
|
||||
* 客户评级剩余查询次数
|
||||
*/
|
||||
private int customerLevelTotal;
|
||||
|
||||
/**
|
||||
* 客户评级总查询次数
|
||||
* 客户评级总查询次数
|
||||
*/
|
||||
private long customerLevelSumTotal;
|
||||
|
||||
/**
|
||||
* 客户分类剩余查询次数
|
||||
* 客户分类剩余查询次数
|
||||
*/
|
||||
private int customerTypeTotal;
|
||||
|
||||
/**
|
||||
* 客户分类总查询次数
|
||||
* 客户分类总查询次数
|
||||
*/
|
||||
private long customerTypeSumTotal;
|
||||
|
||||
/**
|
||||
* 我的房产剩余查询次数
|
||||
* 我的房产剩余查询次数
|
||||
*/
|
||||
private int myHouseTotal;
|
||||
|
||||
/**
|
||||
* 我的房产总查询次数
|
||||
* 我的房产总查询次数
|
||||
*/
|
||||
private long myHouseSumTotal;
|
||||
|
||||
/**
|
||||
* 贷前估值剩余查询次数
|
||||
* 贷前估值剩余查询次数
|
||||
*/
|
||||
private int prevaluationTotal;
|
||||
|
||||
/**
|
||||
* 贷前估值总查询次数
|
||||
* 贷前估值总查询次数
|
||||
*/
|
||||
private long prevaluationSumTotal;
|
||||
|
||||
/**
|
||||
* 批量评估剩余查询次数
|
||||
* 批量评估剩余查询次数
|
||||
*/
|
||||
private int evaluationBatchTotal;
|
||||
|
||||
/**
|
||||
* 批量评估总查询次数
|
||||
* 批量评估总查询次数
|
||||
*/
|
||||
private long evaluationBatchSumTotal;
|
||||
|
||||
/**
|
||||
* 我要评估剩余查询次数
|
||||
* 我要评估剩余查询次数
|
||||
*/
|
||||
private int evaluatingTotal;
|
||||
|
||||
/**
|
||||
* 我要评估总查询次数
|
||||
* 我要评估总查询次数
|
||||
*/
|
||||
private long evaluatingSumTotal;
|
||||
|
||||
/**
|
||||
* 分页时传过来的页数
|
||||
* 分页时传过来的页数
|
||||
*/
|
||||
private int currentPage;
|
||||
|
||||
/**
|
||||
* 评估报告剩余查询次数
|
||||
* 评估报告剩余查询次数
|
||||
*/
|
||||
private int reportListTotal;
|
||||
|
||||
/**
|
||||
* 评估报告总查询次数
|
||||
* 评估报告总查询次数
|
||||
*/
|
||||
private long reportListSumTotal;
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@ public class EnterpriseShowModel extends Enterprise {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//企业用户数
|
||||
//企业用户数
|
||||
private Long enterpriseUserCount;
|
||||
|
||||
/**
|
||||
* 我要评估剩余查询次数
|
||||
* 我要评估剩余查询次数
|
||||
*/
|
||||
private int evaluatingTotal;
|
||||
|
||||
/**
|
||||
* 货客剩余查询次数
|
||||
* 货客剩余查询次数
|
||||
*/
|
||||
private int huoKeTotal;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class EquipmentInfoModel extends BaseModel {
|
||||
|
||||
private static final long serialVersionUID = -5724990326450013316L;
|
||||
/**
|
||||
* 分页数据对象
|
||||
* 分页数据对象
|
||||
*/
|
||||
private PageBean<OnceCollInfo> pageBean;
|
||||
private Date startDate;
|
||||
|
||||
+24
-24
@@ -6,7 +6,7 @@ import java.util.Map;
|
||||
import com.fangjia.dal.mongo.pds.model.FileDataDetailBatch;
|
||||
|
||||
/**
|
||||
* 批量评估
|
||||
* 批量评估
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
@@ -15,118 +15,118 @@ public class EvaluationBatchModel extends BaseModel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private List<String> cityList; //城市
|
||||
private List<String> cityList; //城市
|
||||
|
||||
/**
|
||||
* 区域
|
||||
* 区域
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 物业类型
|
||||
* 物业类型
|
||||
*/
|
||||
private String estateType;
|
||||
|
||||
/**
|
||||
* 最小评估总价(查询)单位:万
|
||||
* 最小评估总价(查询)单位:万
|
||||
*/
|
||||
private String minTotalPrice;
|
||||
|
||||
/**
|
||||
* 最大评估总价(查询)单位:万
|
||||
* 最大评估总价(查询)单位:万
|
||||
*/
|
||||
private String maxTotalPrice;
|
||||
|
||||
/**
|
||||
* 最小评估单价(查询)单位:元/平米
|
||||
* 最小评估单价(查询)单位:元/平米
|
||||
*/
|
||||
private String minPrice;
|
||||
|
||||
/**
|
||||
* 最大评估单价(查询)单位:元/平米
|
||||
* 最大评估单价(查询)单位:元/平米
|
||||
*/
|
||||
private String maxPrice;
|
||||
|
||||
/**
|
||||
* 最小房龄(查询)单位:年
|
||||
* 最小房龄(查询)单位:年
|
||||
*/
|
||||
private String minHouseYear;
|
||||
|
||||
/**
|
||||
* 最大房龄(查询)单位:年
|
||||
* 最大房龄(查询)单位:年
|
||||
*/
|
||||
private String maxHouseYear;
|
||||
|
||||
/**
|
||||
* 最小面积(查询)单位:平米
|
||||
* 最小面积(查询)单位:平米
|
||||
*/
|
||||
private String minArea;
|
||||
|
||||
/**
|
||||
* 最大面积(查询)单位:平米
|
||||
* 最大面积(查询)单位:平米
|
||||
*/
|
||||
private String maxArea;
|
||||
|
||||
/**
|
||||
* 文件列表
|
||||
* 文件列表
|
||||
* @return
|
||||
*/
|
||||
private Map<String,String> fileMap;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 物业地址
|
||||
* 物业地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
private List<FileDataDetailBatch> fileDataDetailBatchList;
|
||||
|
||||
/**
|
||||
* 排序字段和类型
|
||||
* 排序字段和类型
|
||||
*/
|
||||
private String sort="assetLevel_asc";
|
||||
|
||||
/**
|
||||
* 解析状态
|
||||
* 解析状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 总量(用于页面显示)
|
||||
* 总量(用于页面显示)
|
||||
*/
|
||||
private Integer totalNum;
|
||||
|
||||
/**
|
||||
* 资产总价(用于页面显示)
|
||||
* 资产总价(用于页面显示)
|
||||
*/
|
||||
private Long sumTotalPrice;
|
||||
|
||||
/**
|
||||
* 平均涨跌幅(用于页面显示)%
|
||||
* 平均涨跌幅(用于页面显示)%
|
||||
*/
|
||||
private Double aveUpDownRange;
|
||||
|
||||
/**
|
||||
* 平均面积(用于页面显示)
|
||||
* 平均面积(用于页面显示)
|
||||
*/
|
||||
private Double aveArea;
|
||||
|
||||
/**
|
||||
* 平均总价(用于页面显示)
|
||||
* 平均总价(用于页面显示)
|
||||
*/
|
||||
private Long aveTotalPrice;
|
||||
|
||||
/**
|
||||
* 平均均价(用于页面显示)
|
||||
* 平均均价(用于页面显示)
|
||||
*/
|
||||
private Double avePrice;
|
||||
|
||||
/**
|
||||
* 评估时间(用于页面显示) 例:2016.01.25
|
||||
* 评估时间(用于页面显示) 例:2016.01.25
|
||||
*/
|
||||
private String evaluationTime;
|
||||
|
||||
|
||||
+7
-7
@@ -12,37 +12,37 @@ public class EvaluationBeforeLoanModel extends BaseModel {
|
||||
private static final long serialVersionUID = -6321801605609229903L;
|
||||
|
||||
/**
|
||||
* 评估结果ID
|
||||
* 评估结果ID
|
||||
*/
|
||||
private String eid;
|
||||
|
||||
/**
|
||||
* 贷前估值评估结果
|
||||
* 贷前估值评估结果
|
||||
*/
|
||||
private EvaluationBeforeLoan result;
|
||||
|
||||
/**
|
||||
* 上个月月份
|
||||
* 上个月月份
|
||||
*/
|
||||
private Integer topMonth;
|
||||
|
||||
/**
|
||||
* 房产价格走势数据查询参数
|
||||
* 房产价格走势数据查询参数
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 各大小区均价
|
||||
* 各大小区均价
|
||||
*/
|
||||
private List<List<SiteDistrictAvgPriceInfo>> sitePrices;
|
||||
|
||||
/**
|
||||
* 正负向因素
|
||||
* 正负向因素
|
||||
*/
|
||||
private FactorStat factorStat;
|
||||
|
||||
/**
|
||||
* 房龄
|
||||
* 房龄
|
||||
*/
|
||||
private Integer houseAgeLimit;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class HkEvaluateModel extends BaseModel {
|
||||
private Integer avgPrice;
|
||||
|
||||
/**
|
||||
* 楼栋单元室号拼接显示(移动端)
|
||||
* 楼栋单元室号拼接显示(移动端)
|
||||
*/
|
||||
private String loudongName;
|
||||
|
||||
|
||||
@@ -3,48 +3,48 @@ package com.fangjia.pds.model;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 抵押品model
|
||||
* 抵押品model
|
||||
* Created by linxsh on 2016/12/6.
|
||||
*/
|
||||
public class HouseInfoModel {
|
||||
|
||||
/** 房产类型 */
|
||||
/** 房产类型 */
|
||||
private String estateType;
|
||||
/**所在城市*/
|
||||
/**所在城市*/
|
||||
private String cityDisplay;
|
||||
/**实际输入的城市*/
|
||||
/**实际输入的城市*/
|
||||
private String cityInput;
|
||||
/**所在区、县*/
|
||||
/**所在区、县*/
|
||||
private String region;
|
||||
/**楼盘/地址*/
|
||||
/**楼盘/地址*/
|
||||
private String district;
|
||||
/**楼号*/
|
||||
/**楼号*/
|
||||
private String houseNumber;
|
||||
/**
|
||||
* 单元号
|
||||
* 单元号
|
||||
*/
|
||||
private String unitNumber;
|
||||
/**室号*/
|
||||
/**室号*/
|
||||
private String roomNumber;
|
||||
/**所在楼层*/
|
||||
/**所在楼层*/
|
||||
private Integer floor;
|
||||
/**总楼层*/
|
||||
/**总楼层*/
|
||||
private Integer height;
|
||||
/**建筑面积*/
|
||||
/**建筑面积*/
|
||||
private Double area;
|
||||
/**购置时间*/
|
||||
/**购置时间*/
|
||||
private Date purchaseDate;
|
||||
/**款项用途*/
|
||||
/**款项用途*/
|
||||
private String usage;
|
||||
/**匹配到的小区名*/
|
||||
/**匹配到的小区名*/
|
||||
private String districtMatch;
|
||||
/**装修*/
|
||||
/**装修*/
|
||||
private String direction;
|
||||
/**朝向*/
|
||||
/**朝向*/
|
||||
private String fitment;
|
||||
/**地址*/
|
||||
/**地址*/
|
||||
private String address;
|
||||
/**是否填写了非必要信息,即是否精准评估*/
|
||||
/**是否填写了非必要信息,即是否精准评估*/
|
||||
private Boolean hasDetailInfo;
|
||||
|
||||
public String getEstateType() {
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.fangjia.pds.model;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 挹ⅲ瑞諷華芞樓婥model
|
||||
* 押品风控地图加载model
|
||||
* @author wenyan
|
||||
*/
|
||||
public class LoadMapDataModel extends BaseModel {
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
public class LoanRateModel extends BaseModel {
|
||||
private static final long serialVersionUID = 2063979794964333858L;
|
||||
/**
|
||||
* 利率信息
|
||||
* 利率信息
|
||||
*/
|
||||
private List<LoanRateInfo> infos;
|
||||
public void setInfos(List<LoanRateInfo> infos) {
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ManualInquiryModel extends BaseModel {
|
||||
|
||||
private static final long serialVersionUID = -1671947694144540813L;
|
||||
/**
|
||||
* 分页数据对象
|
||||
* 分页数据对象
|
||||
*/
|
||||
private PageBean<ManualInquiryBo> replyBean;
|
||||
|
||||
@@ -30,17 +30,17 @@ public class ManualInquiryModel extends BaseModel {
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 评估ID
|
||||
* 评估ID
|
||||
*/
|
||||
private String sid;
|
||||
|
||||
/**
|
||||
* 类型(1:人工询价 2:价格纠错)
|
||||
* 类型(1:人工询价 2:价格纠错)
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 创建时间(提交时间)
|
||||
* 创建时间(提交时间)
|
||||
*/
|
||||
private Date crateDate;
|
||||
|
||||
@@ -54,96 +54,96 @@ public class ManualInquiryModel extends BaseModel {
|
||||
|
||||
private double area;
|
||||
|
||||
//物业类型
|
||||
//物业类型
|
||||
private String estateType;
|
||||
|
||||
//楼栋
|
||||
//楼栋
|
||||
private String houseNumber;
|
||||
|
||||
//单元
|
||||
//单元
|
||||
private String unitNumber;
|
||||
|
||||
//室号
|
||||
//室号
|
||||
private String roomNumber;
|
||||
|
||||
//楼层
|
||||
//楼层
|
||||
private Integer floor;
|
||||
|
||||
//总楼层
|
||||
//总楼层
|
||||
private Integer height;
|
||||
|
||||
//朝向
|
||||
//朝向
|
||||
private String direction;
|
||||
|
||||
//装修
|
||||
//装修
|
||||
private String fitment;
|
||||
|
||||
/**
|
||||
* 提交用户姓名
|
||||
* 提交用户姓名
|
||||
*/
|
||||
private String uname;
|
||||
|
||||
/**
|
||||
* 用户手机号
|
||||
* 用户手机号
|
||||
*/
|
||||
private String umobile;
|
||||
|
||||
/**
|
||||
* 提交用户所在企业名称
|
||||
* 提交用户所在企业名称
|
||||
*/
|
||||
private String ename;
|
||||
|
||||
/**
|
||||
* 评估均价
|
||||
* 评估均价
|
||||
*/
|
||||
private int evalPrice;
|
||||
|
||||
/**
|
||||
* 原因(1偏低 2偏高 3合理)
|
||||
* 原因(1偏低 2偏高 3合理)
|
||||
*/
|
||||
private int reason;
|
||||
|
||||
/**
|
||||
* 我认为的均价
|
||||
* 我认为的均价
|
||||
*/
|
||||
private int myPrice;
|
||||
|
||||
/**
|
||||
* 回复给客户的价格, 价格纠错就是直接回复的价格, 人工估价,如果能评估,那就是评估之后的价格, 不能评估为空
|
||||
* 回复给客户的价格, 价格纠错就是直接回复的价格, 人工估价,如果能评估,那就是评估之后的价格, 不能评估为空
|
||||
*/
|
||||
private int replyPrice;
|
||||
|
||||
/**
|
||||
* 回复内容
|
||||
* 回复内容
|
||||
*/
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 回复时间(用时多长时间)
|
||||
* 回复时间(用时多长时间)
|
||||
*/
|
||||
private Date backTime;
|
||||
|
||||
/**
|
||||
* 回复时间
|
||||
* 回复时间
|
||||
*/
|
||||
private Date replyTime;
|
||||
|
||||
/**
|
||||
* 回复用户
|
||||
* 回复用户
|
||||
*/
|
||||
private String replyUser;
|
||||
|
||||
private long replyCount;//已回复数量
|
||||
private long noReplyCount;//末回复数量
|
||||
private long replyCount;//已回复数量
|
||||
private long noReplyCount;//末回复数量
|
||||
|
||||
private PageBean<ManualInquiry> pageBean;
|
||||
/**
|
||||
* 不能评估原因(1小区不存在 2无法获取价格 3非住宅,不支持估价)
|
||||
* 不能评估原因(1小区不存在 2无法获取价格 3非住宅,不支持估价)
|
||||
*/
|
||||
private int noEvalReason;
|
||||
|
||||
/**
|
||||
* 回复类型(1 可评估 2不可评估)
|
||||
* 回复类型(1 可评估 2不可评估)
|
||||
*/
|
||||
private int replyType;
|
||||
|
||||
@@ -151,12 +151,12 @@ public class ManualInquiryModel extends BaseModel {
|
||||
private Map<String, List<Cities>> citiesMap;
|
||||
|
||||
/**
|
||||
* 状态(0 待回价 1已回价)
|
||||
* 状态(0 待回价 1已回价)
|
||||
*/
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 房产证和土地证
|
||||
* 房产证和土地证
|
||||
*/
|
||||
private List<String> certificates;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.fangjia.pds.model;
|
||||
|
||||
public class Message {
|
||||
/**
|
||||
* 短信验证码的使用类型(登录,注册,绑定号码)
|
||||
* 短信验证码的使用类型(登录,注册,绑定号码)
|
||||
*/
|
||||
public static final String SMS_CODE_TYPE_LOGIN = "login";
|
||||
public static final String SMS_CODE_TYPE_CI_CHAN = "Zi_Chan_Guan_Li";
|
||||
@@ -17,55 +17,55 @@ public class Message {
|
||||
|
||||
public static final String RESULT_SUCCESS = "success";
|
||||
|
||||
public static final String PARAM_NOT_NULL = "请将信息输入完整";
|
||||
public static final String PARAM_NOT_NULL = "请将信息输入完整";
|
||||
|
||||
public static final String SMS_CODE_SEND_FAIL = "短信验证码发送失败";
|
||||
public static final String SMS_CODE_SEND_FAIL = "短信验证码发送失败";
|
||||
|
||||
public static final String SMS_CODE_SEND_FAIL_TIME = "操作太频繁";
|
||||
public static final String SMS_CODE_SEND_FAIL_TIME = "操作太频繁";
|
||||
|
||||
public static final String MOBILE_EXISTS = "您输入的手机号码已经存在,请重新输入";
|
||||
public static final String MOBILE_EXISTS = "您输入的手机号码已经存在,请重新输入";
|
||||
|
||||
public static final String MIBILE_FORMAT = "手机号码已存在";
|
||||
public static final String MIBILE_FORMAT = "手机号码已存在";
|
||||
|
||||
public static final String PASS_REPEAT = "2次密码输入不一致";
|
||||
public static final String PASS_REPEAT = "2次密码输入不一致";
|
||||
|
||||
public static final String PASS_OLD = "原密码错误";
|
||||
public static final String PASS_OLD = "原密码错误";
|
||||
|
||||
public static final String MOBILE_NOT_SEND_CODE = "此号码没发过验证码";
|
||||
public static final String MOBILE_NOT_SEND_CODE = "此号码没发过验证码";
|
||||
|
||||
public static final String CODE_ERROR = "输入的验证码不正确,请重新输入";
|
||||
public static final String CODE_ERROR = "输入的验证码不正确,请重新输入";
|
||||
|
||||
public static final String ACCOUNT_EXISTS = "该账户已存在";
|
||||
public static final String ACCOUNT_EXISTS = "该账户已存在";
|
||||
|
||||
public static final String ACCOUNT_NOT_EXISTS = "该用户不存在,请联系管理员开通";
|
||||
public static final String ACCOUNT_NOT_EXISTS = "该用户不存在,请联系管理员开通";
|
||||
|
||||
public static final String ACCOUNT_SAVE_FAIL = "用户信息保存失败";
|
||||
public static final String ACCOUNT_SAVE_FAIL = "用户信息保存失败";
|
||||
|
||||
public static final String LOGIN_FAIL = "账号/密码错误";
|
||||
public static final String LOGIN_FAIL = "账号/密码错误";
|
||||
|
||||
public static final String NOT_BIND_MOBILE = "没有绑定手机";
|
||||
public static final String NOT_BIND_MOBILE = "没有绑定手机";
|
||||
|
||||
public static final String IMG_CODE_ERROR = "输入的验证码不正确,请重新输入";
|
||||
public static final String IMG_CODE_ERROR = "输入的验证码不正确,请重新输入";
|
||||
|
||||
public static final String NOT_SET_PAY_PASSWORD = "未设置支付密码";
|
||||
public static final String NOT_SET_PAY_PASSWORD = "未设置支付密码";
|
||||
|
||||
public static final String PAY_PASSWORD_ERROR = "支付密码错误,请重新输入";
|
||||
public static final String PAY_PASSWORD_ERROR = "支付密码错误,请重新输入";
|
||||
|
||||
public static final String NOT_LOGIN = "请先进行登录";
|
||||
public static final String NOT_LOGIN = "请先进行登录";
|
||||
|
||||
public static final String IMG_CODE_VALID = "图形验证码已过期,请刷新验证码";
|
||||
public static final String IMG_CODE_VALID = "图形验证码已过期,请刷新验证码";
|
||||
|
||||
public static final String IP_FORBID = "IP非法,禁止访问";
|
||||
public static final String IP_FORBID = "IP非法,禁止访问";
|
||||
|
||||
public static final String PDS_EXPIRED = "账号已到期,请及时联系业务人员续约,咨询4001883787";
|
||||
public static final String PDS_EXPIRED = "账号已到期,请及时联系业务人员续约,咨询4001883787";
|
||||
|
||||
public static final String PDS_EXPIRING = "贵公司PDS即将于{0}到期,为了保证您正常使用,请及时联系业务人员续约,咨询电话4001883787";
|
||||
public static final String PDS_EXPIRING = "贵公司PDS即将于{0}到期,为了保证您正常使用,请及时联系业务人员续约,咨询电话4001883787";
|
||||
|
||||
public static final String INSUFFICIENT = "贵公司PDS评估次数余额为{0}次,为了保证您正常使用,请及时联系业务人员续约,咨询电话4001883787";
|
||||
public static final String INSUFFICIENT = "贵公司PDS评估次数余额为{0}次,为了保证您正常使用,请及时联系业务人员续约,咨询电话4001883787";
|
||||
|
||||
public static final String USER_PROHIBIT = "该用户已禁用,无法使用";
|
||||
public static final String USER_PROHIBIT = "该用户已禁用,无法使用";
|
||||
|
||||
public static final String ENT_PROHIBIT = "该企业用户已禁用,无法使用";
|
||||
public static final String ENT_PROHIBIT = "该企业用户已禁用,无法使用";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,75 +13,75 @@ public class MortgagesModel extends BaseModel {
|
||||
|
||||
private String input;
|
||||
/**
|
||||
* 城市
|
||||
* 城市
|
||||
*/
|
||||
private String cityDisplay;
|
||||
/**
|
||||
* 区域
|
||||
* 区域
|
||||
*/
|
||||
private String region;
|
||||
/**
|
||||
* 小区名
|
||||
* 小区名
|
||||
*/
|
||||
private String districtName;
|
||||
/**
|
||||
* 地址
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 物业类型
|
||||
* 物业类型
|
||||
*/
|
||||
private String estateType;
|
||||
/**
|
||||
* 楼号
|
||||
* 楼号
|
||||
*/
|
||||
private String houseNumber;
|
||||
/**
|
||||
* 单元号
|
||||
* 单元号
|
||||
*/
|
||||
private String unitNumber;
|
||||
/**
|
||||
* 面积
|
||||
* 面积
|
||||
*/
|
||||
private Double area;
|
||||
/**
|
||||
* 室号
|
||||
* 室号
|
||||
*/
|
||||
private String roomNumber;
|
||||
/**
|
||||
* 所在楼层
|
||||
* 所在楼层
|
||||
*/
|
||||
private Integer floor;
|
||||
/**
|
||||
* 总楼层
|
||||
* 总楼层
|
||||
*/
|
||||
private Integer height;
|
||||
/**
|
||||
* 朝向
|
||||
* 朝向
|
||||
*/
|
||||
private String direction;
|
||||
/**
|
||||
* 地下室面积
|
||||
* 地下室面积
|
||||
*/
|
||||
private Double basementArea;
|
||||
/**
|
||||
* 阁楼面积
|
||||
* 阁楼面积
|
||||
*/
|
||||
private Double atticArea;
|
||||
/**
|
||||
* 露台面积
|
||||
* 露台面积
|
||||
*/
|
||||
private Double terraceArea;
|
||||
/**
|
||||
* 采光通风
|
||||
* 采光通风
|
||||
*/
|
||||
private String lighting;
|
||||
/**
|
||||
* 车位情况
|
||||
* 车位情况
|
||||
*/
|
||||
private String carport;
|
||||
/**
|
||||
* 需要人工评估时填写的联系电话
|
||||
* 需要人工评估时填写的联系电话
|
||||
*/
|
||||
private String contactNumber;
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
package com.fangjia.pds.model;
|
||||
|
||||
/**
|
||||
* 公告Model
|
||||
* 公告Model
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
public class NoticeModel extends BaseModel {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
* 编号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
* 发布时间
|
||||
*/
|
||||
private String pushDate;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
|
||||
@@ -8,24 +8,24 @@ public class PeopleInquiryModel extends BaseModel {
|
||||
private static final long serialVersionUID = -1671947694144540813L;
|
||||
|
||||
/**
|
||||
* 分页数据对象
|
||||
* 分页数据对象
|
||||
*/
|
||||
private PageBean<PeopleInquiry> pageBean;
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 回复价格
|
||||
* 回复价格
|
||||
*/
|
||||
private int replyPrice;
|
||||
|
||||
/**
|
||||
* 回复内容
|
||||
* 回复内容
|
||||
*/
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 回复类型(1有价格 0无价格)
|
||||
* 回复类型(1有价格 0无价格)
|
||||
*/
|
||||
private int type;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 押品房产信息Model
|
||||
* 押品房产信息Model
|
||||
* @author wenyan
|
||||
*/
|
||||
public class PreassessModel extends BaseModel {
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 数据展示
|
||||
* 数据展示
|
||||
* Created by linxsh on 2017/6/29.
|
||||
*/
|
||||
public class PrevaluationModel extends BaseModel {
|
||||
@@ -14,75 +14,75 @@ public class PrevaluationModel extends BaseModel {
|
||||
|
||||
private String input;
|
||||
/**
|
||||
* 城市
|
||||
* 城市
|
||||
*/
|
||||
private String cityDisplay;
|
||||
/**
|
||||
* 区域
|
||||
* 区域
|
||||
*/
|
||||
private String region;
|
||||
/**
|
||||
* 小区名
|
||||
* 小区名
|
||||
*/
|
||||
private String districtName;
|
||||
/**
|
||||
* 地址
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 物业类型
|
||||
* 物业类型
|
||||
*/
|
||||
private String estateType;
|
||||
/**
|
||||
* 楼号
|
||||
* 楼号
|
||||
*/
|
||||
private String houseNumber;
|
||||
/**
|
||||
* 单元号
|
||||
* 单元号
|
||||
*/
|
||||
private String unitNumber;
|
||||
/**
|
||||
* 面积
|
||||
* 面积
|
||||
*/
|
||||
private Double area;
|
||||
/**
|
||||
* 室号
|
||||
* 室号
|
||||
*/
|
||||
private String roomNumber;
|
||||
/**
|
||||
* 所在楼层
|
||||
* 所在楼层
|
||||
*/
|
||||
private Integer floor;
|
||||
/**
|
||||
* 总楼层
|
||||
* 总楼层
|
||||
*/
|
||||
private Integer height;
|
||||
/**
|
||||
* 朝向
|
||||
* 朝向
|
||||
*/
|
||||
private String direction;
|
||||
/**
|
||||
* 地下室面积
|
||||
* 地下室面积
|
||||
*/
|
||||
private Double basementArea;
|
||||
/**
|
||||
* 阁楼面积
|
||||
* 阁楼面积
|
||||
*/
|
||||
private Double atticArea;
|
||||
/**
|
||||
* 露台面积
|
||||
* 露台面积
|
||||
*/
|
||||
private Double terraceArea;
|
||||
/**
|
||||
* 采光通风
|
||||
* 采光通风
|
||||
*/
|
||||
private String lighting;
|
||||
/**
|
||||
* 车位情况
|
||||
* 车位情况
|
||||
*/
|
||||
private String carport;
|
||||
/**
|
||||
* 需要人工评估时填写的联系电话
|
||||
* 需要人工评估时填写的联系电话
|
||||
*/
|
||||
private String contactNumber;
|
||||
|
||||
|
||||
@@ -15,70 +15,70 @@ public class ReportModel extends BaseModel {
|
||||
|
||||
private String id;
|
||||
|
||||
// 姓名
|
||||
// 姓名
|
||||
private String username;
|
||||
|
||||
// 手机号码
|
||||
// 手机号码
|
||||
private String mobile;
|
||||
|
||||
// 身份证
|
||||
// 身份证
|
||||
private String identityCard;
|
||||
|
||||
// 房产所在城市
|
||||
// 房产所在城市
|
||||
private String houseCity;
|
||||
|
||||
// 房产区域
|
||||
// 房产区域
|
||||
private String houseRegion;
|
||||
|
||||
// 房产名称
|
||||
// 房产名称
|
||||
private String houseName;
|
||||
|
||||
// 房产地址
|
||||
// 房产地址
|
||||
private String houseAddress;
|
||||
|
||||
// 房产面积
|
||||
// 房产面积
|
||||
private Double houseArea;
|
||||
|
||||
// 居住城市
|
||||
// 居住城市
|
||||
private String liveCity;
|
||||
|
||||
// 居住区域
|
||||
// 居住区域
|
||||
private String liveRegion;
|
||||
|
||||
// 居住名称
|
||||
// 居住名称
|
||||
private String liveName;
|
||||
|
||||
// 居住地址
|
||||
// 居住地址
|
||||
private String liveAddress;
|
||||
|
||||
// 实际居住房产面积
|
||||
// 实际居住房产面积
|
||||
private Double liveArea;
|
||||
|
||||
// 工作地址
|
||||
// 工作地址
|
||||
private String workAddress;
|
||||
// 工作地址坐标
|
||||
// 工作地址坐标
|
||||
private Double workAddressLat;
|
||||
private Double workAddressLng;
|
||||
|
||||
// 文化程度
|
||||
// 文化程度
|
||||
private String educationLevels;
|
||||
|
||||
// 企业注册号
|
||||
// 企业注册号
|
||||
private String enterpriseRegisterNumber;
|
||||
|
||||
// 车架号
|
||||
// 车架号
|
||||
private String carNumber;
|
||||
|
||||
// 物业类型
|
||||
// 物业类型
|
||||
private String estateType;
|
||||
|
||||
// 用途
|
||||
// 用途
|
||||
private String usage;
|
||||
|
||||
// 处理结果
|
||||
// 处理结果
|
||||
private String result;
|
||||
|
||||
// 状态(0-生成中 1-成功 2-失败)
|
||||
// 状态(0-生成中 1-成功 2-失败)
|
||||
private int status;
|
||||
|
||||
private Date startDate;
|
||||
@@ -87,38 +87,38 @@ public class ReportModel extends BaseModel {
|
||||
|
||||
private List<ReportInput> inputList;
|
||||
|
||||
// 防重复提交
|
||||
// 防重复提交
|
||||
private String objectId;
|
||||
|
||||
private String reportNumber;
|
||||
|
||||
private ReportCheck reportCheck;
|
||||
|
||||
// 抵押物楼栋号和室号
|
||||
// 抵押物楼栋号和室号
|
||||
private String houseNum;
|
||||
private String roomNum;
|
||||
|
||||
// 抵押物经纬度
|
||||
// 抵押物经纬度
|
||||
private Long houseLat;
|
||||
private Long houseLng;
|
||||
|
||||
// 居住地址经纬度
|
||||
// 居住地址经纬度
|
||||
private Long liveLat;
|
||||
private Long liveLng;
|
||||
|
||||
// 总户数
|
||||
// 总户数
|
||||
private Integer houseSum;
|
||||
|
||||
// 自雇企业注册号
|
||||
// 自雇企业注册号
|
||||
private String selfEnterpriseRegisterNumber;
|
||||
|
||||
// 认证状态 0.待认证 1.认证中 2.认证成功 3.认证失败
|
||||
// 认证状态 0.待认证 1.认证中 2.认证成功 3.认证失败
|
||||
private Integer creditCertification;
|
||||
|
||||
// 认证状态 0.待认证 1.认证中 2.认证成功 3.认证失败
|
||||
// 认证状态 0.待认证 1.认证中 2.认证成功 3.认证失败
|
||||
private Integer fundCertification;
|
||||
|
||||
//银行卡
|
||||
//银行卡
|
||||
private String card1;
|
||||
private String card2;
|
||||
private String card3;
|
||||
@@ -327,46 +327,46 @@ public class ReportModel extends BaseModel {
|
||||
this.reportCheck = reportCheck;
|
||||
}
|
||||
|
||||
// 选项选择
|
||||
// 押品成交信息
|
||||
// 选项选择
|
||||
// 押品成交信息
|
||||
private Boolean contractTransaction;
|
||||
// 人房关系
|
||||
// 人房关系
|
||||
private Boolean personHouse;
|
||||
// 押品处理分析
|
||||
// 押品处理分析
|
||||
private Boolean collateralTreatment;
|
||||
// 个人资料核验
|
||||
// 个人资料核验
|
||||
private Boolean personCheck;
|
||||
// 企业信息查询
|
||||
// 企业信息查询
|
||||
private Boolean enterpriseInformation;
|
||||
// 自雇企业经营状况
|
||||
// 自雇企业经营状况
|
||||
private Boolean enterpriseOperation;
|
||||
// 个人关联企业
|
||||
// 个人关联企业
|
||||
private Boolean personEnterprise;
|
||||
// 银行交易综合评估
|
||||
// 银行交易综合评估
|
||||
private Boolean bankTransaction;
|
||||
// 消费画像
|
||||
// 消费画像
|
||||
private Boolean consumePortrait;
|
||||
// 资产状况
|
||||
// 资产状况
|
||||
private Boolean assetsStatus;
|
||||
// 名下动产信息
|
||||
// 名下动产信息
|
||||
private Boolean realEstate;
|
||||
// 借贷情况
|
||||
// 借贷情况
|
||||
private Boolean loanData;
|
||||
// 逾期信息
|
||||
// 逾期信息
|
||||
private Boolean overdueData;
|
||||
// 涉诉风险摘要
|
||||
// 涉诉风险摘要
|
||||
private Boolean caseRiskAbstract;
|
||||
// 不良记录
|
||||
// 不良记录
|
||||
private Boolean badRecord;
|
||||
// 个人申请贷款次数
|
||||
// 个人申请贷款次数
|
||||
private Boolean applyLoanNum;
|
||||
// 征信信息查询
|
||||
// 征信信息查询
|
||||
private Boolean credit;
|
||||
// 公积金信息
|
||||
// 公积金信息
|
||||
private Boolean fund;
|
||||
// 负债状况
|
||||
// 负债状况
|
||||
private Boolean liabilities;
|
||||
// 个人信息最近查询量
|
||||
// 个人信息最近查询量
|
||||
private Boolean personalQueryNum;
|
||||
|
||||
public Boolean getContractTransaction() {
|
||||
|
||||
@@ -19,8 +19,8 @@ public class ReportResultModel extends BaseModel {
|
||||
|
||||
private ReportCheck reportCheck;
|
||||
|
||||
private Integer ypFlag;//押品分析是否选中,0:为选中 1:选中
|
||||
private Integer userFlag;//用户分析及风险提示是否选中,0:为选中 1:选中
|
||||
private Integer ypFlag;//押品分析是否选中,0:为选中 1:选中
|
||||
private Integer userFlag;//用户分析及风险提示是否选中,0:为选中 1:选中
|
||||
private boolean flag;
|
||||
private Map<String, Object> resultMap;
|
||||
private String poiString;
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
package com.fangjia.pds.model;
|
||||
/**
|
||||
* 找回密码
|
||||
* 找回密码
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
public class ResetPassModel {
|
||||
/**
|
||||
* 手机
|
||||
* 手机
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 短信验证码
|
||||
* 短信验证码
|
||||
*/
|
||||
private String smsCode;
|
||||
|
||||
/**
|
||||
* 新密码
|
||||
* 新密码
|
||||
*/
|
||||
private String newPass;
|
||||
|
||||
/**
|
||||
* 重复密码
|
||||
* 重复密码
|
||||
*/
|
||||
private String repeatePass;
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 押品详情小区分组
|
||||
* 押品详情小区分组
|
||||
*/
|
||||
public class RiskControlDetailDistrictGroup {
|
||||
|
||||
|
||||
+18
-18
@@ -16,61 +16,61 @@ public class RiskControlDetailListModel extends BaseModel {
|
||||
private String region;
|
||||
private String districtName;
|
||||
/**
|
||||
* 贷款金额:最小
|
||||
* 贷款金额:最小
|
||||
*/
|
||||
private Double minLendingPrice;
|
||||
/**
|
||||
* 贷款金额:最大
|
||||
* 贷款金额:最大
|
||||
*/
|
||||
private Double maxLendingPrice;
|
||||
/**
|
||||
* 开始放贷日期
|
||||
* 开始放贷日期
|
||||
*/
|
||||
private Date startLendingDate;
|
||||
/**
|
||||
* 放贷结束日期
|
||||
* 放贷结束日期
|
||||
*/
|
||||
private Date endLendingDate;
|
||||
private Integer minLoanMonth;
|
||||
private Integer maxLoanMonth;
|
||||
|
||||
/**
|
||||
* 贷款余额
|
||||
* 贷款余额
|
||||
*/
|
||||
private Double minLoanBalance;
|
||||
private Double maxLoanBalance;
|
||||
|
||||
/**
|
||||
* 当前估价
|
||||
* 当前估价
|
||||
*/
|
||||
private Double minCurPrice;
|
||||
private Double maxCurPrice;
|
||||
|
||||
/**
|
||||
* 即时抵押率 CLTV
|
||||
* 即时抵押率 CLTV
|
||||
*/
|
||||
private Double minCltv;
|
||||
private Double maxCltv;
|
||||
|
||||
/**
|
||||
* 风险指数
|
||||
* 风险指数
|
||||
*/
|
||||
private Double minRiskRate;
|
||||
private Double maxRiskRate;
|
||||
/**
|
||||
* 数据来源
|
||||
* 数据来源
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 是否显示所有,包括无法评估的数据
|
||||
* 是否显示所有,包括无法评估的数据
|
||||
*/
|
||||
private Boolean showInvalid;
|
||||
/**
|
||||
* 显示未结清
|
||||
* 显示未结清
|
||||
*/
|
||||
private Boolean showOnlyUncleared;
|
||||
/**
|
||||
* 最新统计日期
|
||||
* 最新统计日期
|
||||
*/
|
||||
private Date countDate;
|
||||
|
||||
@@ -78,30 +78,30 @@ public class RiskControlDetailListModel extends BaseModel {
|
||||
private Integer clearCount;
|
||||
|
||||
/**
|
||||
* 贷款总金额
|
||||
* 贷款总金额
|
||||
*/
|
||||
private Integer loanPrice;
|
||||
/**
|
||||
* 贷款余额
|
||||
* 贷款余额
|
||||
*/
|
||||
private Double loanBalance;
|
||||
/**
|
||||
* 押品总市值
|
||||
* 押品总市值
|
||||
*/
|
||||
private Integer totalPrice;
|
||||
|
||||
/**
|
||||
* 即时抵押率
|
||||
* 即时抵押率
|
||||
*/
|
||||
private Double totalCltv;
|
||||
|
||||
private List<RiskControlDetailModel> riskControlDetailModels = new ArrayList<RiskControlDetailModel>();
|
||||
/**
|
||||
* 所有的城市列表
|
||||
* 所有的城市列表
|
||||
*/
|
||||
private List<String> cities = Lists.newArrayList();
|
||||
/**
|
||||
* 排序字段和类型
|
||||
* 排序字段和类型
|
||||
*/
|
||||
private String sort;
|
||||
|
||||
|
||||
+15
-15
@@ -12,68 +12,68 @@ public class RiskControlDetailModel extends BaseModel {
|
||||
private String region;
|
||||
private String name;
|
||||
/**
|
||||
* 贷款金额
|
||||
* 贷款金额
|
||||
*/
|
||||
private Integer lendingPrice;
|
||||
/**
|
||||
* 放贷日期
|
||||
* 放贷日期
|
||||
*/
|
||||
private Date lendingDate;
|
||||
/**
|
||||
* 贷款期限
|
||||
* 贷款期限
|
||||
*/
|
||||
private Integer loanMonth;
|
||||
|
||||
/**
|
||||
* 贷款余额
|
||||
* 贷款余额
|
||||
*/
|
||||
private Double loanBalance;
|
||||
|
||||
/**
|
||||
* 当前估价
|
||||
* 当前估价
|
||||
*/
|
||||
private Integer curPrice;
|
||||
|
||||
/**
|
||||
* 即时抵押率 CLTV
|
||||
* 即时抵押率 CLTV
|
||||
*/
|
||||
private Double cltv;
|
||||
|
||||
/**
|
||||
* 风险指数
|
||||
* 风险指数
|
||||
*/
|
||||
private Double riskRate;
|
||||
/**
|
||||
* 数据来源
|
||||
* 数据来源
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 详情中的展示名称
|
||||
* 详情中的展示名称
|
||||
*/
|
||||
private String displayName;
|
||||
/**
|
||||
* 地址
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 贷款人姓名、手机号
|
||||
* 贷款人姓名、手机号
|
||||
*/
|
||||
private String personName;
|
||||
private String phone;
|
||||
/**
|
||||
* 还款方式
|
||||
* 还款方式
|
||||
*/
|
||||
private String repayWay;
|
||||
/**
|
||||
* 贷款利率
|
||||
* 贷款利率
|
||||
*/
|
||||
private Double rate;
|
||||
/**
|
||||
* 放贷时估价
|
||||
* 放贷时估价
|
||||
*/
|
||||
private Integer oriPrice;
|
||||
/**
|
||||
* 原始抵押率
|
||||
* 原始抵押率
|
||||
*/
|
||||
private Double ltv;
|
||||
|
||||
|
||||
@@ -11,57 +11,57 @@ public class RiskControlModel extends BaseModel {
|
||||
private int status = 0;
|
||||
|
||||
/**
|
||||
* 统计日期
|
||||
* 统计日期
|
||||
*/
|
||||
private Date countDate;
|
||||
|
||||
/**有效评估套数*/
|
||||
/**有效评估套数*/
|
||||
private Long availableAssess;
|
||||
/**
|
||||
* 贷款已结清
|
||||
* 贷款已结清
|
||||
*/
|
||||
private Long clearCount;
|
||||
|
||||
/** 存量押品总市值 */
|
||||
/** 存量押品总市值 */
|
||||
private Double stockHousePrice;
|
||||
|
||||
/** 贷款余额 */
|
||||
/** 贷款余额 */
|
||||
private Double stockBalance;
|
||||
/**原始抵押率*/
|
||||
/**原始抵押率*/
|
||||
private Double oriMortgageRate;
|
||||
/**即时抵押率*/
|
||||
/**即时抵押率*/
|
||||
private Double curMortgageRate;
|
||||
/**存量押品平均增长率
|
||||
/**存量押品平均增长率
|
||||
private Double totalHousePriceAvgRate;
|
||||
*存量押品平均增长率标识:+(正)、-(负)
|
||||
*存量押品平均增长率标识:+(正)、-(负)
|
||||
private String totalHousePriceAvgRateFlag = "+";*/
|
||||
/**存量押品平均涨幅*/
|
||||
/**存量押品平均涨幅*/
|
||||
private Double stockHousePriceAvgRate;
|
||||
/**CPDB押品平均涨幅*/
|
||||
/**CPDB押品平均涨幅*/
|
||||
private Double cpdbHousePriceAvgRate;
|
||||
/**存量押品上涨数比率*/
|
||||
/**存量押品上涨数比率*/
|
||||
private Double stockHousePriceUpRate;
|
||||
/**存量押品下跌数比率*/
|
||||
/**存量押品下跌数比率*/
|
||||
private Double stockHousePriceDownRate;
|
||||
/**CPDB押品上涨数比率*/
|
||||
/**CPDB押品上涨数比率*/
|
||||
private Double cpdbHousePriceUpRate;
|
||||
/**存量押品下跌数比率*/
|
||||
/**存量押品下跌数比率*/
|
||||
private Double cpdbHousePriceDownRate;
|
||||
/**存量押品上涨-平均增长率*/
|
||||
/**存量押品上涨-平均增长率*/
|
||||
private Double stockHousePriceUpAvgRate;
|
||||
/**存量押品下跌-平均增长率*/
|
||||
/**存量押品下跌-平均增长率*/
|
||||
private Double stockHousePriceDownAvgRate;
|
||||
/**CPDB押品上涨-平均增长率*/
|
||||
/**CPDB押品上涨-平均增长率*/
|
||||
private Double cpdbHousePriceUpAvgRate;
|
||||
/**CPDB押品下跌-平均增长率*/
|
||||
/**CPDB押品下跌-平均增长率*/
|
||||
private Double cpdbHousePriceDownAvgRate;
|
||||
/**存量押品市值走势*/
|
||||
/**存量押品市值走势*/
|
||||
private Map<String, Integer> stockHousePriceTrend = new LinkedHashMap<String, Integer>();
|
||||
/**CPDB押品市值走势*/
|
||||
/**CPDB押品市值走势*/
|
||||
private Map<String, Integer> cpdbHousePriceTrend = new LinkedHashMap<String, Integer>();
|
||||
/**风险指数占比*/
|
||||
/**风险指数占比*/
|
||||
private Map<String, Double> riskRateLevelMap = new HashMap<String, Double>();
|
||||
/**CLTV占比*/
|
||||
/**CLTV占比*/
|
||||
private Map<String, Double> cltvLevelMap = new HashMap<String, Double>();
|
||||
|
||||
public int getStatus() {
|
||||
|
||||
@@ -9,37 +9,37 @@ public class RiskMapModel extends BaseModel {
|
||||
private String cityDisplay;
|
||||
private String region;
|
||||
private String token;
|
||||
/**统计日期*/
|
||||
/**统计日期*/
|
||||
private String countDate;
|
||||
/**创建时间*/
|
||||
/**创建时间*/
|
||||
private String createDate;
|
||||
/**放贷时间*/
|
||||
/**放贷时间*/
|
||||
private String mortgageDate;
|
||||
/**贷款月数(期数)*/
|
||||
/**贷款月数(期数)*/
|
||||
private Integer months;
|
||||
/**贷款数额*/
|
||||
/**贷款数额*/
|
||||
private Integer mortgagePrice;
|
||||
/**年化利率*/
|
||||
/**年化利率*/
|
||||
private Double rate;
|
||||
/**还款方式*/
|
||||
/**还款方式*/
|
||||
private String repaymentWay;
|
||||
/**主贷人姓名*/
|
||||
/**主贷人姓名*/
|
||||
private String name;
|
||||
/**电话*/
|
||||
/**电话*/
|
||||
private String phone;
|
||||
/**抵押房产:房产名*/
|
||||
/**抵押房产:房产名*/
|
||||
private String districtName;
|
||||
/**抵押房产:房产地址*/
|
||||
/**抵押房产:房产地址*/
|
||||
private String districtAddr;
|
||||
/**房贷时估价*/
|
||||
/**房贷时估价*/
|
||||
private Integer oriPrice;
|
||||
/**抵押率*/
|
||||
/**抵押率*/
|
||||
private Double mortgageRate;
|
||||
/**即时抵押率*/
|
||||
/**即时抵押率*/
|
||||
private Double curMortgageRate;
|
||||
/**风险指数*/
|
||||
/**风险指数*/
|
||||
private Double riskRate;
|
||||
/**经纬度*/
|
||||
/**经纬度*/
|
||||
private Double lat;
|
||||
private Double lng;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.fangjia.pds.model;
|
||||
import java.util.List;
|
||||
import com.fangjia.dal.mongo.pds.model.RiskWarn;
|
||||
/**
|
||||
* 风险警告
|
||||
* 风险警告
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -11,7 +11,7 @@ public class RiskWarnModel extends BaseModel {
|
||||
private static final long serialVersionUID = 7561604992967123257L;
|
||||
|
||||
/**
|
||||
* 风险警告信息
|
||||
* 风险警告信息
|
||||
*/
|
||||
private List<RiskWarn> riskWarns;
|
||||
|
||||
|
||||
@@ -10,22 +10,22 @@ public class RoleModel extends BaseModel {
|
||||
private static final long serialVersionUID = -5724990326450013316L;
|
||||
|
||||
/**
|
||||
* 分页数据对象
|
||||
* 分页数据对象
|
||||
*/
|
||||
private PageBean<RoleInfo> pageBean;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
* 企业编号
|
||||
*/
|
||||
private String enterpriseId;
|
||||
|
||||
/**
|
||||
* 权限信息
|
||||
* 权限信息
|
||||
*/
|
||||
private List<AuthorityGroupInfo> groupInfos;
|
||||
|
||||
/**
|
||||
* 角色信息,pds前台列表展示
|
||||
* 角色信息,pds前台列表展示
|
||||
*/
|
||||
private List<Role> roles;
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package com.fangjia.pds.model;
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
* 发送验证码
|
||||
* @author yinjihuan
|
||||
* @date 2016年5月10日
|
||||
* @date 2016年5月10日
|
||||
*
|
||||
*/
|
||||
public class SendCodeModel extends BaseModel {
|
||||
|
||||
private static final long serialVersionUID = 4443755009679445709L;
|
||||
/**
|
||||
* 类型(login:登录 register:注册 bindmobile:绑定手机,leaveMessage:联系我们留言)
|
||||
* 类型(login:登录 register:注册 bindmobile:绑定手机,leaveMessage:联系我们留言)
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 手机号
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
private String codeToken;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package com.fangjia.pds.model;
|
||||
/**
|
||||
* 各大门户小区均价
|
||||
* 各大门户小区均价
|
||||
* @author user
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.fangjia.pds.model;
|
||||
/**
|
||||
* 修改密码Model
|
||||
* 修改密码Model
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
public class UpdatePassModel {
|
||||
|
||||
/**
|
||||
* 原始密码
|
||||
* 原始密码
|
||||
*/
|
||||
private String oldPass;
|
||||
|
||||
/**
|
||||
* 新密码
|
||||
* 新密码
|
||||
*/
|
||||
private String newPass;
|
||||
|
||||
/**
|
||||
* 重复密码
|
||||
* 重复密码
|
||||
*/
|
||||
private String repeatePass;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class UserInfo extends User {
|
||||
private List<Role> roleInfos;
|
||||
|
||||
/**
|
||||
* 评估次数
|
||||
* 评估次数
|
||||
* @return
|
||||
*/
|
||||
private long evaluationTime;
|
||||
|
||||
@@ -6,19 +6,19 @@ public class UserLoginModel extends BaseModel {
|
||||
|
||||
private static final long serialVersionUID = -6691753727056036214L;
|
||||
|
||||
//手机或者邮箱
|
||||
//手机或者邮箱
|
||||
private String username;
|
||||
|
||||
//密码
|
||||
//密码
|
||||
private String pass;
|
||||
|
||||
//图片验证码或者短信验证码
|
||||
//图片验证码或者短信验证码
|
||||
private String code;
|
||||
private String codeToken;
|
||||
private String smsCode;
|
||||
|
||||
/**
|
||||
* 公告列表
|
||||
* 公告列表
|
||||
*/
|
||||
private List<NoticeModel> notices;
|
||||
|
||||
|
||||
@@ -16,89 +16,89 @@ public class UserModel extends BaseModel {
|
||||
private static final long serialVersionUID = 4899071723202633378L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
* 用户ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 分页数据对象
|
||||
* 分页数据对象
|
||||
*/
|
||||
private PageBean<UserInfo> pageBean;
|
||||
|
||||
/**
|
||||
* 公司
|
||||
* 公司
|
||||
*/
|
||||
private String company;
|
||||
|
||||
/**
|
||||
* 手机
|
||||
* 手机
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
* 企业编号
|
||||
*/
|
||||
private String enterpriseId;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
* 企业名称
|
||||
*/
|
||||
private String enterpriseName;
|
||||
|
||||
/**
|
||||
* 操作标识(save,update,detail)
|
||||
* 操作标识(save,update,detail)
|
||||
*/
|
||||
private String op = "save";
|
||||
|
||||
/**
|
||||
* 用户对象
|
||||
* 用户对象
|
||||
*/
|
||||
private User user;
|
||||
|
||||
/**
|
||||
* 企业下的角色列表
|
||||
* 企业下的角色列表
|
||||
*/
|
||||
private List<Role> enterpriseRoles;
|
||||
|
||||
/**
|
||||
* 企业开通的城市列表
|
||||
* 企业开通的城市列表
|
||||
*/
|
||||
private List<String> enterpriseCitys;
|
||||
|
||||
/**
|
||||
* 用户姓名
|
||||
* 用户姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 用户信息列表,pds前台用户列表
|
||||
* 用户信息列表,pds前台用户列表
|
||||
*/
|
||||
private List<UserInfo> userInfos;
|
||||
|
||||
/**
|
||||
* 拼音城市列表
|
||||
* 拼音城市列表
|
||||
*/
|
||||
private Map<String, List<Cities>> pinYinCitys;
|
||||
|
||||
|
||||
/**
|
||||
* 省份城市列表
|
||||
* 省份城市列表
|
||||
*/
|
||||
private Map<String, List<Cities>> provinceCitys;
|
||||
|
||||
/**
|
||||
* 企业对象
|
||||
* 企业对象
|
||||
*/
|
||||
private Enterprise enterprise;
|
||||
|
||||
/**
|
||||
* 查询评估次数开始时间
|
||||
* 查询评估次数开始时间
|
||||
* @return
|
||||
*/
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 查询评估次数结束时间
|
||||
* 查询评估次数结束时间
|
||||
* @return
|
||||
*/
|
||||
private Date endDate;
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.fangjia.service.pds.PdsUserService;
|
||||
public class SafeCode extends HttpServlet {
|
||||
private static final long serialVersionUID = 8729414662081043987L;
|
||||
|
||||
//产生随即的字体
|
||||
//产生随即的字体
|
||||
private Font getFont() {
|
||||
Random random = new Random();
|
||||
Font font[] = new Font[5];
|
||||
@@ -31,44 +31,44 @@ public class SafeCode extends HttpServlet {
|
||||
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
// 设置响应头 Content-type类型
|
||||
// 设置响应头 Content-type类型
|
||||
resp.setContentType("image/jpeg");
|
||||
// 以下三句是用于设置页面不缓存
|
||||
// 以下三句是用于设置页面不缓存
|
||||
resp.setHeader("Pragma", "No-cache");
|
||||
resp.setHeader("Cache-Control", "No-cache");
|
||||
resp.setDateHeader("Expires", 0);
|
||||
|
||||
OutputStream os = resp.getOutputStream();
|
||||
int width = 72, height = 30;
|
||||
// 建立指定宽、高和BufferedImage对象
|
||||
// 建立指定宽、高和BufferedImage对象
|
||||
BufferedImage image = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB);
|
||||
|
||||
Graphics g = image.getGraphics(); // 该画笔画在image上
|
||||
Color c = g.getColor(); // 保存当前画笔的颜色,用完画笔后要回复现场
|
||||
Graphics g = image.getGraphics(); // 该画笔画在image上
|
||||
Color c = g.getColor(); // 保存当前画笔的颜色,用完画笔后要回复现场
|
||||
g.fillRect(0, 0, width, height);
|
||||
|
||||
|
||||
char[] ch = "abcdefghjkmnpqrstuvwxyz23456789".toCharArray(); // 随即产生的字符串 不包括 i l(小写L) o(小写O) 1(数字1)0(数字0)
|
||||
int length = ch.length; // 随即字符串的长度
|
||||
StringBuilder sRand = new StringBuilder(); // 保存随即产生的字符串
|
||||
char[] ch = "abcdefghjkmnpqrstuvwxyz23456789".toCharArray(); // 随即产生的字符串 不包括 i l(小写L) o(小写O) 1(数字1)0(数字0)
|
||||
int length = ch.length; // 随即字符串的长度
|
||||
StringBuilder sRand = new StringBuilder(); // 保存随即产生的字符串
|
||||
Random random = new Random();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
// 设置字体
|
||||
// 设置字体
|
||||
g.setFont(getFont());
|
||||
// 随即生成0-9的数字
|
||||
// 随即生成0-9的数字
|
||||
String rand = new Character(ch[random.nextInt(length)]).toString();
|
||||
sRand.append(rand);
|
||||
// 设置随机颜色
|
||||
// 设置随机颜色
|
||||
g.setColor(new Color(random.nextInt(255), random.nextInt(255), random.nextInt(255)));
|
||||
g.drawString(rand, 18 * i , 22);
|
||||
}
|
||||
//产生随即干扰点
|
||||
//产生随即干扰点
|
||||
for (int i = 0; i < 20; i++) {
|
||||
int x1 = random.nextInt(width);
|
||||
int y1 = random.nextInt(height);
|
||||
g.drawOval(x1, y1, 2, 2);
|
||||
}
|
||||
g.setColor(c); // 将画笔的颜色再设置回去
|
||||
g.setColor(c); // 将画笔的颜色再设置回去
|
||||
g.dispose();
|
||||
String codeToken = getCodeToken(req);
|
||||
try {
|
||||
@@ -76,7 +76,7 @@ public class SafeCode extends HttpServlet {
|
||||
} catch (Exception e) {
|
||||
CacheUtils.putValue(CachePolicyEnum.TINY, PdsUserService.class, codeToken + "_" + Message.SMS_CODE_TYPE_LOGIN, sRand.toString());
|
||||
}
|
||||
// 输出图像到页面
|
||||
// 输出图像到页面
|
||||
ImageIO.write(image, "JPEG", os);
|
||||
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ public class Test {
|
||||
//
|
||||
// public void createPDF(String path) {
|
||||
// try {
|
||||
// Rectangle rectPageSize = new Rectangle(PageSize.A4);// A4纸张
|
||||
// Document document = new Document(rectPageSize, 40, 40, 40, 40);// 上、下、左、右间距
|
||||
// Rectangle rectPageSize = new Rectangle(PageSize.A4);// A4纸张
|
||||
// Document document = new Document(rectPageSize, 40, 40, 40, 40);// 上、下、左、右间距
|
||||
//
|
||||
// OutputStream outputStream = new FileOutputStream(new File(path));
|
||||
>>>>>>> .theirs
|
||||
@@ -76,18 +76,18 @@ public class Test {
|
||||
|
||||
public static void pdfTest(final String htmlUrl, final String pdfFilePath) {
|
||||
|
||||
// 只能5个线程同时访问
|
||||
// 只能5个线程同时访问
|
||||
final Semaphore semaphore = new Semaphore(2);
|
||||
final String whktmlExe = "wkhtmltopdf";
|
||||
try {
|
||||
System.out.println(" inside for before " + semaphore.availablePermits());
|
||||
// 获取许可
|
||||
// 获取许可
|
||||
semaphore.acquire();
|
||||
System.out.println(" inside for after " + " ---" + htmlUrl);
|
||||
new java.lang.Thread() {
|
||||
public void run() {
|
||||
try {
|
||||
ProcessBuilder pb = new ProcessBuilder(whktmlExe, "--print-media-type", "--margin-left", "10mm", "--margin-right", "10mm", htmlUrl, pdfFilePath); // 使用print样式
|
||||
ProcessBuilder pb = new ProcessBuilder(whktmlExe, "--print-media-type", "--margin-left", "10mm", "--margin-right", "10mm", htmlUrl, pdfFilePath); // 使用print样式
|
||||
//ProcessBuilder pb = new ProcessBuilder(whktmlExe, htmlUrl, pdfFilePath);
|
||||
pb.redirectErrorStream(true);
|
||||
Process process = pb.start();
|
||||
@@ -102,7 +102,7 @@ public class Test {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
System.out.println("in finally releasing " + semaphore.availablePermits());
|
||||
// 访问完后,释放
|
||||
// 访问完后,释放
|
||||
semaphore.release();
|
||||
}
|
||||
}
|
||||
|
||||
+9
-9
@@ -77,26 +77,26 @@ public class UploadDataBatchServlet extends HttpServlet {
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
// 构造一个文件上传处理对象
|
||||
// 构造一个文件上传处理对象
|
||||
FileItemFactory factory = new DiskFileItemFactory();
|
||||
ServletFileUpload upload = new ServletFileUpload(factory);
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
Iterator items;
|
||||
Map<String, Object> infoMap = new HashMap<String, Object>();
|
||||
try {
|
||||
// 解析表单中提交的所有文件内容
|
||||
// 解析表单中提交的所有文件内容
|
||||
items = upload.parseRequest(request).iterator();
|
||||
while (items.hasNext()) {
|
||||
FileItem item = (FileItem) items.next();
|
||||
if (!item.isFormField()) {
|
||||
// 取出上传文件的文件名称
|
||||
// 取出上传文件的文件名称
|
||||
String name = item.getName();
|
||||
// 取得上传文件以后的存储路径
|
||||
// 取得上传文件以后的存储路径
|
||||
Workbook workbook = getWorkbookFromStream(name, item);
|
||||
workbook.setForceFormulaRecalculation(true);
|
||||
|
||||
if (workbook == null) {
|
||||
infoMap.put("msg", "上传类型不匹配!");
|
||||
infoMap.put("msg", "上传类型不匹配!");
|
||||
String json = JSONObject.fromObject(infoMap).toString();
|
||||
response.getWriter().write(json.toString());
|
||||
response.getWriter().flush();
|
||||
@@ -117,7 +117,7 @@ public class UploadDataBatchServlet extends HttpServlet {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
infoMap.put("msg", "上传失败!");
|
||||
infoMap.put("msg", "上传失败!");
|
||||
String json = JSONObject.fromObject(infoMap).toString();
|
||||
response.getWriter().write(json.toString());
|
||||
response.getWriter().flush();
|
||||
@@ -160,7 +160,7 @@ public class UploadDataBatchServlet extends HttpServlet {
|
||||
String userId, long version, Map<String, Object> infoMap) {
|
||||
int totalNum = sheet.getLastRowNum();
|
||||
if (totalNum > 5000) {
|
||||
infoMap.put("msg", "上传数量最多5000条数据!");
|
||||
infoMap.put("msg", "上传数量最多5000条数据!");
|
||||
return infoMap;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public class UploadDataBatchServlet extends HttpServlet {
|
||||
}
|
||||
|
||||
if (datas.size() == 0) {
|
||||
infoMap.put("msg", "不能上传空文件");
|
||||
infoMap.put("msg", "不能上传空文件");
|
||||
return infoMap;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public class UploadDataBatchServlet extends HttpServlet {
|
||||
|
||||
fileDataTotality = fileDataTotalityService.get(userId, fileName);
|
||||
if (fileDataTotality == null) {
|
||||
infoMap.put("msg", "上传失败,请重新上传");
|
||||
infoMap.put("msg", "上传失败,请重新上传");
|
||||
return infoMap;
|
||||
}
|
||||
List<FileDataDetailBatch> list = new ArrayList<FileDataDetailBatch>();
|
||||
|
||||
@@ -79,26 +79,26 @@ public class UploadDataServlet extends HttpServlet {
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
// 构造一个文件上传处理对象
|
||||
// 构造一个文件上传处理对象
|
||||
FileItemFactory factory = new DiskFileItemFactory();
|
||||
ServletFileUpload upload = new ServletFileUpload(factory);
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
Iterator items;
|
||||
Map<String, Object> infoMap = new HashMap<String, Object>();
|
||||
try {
|
||||
// 解析表单中提交的所有文件内容
|
||||
// 解析表单中提交的所有文件内容
|
||||
items = upload.parseRequest(request).iterator();
|
||||
while (items.hasNext()) {
|
||||
FileItem item = (FileItem) items.next();
|
||||
if (!item.isFormField()) {
|
||||
// 取出上传文件的文件名称
|
||||
// 取出上传文件的文件名称
|
||||
String name = item.getName();
|
||||
// 取得上传文件以后的存储路径
|
||||
// 取得上传文件以后的存储路径
|
||||
Workbook workbook = getWorkbookFromStream(name, item);
|
||||
workbook.setForceFormulaRecalculation(true);
|
||||
|
||||
if (workbook == null) {
|
||||
infoMap.put("msg", "上传类型不匹配!");
|
||||
infoMap.put("msg", "上传类型不匹配!");
|
||||
String json = JSONObject.fromObject(infoMap).toString();
|
||||
response.getWriter().write(json.toString());
|
||||
response.getWriter().flush();
|
||||
@@ -119,7 +119,7 @@ public class UploadDataServlet extends HttpServlet {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
infoMap.put("msg", "上传失败!");
|
||||
infoMap.put("msg", "上传失败!");
|
||||
String json = JSONObject.fromObject(infoMap).toString();
|
||||
response.getWriter().write(json.toString());
|
||||
response.getWriter().flush();
|
||||
@@ -162,7 +162,7 @@ public class UploadDataServlet extends HttpServlet {
|
||||
String userId, long version, Map<String, Object> infoMap) {
|
||||
int totalNum = sheet.getLastRowNum();
|
||||
if (totalNum > 5000) {
|
||||
infoMap.put("msg", "上传数量最多5000条数据!");
|
||||
infoMap.put("msg", "上传数量最多5000条数据!");
|
||||
return infoMap;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public class UploadDataServlet extends HttpServlet {
|
||||
}
|
||||
|
||||
if (datas.size() == 0) {
|
||||
infoMap.put("msg", "不能上传空文件");
|
||||
infoMap.put("msg", "不能上传空文件");
|
||||
return infoMap;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public class UploadDataServlet extends HttpServlet {
|
||||
|
||||
fileDataTotality = fileDataTotalityService.get(userId, fileName);
|
||||
if (fileDataTotality == null) {
|
||||
infoMap.put("msg", "上传失败,请重新上传");
|
||||
infoMap.put("msg", "上传失败,请重新上传");
|
||||
return infoMap;
|
||||
}
|
||||
List<FileDataDetail> list = new ArrayList<FileDataDetail>();
|
||||
|
||||
@@ -63,7 +63,7 @@ public class UploadFileServlet extends HttpServlet{
|
||||
private PdsApiProxyService pdsApiProxyService;
|
||||
private UploadErrorDetailService uploadErrorDetailService;
|
||||
private UploadDataTotalityService uploadDataTotalityService;
|
||||
private static final String[] columns = {"","*房产所在城市","*房产类型","*小区名/地址","*楼栋号","单元号","*室号","*面积(㎡)","*放贷时估价(元)","*贷款开始日期","*贷款金额(元)","*贷款年化利率(%)","*贷款期限(个月)","*还款方式","*当前贷款余额(元)"};
|
||||
private static final String[] columns = {"","*房产所在城市","*房产类型","*小区名/地址","*楼栋号","单元号","*室号","*面积(㎡)","*放贷时估价(元)","*贷款开始日期","*贷款金额(元)","*贷款年化利率(%)","*贷款期限(个月)","*还款方式","*当前贷款余额(元)"};
|
||||
@Override
|
||||
public void init(ServletConfig config) throws ServletException {
|
||||
// Mongo mongo;
|
||||
@@ -92,29 +92,29 @@ public class UploadFileServlet extends HttpServlet{
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
request.setCharacterEncoding("UTF-8"); //转码
|
||||
request.setCharacterEncoding("UTF-8"); //转码
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
//构造一个文件上传处理对象
|
||||
//构造一个文件上传处理对象
|
||||
FileItemFactory factory = new DiskFileItemFactory();
|
||||
ServletFileUpload upload = new ServletFileUpload(factory);
|
||||
String userId = PdsSessionContent.getLoginUserId(request);
|
||||
String enterpriseId = PdsSessionContent.getLoginEnterpriseId(request);
|
||||
Iterator items;
|
||||
try{
|
||||
//解析表单中提交的所有文件内容
|
||||
//解析表单中提交的所有文件内容
|
||||
items = upload.parseRequest(request).iterator();
|
||||
while(items.hasNext()){
|
||||
FileItem item = (FileItem) items.next();
|
||||
if(!item.isFormField()){
|
||||
|
||||
//取出上传文件的文件名称
|
||||
//取出上传文件的文件名称
|
||||
String name = item.getName();
|
||||
//取得上传文件以后的存储路径
|
||||
//取得上传文件以后的存储路径
|
||||
Workbook workbook = getWorkbookFromStream(name, item);
|
||||
workbook.setForceFormulaRecalculation(true);
|
||||
Map<String, Object> infoMap = new HashMap<String, Object>();
|
||||
if(workbook == null){
|
||||
infoMap.put("error", "上传类型不匹配!");
|
||||
infoMap.put("error", "上传类型不匹配!");
|
||||
String json = JSONObject.fromObject(infoMap).toString();
|
||||
response.getWriter().write(json.toString());
|
||||
response.getWriter().flush();
|
||||
@@ -143,17 +143,17 @@ public class UploadFileServlet extends HttpServlet{
|
||||
|
||||
private Map<String, Object> checkUploadData(Sheet sheet, String name, String userId, String enterpriseId, long version, Map<String, Object> infoMap){
|
||||
int totalNum = sheet.getLastRowNum();
|
||||
System.out.println("上传文件共:"+totalNum+"个");
|
||||
System.out.println("上传文件共:"+totalNum+"个");
|
||||
if(totalNum>1000){
|
||||
totalNum = 1000;
|
||||
}
|
||||
|
||||
Integer totalLine = 0;//总行数
|
||||
Integer totalErrorLine = 0;//总错误行
|
||||
String message = "上传成功!";
|
||||
Integer totalLine = 0;//总行数
|
||||
Integer totalErrorLine = 0;//总错误行
|
||||
String message = "上传成功!";
|
||||
|
||||
//获取总列数
|
||||
int coloumNum=sheet.getRow(0).getPhysicalNumberOfCells();//获得总列数
|
||||
//获取总列数
|
||||
int coloumNum=sheet.getRow(0).getPhysicalNumberOfCells();//获得总列数
|
||||
List<List<Object>> ret = new ArrayList<List<Object>>();
|
||||
List<Map<String, String>> datas = new ArrayList<Map<String,String>>();
|
||||
for(int rowj=3;rowj <= totalNum;rowj++){
|
||||
@@ -166,18 +166,18 @@ public class UploadFileServlet extends HttpServlet{
|
||||
Map<String, String> dataMap = new HashMap<String,String>();
|
||||
|
||||
List<String> errorList = new ArrayList<String>();
|
||||
//字段验证
|
||||
//字段验证
|
||||
for(int i=1;i<coloumNum;i++){
|
||||
Object val = getCellVal(row.getCell(i));
|
||||
if(null!=val && isBlankRows){
|
||||
isBlankRows = false;
|
||||
}
|
||||
//空值检查
|
||||
//空值检查
|
||||
if(null == val && i!=5 && i!=6){
|
||||
errorFlag = true;
|
||||
errorList.add(columns[i]);
|
||||
}else{
|
||||
//数字类型检查
|
||||
//数字类型检查
|
||||
if(i==7||i==8||i>=10&&i<=12||i>=14){
|
||||
if(!DataUtil.getNumberFromString(val.toString())){
|
||||
errorFlag = true;
|
||||
@@ -190,7 +190,7 @@ public class UploadFileServlet extends HttpServlet{
|
||||
if(val.toString().contains("/")){
|
||||
dateArr = val.toString().split("/");
|
||||
}
|
||||
//日期类型检查
|
||||
//日期类型检查
|
||||
Date date = DateUtil.parseDate(val.toString(), "yyyy/MM/dd");
|
||||
if(null == date || dateArr.length<3 || (dateArr.length==3 && (dateArr[0].length()<4 || dateArr[1].length()>=3 || dateArr[2].length()>=3))){
|
||||
errorFlag = true;
|
||||
@@ -214,7 +214,7 @@ public class UploadFileServlet extends HttpServlet{
|
||||
}
|
||||
}
|
||||
|
||||
if(!isBlankRows){//不是空白行
|
||||
if(!isBlankRows){//不是空白行
|
||||
totalLine ++;
|
||||
if(errorFlag){
|
||||
totalErrorLine++;
|
||||
@@ -227,20 +227,20 @@ public class UploadFileServlet extends HttpServlet{
|
||||
}
|
||||
|
||||
|
||||
//保存上传文件的总体情况
|
||||
//保存上传文件的总体情况
|
||||
saveUploadFileData(totalLine, totalErrorLine, name, userId, version);
|
||||
if(totalErrorLine > 0){
|
||||
//保存失败信息
|
||||
//保存失败信息
|
||||
saveUploadErrorInfo(ret, version);
|
||||
infoMap.put("error", "上传失败!");
|
||||
infoMap.put("error", "上传失败!");
|
||||
}else if(totalLine==0){
|
||||
ret.add(Arrays.asList("0", Arrays.asList("格式有误或无数据")));
|
||||
ret.add(Arrays.asList("0", Arrays.asList("格式有误或无数据")));
|
||||
saveUploadErrorInfo(ret, version);
|
||||
infoMap.put("error", "上传失败!");
|
||||
infoMap.put("error", "上传失败!");
|
||||
}else{
|
||||
|
||||
infoMap.put("success", message);
|
||||
//验证通过后,保存信息
|
||||
//验证通过后,保存信息
|
||||
saveSuccessToDB(datas, userId, enterpriseId, version);
|
||||
}
|
||||
|
||||
@@ -272,51 +272,51 @@ public class UploadFileServlet extends HttpServlet{
|
||||
DBObject detailDbo = new BasicDBObject();*/
|
||||
while(ite.hasNext()){
|
||||
String key = (String) ite.next();
|
||||
if(key.equals("*房产所在城市")){
|
||||
if(key.equals("*房产所在城市")){
|
||||
collateralEvaluationInfo.setCity(map.get(key));
|
||||
// houseDbo.put("city", map.get(key));
|
||||
}else if(key.equals("*房产类型")){
|
||||
}else if(key.equals("*房产类型")){
|
||||
collateralEvaluationInfo.setEstateType(map.get(key));
|
||||
// houseDbo.put("estate_type", map.get(key));
|
||||
}else if(key.equals("*小区名/地址")){
|
||||
}else if(key.equals("*小区名/地址")){
|
||||
collateralEvaluationInfo.setOldAddress(map.get(key));
|
||||
// houseDbo.put("old_address", map.get(key));
|
||||
}else if(key.equals("*楼栋号")){
|
||||
}else if(key.equals("*楼栋号")){
|
||||
collateralEvaluationInfo.setHouseNumber(formatNumer(map.get(key)));
|
||||
// houseDbo.put("house_number", formatNumer(map.get(key)));
|
||||
}else if(key.equals("单元号")){
|
||||
}else if(key.equals("单元号")){
|
||||
collateralEvaluationInfo.setUnitNumber(formatNumer(map.get(key)));
|
||||
// houseDbo.put("unit_number", formatNumer(map.get(key)));
|
||||
}else if(key.equals("*室号")){
|
||||
}else if(key.equals("*室号")){
|
||||
collateralEvaluationInfo.setRoomNumber(formatNumer(map.get(key)));
|
||||
// houseDbo.put("room_number", formatNumer(map.get(key)));
|
||||
}else if(key.equals("*面积(㎡)")){
|
||||
}else if(key.equals("*面积(㎡)")){
|
||||
collateralEvaluationInfo.setArea(NumberUtils.toDouble(map.get(key)));
|
||||
// houseDbo.put("area", Double.valueOf(formatNumer(map.get(key))));
|
||||
}else if(key.equals("*放贷时估价(元)")){
|
||||
}else if(key.equals("*放贷时估价(元)")){
|
||||
collateralEvaluationInfo.setTotalPrice(new BigDecimal(map.get(key)).intValue());
|
||||
// houseDbo.put("total_price", formatInt(formatNumer(map.get(key))));
|
||||
}else if(key.equals("*贷款开始日期")){
|
||||
}else if(key.equals("*贷款开始日期")){
|
||||
mortgageDetail.setLendingDate(DateUtil.parseDate(map.get(key), "yyyy/MM/dd"));
|
||||
// detailDbo.put("lending_date", DateUtil.parseDate(map.get(key),"yyyy/MM/dd"));
|
||||
}else if(key.equals("*贷款金额(元)")){
|
||||
}else if(key.equals("*贷款金额(元)")){
|
||||
mortgageDetail.setLendingPrice(new BigDecimal(map.get(key)).intValue());
|
||||
// detailDbo.put("lending_price", formatInt(formatNumer(map.get(key))));
|
||||
}else if(key.equals("*贷款年化利率(%)")){
|
||||
}else if(key.equals("*贷款年化利率(%)")){
|
||||
mortgageDetail.setRate(NumberUtils.toDouble(map.get(key)));
|
||||
// detailDbo.put("rate", Double.valueOf(formatNumer(map.get(key))));
|
||||
}else if(key.equals("*贷款期限(个月)")){
|
||||
}else if(key.equals("*贷款期限(个月)")){
|
||||
mortgageDetail.setLoanMonth(new BigDecimal(map.get(key)).intValue());
|
||||
// detailDbo.put("loan_month", formatInt(formatNumer(map.get(key))));
|
||||
}else if(key.equals("*还款方式")){
|
||||
mortgageDetail.setRepaymentWay("等额本息".equals(map.get(key)) ? 1 : 2);
|
||||
/*if(map.get(key).toString().equals("等额本息")){
|
||||
}else if(key.equals("*还款方式")){
|
||||
mortgageDetail.setRepaymentWay("等额本息".equals(map.get(key)) ? 1 : 2);
|
||||
/*if(map.get(key).toString().equals("等额本息")){
|
||||
detailDbo.put("repayment_way", 1);
|
||||
}else{
|
||||
detailDbo.put("repayment_way", 2);
|
||||
}*/
|
||||
}
|
||||
else if(key.equals("*当前贷款余额(元)")){
|
||||
else if(key.equals("*当前贷款余额(元)")){
|
||||
try {
|
||||
long balance = new BigDecimal(map.get(key)).longValue();
|
||||
mortgageDetail.setBalance(balance);
|
||||
@@ -350,7 +350,7 @@ public class UploadFileServlet extends HttpServlet{
|
||||
mortgageDetail.setHouseIds(Arrays.asList(houseId));
|
||||
mortgageDetail.setUserId(userId);
|
||||
mortgageDetail.setEnterpriseId(enterpriseId);
|
||||
mortgageDetail.setSource("导入数据");
|
||||
mortgageDetail.setSource("导入数据");
|
||||
mortgageDetail.setCreateDate(new Date());
|
||||
mortgageDetail.setVersion(version);
|
||||
mortgageDetailService.save(mortgageDetail, PdsConstants.FANGJIA_API_TOKEN);
|
||||
@@ -360,7 +360,7 @@ public class UploadFileServlet extends HttpServlet{
|
||||
detailDbo.put("house_ids", Arrays.asList(houseId));
|
||||
detailDbo.put("user_id", userId);
|
||||
detailDbo.put("enterprise_id", enterpriseId);
|
||||
detailDbo.put("source", "导入数据");
|
||||
detailDbo.put("source", "导入数据");
|
||||
detailDbo.put("c_date", new Date());
|
||||
detailDbo.put("version", version);*/
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class CommonUtil {
|
||||
private static final Pattern specialChacacter = Pattern.compile("([-\\{\\}\\(\\)\\[\\]\\.\\*\\+\\:\\?\\\\])");
|
||||
|
||||
public static String formatCity(String city) {
|
||||
if(city.endsWith("市")){
|
||||
if(city.endsWith("市")){
|
||||
city = city.substring(0, city.length() - 1);
|
||||
}
|
||||
return city;
|
||||
@@ -29,16 +29,16 @@ public class CommonUtil {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 省、直辖市代码表:
|
||||
* 11 : 北京 12 : 天津 13 : 河北 14 : 山西 15 : 内蒙古
|
||||
* 21 : 辽宁 22 : 吉林 23 : 黑龙江 31 : 上海 32 : 江苏
|
||||
* 33 : 浙江 34 : 安徽 35 : 福建 36 : 江西 37 : 山东
|
||||
* 41 : 河南 42 : 湖北 43 : 湖南 44 : 广东 45 : 广西 46 : 海南
|
||||
* 50 : 重庆 51 : 四川 52 : 贵州 53 : 云南 54 : 西藏
|
||||
* 61 : 陕西 62 : 甘肃 63 : 青海 64 : 宁夏 65 : 新疆
|
||||
* 71 : 台湾
|
||||
* 81 : 香港 82 : 澳门
|
||||
* 91 : 国外
|
||||
* 省、直辖市代码表:
|
||||
* 11 : 北京 12 : 天津 13 : 河北 14 : 山西 15 : 内蒙古
|
||||
* 21 : 辽宁 22 : 吉林 23 : 黑龙江 31 : 上海 32 : 江苏
|
||||
* 33 : 浙江 34 : 安徽 35 : 福建 36 : 江西 37 : 山东
|
||||
* 41 : 河南 42 : 湖北 43 : 湖南 44 : 广东 45 : 广西 46 : 海南
|
||||
* 50 : 重庆 51 : 四川 52 : 贵州 53 : 云南 54 : 西藏
|
||||
* 61 : 陕西 62 : 甘肃 63 : 青海 64 : 宁夏 65 : 新疆
|
||||
* 71 : 台湾
|
||||
* 81 : 香港 82 : 澳门
|
||||
* 91 : 国外
|
||||
* </pre>
|
||||
*/
|
||||
private static String cityCode[] = { "11", "12", "13", "14", "15", "21",
|
||||
@@ -47,7 +47,7 @@ public class CommonUtil {
|
||||
"63", "64", "65", "71", "81", "82", "91" };
|
||||
|
||||
/**
|
||||
* 每位加权因子
|
||||
* 每位加权因子
|
||||
*/
|
||||
private static int power[] = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
|
||||
|
||||
@@ -59,7 +59,7 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证是否是手机号
|
||||
* 验证是否是手机号
|
||||
* @param phoneNumber
|
||||
* @return
|
||||
*/
|
||||
@@ -71,12 +71,12 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份证号合法性校验
|
||||
* 身份证号合法性校验
|
||||
*
|
||||
* <pre>
|
||||
* --15位身份证号码:第7、8位为出生年份(两位数),第9、10位为出生月份,第11、12位代表出生日期,第15位代表性别,奇数为男,偶数为女。
|
||||
* --18位身份证号码:第7、8、9、10位为出生年份(四位数),第11、第12位为出生月份,第13、14位代表出生日期,第17位代表性别,奇数为男,偶数为女。
|
||||
* 最后一位为校验位
|
||||
* --15位身份证号码:第7、8位为出生年份(两位数),第9、10位为出生月份,第11、12位代表出生日期,第15位代表性别,奇数为男,偶数为女。
|
||||
* --18位身份证号码:第7、8、9、10位为出生年份(四位数),第11、第12位为出生月份,第13、14位代表出生日期,第17位代表性别,奇数为男,偶数为女。
|
||||
* 最后一位为校验位
|
||||
* </pre>
|
||||
*
|
||||
* @param idCardNumber
|
||||
@@ -91,9 +91,9 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化为指定位数的小数,四舍五入
|
||||
* 格式化为指定位数的小数,四舍五入
|
||||
* @param d
|
||||
* @param scale 保留的小数位数
|
||||
* @param scale 保留的小数位数
|
||||
* @return
|
||||
*/
|
||||
public static Double formatNumber(Double d, int scale) {
|
||||
@@ -105,7 +105,7 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能:判断字符串是否为日期格式
|
||||
* 功能:判断字符串是否为日期格式
|
||||
*
|
||||
* @param strDate
|
||||
* @return
|
||||
@@ -117,41 +117,41 @@ public class CommonUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 功能:身份证的有效验证
|
||||
* 功能:身份证的有效验证
|
||||
*
|
||||
* @param IDStr
|
||||
* 身份证号
|
||||
* @return 有效:返回"" 无效:返回String信息
|
||||
* 身份证号
|
||||
* @return 有效:返回"" 无效:返回String信息
|
||||
*/
|
||||
private static String IDCardValidate(String IDStr) {
|
||||
String errorInfo = "";// 记录错误信息
|
||||
String errorInfo = "";// 记录错误信息
|
||||
String[] ValCodeArr = { "1", "0", "x", "9", "8", "7", "6", "5", "4", "3", "2" };
|
||||
String Ai = "";
|
||||
// ================ 号码的长度 15位或18位 ================
|
||||
// ================ 号码的长度 15位或18位 ================
|
||||
if (IDStr.length() != 15 && IDStr.length() != 18) {
|
||||
errorInfo = "身份证号码长度应该为15位或18位";
|
||||
errorInfo = "身份证号码长度应该为15位或18位";
|
||||
return errorInfo;
|
||||
}
|
||||
// =======================(end)========================
|
||||
|
||||
// ================ 数字 除最后以为都为数字 ================
|
||||
// ================ 数字 除最后以为都为数字 ================
|
||||
if (IDStr.length() == 18) {
|
||||
Ai = IDStr.substring(0, 17);
|
||||
} else if (IDStr.length() == 15) {
|
||||
Ai = IDStr.substring(0, 6) + "19" + IDStr.substring(6, 15);
|
||||
}
|
||||
if (!StringUtils.isNumeric(Ai)) {
|
||||
errorInfo = "身份证15位号码都应为数字;18位号码除最后一位外,都应为数字。";
|
||||
errorInfo = "身份证15位号码都应为数字;18位号码除最后一位外,都应为数字。";
|
||||
return errorInfo;
|
||||
}
|
||||
// =======================(end)========================
|
||||
|
||||
// ================ 出生年月是否有效 ================
|
||||
String strYear = Ai.substring(6, 10);// 年份
|
||||
String strMonth = Ai.substring(10, 12);// 月份
|
||||
String strDay = Ai.substring(12, 14);// 月份
|
||||
// ================ 出生年月是否有效 ================
|
||||
String strYear = Ai.substring(6, 10);// 年份
|
||||
String strMonth = Ai.substring(10, 12);// 月份
|
||||
String strDay = Ai.substring(12, 14);// 月份
|
||||
if (isDate(strYear + "-" + strMonth + "-" + strDay) == false) {
|
||||
errorInfo = "身份证生日无效";
|
||||
errorInfo = "身份证生日无效";
|
||||
return errorInfo;
|
||||
}
|
||||
GregorianCalendar gc = new GregorianCalendar();
|
||||
@@ -160,7 +160,7 @@ public class CommonUtil {
|
||||
if ((gc.get(Calendar.YEAR) - Integer.parseInt(strYear)) > 150
|
||||
|| (gc.getTime().getTime() - s.parse(
|
||||
strYear + "-" + strMonth + "-" + strDay).getTime()) < 0) {
|
||||
errorInfo = "身份证生日不在有效范围";
|
||||
errorInfo = "身份证生日不在有效范围";
|
||||
return errorInfo;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
@@ -169,24 +169,24 @@ public class CommonUtil {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (Integer.parseInt(strMonth) > 12 || Integer.parseInt(strMonth) == 0) {
|
||||
errorInfo = "身份证月份无效";
|
||||
errorInfo = "身份证月份无效";
|
||||
return errorInfo;
|
||||
}
|
||||
if (Integer.parseInt(strDay) > 31 || Integer.parseInt(strDay) == 0) {
|
||||
errorInfo = "身份证日期无效";
|
||||
errorInfo = "身份证日期无效";
|
||||
return errorInfo;
|
||||
}
|
||||
// =====================(end)=====================
|
||||
|
||||
// ================ 地区码时候有效 ================
|
||||
// ================ 地区码时候有效 ================
|
||||
Hashtable<?, ?> h = GetAreaCode();
|
||||
if (h.get(Ai.substring(0, 2)) == null) {
|
||||
errorInfo = "身份证地区编码错误";
|
||||
errorInfo = "身份证地区编码错误";
|
||||
return errorInfo;
|
||||
}
|
||||
// ==============================================
|
||||
|
||||
// ================ 判断最后一位的值 ================
|
||||
// ================ 判断最后一位的值 ================
|
||||
int TotalmulAiWi = 0;
|
||||
for (int i = 0; i < 17; i++) {
|
||||
TotalmulAiWi = TotalmulAiWi
|
||||
@@ -199,7 +199,7 @@ public class CommonUtil {
|
||||
|
||||
if (IDStr.length() == 18) {
|
||||
if (Ai.equals(IDStr) == false) {
|
||||
errorInfo = "身份证无效,不是合法的身份证号码";
|
||||
errorInfo = "身份证无效,不是合法的身份证号码";
|
||||
return errorInfo;
|
||||
}
|
||||
} else {
|
||||
@@ -210,47 +210,47 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能:设置地区编码
|
||||
* 功能:设置地区编码
|
||||
*
|
||||
* @return Hashtable 对象
|
||||
* @return Hashtable 对象
|
||||
*/
|
||||
private static Hashtable<String, String> GetAreaCode() {
|
||||
Hashtable<String, String> hashtable = new Hashtable<String, String>();
|
||||
hashtable.put("11", "北京");
|
||||
hashtable.put("12", "天津");
|
||||
hashtable.put("13", "河北");
|
||||
hashtable.put("14", "山西");
|
||||
hashtable.put("15", "内蒙古");
|
||||
hashtable.put("21", "辽宁");
|
||||
hashtable.put("22", "吉林");
|
||||
hashtable.put("23", "黑龙江");
|
||||
hashtable.put("31", "上海");
|
||||
hashtable.put("32", "江苏");
|
||||
hashtable.put("33", "浙江");
|
||||
hashtable.put("34", "安徽");
|
||||
hashtable.put("35", "福建");
|
||||
hashtable.put("36", "江西");
|
||||
hashtable.put("37", "山东");
|
||||
hashtable.put("41", "河南");
|
||||
hashtable.put("42", "湖北");
|
||||
hashtable.put("43", "湖南");
|
||||
hashtable.put("44", "广东");
|
||||
hashtable.put("45", "广西");
|
||||
hashtable.put("46", "海南");
|
||||
hashtable.put("50", "重庆");
|
||||
hashtable.put("51", "四川");
|
||||
hashtable.put("52", "贵州");
|
||||
hashtable.put("53", "云南");
|
||||
hashtable.put("54", "西藏");
|
||||
hashtable.put("61", "陕西");
|
||||
hashtable.put("62", "甘肃");
|
||||
hashtable.put("63", "青海");
|
||||
hashtable.put("64", "宁夏");
|
||||
hashtable.put("65", "新疆");
|
||||
hashtable.put("71", "台湾");
|
||||
hashtable.put("81", "香港");
|
||||
hashtable.put("82", "澳门");
|
||||
hashtable.put("91", "国外");
|
||||
hashtable.put("11", "北京");
|
||||
hashtable.put("12", "天津");
|
||||
hashtable.put("13", "河北");
|
||||
hashtable.put("14", "山西");
|
||||
hashtable.put("15", "内蒙古");
|
||||
hashtable.put("21", "辽宁");
|
||||
hashtable.put("22", "吉林");
|
||||
hashtable.put("23", "黑龙江");
|
||||
hashtable.put("31", "上海");
|
||||
hashtable.put("32", "江苏");
|
||||
hashtable.put("33", "浙江");
|
||||
hashtable.put("34", "安徽");
|
||||
hashtable.put("35", "福建");
|
||||
hashtable.put("36", "江西");
|
||||
hashtable.put("37", "山东");
|
||||
hashtable.put("41", "河南");
|
||||
hashtable.put("42", "湖北");
|
||||
hashtable.put("43", "湖南");
|
||||
hashtable.put("44", "广东");
|
||||
hashtable.put("45", "广西");
|
||||
hashtable.put("46", "海南");
|
||||
hashtable.put("50", "重庆");
|
||||
hashtable.put("51", "四川");
|
||||
hashtable.put("52", "贵州");
|
||||
hashtable.put("53", "云南");
|
||||
hashtable.put("54", "西藏");
|
||||
hashtable.put("61", "陕西");
|
||||
hashtable.put("62", "甘肃");
|
||||
hashtable.put("63", "青海");
|
||||
hashtable.put("64", "宁夏");
|
||||
hashtable.put("65", "新疆");
|
||||
hashtable.put("71", "台湾");
|
||||
hashtable.put("81", "香港");
|
||||
hashtable.put("82", "澳门");
|
||||
hashtable.put("91", "国外");
|
||||
return hashtable;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user