修改代码字符编码
This commit is contained in:
@@ -16,23 +16,23 @@ public class AveragerConfigModel extends BaseModel {
|
||||
private String display;
|
||||
private String region;
|
||||
private String name;
|
||||
private Integer status; // 0-正常 1-禁用
|
||||
private Integer sampleFetchCount; // 样本获取数量
|
||||
private Integer sampleMaxValue; // 样本允许最大值
|
||||
private Integer sampleMinValue; // 样本允许最小值
|
||||
private Integer ownTypeLimit; // 自身样本计算的最低要求
|
||||
private Integer sampleQueueStart; // 样本队列取值区间最小值
|
||||
private Integer sampleQueueEnd; // 样本队列取值区间最大值
|
||||
private Integer status; // 0-正常 1-禁用
|
||||
private Integer sampleFetchCount; // 样本获取数量
|
||||
private Integer sampleMaxValue; // 样本允许最大值
|
||||
private Integer sampleMinValue; // 样本允许最小值
|
||||
private Integer ownTypeLimit; // 自身样本计算的最低要求
|
||||
private Integer sampleQueueStart; // 样本队列取值区间最小值
|
||||
private Integer sampleQueueEnd; // 样本队列取值区间最大值
|
||||
|
||||
private Integer aroundRadius; // 周边最大半径
|
||||
private Integer aroundLimit; // 周边小区最大数量限制
|
||||
private Integer valueCluType; //类簇的用值类型 0-默认 1-中位数 2-最大值 3-最小值
|
||||
private Integer aroundRadius; // 周边最大半径
|
||||
private Integer aroundLimit; // 周边小区最大数量限制
|
||||
private Integer valueCluType; //类簇的用值类型 0-默认 1-中位数 2-最大值 3-最小值
|
||||
|
||||
private Integer aroundDiffMinPercent; //样本与周边对比的最小相差比例
|
||||
private Integer aroundDiffMaxPercent; //样本与周边对比的最大相差比例
|
||||
private Integer guidingPriceExpirationDay; //指导价过期天数
|
||||
private Integer uncomforableSampleDay; //样本换算需要间隔时间
|
||||
private Integer masterIntervenePercent; //主小区影响从小区可信度衰减比例
|
||||
private Integer aroundDiffMinPercent; //样本与周边对比的最小相差比例
|
||||
private Integer aroundDiffMaxPercent; //样本与周边对比的最大相差比例
|
||||
private Integer guidingPriceExpirationDay; //指导价过期天数
|
||||
private Integer uncomforableSampleDay; //样本换算需要间隔时间
|
||||
private Integer masterIntervenePercent; //主小区影响从小区可信度衰减比例
|
||||
|
||||
private Integer time;
|
||||
private String site;
|
||||
|
||||
+35
-35
@@ -58,12 +58,12 @@ public class AdController {
|
||||
} else {
|
||||
adSpace.setCity("all");
|
||||
}
|
||||
if (StringUtils.isNotBlank(model.getPageId()) && model.getPageId().equals("全国首页")) {
|
||||
if (StringUtils.isNotBlank(model.getPageId()) && model.getPageId().equals("全国首页")) {
|
||||
adSpace.setCity("all");
|
||||
}
|
||||
adSpaceService.saveOrUpdate(adSpace);
|
||||
BeanUtils.copyProperties(adSpace, model);
|
||||
model.flash().setAttribute("message", StringUtils.isBlank(model.getId()) ? "添加成功" : "修改成功");
|
||||
model.flash().setAttribute("message", StringUtils.isBlank(model.getId()) ? "添加成功" : "修改成功");
|
||||
return model.redirect("show?id=" + adSpace.getId());
|
||||
} else if (StringUtils.isNotBlank(model.getId())) {
|
||||
AdSpace adSpace = adSpaceService.findAdSpaceById(model.getId());
|
||||
@@ -108,38 +108,38 @@ public class AdController {
|
||||
}
|
||||
|
||||
try {
|
||||
// 发邮件给用户
|
||||
// 发邮件给用户
|
||||
Mail mail = new Mail();
|
||||
mail.setReceiver(new MailUser(cpdbApp.getEmail()));
|
||||
mail.setSubject("房价网—中国不动产大数据库CPDB演示");
|
||||
mail.setSubject("房价网—中国不动产大数据库CPDB演示");
|
||||
StringBuffer emailMsg = new StringBuffer();
|
||||
emailMsg.append("尊敬的用户:<br/><br/>")
|
||||
.append("  感谢您申请房价网的<b>房价数据测试平台</b>免费试用账号!<br/><br/>")
|
||||
.append("  您现在可以在48小时内免费体验<b>房价数据测试平台</b>的所有功能了!<br/><br/>")
|
||||
.append("  登陆链接:<a href=\"http://user.fangjia.com/fangjiatong2/users/userCenterLogin?__from=cpdbemail\">房价数据测试平台</a><br/>")
|
||||
.append("  用户名:")
|
||||
emailMsg.append("尊敬的用户:<br/><br/>")
|
||||
.append("  感谢您申请房价网的<b>房价数据测试平台</b>免费试用账号!<br/><br/>")
|
||||
.append("  您现在可以在48小时内免费体验<b>房价数据测试平台</b>的所有功能了!<br/><br/>")
|
||||
.append("  登陆链接:<a href=\"http://user.fangjia.com/fangjiatong2/users/userCenterLogin?__from=cpdbemail\">房价数据测试平台</a><br/>")
|
||||
.append("  用户名:")
|
||||
.append(cpdbApp.getEmail())
|
||||
.append("<br/>")
|
||||
.append("  密码:")
|
||||
.append("  密码:")
|
||||
.append(fjtuser.getPassword())
|
||||
.append("<br/><br/>")
|
||||
.append("  由于该账号为<b>限时使用</b>,所以请尽快开始使用。<br/><br/>")
|
||||
.append("  <b>房价数据测试平台</b>是凭借<b>中国不动产大数据库CPDB</b>的基础上,整合优势力量,推出的测试平台。<br/><br/>")
|
||||
.append("  CPDB大数据库包括")
|
||||
.append("  <ul><li>住宅物业的实时挂牌价格、成交参考、房源、楼盘详情、照片、地图</li>")
|
||||
.append("  <li>商业地产的均价、详情、消费分析、竞争对手情报</li>")
|
||||
.append("  <li>城市行情、历史数据等</li></ul><br/>")
|
||||
.append("  CPDB(China Property Data Base)是由房价网通过<b>10年积累</b>和国际领先的<b>专利技术</b>(OLKD),打造的精确到每一户房产微观数据的“中国不动产大数据库”。<br/>")
|
||||
.append("  CPDB的数据覆盖全国<b>100个</b>城市、<b>15万</b>楼盘,拥有<b>5000万套</b>房产的个性化微观数据,革命性的实现了“<b>一户一信息</b>”,是目前中国最大、最专业、最实时的不动产微观数据库。<br/><br/>")
|
||||
.append("  关于<b>中国不动产大数据库CPDB</b>的更多相关内容,您可以通过附件中的PPT演示文稿更全面的了解。<br/><br/>")
|
||||
.append("  您可以将此封邮件转发给其他用到不动产大数据库的伙伴,比如银行、电商平台、贷款公司、评估机构、房地产营销机构、软件公司、金融类网站等等,相信给会他们带来极大帮助。<br/><br/>")
|
||||
.append("  如有任何疑问,欢迎您致电客服电话:021-6239 2522。<br/><br/>").append("  谢谢您。<br/><br/>")
|
||||
.append("  祝您生活愉快,工作顺利。");
|
||||
.append("  由于该账号为<b>限时使用</b>,所以请尽快开始使用。<br/><br/>")
|
||||
.append("  <b>房价数据测试平台</b>是凭借<b>中国不动产大数据库CPDB</b>的基础上,整合优势力量,推出的测试平台。<br/><br/>")
|
||||
.append("  CPDB大数据库包括")
|
||||
.append("  <ul><li>住宅物业的实时挂牌价格、成交参考、房源、楼盘详情、照片、地图</li>")
|
||||
.append("  <li>商业地产的均价、详情、消费分析、竞争对手情报</li>")
|
||||
.append("  <li>城市行情、历史数据等</li></ul><br/>")
|
||||
.append("  CPDB(China Property Data Base)是由房价网通过<b>10年积累</b>和国际领先的<b>专利技术</b>(OLKD),打造的精确到每一户房产微观数据的“中国不动产大数据库”。<br/>")
|
||||
.append("  CPDB的数据覆盖全国<b>100个</b>城市、<b>15万</b>楼盘,拥有<b>5000万套</b>房产的个性化微观数据,革命性的实现了“<b>一户一信息</b>”,是目前中国最大、最专业、最实时的不动产微观数据库。<br/><br/>")
|
||||
.append("  关于<b>中国不动产大数据库CPDB</b>的更多相关内容,您可以通过附件中的PPT演示文稿更全面的了解。<br/><br/>")
|
||||
.append("  您可以将此封邮件转发给其他用到不动产大数据库的伙伴,比如银行、电商平台、贷款公司、评估机构、房地产营销机构、软件公司、金融类网站等等,相信给会他们带来极大帮助。<br/><br/>")
|
||||
.append("  如有任何疑问,欢迎您致电客服电话:021-6239 2522。<br/><br/>").append("  谢谢您。<br/><br/>")
|
||||
.append("  祝您生活愉快,工作顺利。");
|
||||
mail.setContent(emailMsg.toString());
|
||||
mail.setImportant(true);
|
||||
mail.setAttachment(true);
|
||||
mail.setAttachmentDes("CPDB大数据库示例");
|
||||
mail.setAttachmentName("CPDB大数据库示例.pptx");
|
||||
mail.setAttachmentDes("CPDB大数据库示例");
|
||||
mail.setAttachmentName("CPDB大数据库示例.pptx");
|
||||
mail.setAttachmentUrl("http://static.fangjia.com/res/static_logo/CPDB.pptx");
|
||||
|
||||
emailService.sendHtmlMailWithFile(mail);
|
||||
@@ -179,17 +179,17 @@ public class AdController {
|
||||
|
||||
private Map<String, String> getPositionMap() {
|
||||
Map<String, String> positionMap = new ListOrderedMap();
|
||||
positionMap.put("header;right;top", "头部右上");
|
||||
positionMap.put("header;center;middle", "头部居中");
|
||||
positionMap.put("body;right;top", "体部右上");
|
||||
positionMap.put("body;right;middle", "体部右中");
|
||||
positionMap.put("body;right;down", "体部右下");
|
||||
positionMap.put("body;center;top", "体部中上");
|
||||
positionMap.put("body;center;middle", "体部居中");
|
||||
positionMap.put("body;center;down", "体部中下");
|
||||
positionMap.put("footer;center;middle", "底部居中");
|
||||
positionMap.put("side;left;middle", "对联左中");
|
||||
positionMap.put("side;right;middle", "对联右中");
|
||||
positionMap.put("header;right;top", "头部右上");
|
||||
positionMap.put("header;center;middle", "头部居中");
|
||||
positionMap.put("body;right;top", "体部右上");
|
||||
positionMap.put("body;right;middle", "体部右中");
|
||||
positionMap.put("body;right;down", "体部右下");
|
||||
positionMap.put("body;center;top", "体部中上");
|
||||
positionMap.put("body;center;middle", "体部居中");
|
||||
positionMap.put("body;center;down", "体部中下");
|
||||
positionMap.put("footer;center;middle", "底部居中");
|
||||
positionMap.put("side;left;middle", "对联左中");
|
||||
positionMap.put("side;right;middle", "对联右中");
|
||||
return positionMap;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -110,9 +110,9 @@ public class AddressAnalyController {
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
|
||||
if(model.getType().equals("风控")){
|
||||
if(model.getType().equals("风控")){
|
||||
|
||||
titles = new String[]{"城市","地址", "面积", "贷款余额", "房价总价","区域","近12月涨幅","CLTV值","物业类型"};
|
||||
titles = new String[]{"城市","地址", "面积", "贷款余额", "房价总价","区域","近12月涨幅","CLTV值","物业类型"};
|
||||
for (AddressDetail detail : addressDetails) {
|
||||
AddressAnalyticsResult analy = resultMap.get(detail.getNumber());
|
||||
if(analy == null){
|
||||
@@ -128,9 +128,9 @@ public class AddressAnalyController {
|
||||
}
|
||||
}
|
||||
|
||||
}else if(model.getType().equals("营销")){
|
||||
}else if(model.getType().equals("营销")){
|
||||
|
||||
titles = new String[]{"城市","地址", "面积", "贷款余额", "房价总价","区域","近12月涨幅","物业类型"};
|
||||
titles = new String[]{"城市","地址", "面积", "贷款余额", "房价总价","区域","近12月涨幅","物业类型"};
|
||||
for (AddressDetail detail : addressDetails) {
|
||||
AddressAnalyticsResult analy = resultMap.get(detail.getNumber());
|
||||
if(analy == null){
|
||||
@@ -148,14 +148,14 @@ public class AddressAnalyController {
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
} catch (Exception e) {
|
||||
|
||||
+27
-27
@@ -69,7 +69,7 @@ public class AddressController {
|
||||
model.setSearchFlag(1);
|
||||
}
|
||||
if(model.getSource() == null){
|
||||
model.setSource("房价通");
|
||||
model.setSource("房价通");
|
||||
}
|
||||
pager.setTotalRows((int) addressMatchLogService.findAddressMathLogCount(model.getCityDisplay(), model.getSource(), model.getStatus(), model.getSearchFlag(), model.getCompany(),model.getEmail(),model.getStartDate(),model.getEndDate()));
|
||||
List<AddressMatchLog> logs= addressMatchLogService.findAddressMathLog(model.getCityDisplay(), model.getSource(), model.getStatus(), model.getSearchFlag(),model.getCompany(), model.getEmail(),model.getStartDate(),model.getEndDate(), pager.getStartRow(), pager.getPageSize());
|
||||
@@ -80,9 +80,9 @@ public class AddressController {
|
||||
if(StringUtils.isBlank(log.getUserName())){
|
||||
continue;
|
||||
}
|
||||
if("房价通".equals(log.getSource())&&!fjtEmails.contains(log.getUserName())){
|
||||
if("房价通".equals(log.getSource())&&!fjtEmails.contains(log.getUserName())){
|
||||
fjtEmails.add(log.getUserName());
|
||||
}else if("房评卡".equals(log.getSource()) && !fpkUserNames.contains(log.getUserName())){
|
||||
}else if("房评卡".equals(log.getSource()) && !fpkUserNames.contains(log.getUserName())){
|
||||
fpkUserNames.add(log.getUserName());
|
||||
}else if("API".equals(log.getSource()) && !apiUserNames.contains(log.getUserName())){
|
||||
apiUserNames.add(log.getUserName());
|
||||
@@ -98,7 +98,7 @@ public class AddressController {
|
||||
}
|
||||
Map<Long,String> idToCompanyName = usersDetailService.findCompanyNameByIds(new ArrayList<Long>(idToEmail.keySet()));
|
||||
for(AddressMatchLog log:logs){
|
||||
if("房价通".equals(log.getSource())){
|
||||
if("房价通".equals(log.getSource())){
|
||||
Long id = emailToId.get(log.getUserName());
|
||||
if(id != null){
|
||||
log.setCompanyName(idToCompanyName.get(id));
|
||||
@@ -109,7 +109,7 @@ public class AddressController {
|
||||
if(fpkUserNames.size() > 0){
|
||||
Map<String,String> userNameToCompanyName = fpkUsersService.findCompanyNameByUserNames(fpkUserNames);
|
||||
for(AddressMatchLog log:logs){
|
||||
if("房评卡".equals(log.getSource())){
|
||||
if("房评卡".equals(log.getSource())){
|
||||
log.setCompanyName(userNameToCompanyName.get(log.getUserName()));
|
||||
}
|
||||
}
|
||||
@@ -129,11 +129,11 @@ public class AddressController {
|
||||
public Object loadCompanyAction(AddressModel addressModel){
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String,Object> data = new HashMap<String, Object>();
|
||||
if("房价通".equals(addressModel.getSource())){
|
||||
if("房价通".equals(addressModel.getSource())){
|
||||
data.put("companyList",usersDetailService.findAllCompanyName(addressModel.getKeyword()));
|
||||
}else if("API".equals(addressModel.getSource())){
|
||||
data.put("companyList",apiUserService.findAllCompanyName(addressModel.getKeyword()));
|
||||
}else if("房评卡".equals(addressModel.getSource())){
|
||||
}else if("房评卡".equals(addressModel.getSource())){
|
||||
data.put("companyList",fpkUsersService.findAllCompanyName(addressModel.getKeyword()));
|
||||
}
|
||||
|
||||
@@ -166,11 +166,11 @@ public class AddressController {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
params.add(new QueryParam("name", model.getArtificialMatch()));
|
||||
String cat = "";
|
||||
if(model.getArtificialMatchStatus().equals("住宅")){
|
||||
if(model.getArtificialMatchStatus().equals("住宅")){
|
||||
cat = "district";
|
||||
}else if(model.getArtificialMatchStatus().equals("商铺")){
|
||||
}else if(model.getArtificialMatchStatus().equals("商铺")){
|
||||
cat = "shop";
|
||||
}else if(model.getArtificialMatchStatus().equals("写字楼")){
|
||||
}else if(model.getArtificialMatchStatus().equals("写字楼")){
|
||||
cat = "office";
|
||||
}
|
||||
params.add(new QueryParam("category", cat));
|
||||
@@ -197,9 +197,9 @@ public class AddressController {
|
||||
|
||||
if(ailas.contains(model.getAlias())){
|
||||
if(way == 1){
|
||||
errMap.put("msg", "【"+model.getArtificialMatch() + "】在名称别名中已存在!");
|
||||
errMap.put("msg", "【"+model.getArtificialMatch() + "】在名称别名中已存在!");
|
||||
}else{
|
||||
errMap.put("msg", "【"+model.getArtificialMatch() + "】在地址别名中已存在!");
|
||||
errMap.put("msg", "【"+model.getArtificialMatch() + "】在地址别名中已存在!");
|
||||
}
|
||||
errMap.put("trId", model.getId());
|
||||
}else{
|
||||
@@ -214,9 +214,9 @@ public class AddressController {
|
||||
}
|
||||
}else{
|
||||
if(districts != null && districts.size() > 1){
|
||||
errMap.put("msg", "【"+model.getCityDisplay()+"】【"+model.getArtificialMatchStatus()+"】【"+model.getArtificialMatch() + "】在数据库中有多个,请确定唯一!");
|
||||
errMap.put("msg", "【"+model.getCityDisplay()+"】【"+model.getArtificialMatchStatus()+"】【"+model.getArtificialMatch() + "】在数据库中有多个,请确定唯一!");
|
||||
}else{
|
||||
errMap.put("msg", "没有找到【"+model.getCityDisplay()+"】【"+model.getArtificialMatchStatus()+"】【"+model.getArtificialMatch() + "】");
|
||||
errMap.put("msg", "没有找到【"+model.getCityDisplay()+"】【"+model.getArtificialMatchStatus()+"】【"+model.getArtificialMatch() + "】");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,15 +291,15 @@ public class AddressController {
|
||||
model.setViewType("json");
|
||||
String cat = "";
|
||||
if(StringUtils.isNotBlank(model.getCategory())){
|
||||
if(model.getCategory().equals("住宅")){
|
||||
if(model.getCategory().equals("住宅")){
|
||||
cat = "district";
|
||||
}else if(model.getCategory().equals("商铺")){
|
||||
}else if(model.getCategory().equals("商铺")){
|
||||
cat = "shop";
|
||||
}else if(model.getCategory().equals("写字楼")){
|
||||
}else if(model.getCategory().equals("写字楼")){
|
||||
cat = "office";
|
||||
}
|
||||
}else{
|
||||
model.setMsg("类型不能为空!");
|
||||
model.setMsg("类型不能为空!");
|
||||
return model;
|
||||
}
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
@@ -310,7 +310,7 @@ public class AddressController {
|
||||
|
||||
List<District> districts = districtService.findAllByParams(params);
|
||||
if(districts.size() > 0){
|
||||
model.setMsg( model.getName()+" 已存在!");
|
||||
model.setMsg( model.getName()+" 已存在!");
|
||||
return model;
|
||||
}
|
||||
District district = new District();
|
||||
@@ -368,16 +368,16 @@ public class AddressController {
|
||||
model.setSearchFlag(1);
|
||||
}
|
||||
if(model.getSource() == null){
|
||||
model.setSource("房价通");
|
||||
model.setSource("房价通");
|
||||
}
|
||||
List<AddressMatchLog> logs= addressMatchLogService.findAddressMathLog(model.getCityDisplay(), model.getSource(), model.getStatus(), model.getSearchFlag(),model.getCompany(), model.getEmail(),model.getStartDate(),model.getEndDate());
|
||||
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
|
||||
String[] columns = {"城市","用户输入","来源","公司","技术匹配","技术匹配结果","搜索结果","记录时间"};
|
||||
String[] columns = {"城市","用户输入","来源","公司","技术匹配","技术匹配结果","搜索结果","记录时间"};
|
||||
HSSFWorkbook wb= new HSSFWorkbook();
|
||||
Sheet sheet = wb.createSheet("地址匹配");
|
||||
Sheet sheet = wb.createSheet("地址匹配");
|
||||
Row row = sheet.createRow(0);
|
||||
for(int i =0 ;i < columns.length ; i++){
|
||||
row.createCell(i).setCellValue(columns[i]);
|
||||
@@ -407,20 +407,20 @@ public class AddressController {
|
||||
}
|
||||
row.createCell(5).setCellValue(names);
|
||||
row.createCell(6).setCellValue(log.getSearchCount()>0?"Yes":"No");
|
||||
row.createCell(7).setCellValue(DateUtil.formatByPattern(log.getCreationDate(), "yyyy年MM月dd日"));
|
||||
row.createCell(7).setCellValue(DateUtil.formatByPattern(log.getCreationDate(), "yyyy年MM月dd日"));
|
||||
}
|
||||
String fileName = "地址匹配" + "(" + DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
String fileName = "地址匹配" + "(" + DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
|
||||
+51
-51
@@ -52,17 +52,17 @@ public class AddressMatchController {
|
||||
private FpkUsersService fpkUsersService;
|
||||
private DistrictService districtService;
|
||||
private static final Map<Integer,String> HUMAN_MATCH_STATUS = new HashMap<Integer, String>(){{
|
||||
put(-2,"系统匹配错误");
|
||||
put(-1,"输入无效");
|
||||
put(0,"人工匹配失败");
|
||||
put(1,"CPDB库新增");
|
||||
put(2,"CPDB库存在");
|
||||
put(-2,"系统匹配错误");
|
||||
put(-1,"输入无效");
|
||||
put(0,"人工匹配失败");
|
||||
put(1,"CPDB库新增");
|
||||
put(2,"CPDB库存在");
|
||||
}};
|
||||
|
||||
private static final Map<Integer,String> OPERATING_MODE = new HashMap<Integer, String>(){{
|
||||
put(1,"名称别名");
|
||||
put(2,"地址别名");
|
||||
put(3,"入库编辑");
|
||||
put(1,"名称别名");
|
||||
put(2,"地址别名");
|
||||
put(3,"入库编辑");
|
||||
}};
|
||||
|
||||
|
||||
@@ -93,11 +93,11 @@ public class AddressMatchController {
|
||||
public Object loadCompanyAction(AddressMatchModel model){
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String,Object> data = new HashMap<String, Object>();
|
||||
if("房价通".equals(model.getSource())){
|
||||
if("房价通".equals(model.getSource())){
|
||||
data.put("companyList",usersDetailService.findAllCompanyName(model.getKeyword()));
|
||||
}else if("API".equals(model.getSource())){
|
||||
data.put("companyList",apiUserService.findAllCompanyName(model.getKeyword()));
|
||||
}else if("房评卡".equals(model.getSource())){
|
||||
}else if("房评卡".equals(model.getSource())){
|
||||
data.put("companyList",fpkUsersService.findAllCompanyName(model.getKeyword()));
|
||||
}
|
||||
jsonModel.setJsonModel(data);
|
||||
@@ -109,11 +109,11 @@ public class AddressMatchController {
|
||||
params.add(new QueryParam("visible", 0));
|
||||
if(StringUtils.isBlank(model.getCategory())){
|
||||
params.add(new QueryParam("category", "district,shop,office"));
|
||||
}else if( "住宅".equals(model.getCategory())){
|
||||
}else if( "住宅".equals(model.getCategory())){
|
||||
params.add(new QueryParam("category", "district"));
|
||||
}else if( "商铺".equals(model.getCategory())){
|
||||
}else if( "商铺".equals(model.getCategory())){
|
||||
params.add(new QueryParam("category", "shop"));
|
||||
}else if( "写字楼".equals(model.getCategory())){
|
||||
}else if( "写字楼".equals(model.getCategory())){
|
||||
params.add(new QueryParam("category", "office"));
|
||||
}
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())) {
|
||||
@@ -169,31 +169,31 @@ public class AddressMatchController {
|
||||
}else{
|
||||
if(3 == address.getOperatingMode()){
|
||||
cpdbTotal ++;
|
||||
if("住宅".equals(address.getHumanMatchCategory())){
|
||||
if("住宅".equals(address.getHumanMatchCategory())){
|
||||
districtTotal ++;
|
||||
}else if("写字楼".equals(address.getHumanMatchCategory())){
|
||||
}else if("写字楼".equals(address.getHumanMatchCategory())){
|
||||
officeTotal ++;
|
||||
}else if("商铺".equals(address.getHumanMatchCategory())){
|
||||
}else if("商铺".equals(address.getHumanMatchCategory())){
|
||||
shopTotal ++;
|
||||
}
|
||||
|
||||
}else if(2 == address.getOperatingMode()){
|
||||
addrAliasTotal++;
|
||||
if("住宅".equals(address.getHumanMatchCategory())){
|
||||
if("住宅".equals(address.getHumanMatchCategory())){
|
||||
addrAliasDistrictTotal ++;
|
||||
}else if("写字楼".equals(address.getHumanMatchCategory())){
|
||||
}else if("写字楼".equals(address.getHumanMatchCategory())){
|
||||
addrAliasOfficeTotal ++;
|
||||
}else if("商铺".equals(address.getHumanMatchCategory())){
|
||||
}else if("商铺".equals(address.getHumanMatchCategory())){
|
||||
addrAliasShopTotal ++;
|
||||
}
|
||||
|
||||
}else if(1 == address.getOperatingMode() ){
|
||||
nameAliasTotal++;
|
||||
if("住宅".equals(address.getHumanMatchCategory())){
|
||||
if("住宅".equals(address.getHumanMatchCategory())){
|
||||
nameAliasDistrictTotal ++;
|
||||
}else if("写字楼".equals(address.getHumanMatchCategory())){
|
||||
}else if("写字楼".equals(address.getHumanMatchCategory())){
|
||||
nameAliasShopTotal ++;
|
||||
}else if("商铺".equals(address.getHumanMatchCategory())){
|
||||
}else if("商铺".equals(address.getHumanMatchCategory())){
|
||||
nameAliasOfficeTotal ++;
|
||||
}
|
||||
}
|
||||
@@ -203,62 +203,62 @@ public class AddressMatchController {
|
||||
|
||||
|
||||
HSSFWorkbook book = new HSSFWorkbook();
|
||||
HSSFSheet sheet = book.createSheet("统计结果");
|
||||
HSSFSheet sheet = book.createSheet("统计结果");
|
||||
|
||||
HSSFRow row = sheet.createRow(0);
|
||||
HSSFCell cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("城市");
|
||||
cell.setCellValue("城市");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue(model.getCityDisplay());
|
||||
|
||||
row = sheet.createRow(1);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("来源");
|
||||
cell.setCellValue("来源");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue(model.getSource());
|
||||
|
||||
row = sheet.createRow(2);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("时间段");
|
||||
cell.setCellValue("时间段");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue(DateUtil.formatByPattern(model.getStartDate(),"yyyy年MM月dd日") + "到" + DateUtil.formatByPattern(model.getEndDate(),"yyyy年MM月dd日"));
|
||||
cell.setCellValue(DateUtil.formatByPattern(model.getStartDate(),"yyyy年MM月dd日") + "到" + DateUtil.formatByPattern(model.getEndDate(),"yyyy年MM月dd日"));
|
||||
|
||||
row = sheet.createRow(3);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("人工操作总量");
|
||||
cell.setCellValue("人工操作总量");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue(addressMatches.size());
|
||||
|
||||
row = sheet.createRow(4);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
sheet.addMergedRegion(new CellRangeAddress(4, 6, 0, 0));
|
||||
cell.setCellValue("CPDB库新增总量");
|
||||
cell.setCellValue("CPDB库新增总量");
|
||||
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_STRING);
|
||||
sheet.addMergedRegion(new CellRangeAddress(4, 6, 1, 1));
|
||||
cell.setCellValue(cpdbTotal);
|
||||
|
||||
cell= row.createCell(2,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("新增住宅");
|
||||
cell.setCellValue("新增住宅");
|
||||
cell= row.createCell(3,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(districtTotal);
|
||||
|
||||
row = sheet.createRow(5);
|
||||
cell= row.createCell(2,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("新增写字楼");
|
||||
cell.setCellValue("新增写字楼");
|
||||
cell= row.createCell(3,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(officeTotal);
|
||||
|
||||
row = sheet.createRow(6);
|
||||
cell= row.createCell(2,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("新增商铺");
|
||||
cell.setCellValue("新增商铺");
|
||||
cell= row.createCell(3,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(shopTotal);
|
||||
|
||||
row = sheet.createRow(7);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
sheet.addMergedRegion(new CellRangeAddress(7, 12, 0, 0));
|
||||
cell.setCellValue("CPDB库新增存在");
|
||||
cell.setCellValue("CPDB库新增存在");
|
||||
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_NUMERIC);
|
||||
sheet.addMergedRegion(new CellRangeAddress(7,12,1,1));
|
||||
@@ -266,77 +266,77 @@ public class AddressMatchController {
|
||||
|
||||
cell= row.createCell(2,Cell.CELL_TYPE_STRING);
|
||||
sheet.addMergedRegion(new CellRangeAddress(7,9,2,2));
|
||||
cell.setCellValue("名称别名");
|
||||
cell.setCellValue("名称别名");
|
||||
|
||||
cell= row.createCell(3,Cell.CELL_TYPE_NUMERIC);
|
||||
sheet.addMergedRegion(new CellRangeAddress(7,9,3,3));
|
||||
cell.setCellValue(nameAliasTotal);
|
||||
|
||||
cell= row.createCell(4,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("住宅别名");
|
||||
cell.setCellValue("住宅别名");
|
||||
|
||||
cell= row.createCell(5,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(nameAliasDistrictTotal);
|
||||
|
||||
row = sheet.createRow(8);
|
||||
cell= row.createCell(4,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("写字楼别名");
|
||||
cell.setCellValue("写字楼别名");
|
||||
cell= row.createCell(5,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(nameAliasOfficeTotal);
|
||||
|
||||
row = sheet.createRow(9);
|
||||
cell= row.createCell(4,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("商铺别名");
|
||||
cell.setCellValue("商铺别名");
|
||||
cell= row.createCell(5,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(nameAliasShopTotal);
|
||||
|
||||
row = sheet.createRow(10);
|
||||
cell= row.createCell(2,Cell.CELL_TYPE_STRING);
|
||||
sheet.addMergedRegion(new CellRangeAddress(10,12,2,2));
|
||||
cell.setCellValue("地址别名");
|
||||
cell.setCellValue("地址别名");
|
||||
|
||||
cell= row.createCell(3,Cell.CELL_TYPE_NUMERIC);
|
||||
sheet.addMergedRegion(new CellRangeAddress(10,12,3,3));
|
||||
cell.setCellValue(addrAliasTotal);
|
||||
|
||||
cell= row.createCell(4,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("住宅地址别名");
|
||||
cell.setCellValue("住宅地址别名");
|
||||
cell= row.createCell(5,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(addrAliasDistrictTotal);
|
||||
|
||||
row = sheet.createRow(11);
|
||||
cell= row.createCell(4,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("写字楼住宅别名");
|
||||
cell.setCellValue("写字楼住宅别名");
|
||||
cell= row.createCell(5,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(addrAliasOfficeTotal);
|
||||
|
||||
row = sheet.createRow(12);
|
||||
cell= row.createCell(4,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("商铺地址别名");
|
||||
cell.setCellValue("商铺地址别名");
|
||||
cell= row.createCell(5,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(addrAliasShopTotal);
|
||||
|
||||
row = sheet.createRow(13);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("输入无效");
|
||||
cell.setCellValue("输入无效");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(inputInvalidTotal);
|
||||
|
||||
row = sheet.createRow(14);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("人工匹配失败");
|
||||
cell.setCellValue("人工匹配失败");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(humanMatchFailure);
|
||||
|
||||
row = sheet.createRow(15);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("系统匹配错误");
|
||||
cell.setCellValue("系统匹配错误");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(sysMatchErrorTotal);
|
||||
|
||||
row = sheet.createRow(16);
|
||||
cell= row.createCell(0,Cell.CELL_TYPE_STRING);
|
||||
cell.setCellValue("CPDB库中已存在");
|
||||
cell.setCellValue("CPDB库中已存在");
|
||||
cell= row.createCell(1,Cell.CELL_TYPE_NUMERIC);
|
||||
cell.setCellValue(cpdbExistsTotal);
|
||||
|
||||
@@ -349,11 +349,11 @@ public class AddressMatchController {
|
||||
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();// 取得输出流
|
||||
book.write(os);
|
||||
os.flush();
|
||||
}catch (Exception e) {
|
||||
@@ -374,11 +374,11 @@ public class AddressMatchController {
|
||||
model.setViewType("json");
|
||||
String cat = "";
|
||||
if(StringUtils.isNotBlank(model.getCategory())){
|
||||
if(model.getCategory().equals("住宅")){
|
||||
if(model.getCategory().equals("住宅")){
|
||||
cat = "district";
|
||||
}else if(model.getCategory().equals("商铺")){
|
||||
}else if(model.getCategory().equals("商铺")){
|
||||
cat = "shop";
|
||||
}else if(model.getCategory().equals("写字楼")){
|
||||
}else if(model.getCategory().equals("写字楼")){
|
||||
cat = "office";
|
||||
}
|
||||
}else{
|
||||
@@ -393,7 +393,7 @@ public class AddressMatchController {
|
||||
|
||||
List<District> districts = districtService.findAllByParams(params);
|
||||
if(districts.size() > 0){
|
||||
model.setMsg( model.getName()+" 已存在!");
|
||||
model.setMsg( model.getName()+" 已存在!");
|
||||
return model;
|
||||
}
|
||||
District district = new District();
|
||||
|
||||
+33
-33
@@ -27,7 +27,7 @@ import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Desc : 房价网后台广告配置
|
||||
* @Desc : 房价网后台广告配置
|
||||
* @User : xh
|
||||
*/
|
||||
public class AdvertisementController {
|
||||
@@ -37,7 +37,7 @@ public class AdvertisementController {
|
||||
private AdvertisementService advertisementService;
|
||||
|
||||
/**
|
||||
* 展示广告列表+查询
|
||||
* 展示广告列表+查询
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -88,25 +88,25 @@ public class AdvertisementController {
|
||||
return max;
|
||||
}
|
||||
/**
|
||||
* 根据时间+排序检测是否重复
|
||||
* @return true:无重复 、 false:重复
|
||||
* 根据时间+排序检测是否重复
|
||||
* @return true:无重复 、 false:重复
|
||||
*/
|
||||
private boolean checkSort(String oldId, int source, String model, int location, int type, int sort, Date startDate, Date endDate){
|
||||
//查询对应类型和sort的广告
|
||||
//查询对应类型和sort的广告
|
||||
List<Advertisement> advertisements = advertisementService.listByParam(model, source, location, type, sort, null, null);
|
||||
if(advertisements==null||advertisements.size()==0) {//无不存在重复
|
||||
if(advertisements==null||advertisements.size()==0) {//无不存在重复
|
||||
return true;
|
||||
}
|
||||
boolean newBeforeOld = true;//待插入的时间在所有已存在的时间之前
|
||||
boolean newAfterOld = true;//待插入的时间在所有已存在的时间之后
|
||||
boolean newBeforeOld = true;//待插入的时间在所有已存在的时间之前
|
||||
boolean newAfterOld = true;//待插入的时间在所有已存在的时间之后
|
||||
for(Advertisement a : advertisements) {
|
||||
if(oldId!=null&&oldId.equals(a.getId())) {//排除自己(如果存在)
|
||||
if(oldId!=null&&oldId.equals(a.getId())) {//排除自己(如果存在)
|
||||
continue;
|
||||
}
|
||||
if(a.getStartDate()!=null&&!endDate.before(a.getStartDate())) {//不在前面
|
||||
if(a.getStartDate()!=null&&!endDate.before(a.getStartDate())) {//不在前面
|
||||
newBeforeOld = false;
|
||||
}
|
||||
if(a.getEndDate()!=null&&!startDate.after(a.getEndDate())) {//不在后面
|
||||
if(a.getEndDate()!=null&&!startDate.after(a.getEndDate())) {//不在后面
|
||||
newAfterOld = false;
|
||||
}
|
||||
}
|
||||
@@ -145,20 +145,20 @@ public class AdvertisementController {
|
||||
model.setViewType("json");
|
||||
if(model.getSort()==null) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("操作失败,未获得排序号!");
|
||||
model.setMsg("操作失败,未获得排序号!");
|
||||
return model;
|
||||
}
|
||||
Advertisement advertisement = advertisementService.findById(model.getId());
|
||||
if(advertisement==null) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("操作失败,查询广告位失败!");
|
||||
model.setMsg("操作失败,查询广告位失败!");
|
||||
return model;
|
||||
}
|
||||
if(model.getSort()!=0&&model.getSort()!=advertisement.getSort()) {//不为0且不与原排序相等时(即修改时)才加限制
|
||||
if(model.getSort()!=0&&model.getSort()!=advertisement.getSort()) {//不为0且不与原排序相等时(即修改时)才加限制
|
||||
List<Advertisement> advertisements = advertisementService.listByParam(advertisement.getModel(),advertisement.getSource(),advertisement.getLocation(),advertisement.getType(),model.getSort(),null,null);
|
||||
if(advertisements!=null&&advertisements.size()>0) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("操作失败,该排序号的广告已存在!");
|
||||
model.setMsg("操作失败,该排序号的广告已存在!");
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ public class AdvertisementController {
|
||||
Advertisement advertisement = advertisementService.findById(model.getId());
|
||||
if(advertisement==null) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("根据Id查询广告失败!");
|
||||
model.setMsg("根据Id查询广告失败!");
|
||||
return model;
|
||||
}
|
||||
String startDateStr = model.getStartDateStr();
|
||||
@@ -250,19 +250,19 @@ public class AdvertisementController {
|
||||
endDate = sdf.parse(endDateStr);
|
||||
if(startDate.after(endDate)) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("操作失败,开始时间不可以在结束时间之后!");
|
||||
model.setMsg("操作失败,开始时间不可以在结束时间之后!");
|
||||
return model;
|
||||
}
|
||||
}catch(Exception e) {
|
||||
LOGGER.error("时间转换失败",e);
|
||||
LOGGER.error("时间转换失败",e);
|
||||
model.setCode("-1");
|
||||
model.setMsg("时间转换失败");
|
||||
model.setMsg("时间转换失败");
|
||||
return model;
|
||||
}
|
||||
if(model.getSort()!=0) {//排序不为0才加限制
|
||||
if(model.getSort()!=0) {//排序不为0才加限制
|
||||
if(!checkSort(advertisement.getId(),advertisement.getSource(),advertisement.getModel(),advertisement.getLocation(),advertisement.getType(),model.getSort(),startDate,endDate)) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("操作失败,该位置广告存在重复(存在同序号且时间重叠的广告)!");
|
||||
model.setMsg("操作失败,该位置广告存在重复(存在同序号且时间重叠的广告)!");
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -287,14 +287,14 @@ public class AdvertisementController {
|
||||
Advertisement advertisement = advertisementService.findById(model.getId());
|
||||
if(advertisement==null) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("根据Id查询广告失败!");
|
||||
model.setMsg("根据Id查询广告失败!");
|
||||
return model;
|
||||
}
|
||||
// if(model.getSort()!=0&&model.getSort()!=advertisement.getSort()) {//不为0且不与原排序相等时(即修改时)才加限制
|
||||
// if(model.getSort()!=0&&model.getSort()!=advertisement.getSort()) {//不为0且不与原排序相等时(即修改时)才加限制
|
||||
// List<Advertisement> advertisements = advertisementService.listByParam(advertisement.getModel(),advertisement.getSource(),advertisement.getLocation(),advertisement.getType(),model.getSort(),null,null);
|
||||
// if(advertisements!=null&&advertisements.size()>0) {
|
||||
// model.setCode("-1");
|
||||
// model.setMsg("操作失败,该排序号的广告已存在!");
|
||||
// model.setMsg("操作失败,该排序号的广告已存在!");
|
||||
// return model;
|
||||
// }
|
||||
// }
|
||||
@@ -315,12 +315,12 @@ public class AdvertisementController {
|
||||
model.setCode("1");
|
||||
return model;
|
||||
}
|
||||
//图片上传
|
||||
//图片上传
|
||||
public Object uploadImageAction(HttpServletRequest request) {
|
||||
JsonModel json = new JsonModel();
|
||||
Map<String, Object[]> paraMap = ActionContext.getContext().getParameters();
|
||||
Object[] objects = paraMap.get("fileInputStream");
|
||||
Object[] objectsHeight = paraMap.get("height");//带过来的参数
|
||||
Object[] objectsHeight = paraMap.get("height");//带过来的参数
|
||||
Object[] objectsWidth = paraMap.get("width");
|
||||
if(objectsHeight==null||objectsWidth==null||objectsHeight.length==0||objectsWidth.length==0) {
|
||||
ImageUploadModel model = new ImageUploadModel(false,"");
|
||||
@@ -343,9 +343,9 @@ public class AdvertisementController {
|
||||
baos.flush();
|
||||
InputStream inputStream1 = new ByteArrayInputStream(baos.toByteArray());
|
||||
InputStream inputStream2 = new ByteArrayInputStream(baos.toByteArray());
|
||||
if(!imageCheck(inputStream1,height,width)) {//长宽检测
|
||||
if(!imageCheck(inputStream1,height,width)) {//长宽检测
|
||||
ImageUploadModel model = new ImageUploadModel(false,"");
|
||||
model.setLink("图片长宽与所填数值不对应");
|
||||
model.setLink("图片长宽与所填数值不对应");
|
||||
json.setJsonModel(model);
|
||||
return json;
|
||||
};
|
||||
@@ -362,7 +362,7 @@ public class AdvertisementController {
|
||||
String link = jsonObj.getJSONObject("result").getString("link");
|
||||
ImageUploadModel model = new ImageUploadModel(true,link);
|
||||
json.setJsonModel(model);
|
||||
Thread.sleep(2000);//等待2秒,前端页面图片可能展示失败
|
||||
Thread.sleep(2000);//等待2秒,前端页面图片可能展示失败
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@@ -370,15 +370,15 @@ public class AdvertisementController {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
ImageUploadModel model = new ImageUploadModel(false,"");
|
||||
model.setLink("上传失败");
|
||||
model.setLink("上传失败");
|
||||
json.setJsonModel(model);
|
||||
return json;
|
||||
}
|
||||
//宽高检查
|
||||
//宽高检查
|
||||
private boolean imageCheck(InputStream inputStream, int height, int width) throws IOException {
|
||||
BufferedImage bufferedImage = ImageIO.read(inputStream);
|
||||
int imgHeight = bufferedImage.getHeight();//图片真实的高
|
||||
int imgWidth = bufferedImage.getWidth();//图片的真实的宽
|
||||
int imgHeight = bufferedImage.getHeight();//图片真实的高
|
||||
int imgWidth = bufferedImage.getWidth();//图片的真实的宽
|
||||
if(height==imgHeight&&imgWidth==width) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+15
-15
@@ -34,7 +34,7 @@ import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Desc : 房价网后台广告运营
|
||||
* @Desc : 房价网后台广告运营
|
||||
* @User : xh
|
||||
*/
|
||||
public class AdvertisementOperationController {
|
||||
@@ -54,7 +54,7 @@ public class AdvertisementOperationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示广告列表+查询
|
||||
* 展示广告列表+查询
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ public class AdvertisementOperationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面列表+查询
|
||||
* 页面列表+查询
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -77,12 +77,12 @@ public class AdvertisementOperationController {
|
||||
List<Map> resultMap = new ArrayList<Map>();
|
||||
List<AdLog> list = new ArrayList<AdLog>();
|
||||
if(model.getDateType() == 0){
|
||||
model.setDateType(1); //默认全部
|
||||
model.setDateType(1); //默认全部
|
||||
}
|
||||
list = adLogService.listByParam(model.getDateType(), model.getStartDate(), model.getEndDate(), model.getModel(), model.getSource(), model.getType());
|
||||
//广告商-总量
|
||||
//广告商-总量
|
||||
Map<String,Integer> map1 = new TreeMap<String,Integer>();
|
||||
//广告商-日期查询
|
||||
//广告商-日期查询
|
||||
Map<String,Map<String,Integer>> map2 = new HashMap<String,Map<String,Integer>>();
|
||||
if(model.getWay()==null || "1".equals(model.getWay())){
|
||||
adList(model,list,resultMap,map1,map2);
|
||||
@@ -93,7 +93,7 @@ public class AdvertisementOperationController {
|
||||
int todayCount = adLogService.todayCount();
|
||||
model.setTodayCount(todayCount);
|
||||
}
|
||||
//广告商页面
|
||||
//广告商页面
|
||||
private void adList(AdvertisementOperationModel model,List<AdLog> list,List<Map> resultMap,
|
||||
Map<String,Integer> map1,Map<String,Map<String,Integer>> map2){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd");
|
||||
@@ -120,7 +120,7 @@ public class AdvertisementOperationController {
|
||||
}
|
||||
|
||||
Map<String,Integer> adCountSumMap = sortValue(map1);
|
||||
int sumCount = 0;//第一条数据(数据量最大)
|
||||
int sumCount = 0;//第一条数据(数据量最大)
|
||||
for (String key : adCountSumMap.keySet()) {
|
||||
if(adCountSumMap.get(key) > sumCount){
|
||||
sumCount = adCountSumMap.get(key);
|
||||
@@ -128,7 +128,7 @@ public class AdvertisementOperationController {
|
||||
Map map = new HashMap();
|
||||
map.put("advertiser", key);
|
||||
map.put("count", map1.get(key));
|
||||
//查询全部数据,不显示日期分段数据
|
||||
//查询全部数据,不显示日期分段数据
|
||||
if(model.getStartDate()==null && model.getEndDate()==null && model.getDateType()==1){
|
||||
|
||||
}else{
|
||||
@@ -143,12 +143,12 @@ public class AdvertisementOperationController {
|
||||
model.setSumCount(sumCount);
|
||||
}
|
||||
|
||||
//页面页面
|
||||
//页面页面
|
||||
private void sourceList(AdvertisementOperationModel model,List<AdLog> list,List<Map> resultMap,
|
||||
Map<String,Integer> map1,Map<String,Map<String,Integer>> map2){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
||||
List<String> dateList = new LinkedList<String>();
|
||||
// 页面+时间 单日总量、类型数量
|
||||
// 页面+时间 单日总量、类型数量
|
||||
Map<String,Integer> detailMap = new HashMap<String,Integer>();
|
||||
for(AdLog adLog:list){
|
||||
if(map1.containsKey(adLog.getSource())){
|
||||
@@ -162,20 +162,20 @@ public class AdvertisementOperationController {
|
||||
dateList.add(dateStr);
|
||||
}
|
||||
if(dateList.contains(dateStr)){
|
||||
//判断当天页面不同类型下的数据是否已经存在
|
||||
//判断当天页面不同类型下的数据是否已经存在
|
||||
if(detailMap.containsKey(adLog.getSource()+dateStr+"_count")){
|
||||
detailMap.put(adLog.getSource()+dateStr+"_count", detailMap.get(adLog.getSource()+dateStr+"_count")+1);
|
||||
}else{
|
||||
detailMap.put(adLog.getSource()+dateStr+"_count", 1);
|
||||
}
|
||||
if("单独位".equals(adLog.getType())){
|
||||
if("单独位".equals(adLog.getType())){
|
||||
if(detailMap.containsKey(adLog.getSource()+dateStr+"_singleCount")){
|
||||
detailMap.put(adLog.getSource()+dateStr+"_singleCount", detailMap.get(adLog.getSource()+dateStr+"_singleCount")+1);
|
||||
}else{
|
||||
detailMap.put(adLog.getSource()+dateStr+"_singleCount", 1);
|
||||
}
|
||||
}
|
||||
if("轮播位".equals(adLog.getType())){
|
||||
if("轮播位".equals(adLog.getType())){
|
||||
if(detailMap.containsKey(adLog.getSource()+dateStr+"_aroundCount")){
|
||||
detailMap.put(adLog.getSource()+dateStr+"_aroundCount", detailMap.get(adLog.getSource()+dateStr+"_aroundCount")+1);
|
||||
}else{
|
||||
@@ -208,7 +208,7 @@ public class AdvertisementOperationController {
|
||||
@Override
|
||||
public int compare(Entry<String, Integer> o1,
|
||||
Entry<String, Integer> o2) {
|
||||
return o2.getValue().compareTo(o1.getValue());//倒序
|
||||
return o2.getValue().compareTo(o1.getValue());//倒序
|
||||
}
|
||||
});
|
||||
Map<String,Integer> adCountSumMap = new LinkedHashMap<String,Integer>();
|
||||
|
||||
+16
-16
@@ -23,14 +23,14 @@ public class AnalyResultController {
|
||||
|
||||
public Object totalLineAction(AnalyResultModel model){
|
||||
if(null != model.getDayBefore()){
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), model.getDayBefore())))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), model.getDayBefore())))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 1))));
|
||||
}
|
||||
if(StringUtils.isBlank(model.getCityDisplay())){
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 8)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 8)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 1))));
|
||||
}
|
||||
|
||||
@@ -66,12 +66,12 @@ public class AnalyResultController {
|
||||
JSONArray pt1 = new JSONArray(), pt2 = new JSONArray(),
|
||||
pt3 = new JSONArray(), pt4 = new JSONArray(),
|
||||
pt5 = new JSONArray(), pt6 = new JSONArray();
|
||||
jo1.put("name", "二手房");
|
||||
jo2.put("name", "租房");
|
||||
jo3.put("name", "写字楼出售");
|
||||
jo4.put("name", "写字楼出租");
|
||||
jo5.put("name", "商铺出售");
|
||||
jo6.put("name", "商铺出租");
|
||||
jo1.put("name", "二手房");
|
||||
jo2.put("name", "租房");
|
||||
jo3.put("name", "写字楼出售");
|
||||
jo4.put("name", "写字楼出租");
|
||||
jo5.put("name", "商铺出售");
|
||||
jo6.put("name", "商铺出租");
|
||||
for(AnalyTotalBo vo : bos){
|
||||
Date date = DateUtil.parseFormatDate(vo.getDateStr());
|
||||
long tms = date.getTime();
|
||||
@@ -173,7 +173,7 @@ public class AnalyResultController {
|
||||
model.setVts("1-2-3-4-5-6");
|
||||
}
|
||||
|
||||
//查询所有的数据
|
||||
//查询所有的数据
|
||||
List<AnalyResult> list = analyResultService.findAnalyResults(model.getCityDisplay(), model.getSiteName(),
|
||||
DateUtil.parseDate(String.valueOf(model.getSdateStart()), "yyyyMMdd"), DateUtil.parseDate(String.valueOf(model.getSdateEnd()), "yyyyMMdd"));
|
||||
|
||||
@@ -194,7 +194,7 @@ public class AnalyResultController {
|
||||
model.setVts("1-2-3-4-5-6");
|
||||
}
|
||||
|
||||
//查询所有的数据
|
||||
//查询所有的数据
|
||||
List<AnalyResult> list = analyResultService.findAnalyResults(model.getCityDisplay(), model.getSiteName(),
|
||||
DateUtil.parseDate(String.valueOf(model.getSdateStart()), "yyyyMMdd"), DateUtil.parseDate(String.valueOf(model.getSdateEnd()), "yyyyMMdd"));
|
||||
|
||||
@@ -337,10 +337,10 @@ public class AnalyResultController {
|
||||
jo3 = new JSONObject(), jo4 = new JSONObject();
|
||||
JSONArray pt1 = new JSONArray(), pt2 = new JSONArray(),
|
||||
pt3 = new JSONArray(), pt4 = new JSONArray();
|
||||
jo1.put("name", "二手房解析错误");
|
||||
jo2.put("name", "租房解析错误");
|
||||
jo3.put("name", "二手房规则过滤");
|
||||
jo4.put("name", "租房规则过滤");
|
||||
jo1.put("name", "二手房解析错误");
|
||||
jo2.put("name", "租房解析错误");
|
||||
jo3.put("name", "二手房规则过滤");
|
||||
jo4.put("name", "租房规则过滤");
|
||||
for(AnalyTotalBo vo : bos){
|
||||
Date date = DateUtil.parseFormatDate(vo.getDateStr());
|
||||
long tms = date.getTime();
|
||||
@@ -462,7 +462,7 @@ public class AnalyResultController {
|
||||
|
||||
public Object failAnalyDetailPieAction(AnalyResultModel model){
|
||||
if(null != model.getDayBefore()){
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), model.getDayBefore())))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), model.getDayBefore())))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(new Date())));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* apiÓû§¿ªÍ¨µÈ¹ÜÀícontroller
|
||||
* api用户开通等管理controller
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
|
||||
+4
-4
@@ -34,9 +34,9 @@ import com.fangjia.service.open.OpenUriAnalyService;
|
||||
import com.fangjia.service.sql.UserService;
|
||||
|
||||
/**
|
||||
* API监控后台
|
||||
* API监控后台
|
||||
* @author yinjihuan
|
||||
* @date 2016年10月20日
|
||||
* @date 2016年10月20日
|
||||
*
|
||||
*/
|
||||
public class ApiMonitorController {
|
||||
@@ -149,7 +149,7 @@ public class ApiMonitorController {
|
||||
info.setUsername(user.getUserName());
|
||||
}
|
||||
|
||||
//统计当前接口剩余使用次数
|
||||
//统计当前接口剩余使用次数
|
||||
long totalCallCount = apiVisitCountService.findApiVisitTotalCountByUser(analy.getApiUserId().longValue(), analy.getUrl());
|
||||
try {
|
||||
ApiUserAuthority author = apiUserAuthorityService.findByUserId(analy.getApiUserId().longValue());
|
||||
@@ -171,7 +171,7 @@ public class ApiMonitorController {
|
||||
}
|
||||
}
|
||||
}
|
||||
//统计接口当前剩余时间
|
||||
//统计接口当前剩余时间
|
||||
Map<String, Date> deadLineMap = author.getDeadlineMap();
|
||||
if(deadLineMap != null) {
|
||||
if(analy.getUrl().equals("/property/transaction")){
|
||||
|
||||
+14
-14
@@ -30,9 +30,9 @@ import com.fangjia.service.sql.ApiUserService;
|
||||
import com.fangjia.service.sql.UserService;
|
||||
import com.fangjia.service.user.UsersInfoService;
|
||||
/**
|
||||
* 测试申请控制器
|
||||
* 测试申请控制器
|
||||
* @author yinjihuan
|
||||
* @date 2016年6月13日
|
||||
* @date 2016年6月13日
|
||||
*
|
||||
*/
|
||||
public class ApiTestApplyController {
|
||||
@@ -71,9 +71,9 @@ public class ApiTestApplyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入管理页面
|
||||
* 进入管理页面
|
||||
* @author yinjihuan
|
||||
* @date 2016年6月13日
|
||||
* @date 2016年6月13日
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -122,9 +122,9 @@ public class ApiTestApplyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批准申请
|
||||
* 批准申请
|
||||
* @author yinjihuan
|
||||
* @date 2016年6月8日
|
||||
* @date 2016年6月8日
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -134,7 +134,7 @@ public class ApiTestApplyController {
|
||||
try {
|
||||
FangJiaUser fjuser = fangJiaUserService.getUserById(model.getUserId());
|
||||
if(fjuser != null) {
|
||||
//判断是否已有API账号,没有则添加
|
||||
//判断是否已有API账号,没有则添加
|
||||
Long apiUserId = 0L;
|
||||
User old = userService.findByUserId(model.getUserId());
|
||||
if(old == null){
|
||||
@@ -163,17 +163,17 @@ public class ApiTestApplyController {
|
||||
} else {
|
||||
apiUserId = old.getId();
|
||||
}
|
||||
//加上测试申请的接口使用次数
|
||||
//加上测试申请的接口使用次数
|
||||
ApiTestApply apiTestApply = apiService.getTestApply(model.getUserId());
|
||||
String[] fields = apiTestApply.getTestFields().split(",");
|
||||
for (String field : fields) {
|
||||
apiUserAuthorityService.increaseVisitCount(apiUserId, "/property/transaction", field, 100, getMonthAfterTime());
|
||||
}
|
||||
//更新申请状态
|
||||
//更新申请状态
|
||||
apiService.approvalApply(model.getUserId());
|
||||
//发送短信
|
||||
//发送短信
|
||||
String format_fields = formatTestFields(apiTestApply.getTestFields());
|
||||
String message = "【房价网】您申请的"+format_fields+"接口免费测试已审核通过,您可以进行在线测试。";
|
||||
String message = "【房价网】您申请的"+format_fields+"接口免费测试已审核通过,您可以进行在线测试。";
|
||||
smsService.send(fjuser.getMobile(), message);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -185,9 +185,9 @@ public class ApiTestApplyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化测试字段,编码转成中文显示
|
||||
* 格式化测试字段,编码转成中文显示
|
||||
* @author yinjihuan
|
||||
* @date 2016年6月13日
|
||||
* @date 2016年6月13日
|
||||
* @param apiTestApply
|
||||
* @return
|
||||
*/
|
||||
@@ -207,7 +207,7 @@ public class ApiTestApplyController {
|
||||
private Date getMonthAfterTime() {
|
||||
Calendar cd = Calendar.getInstance();
|
||||
cd.setTime(new Date());
|
||||
cd.add(Calendar.MONTH, 1);//增加一个月
|
||||
cd.add(Calendar.MONTH, 1);//增加一个月
|
||||
return cd.getTime();
|
||||
}
|
||||
}
|
||||
|
||||
+16
-16
@@ -64,8 +64,8 @@ public class ApiTestController {
|
||||
//String filePath = request.getRealPath("/") +"file" + "\\" + model.getFileName()+".xls";
|
||||
String filePath = BkoffConfig.getConfig().getDownloadPath()+"\\downLoad\\" + model.getFileName()+".xls";
|
||||
|
||||
File file = new File(filePath);// path是根据日志路径和文件名拼接出来的
|
||||
String filename = file.getName();// 获取日志文件名称
|
||||
File file = new File(filePath);// path是根据日志路径和文件名拼接出来的
|
||||
String filename = file.getName();// 获取日志文件名称
|
||||
InputStream fis;
|
||||
try {
|
||||
fis = new BufferedInputStream(new FileInputStream(filePath));
|
||||
@@ -73,12 +73,12 @@ public class ApiTestController {
|
||||
fis.read(buffer);
|
||||
fis.close();
|
||||
response.reset();
|
||||
// 先去掉文件名称中的空格,然后转换编码格式为utf-8,保证不出现乱码,这个文件名称用于浏览器的下载框中自动显示的文件名
|
||||
// 先去掉文件名称中的空格,然后转换编码格式为utf-8,保证不出现乱码,这个文件名称用于浏览器的下载框中自动显示的文件名
|
||||
response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.replaceAll(" ", "").getBytes("utf-8"),"iso8859-1"));
|
||||
response.addHeader("Content-Length", "" + file.length());
|
||||
OutputStream os = new BufferedOutputStream(response.getOutputStream());
|
||||
response.setContentType("application/octet-stream");
|
||||
os.write(buffer);// 输出文件
|
||||
os.write(buffer);// 输出文件
|
||||
os.flush();
|
||||
os.close();
|
||||
} catch (Exception e) {
|
||||
@@ -101,7 +101,7 @@ public class ApiTestController {
|
||||
|
||||
//final String filePath = ActionContext.getContext().getRequest().getRealPath("/")+"file"+"\\";
|
||||
final String filePath = BkoffConfig.getConfig().getDownloadPath()+"\\"+"downLoad"+"\\" ;
|
||||
System.out.println("create:"+filePath+task.getFileName()+".xls");
|
||||
System.out.println("create:"+filePath+task.getFileName()+".xls");
|
||||
if(StringUtils.isNotBlank(model.getContent())){
|
||||
|
||||
Runnable myRunnable = new Runnable(){
|
||||
@@ -130,7 +130,7 @@ public class ApiTestController {
|
||||
if(StringUtils.isNotBlank(model.getId())){
|
||||
apiTaskService.deleteTask(model.getId());
|
||||
|
||||
//删除文件
|
||||
//删除文件
|
||||
//String filePath = ActionContext.getContext().getRequest().getRealPath("/")+"file"+"\\";
|
||||
String filePath = BkoffConfig.getConfig().getDownloadPath()+"\\downLoad\\";
|
||||
System.out.println("delete:"+filePath+model.getFileName()+".xls");
|
||||
@@ -146,13 +146,13 @@ public class ApiTestController {
|
||||
public void task(ApiTestModel model, String id, String filePath, String fileName) throws Exception{
|
||||
String[] fields = model.getUrlParams().split(",");
|
||||
List<String> fieldsList = new ArrayList<String>(Arrays.asList(fields));
|
||||
List<Map<String, String>> ret = getResult(model.getContent(), fieldsList);//文本结果格式化
|
||||
List<Map<String, String>> ret = getResult(model.getContent(), fieldsList);//文本结果格式化
|
||||
String token = getToken();
|
||||
|
||||
List<Map<String, Object>> lastMap = new ArrayList<Map<String, Object>>();
|
||||
|
||||
for(Map<String, String> params : ret){
|
||||
Map<String, Object> map = run(params, token, model.getUri());//接口调用
|
||||
Map<String, Object> map = run(params, token, model.getUri());//接口调用
|
||||
|
||||
for(String key : fieldsList){
|
||||
if(!map.containsKey(key)){
|
||||
@@ -161,18 +161,18 @@ public class ApiTestController {
|
||||
}
|
||||
|
||||
lastMap.add(map);
|
||||
fieldsList = getResultFlieds(map, fieldsList);//提取结果中key,做为excel标题
|
||||
fieldsList = getResultFlieds(map, fieldsList);//提取结果中key,做为excel标题
|
||||
}
|
||||
|
||||
for(Map<String, Object> map : lastMap){
|
||||
isExist(filePath);//是否存在该目录,不存在创建
|
||||
writeExcel(map, fieldsList, filePath, fileName);//写入excel
|
||||
isExist(filePath);//是否存在该目录,不存在创建
|
||||
writeExcel(map, fieldsList, filePath, fileName);//写入excel
|
||||
}
|
||||
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("status", 2);
|
||||
apiTaskService.updateTaskStatus(id, data);//修改任务状态
|
||||
System.out.println("任务完成......");
|
||||
apiTaskService.updateTaskStatus(id, data);//修改任务状态
|
||||
System.out.println("任务完成......");
|
||||
}
|
||||
|
||||
public List<String> getResultFlieds(Map<String, Object> map, List<String> fields ){
|
||||
@@ -207,7 +207,7 @@ public class ApiTestController {
|
||||
row.createCell((short)index).setCellValue(fields.get(index));
|
||||
}
|
||||
}
|
||||
if(rowNum==0){//创建标题
|
||||
if(rowNum==0){//创建标题
|
||||
row=sheet.createRow((short)(sheet.getPhysicalNumberOfRows()));
|
||||
for(int index=0 ; index < fields.size() ; index++){
|
||||
row.createCell((short)index).setCellValue(fields.get(index));
|
||||
@@ -240,14 +240,14 @@ public class ApiTestController {
|
||||
workbook.write(fOut);
|
||||
fOut.flush();
|
||||
fOut.close();
|
||||
System.out.println("文件生成...");
|
||||
System.out.println("文件生成...");
|
||||
return workbook;
|
||||
}
|
||||
|
||||
|
||||
public void isExist(String path) {
|
||||
File file = new File(path);
|
||||
//判断文件夹是否存在,如果不存在则创建文件夹
|
||||
//判断文件夹是否存在,如果不存在则创建文件夹
|
||||
if (!file.exists()) {
|
||||
file.mkdir();
|
||||
}
|
||||
|
||||
+10
-10
@@ -128,7 +128,7 @@ public class ApiTradeController {
|
||||
data.put("result", "fail");
|
||||
|
||||
if(StringUtils.isNotBlank(model.getId()) && model.getNumber()>=0 && model.getCost()!=null){
|
||||
String tradeNo = ObjectId.get().toString();//订单号
|
||||
String tradeNo = ObjectId.get().toString();//订单号
|
||||
ApiBuyApply apiBuyApply = apiBuyApplyService.findById(model.getId());
|
||||
apiBuyApply.setStatus(1);
|
||||
apiBuyApply.setApiCount(model.getNumber());
|
||||
@@ -139,14 +139,14 @@ public class ApiTradeController {
|
||||
}
|
||||
apiBuyApplyService.update(apiBuyApply);
|
||||
|
||||
//创建或更改API-USER的状态
|
||||
//创建或更改API-USER的状态
|
||||
FangJiaUser fjuser = fangJiaUserService.getUser(apiBuyApply.getMobile());
|
||||
increaseVisetCount(fjuser, "", apiBuyApply.getServiceId(), model.getNumber());
|
||||
|
||||
//增加购买记录
|
||||
//增加购买记录
|
||||
ApiPurchaseRecord apiPurchaseRecord = new ApiPurchaseRecord();
|
||||
apiPurchaseRecord.setOrderDate(new Date());
|
||||
apiPurchaseRecord.setChannel("线下");
|
||||
apiPurchaseRecord.setChannel("线下");
|
||||
apiPurchaseRecord.setOrderNumber(tradeNo);
|
||||
apiPurchaseRecord.setUserId(fjuser.getId());
|
||||
apiPurchaseRecord.setStatus("success");
|
||||
@@ -164,11 +164,11 @@ public class ApiTradeController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加api调用次数
|
||||
* @param fjuser 房价网对应的user
|
||||
* @param ip 请求来源IP
|
||||
* @param subServiceCode 产品码
|
||||
* @param count 增加的次数
|
||||
* 增加api调用次数
|
||||
* @param fjuser 房价网对应的user
|
||||
* @param ip 请求来源IP
|
||||
* @param subServiceCode 产品码
|
||||
* @param count 增加的次数
|
||||
* @throws Exception
|
||||
*/
|
||||
private void increaseVisetCount(FangJiaUser fjuser, String ip, String subServiceCode, int count) throws Exception {
|
||||
@@ -202,7 +202,7 @@ public class ApiTradeController {
|
||||
apiUserId = old.getId();
|
||||
apiUserService.update(ImmutableMap.<String, Object>of("city", "all"), apiUserId);
|
||||
}
|
||||
//更新次数
|
||||
//更新次数
|
||||
apiUserAuthorityService.increaseVisitCount(apiUserId, "/property/transaction", subServiceCode, count, new SimpleDateFormat("yyyy").parse("2099"));
|
||||
}
|
||||
|
||||
|
||||
+97
-97
@@ -64,7 +64,7 @@ import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* api用户开通等管理controller
|
||||
* api用户开通等管理controller
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
@@ -86,19 +86,19 @@ public class ApiUserController {
|
||||
private RegionBlockService regionBlockService;
|
||||
|
||||
/**
|
||||
* 所有api用户的信息展示
|
||||
* 所有api用户的信息展示
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object listAction(ApiUserModel model) {
|
||||
/**
|
||||
* open中公开出的接口资源 ApiUserAuthority 用户的权限信息
|
||||
* open中公开出的接口资源 ApiUserAuthority 用户的权限信息
|
||||
*
|
||||
* @param ApiUser
|
||||
* :用户的资料信息
|
||||
* :用户的资料信息
|
||||
* @param ApiUser
|
||||
* :用户的appKey username、等资料
|
||||
* :用户的appKey username、等资料
|
||||
*/
|
||||
ArrayList<QueryParam> queryParams = new ArrayList<QueryParam>();
|
||||
if (model.getStatus() != null) {
|
||||
@@ -178,7 +178,7 @@ public class ApiUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增api用户的信息
|
||||
* 新增api用户的信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -190,7 +190,7 @@ public class ApiUserController {
|
||||
public Object doAddAction(ApiUserModel model) throws Exception {
|
||||
if (StringUtils.isBlank(model.getDisplayName()) || StringUtils.isBlank(model.getUserName())
|
||||
|| StringUtils.isBlank(model.getPassword())) {
|
||||
model.setMsg("昵称,用户名,密码不能为空");
|
||||
model.setMsg("昵称,用户名,密码不能为空");
|
||||
model.forward("/apiUser/add");
|
||||
return model;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public class ApiUserController {
|
||||
apiUser.setIsMonitorUsed(model.getIsMonitorUsed());
|
||||
apiUser.setIsWarnExpired(model.getIsWarnExpired());
|
||||
this.apiUserService.save(apiUser);
|
||||
// 新增用户,默认挂牌价改为默认评估价
|
||||
// 新增用户,默认挂牌价改为默认评估价
|
||||
model.setPriceType("2B");
|
||||
modifyUserCfg(id, ApiUserCfg.ApiUserCfgKey.PRICE_TYPE, model.getPriceType());
|
||||
if (model.getEvaluateRate() != null && model.getEvaluateRate() != 0) {
|
||||
@@ -237,17 +237,17 @@ public class ApiUserController {
|
||||
apiUserCfg.setCfgValue(model.getEvaluateRate());
|
||||
this.apiUserCfgService.save(apiUserCfg, ApiUserCfg.ApiUserCfgKey.EVALUATE_RATE);
|
||||
}
|
||||
model.setMsg("新建成功!");
|
||||
model.setMsg("新建成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
model.setMsg("新建失败!");
|
||||
model.setMsg("新建失败!");
|
||||
}
|
||||
model.redirect("/apiUser/add?msg=" + URLEncoder.encode(model.getMsg(), "UTF-8"));
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑api用户信息
|
||||
* 编辑api用户信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -287,13 +287,13 @@ public class ApiUserController {
|
||||
|
||||
model.setApiUserBo(bo);
|
||||
if (StringUtils.isNotBlank(model.getMsg()) && model.getMsg().equals("success")) {
|
||||
model.setMsg("更新成功!");
|
||||
model.setMsg("更新成功!");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户登录状态
|
||||
* 修改用户登录状态
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -309,7 +309,7 @@ public class ApiUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动修改api用户appkey值
|
||||
* 手动修改api用户appkey值
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -334,9 +334,9 @@ public class ApiUserController {
|
||||
dataApiUser.put("isMonitorUsed",model.getIsMonitorUsed());
|
||||
dataApiUser.put("isWarnExpired",model.getIsWarnExpired());
|
||||
this.apiUserService.update(dataApiUser, userId);
|
||||
// 更改用户密码
|
||||
// 更改用户密码
|
||||
// this.userService.updateById(user,userId);
|
||||
// 刷新缓存
|
||||
// 刷新缓存
|
||||
// this.apiUserService.clearApiUserAuthorityCache(userId);
|
||||
|
||||
|
||||
@@ -355,9 +355,9 @@ public class ApiUserController {
|
||||
Map<String, Object> user = new HashMap<String, Object>();
|
||||
user.put("password", DigestUtils.md5Hex(model.getPassword()));
|
||||
//
|
||||
// // 更改用户密码
|
||||
// // 更改用户密码
|
||||
this.userService.updateById(user, userId);
|
||||
// 刷新缓存
|
||||
// 刷新缓存
|
||||
this.apiUserService.clearApiUserAuthorityCache(userId);
|
||||
|
||||
model.setViewType("redirect");
|
||||
@@ -410,7 +410,7 @@ public class ApiUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置appkey值,默认为userid md5加上useridmd5再md5, 64位
|
||||
* 重置appkey值,默认为userid md5加上useridmd5再md5, 64位
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -432,7 +432,7 @@ public class ApiUserController {
|
||||
model.setViewParam("config", null);
|
||||
User user = userService.findByUserName(model.getUserName());
|
||||
if (user != null) {
|
||||
model.setMsg("此用户名已经存在!");
|
||||
model.setMsg("此用户名已经存在!");
|
||||
return model;
|
||||
}
|
||||
return model;
|
||||
@@ -468,11 +468,11 @@ public class ApiUserController {
|
||||
model.setDisplayName(user.getDisplayName() == null ? "" : user.getDisplayName());
|
||||
model.setProvinceList(getProvinceList());
|
||||
model.setCityFirstLetters(Arrays.asList(getCityFirstLetter()));
|
||||
List<ServerArea> serverAreaList = serverAreaService.findAll();// Load城市列表
|
||||
if (StringUtils.isBlank(model.getType()) || "all".equals(model.getType())) {// 字母分组列表
|
||||
List<ServerArea> serverAreaList = serverAreaService.findAll();// Load城市列表
|
||||
if (StringUtils.isBlank(model.getType()) || "all".equals(model.getType())) {// 字母分组列表
|
||||
model.setServerAreaList(null);
|
||||
} else { // 首字母查询
|
||||
List<Map<String, Object>> serverAreaLetterList = new ArrayList<Map<String, Object>>();// Load城市列表
|
||||
} else { // 首字母查询
|
||||
List<Map<String, Object>> serverAreaLetterList = new ArrayList<Map<String, Object>>();// Load城市列表
|
||||
for (ServerArea serverArea : serverAreaList) {
|
||||
if (serverArea.getSpell().substring(0, 1).toUpperCase().equals(model.getType())) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
@@ -504,10 +504,10 @@ public class ApiUserController {
|
||||
model.setServerAreaList(serverAreaLetterList);
|
||||
}
|
||||
|
||||
StringBuffer openCitys = new StringBuffer();// Load城市列表
|
||||
StringBuffer openCitys = new StringBuffer();// Load城市列表
|
||||
if (StringUtils.isBlank(apiUser.getCity())) {
|
||||
} else if ("all".equals(apiUser.getCity())) {
|
||||
openCitys.append("全部城市");
|
||||
openCitys.append("全部城市");
|
||||
} else {
|
||||
int cnt = 0;
|
||||
if (StringUtils.isNotBlank(apiUser.getCity()) && !apiUser.getCity().endsWith(",")) {
|
||||
@@ -524,7 +524,7 @@ public class ApiUserController {
|
||||
}
|
||||
}
|
||||
}
|
||||
openCitys.append(";</br>共" + cnt + "个城市");
|
||||
openCitys.append(";</br>共" + cnt + "个城市");
|
||||
}
|
||||
model.setOpenCitys(openCitys.toString());
|
||||
model.setCitys(apiUser.getCity());
|
||||
@@ -628,19 +628,19 @@ public class ApiUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有api用户的信息展示
|
||||
* 所有api用户的信息展示
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object authAction(ApiUserModel model) throws IllegalAccessException {
|
||||
/**
|
||||
* OpenResource open中公开出的接口资源 User 本地user ApiUserAuthority 用户的权限信息
|
||||
* OpenResource open中公开出的接口资源 User 本地user ApiUserAuthority 用户的权限信息
|
||||
*
|
||||
* @param ApiUser
|
||||
* :用户的资料信息
|
||||
* :用户的资料信息
|
||||
* @param AuthorityBo
|
||||
* :用户的appKey username、等资料
|
||||
* :用户的appKey username、等资料
|
||||
*/
|
||||
List<QueryParam> queryParams = Arrays.asList(new QueryParam("pubStatus", 1));
|
||||
List<OpenResource> openResourceList = openResourceService.findOpenResource(queryParams);
|
||||
@@ -655,7 +655,7 @@ public class ApiUserController {
|
||||
model.setDisplayName(user.getDisplayName() == null ? "" : user.getDisplayName());
|
||||
Map<String, Integer> urisMap = authority.getOpenResourseUrisMap();
|
||||
|
||||
// 用户有的uri
|
||||
// 用户有的uri
|
||||
String flag = model.getMsg();
|
||||
List<OpenResource> userResources = new ArrayList<OpenResource>();
|
||||
|
||||
@@ -673,7 +673,7 @@ public class ApiUserController {
|
||||
}
|
||||
}
|
||||
|
||||
// 改成遍历用户有的uri
|
||||
// 改成遍历用户有的uri
|
||||
for (OpenResource openResource : userResources) {
|
||||
AuthorityBo bo = new AuthorityBo();
|
||||
BeanUtils.copyProperties(openResource, bo);
|
||||
@@ -764,7 +764,7 @@ public class ApiUserController {
|
||||
totalCountMap = new HashMap<String, Integer>();
|
||||
}
|
||||
Integer count = model.getSum();
|
||||
//增加次数修改日志
|
||||
//增加次数修改日志
|
||||
ApiCountLog apiCountLog = new ApiCountLog();
|
||||
if (countMap != null && countMap.containsKey(model.getUri())) {
|
||||
String bkoffUserId = (String) ThreadLocalData.getInstance().get(ThreadLocalKey.UserId);
|
||||
@@ -779,13 +779,13 @@ public class ApiUserController {
|
||||
apiCountLog.setOldCount(oldCount);
|
||||
apiCountLog.setNewCount(count);
|
||||
if (count > oldCount) {
|
||||
apiCountLog.setOperate("增加" + (count - oldCount) + "次");
|
||||
apiCountLog.setOperate("增加" + (count - oldCount) + "次");
|
||||
} else if (oldCount > count) {
|
||||
apiCountLog.setOperate("减少" + (oldCount - count) + "次");
|
||||
apiCountLog.setOperate("减少" + (oldCount - count) + "次");
|
||||
}
|
||||
|
||||
apiCountLog.setOperateTime(new Date());
|
||||
// 次数改变了再记录
|
||||
// 次数改变了再记录
|
||||
if (!count.equals(oldCount)) {
|
||||
apiCountLogService.save(apiCountLog);
|
||||
}
|
||||
@@ -820,7 +820,7 @@ public class ApiUserController {
|
||||
apiUserAuthorityService.update(authority);
|
||||
}
|
||||
}
|
||||
// 刷新缓存
|
||||
// 刷新缓存
|
||||
this.apiUserService.clearApiUserAuthorityCache(userId);
|
||||
return model;
|
||||
}
|
||||
@@ -967,7 +967,7 @@ public class ApiUserController {
|
||||
}
|
||||
}
|
||||
|
||||
return "{name:'访问量',data:[" + s + "]}";
|
||||
return "{name:'访问量',data:[" + s + "]}";
|
||||
}
|
||||
|
||||
private String toSeries2(Map<Object, Object> map, List<List<String>> dates) {
|
||||
@@ -980,9 +980,9 @@ public class ApiUserController {
|
||||
int count = (Integer) map.get(date);
|
||||
|
||||
if (i + 1 == dateList.size()) {
|
||||
String name = "上周";
|
||||
String name = "上周";
|
||||
if (k == 1) {
|
||||
name = "最近7天";
|
||||
name = "最近7天";
|
||||
}
|
||||
temp = "{name:'" + name + "',data:[" + temp + String.valueOf(count) + "]}";
|
||||
} else {
|
||||
@@ -1077,10 +1077,10 @@ public class ApiUserController {
|
||||
} else {
|
||||
cities = new ArrayList<String>();
|
||||
}
|
||||
// 只查询正式账号
|
||||
// 只查询正式账号
|
||||
List<QueryParam> queryParams = Arrays.asList(new QueryParam("isTest", 0));
|
||||
List<ApiUser> apiUsers = this.apiUserService.findApiUsersByParamsSortDate(queryParams);
|
||||
// 获取正式账号的ids
|
||||
// 获取正式账号的ids
|
||||
List<Integer> ids = new ArrayList<Integer>();
|
||||
for (ApiUser apiUser : apiUsers) {
|
||||
ids.add((int) apiUser.getId());
|
||||
@@ -1192,30 +1192,30 @@ public class ApiUserController {
|
||||
|
||||
long diffInMillies = Math.abs(endDate.getTime() - startDate.getTime());
|
||||
|
||||
// 将毫秒转换为天数
|
||||
long days = diffInMillies / (1000 * 60 * 60 * 24); // 使用long来计算天数
|
||||
// 将毫秒转换为天数
|
||||
long days = diffInMillies / (1000 * 60 * 60 * 24); // 使用long来计算天数
|
||||
|
||||
// 只查询正式账号、未过期、未禁用
|
||||
// 只查询正式账号、未过期、未禁用
|
||||
List<QueryParam> queryParams = Arrays.asList(new QueryParam("isTest", 0),
|
||||
new QueryParam("status", 0),
|
||||
new QueryParam("deadTime", QueryParam.GREATER_THAN_EQUAL_OPERATOR, new Date()));
|
||||
List<ApiUser> apiUsers = this.apiUserService.findApiUsersByParamsSortDate(queryParams);
|
||||
|
||||
//所有API
|
||||
//所有API
|
||||
List<OpenResource> allApi = openResourceService.findAll();
|
||||
// 所有API的URI与name对应Map
|
||||
// 所有API的URI与name对应Map
|
||||
Map<String, String> apiMap = converMapData(allApi);
|
||||
List<StatAnalyBo> bosAll = new ArrayList<StatAnalyBo>();
|
||||
if (CollectionUtils.isNotEmpty(apiUsers)) {
|
||||
// 根据访问遍历用户
|
||||
// 根据访问遍历用户
|
||||
for (ApiUser apiUser : apiUsers) {
|
||||
long id = apiUser.getId();
|
||||
// 获取每个用户的访问
|
||||
// 获取每个用户的访问
|
||||
ApiUserAuthority authority = apiUserAuthorityService.findByUserId(id);
|
||||
// 用户有的api
|
||||
// 用户有的api
|
||||
List<String> userApi = authority.getOpenResourseUris();
|
||||
Map<String, Integer> countMap = authority.getTotalCountMap();
|
||||
// 获取用户名
|
||||
// 获取用户名
|
||||
User user = userService.findById(id);
|
||||
long date = DateUtil.parseStringToDate("2016-11-23").getTime();
|
||||
if (startDate.getTime() >= date && endDate.getTime() > date) {
|
||||
@@ -1236,13 +1236,13 @@ public class ApiUserController {
|
||||
Map<String, Map<String, Integer>> weekResultMap = getCountByUri(weekApiInvokeStatisticalList);
|
||||
Map<String, Map<String, Integer>> monthResultMap = getCountByUri(monthApiInvokeStatisticalList);
|
||||
|
||||
// 遍历用户所有的api
|
||||
// 遍历用户所有的api
|
||||
for (String url : userApi) {
|
||||
// 统计用过的api
|
||||
// 统计用过的api
|
||||
String urlName = apiMap.get(url);
|
||||
StatAnalyBo bo = new StatAnalyBo();
|
||||
if (resultMap.containsKey(url)) {
|
||||
// 自定义时间的数据
|
||||
// 自定义时间的数据
|
||||
bo.setSuccessEffectiveTime(resultMap.get(url).get("successEffectiveCount"));
|
||||
bo.setSuccessInvalidTime(resultMap.get(url).get("successInvalidCount"));
|
||||
bo.setDefeatTime(resultMap.get(url).get("defeatCount"));
|
||||
@@ -1251,7 +1251,7 @@ public class ApiUserController {
|
||||
bo.setDailyUse(dailyUse);
|
||||
}
|
||||
if (weekResultMap.containsKey(url)) {
|
||||
// 近一周数据
|
||||
// 近一周数据
|
||||
bo.setWeekSuccessEffectiveTime(weekResultMap.get(url).get("successEffectiveCount"));
|
||||
bo.setWeekSuccessInvalidTime(weekResultMap.get(url).get("successInvalidCount"));
|
||||
bo.setWeekDefeatTime(weekResultMap.get(url).get("defeatCount"));
|
||||
@@ -1260,11 +1260,11 @@ public class ApiUserController {
|
||||
bo.setWeekDailyUse(dailyUse);
|
||||
}
|
||||
if (monthResultMap.containsKey(url)) {
|
||||
// 成功有效次数
|
||||
// 成功有效次数
|
||||
bo.setMonthSuccessEffectiveTime(monthResultMap.get(url).get("successEffectiveCount"));
|
||||
// 成功无效次数
|
||||
// 成功无效次数
|
||||
bo.setMonthSuccessInvalidTime(monthResultMap.get(url).get("successInvalidCount"));
|
||||
// 失败次数
|
||||
// 失败次数
|
||||
bo.setMonthDefeatTime(monthResultMap.get(url).get("defeatCount"));
|
||||
bo.setMonthCount(monthResultMap.get(url).get("totalCount"));
|
||||
double dailyUse = bo.getMonthCount() * 1.0 / 30;
|
||||
@@ -1276,7 +1276,7 @@ public class ApiUserController {
|
||||
bo.setDeadline(apiUser.getDeadTime());
|
||||
bo.setUserId((int) id);
|
||||
bo.setUserName(user.getDisplayName());
|
||||
//剩余调用量
|
||||
//剩余调用量
|
||||
long curVistedCount = apiVisitCountService.findApiVisitCountByDay(id, url, DateUtil.truncateDay(new Date()));
|
||||
long historyCount = apiVisitCountService.findApiVisitAllCount(id, url, DateUtil.truncateDay(new Date()));
|
||||
if (countMap != null && countMap.containsKey(url)) {
|
||||
@@ -1306,10 +1306,10 @@ public class ApiUserController {
|
||||
row.add(bo.getUrl() != null ? bo.getUrl().toString() : "");
|
||||
row.add(bo.getUrlName() != null ? bo.getUrlName().toString() : "");
|
||||
row.add(bo.getSurplusCallCount() != null ? bo.getSurplusCallCount().toString() : "");
|
||||
// 上周
|
||||
// 上周
|
||||
row.add(bo.getWeekCount() != null ? bo.getWeekCount().toString() : "");
|
||||
if (bo.getWeekDailyUse() != null) {
|
||||
// 格式化为保留一位小数的字符串
|
||||
// 格式化为保留一位小数的字符串
|
||||
String formattedDailyUse = String.format("%.1f", bo.getWeekDailyUse());
|
||||
row.add(formattedDailyUse);
|
||||
} else {
|
||||
@@ -1318,10 +1318,10 @@ public class ApiUserController {
|
||||
row.add(bo.getWeekSuccessEffectiveTime() != null ? bo.getWeekSuccessEffectiveTime().toString() : "");
|
||||
row.add(bo.getWeekSuccessInvalidTime() != null ? bo.getWeekSuccessInvalidTime().toString() : "");
|
||||
row.add(bo.getWeekDefeatTime() != null ? bo.getWeekDefeatTime().toString() : "");
|
||||
// 上个月
|
||||
// 上个月
|
||||
row.add(bo.getMonthCount() != null ? bo.getMonthCount().toString() : "");
|
||||
if (bo.getMonthDailyUse() != null) {
|
||||
// 格式化为保留一位小数的字符串
|
||||
// 格式化为保留一位小数的字符串
|
||||
String formattedDailyUse = String.format("%.1f", bo.getMonthDailyUse());
|
||||
row.add(formattedDailyUse);
|
||||
} else {
|
||||
@@ -1330,10 +1330,10 @@ public class ApiUserController {
|
||||
row.add(bo.getMonthSuccessEffectiveTime() != null ? bo.getMonthSuccessEffectiveTime().toString() : "");
|
||||
row.add(bo.getMonthSuccessInvalidTime() != null ? bo.getMonthSuccessInvalidTime().toString() : "");
|
||||
row.add(bo.getMonthDefeatTime() != null ? bo.getMonthDefeatTime().toString() : "");
|
||||
// 自定义时间
|
||||
// 自定义时间
|
||||
row.add(bo.getCount() != null ? bo.getCount().toString() : "");
|
||||
if (bo.getDailyUse() != null) {
|
||||
// 格式化为保留一位小数的字符串
|
||||
// 格式化为保留一位小数的字符串
|
||||
String formattedDailyUse = String.format("%.1f", bo.getDailyUse());
|
||||
row.add(formattedDailyUse);
|
||||
} else {
|
||||
@@ -1345,27 +1345,27 @@ public class ApiUserController {
|
||||
dataList.add(row);
|
||||
}
|
||||
|
||||
String dateStr = "(" + DateUtils.format(startDate, "yyyy/MM/dd") + "—" + DateUtils.format(endDate, "yyyy/MM/dd") + ")";
|
||||
String fileName = "用户账号使用统计" + dateStr + ".xlsx";
|
||||
String dateStr = "(" + DateUtils.format(startDate, "yyyy/MM/dd") + "—" + DateUtils.format(endDate, "yyyy/MM/dd") + ")";
|
||||
String fileName = "用户账号使用统计" + dateStr + ".xlsx";
|
||||
// ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build();
|
||||
String displayName = URLEncoder.encode(fileName, "UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + displayName + "\"");
|
||||
response.setContentType("application/x-download;charset=utf-8");
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
Sheet sheet = workbook.createSheet("用户账号使用统计");
|
||||
Sheet sheet = workbook.createSheet("用户账号使用统计");
|
||||
List<String> head = Arrays.asList(
|
||||
"用户ID", "账号", "合同到期时间", "接口", "接口名称", "剩余使用次数",
|
||||
"访问次数(近一周)", "日均访问量(近一周)", "成功并有效(近一周)", "成功并无效(近一周)", "失败次数(近一周)",
|
||||
"访问次数(近一月)", "日均访问量(近一月)", "成功并有效(近一月)", "成功并无效(近一月)", "失败次数(近一月)",
|
||||
"访问次数" + dateStr, "日均访问量" + dateStr, "成功并有效" + dateStr, "成功并无效" + dateStr, "失败次数" + dateStr
|
||||
"用户ID", "账号", "合同到期时间", "接口", "接口名称", "剩余使用次数",
|
||||
"访问次数(近一周)", "日均访问量(近一周)", "成功并有效(近一周)", "成功并无效(近一周)", "失败次数(近一周)",
|
||||
"访问次数(近一月)", "日均访问量(近一月)", "成功并有效(近一月)", "成功并无效(近一月)", "失败次数(近一月)",
|
||||
"访问次数" + dateStr, "日均访问量" + dateStr, "成功并有效" + dateStr, "成功并无效" + dateStr, "失败次数" + dateStr
|
||||
);
|
||||
// 创建表头
|
||||
// 创建表头
|
||||
Row headRow = sheet.createRow(0);
|
||||
for (int i = 0; i < head.size(); i++) {
|
||||
Cell cell = headRow.createCell(i);
|
||||
cell.setCellValue(head.get(i));
|
||||
}
|
||||
// 写入数据,从第二行
|
||||
// 写入数据,从第二行
|
||||
for (int i = 0; i < dataList.size(); i++) {
|
||||
Row row = sheet.createRow(i + 1);
|
||||
List<String> data = dataList.get(i);
|
||||
@@ -1563,7 +1563,7 @@ public class ApiUserController {
|
||||
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||
cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||
HSSFSheet sheet = workbook.createSheet("数据导出");
|
||||
HSSFSheet sheet = workbook.createSheet("数据导出");
|
||||
HSSFRow row = sheet.createRow(0);
|
||||
HSSFCell cell0 = row.createCell(0);
|
||||
HSSFCell cell1 = row.createCell(1);
|
||||
@@ -1571,12 +1571,12 @@ public class ApiUserController {
|
||||
HSSFCell cell3 = row.createCell(3);
|
||||
HSSFCell cell4 = row.createCell(4);
|
||||
HSSFCell cell5 = row.createCell(5);
|
||||
cell0.setCellValue("城市");
|
||||
cell1.setCellValue("调用总量");
|
||||
cell2.setCellValue("成功调用次数");
|
||||
cell3.setCellValue("占比");
|
||||
cell4.setCellValue("失败调用次数");
|
||||
cell5.setCellValue("占比");
|
||||
cell0.setCellValue("城市");
|
||||
cell1.setCellValue("调用总量");
|
||||
cell2.setCellValue("成功调用次数");
|
||||
cell3.setCellValue("占比");
|
||||
cell4.setCellValue("失败调用次数");
|
||||
cell5.setCellValue("占比");
|
||||
if (null != eachCityBos) {
|
||||
for (int i = 0; i < eachCityBos.size(); i++) {
|
||||
HSSFRow rows = sheet.createRow(i + 1);
|
||||
@@ -1933,15 +1933,15 @@ public class ApiUserController {
|
||||
if (bo.getKey().equals("level_0")) {
|
||||
array.put("0s");
|
||||
} else if (bo.getKey().equals("level_1")) {
|
||||
array.put("1s以下");
|
||||
array.put("1s以下");
|
||||
} else if (bo.getKey().equals("level_2")) {
|
||||
array.put("1-2s以下");
|
||||
array.put("1-2s以下");
|
||||
} else if (bo.getKey().equals("level_3")) {
|
||||
array.put("2-3s以下");
|
||||
array.put("2-3s以下");
|
||||
} else if (bo.getKey().equals("level_4")) {
|
||||
array.put("3s以上");
|
||||
array.put("3s以上");
|
||||
} else if (bo.getKey().equals("level_100")) {
|
||||
array.put("暂无数据");
|
||||
array.put("暂无数据");
|
||||
} else {
|
||||
array.put(bo.getKey());
|
||||
}
|
||||
@@ -1956,7 +1956,7 @@ public class ApiUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面查询条件
|
||||
* 页面查询条件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -1967,10 +1967,10 @@ public class ApiUserController {
|
||||
}
|
||||
private List<String> getProvinceList(){
|
||||
List<String> provinces = Arrays.asList(
|
||||
"山东", "福建", "河北", "河南", "湖北", "湖南", "江西", "海南",
|
||||
"黑龙江", "陕西", "贵州", "新疆", "江苏", "安徽", "西藏",
|
||||
"吉林", "山西", "甘肃", "宁夏", "四川", "浙江", "广西",
|
||||
"云南", "直辖市", "内蒙古", "辽宁", "广东", "青海"
|
||||
"山东", "福建", "河北", "河南", "湖北", "湖南", "江西", "海南",
|
||||
"黑龙江", "陕西", "贵州", "新疆", "江苏", "安徽", "西藏",
|
||||
"吉林", "山西", "甘肃", "宁夏", "四川", "浙江", "广西",
|
||||
"云南", "直辖市", "内蒙古", "辽宁", "广东", "青海"
|
||||
);
|
||||
return provinces;
|
||||
}
|
||||
@@ -2152,9 +2152,9 @@ public class ApiUserController {
|
||||
String province = "";
|
||||
if (city.getProvince() == null || city.getProvince() == "") {
|
||||
province = null;
|
||||
} else if (city.getProvince().equals("上海") || city.getProvince().equals("北京") || city.getProvince().equals("天津")
|
||||
|| city.getProvince().equals("重庆")) {
|
||||
province = "直辖市";
|
||||
} else if (city.getProvince().equals("上海") || city.getProvince().equals("北京") || city.getProvince().equals("天津")
|
||||
|| city.getProvince().equals("重庆")) {
|
||||
province = "直辖市";
|
||||
} else {
|
||||
province = city.getProvince();
|
||||
}
|
||||
@@ -2209,8 +2209,8 @@ public class ApiUserController {
|
||||
private String spell;
|
||||
private String name;
|
||||
private List<RegionBlock> cityRegion;
|
||||
private int haveDistrict; // 0:没有 , > 0:有
|
||||
private Map<String, Integer> cityRegionHaveDistrict; // 区域有无小区统计 0:没有
|
||||
private int haveDistrict; // 0:没有 , > 0:有
|
||||
private Map<String, Integer> cityRegionHaveDistrict; // 区域有无小区统计 0:没有
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
|
||||
+4
-4
@@ -23,7 +23,7 @@ public class ArtemisLogController {
|
||||
|
||||
public Object ipListAction(ArtemisLogModel model){
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(new Date())));
|
||||
}
|
||||
if(StringUtils.isBlank(model.getStype())) {
|
||||
@@ -41,7 +41,7 @@ public class ArtemisLogController {
|
||||
|
||||
public Object loadIpDataAction(ArtemisLogModel model) {
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(new Date())));
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public class ArtemisLogController {
|
||||
|
||||
public Object typeListAction(ArtemisLogModel model){
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(new Date())));
|
||||
}
|
||||
if(StringUtils.isBlank(model.getStype())) {
|
||||
@@ -221,7 +221,7 @@ public class ArtemisLogController {
|
||||
|
||||
public Object loadTypeDataAction(ArtemisLogModel model) {
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(new Date(), 30)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(new Date())));
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -29,14 +29,14 @@ public class AuditHouseController {
|
||||
private ReportHouseService reportHouseService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* 列表
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object listAction(HouseModel model) {
|
||||
if (model.getStatus() == null) {
|
||||
model.setStatus(2); // 未审核
|
||||
model.setStatus(2); // 未审核
|
||||
}
|
||||
|
||||
Pager pager = model.getPager(20);
|
||||
@@ -74,7 +74,7 @@ public class AuditHouseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房源
|
||||
* 删除房源
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -140,7 +140,7 @@ public class AuditHouseController {
|
||||
}
|
||||
|
||||
/***
|
||||
* 查看详情
|
||||
* 查看详情
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -272,13 +272,13 @@ public class AuditHouseController {
|
||||
}
|
||||
|
||||
public String stripHtml(String content) {
|
||||
// <p>段落替换为换行
|
||||
// <p>段落替换为换行
|
||||
content = content.replaceAll("<p .*?>", "\r\n");
|
||||
// <br><br/>替换为换行
|
||||
// <br><br/>替换为换行
|
||||
content = content.replaceAll("<br\\s*/?>", "\r\n");
|
||||
// 去掉其它的<>之间的东西
|
||||
// 去掉其它的<>之间的东西
|
||||
content = content.replaceAll("\\<.*?>", "");
|
||||
// 还原HTML
|
||||
// 还原HTML
|
||||
// content = HTMLDecoder.decode(content);
|
||||
return content;
|
||||
}
|
||||
|
||||
+11
-11
@@ -37,7 +37,7 @@ public class AutoController {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(AutoController.class);
|
||||
|
||||
/**
|
||||
* 自动完成词列表
|
||||
* 自动完成词列表
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -63,7 +63,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* 编辑
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -76,7 +76,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
if (auto.getCatCity() == null) {
|
||||
auto.setCatCity(Arrays.asList("none_全国"));
|
||||
auto.setCatCity(Arrays.asList("none_全国"));
|
||||
}
|
||||
|
||||
Object[] array = (Object[]) auto.getCatCity().toArray();
|
||||
@@ -88,18 +88,18 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* 保存
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object updateAction(AutoModel model) {
|
||||
if (StringUtils.isBlank(model.getKeyword())) {
|
||||
model.setMsg("keyword不能为空");
|
||||
model.setMsg("keyword不能为空");
|
||||
return model;
|
||||
}
|
||||
if (StringUtils.isBlank(model.getCatCityString())) {
|
||||
model.setCatCityString("none_全国");
|
||||
model.setCatCityString("none_全国");
|
||||
}
|
||||
|
||||
if ("1".equals(model.getType())) {
|
||||
@@ -108,12 +108,12 @@ public class AutoController {
|
||||
autoOperatorService.saveOrUpdate(model.getKeyword(), model.getCatCityString(), model.getInfoString());
|
||||
}
|
||||
|
||||
model.setMsg("修改成功");
|
||||
model.setMsg("修改成功");
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* 删除
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -128,7 +128,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新导入基础数据
|
||||
* 重新导入基础数据
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -140,7 +140,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入自动完成的基础数据
|
||||
* 导入自动完成的基础数据
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -160,7 +160,7 @@ public class AutoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 把小区导入到自动完成
|
||||
* 把小区导入到自动完成
|
||||
*
|
||||
* @param cityName
|
||||
*/
|
||||
|
||||
+210
-210
@@ -119,8 +119,8 @@ public class AverageStatisticsController {
|
||||
HSSFSheet sheet = wb.createSheet(model.getCityDisplay());
|
||||
initSheet(sheet);
|
||||
HSSFCellStyle setBorder = wb.createCellStyle();
|
||||
setBorder.setAlignment(CellStyle.ALIGN_CENTER);//水平居中
|
||||
setBorder.setVerticalAlignment(CellStyle.VERTICAL_CENTER);//垂直居中
|
||||
setBorder.setAlignment(CellStyle.ALIGN_CENTER);//水平居中
|
||||
setBorder.setVerticalAlignment(CellStyle.VERTICAL_CENTER);//垂直居中
|
||||
setBorder.setFillBackgroundColor((short)13);
|
||||
|
||||
|
||||
@@ -189,19 +189,19 @@ public class AverageStatisticsController {
|
||||
}
|
||||
}
|
||||
|
||||
String fileName = "房价对比(" + model.getShortDate() + ").xls";
|
||||
String fileName = "房价对比(" + model.getShortDate() + ").xls";
|
||||
OutputStream os =null;
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
@@ -220,7 +220,7 @@ public class AverageStatisticsController {
|
||||
|
||||
|
||||
|
||||
//初始化sheet,设置列数和每列宽度
|
||||
//初始化sheet,设置列数和每列宽度
|
||||
private void initSheet(HSSFSheet sheet){
|
||||
sheet.setColumnWidth(0, (int)(35.7 * 150));
|
||||
sheet.setColumnWidth(1, (int)(35.7 * 100));
|
||||
@@ -235,10 +235,10 @@ public class AverageStatisticsController {
|
||||
row.setRowStyle(style);
|
||||
//sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 3));
|
||||
|
||||
row.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
row.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
row.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("计算均价");
|
||||
row.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("可信度");
|
||||
row.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
row.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
row.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("计算均价");
|
||||
row.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("可信度");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, 0, 0));
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, 1, 1));
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, 2, 2));
|
||||
@@ -247,26 +247,26 @@ public class AverageStatisticsController {
|
||||
if(fields.contains("level")){
|
||||
cellNum = cellNum +1;
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, cellNum, cellNum));
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("价格等级");
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("价格等级");
|
||||
}
|
||||
|
||||
if(fields.contains("lastAvgPrice")){
|
||||
cellNum = cellNum +1;
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, cellNum, cellNum));
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("修正价格");
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("修正价格");
|
||||
}
|
||||
|
||||
|
||||
if(fields.contains("maxDeviate")){
|
||||
cellNum = cellNum +1;
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, cellNum, cellNum));
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("均价偏离最大");
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("均价偏离最大");
|
||||
}
|
||||
|
||||
if(fields.contains("artificialPrice")){
|
||||
cellNum = cellNum +1;
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, cellNum, cellNum));
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("人工修改");
|
||||
row.createCell(cellNum, HSSFCell.CELL_TYPE_STRING).setCellValue("人工修改");
|
||||
}
|
||||
|
||||
HSSFRow row1=sheet.createRow(1);
|
||||
@@ -279,128 +279,128 @@ public class AverageStatisticsController {
|
||||
continue;
|
||||
}
|
||||
if(s.contains("lianjia")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("链家");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("链家");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
|
||||
if(s.contains("yungujia")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("云估价");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("云估价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
|
||||
if(s.contains("fanggugu")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("房估估");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("房估估");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
|
||||
if(s.contains("soufang")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
|
||||
if(s.contains("ganji")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("赶集");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("赶集");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
|
||||
if(s.contains("anjuke")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
if(s.contains("tuboshi")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("兔博士");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("兔博士");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
if(s.contains("centanet")){
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("中原");
|
||||
row.createCell(cellNum+1, HSSFCell.CELL_TYPE_STRING).setCellValue("中原");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, cellNum+1, cellNum+4));
|
||||
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+1, cellNum+2));
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, cellNum+3, cellNum+4));
|
||||
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 1, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 2, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(cellNum + 3, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(cellNum + 4, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
cellNum = cellNum +4;
|
||||
}
|
||||
}
|
||||
@@ -409,74 +409,74 @@ public class AverageStatisticsController {
|
||||
|
||||
|
||||
|
||||
/*row.createCell(5, HSSFCell.CELL_TYPE_STRING).setCellValue("中介调查");
|
||||
row.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("用户反馈");
|
||||
/*row.createCell(5, HSSFCell.CELL_TYPE_STRING).setCellValue("中介调查");
|
||||
row.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("用户反馈");
|
||||
|
||||
row.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房");
|
||||
row.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 7, 10));
|
||||
row.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
row.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 11, 14));
|
||||
row.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("新浪乐居");
|
||||
row.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("新浪乐居");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 15, 18));
|
||||
row.createCell(19, HSSFCell.CELL_TYPE_STRING).setCellValue("克尔瑞");
|
||||
row.createCell(19, HSSFCell.CELL_TYPE_STRING).setCellValue("克尔瑞");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 19, 22));
|
||||
row.createCell(23, HSSFCell.CELL_TYPE_STRING).setCellValue("赶集网");
|
||||
row.createCell(23, HSSFCell.CELL_TYPE_STRING).setCellValue("赶集网");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 23, 26));
|
||||
HSSFRow row1=sheet.createRow(1);
|
||||
row1.setRowStyle(style);
|
||||
row1.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
row1.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 0, 0));
|
||||
row1.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
row1.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 1, 1));
|
||||
row1.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("计算均价");
|
||||
row1.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("计算均价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 2, 2));
|
||||
row1.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("可信度");
|
||||
row1.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("可信度");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 3, 3));
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, 4, 4));
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, 5, 5));
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 2, 6, 6));
|
||||
row1.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 7, 8));
|
||||
row1.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 9, 10));
|
||||
row1.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 11, 12));
|
||||
row1.createCell(13, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(13, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 13, 14));
|
||||
row1.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 15, 16));
|
||||
row1.createCell(17, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(17, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 17, 18));
|
||||
row1.createCell(19, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(19, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 19, 20));
|
||||
row1.createCell(21, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(21, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 21, 22));
|
||||
row1.createCell(23, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
row1.createCell(23, HSSFCell.CELL_TYPE_STRING).setCellValue("新房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 23, 24));
|
||||
row1.createCell(25, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
row1.createCell(25, HSSFCell.CELL_TYPE_STRING).setCellValue("二手房");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 25, 26));
|
||||
HSSFRow row2 = sheet.createRow(2);
|
||||
row2.setRowStyle(style);
|
||||
row2.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(13, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(14, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(16, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(17, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(18, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(19, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(20, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(21, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(22, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(23, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(24, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(25, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(26, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");*/
|
||||
row2.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(13, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(14, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(16, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(17, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(18, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(19, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(20, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(21, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(22, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(23, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(24, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(25, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(26, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");*/
|
||||
}
|
||||
|
||||
public Object exportOfficeExcelAction(AverageStatisticsModel model){
|
||||
@@ -490,8 +490,8 @@ public class AverageStatisticsController {
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
HSSFSheet sheet = wb.createSheet(model.getCityDisplay());
|
||||
HSSFCellStyle setBorder = wb.createCellStyle();
|
||||
setBorder.setAlignment(CellStyle.ALIGN_CENTER);//水平居中
|
||||
setBorder.setVerticalAlignment(CellStyle.ALIGN_CENTER);//垂直居中
|
||||
setBorder.setAlignment(CellStyle.ALIGN_CENTER);//水平居中
|
||||
setBorder.setVerticalAlignment(CellStyle.ALIGN_CENTER);//垂直居中
|
||||
setBorder.setFillBackgroundColor((short)13);
|
||||
initOfficeTableHeader(sheet,setBorder);
|
||||
List<AverageStatistics> list = averageStatisticsDao.find("office",model.getCityDisplay(), model.getShortDate(),model.getRegion(),model.getName(),model.getLevel(),model.getMaxDeviate(),null ,model.getOrderby(), Boolean.valueOf(model.getAsc()),model.getDiffField(),model.getMin(),model.getMax(),null);
|
||||
@@ -544,19 +544,19 @@ public class AverageStatisticsController {
|
||||
}
|
||||
i++;
|
||||
}
|
||||
String fileName = "写字楼均价对比(" + model.getShortDate() + ").xls";
|
||||
String fileName = "写字楼均价对比(" + model.getShortDate() + ").xls";
|
||||
OutputStream os =null;
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
@@ -579,52 +579,52 @@ public class AverageStatisticsController {
|
||||
HSSFRow row=sheet.createRow(0);
|
||||
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 1));
|
||||
row.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("房价网");
|
||||
row.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("房价网");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 2, 3));
|
||||
row.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房网");
|
||||
row.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房网");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 4, 7));
|
||||
row.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
row.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 8, 11));
|
||||
row.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("中国写字楼网");
|
||||
row.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("中国写字楼网");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0,12, 15));
|
||||
row.setRowStyle(style);
|
||||
HSSFRow row1=sheet.createRow(1);
|
||||
row1.setRowStyle(style);
|
||||
row1.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
row1.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 0, 0));
|
||||
row1.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
row1.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 1, 1));
|
||||
row1.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
row1.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 2, 2));
|
||||
row1.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
row1.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 3, 3));
|
||||
|
||||
row1.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
row1.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 4, 5));
|
||||
row1.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
row1.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 6, 7));
|
||||
row1.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
row1.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 8, 9));
|
||||
row1.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
row1.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 10, 11));
|
||||
row1.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
row1.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 12, 13));
|
||||
row1.createCell(14, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
row1.createCell(14, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 14, 15));
|
||||
HSSFRow row2 = sheet.createRow(2);
|
||||
row2.setRowStyle(style);
|
||||
row2.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(5, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(13, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(14, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(5, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(13, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(14, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(15, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
}
|
||||
public Object exportShopExcelAction(AverageStatisticsModel model){
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {
|
||||
@@ -637,8 +637,8 @@ public class AverageStatisticsController {
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
HSSFSheet sheet = wb.createSheet(model.getCityDisplay());
|
||||
HSSFCellStyle setBorder = wb.createCellStyle();
|
||||
setBorder.setAlignment(CellStyle.ALIGN_CENTER);//水平居中
|
||||
setBorder.setVerticalAlignment(CellStyle.VERTICAL_CENTER);//垂直居中
|
||||
setBorder.setAlignment(CellStyle.ALIGN_CENTER);//水平居中
|
||||
setBorder.setVerticalAlignment(CellStyle.VERTICAL_CENTER);//垂直居中
|
||||
setBorder.setFillBackgroundColor((short)13);
|
||||
initShopTableHeader(sheet,setBorder);
|
||||
List<AverageStatistics> list = averageStatisticsDao.find("shop",model.getCityDisplay(), model.getShortDate(),model.getRegion(),model.getName(),model.getLevel(),model.getMaxDeviate(),null ,model.getOrderby(), Boolean.valueOf(model.getAsc()),model.getDiffField(),model.getMin(),model.getMax(), null);
|
||||
@@ -693,19 +693,19 @@ public class AverageStatisticsController {
|
||||
row.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue( StringUtils.isEmpty(estate) ? "": estate);
|
||||
i++;
|
||||
}
|
||||
String fileName = "商铺均价对比(" + model.getShortDate() + ").xls";
|
||||
String fileName = "商铺均价对比(" + model.getShortDate() + ").xls";
|
||||
OutputStream os =null;
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
@@ -727,42 +727,42 @@ public class AverageStatisticsController {
|
||||
HSSFRow row=sheet.createRow(0);
|
||||
row.setRowStyle(style);
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 1));
|
||||
row.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("房价网");
|
||||
row.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("房价网");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 2, 3));
|
||||
row.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房网");
|
||||
row.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("搜房网");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 4, 7));
|
||||
row.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
row.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("安居客");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 8, 11));
|
||||
HSSFRow row1=sheet.createRow(1);
|
||||
row1.setRowStyle(style);
|
||||
row1.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
row1.createCell(0, HSSFCell.CELL_TYPE_STRING).setCellValue("区域");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 0, 0));
|
||||
row1.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
row1.createCell(1, HSSFCell.CELL_TYPE_STRING).setCellValue("名称");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 1, 1));
|
||||
row1.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
row1.createCell(2, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 2, 2));
|
||||
row1.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
row1.createCell(3, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, 3, 3));
|
||||
|
||||
row1.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
row1.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 4, 5));
|
||||
row1.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
row1.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 6, 7));
|
||||
row1.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
row1.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("售价");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 8, 9));
|
||||
row1.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
row1.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("租金");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 10, 11));
|
||||
HSSFRow row2 = sheet.createRow(2);
|
||||
row2.setRowStyle(style);
|
||||
row2.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(5, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("物业类型");
|
||||
row2.createCell(4, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(5, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(6, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(7, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(8, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(9, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(10, HSSFCell.CELL_TYPE_STRING).setCellValue("价格");
|
||||
row2.createCell(11, HSSFCell.CELL_TYPE_STRING).setCellValue("差比");
|
||||
row2.createCell(12, HSSFCell.CELL_TYPE_STRING).setCellValue("物业类型");
|
||||
}
|
||||
|
||||
public Object summaryAction(AverageStatisticsModel model){
|
||||
@@ -787,9 +787,9 @@ public class AverageStatisticsController {
|
||||
int row =0;
|
||||
for(int i=7;i>=-8;i--){
|
||||
if(i==7){
|
||||
data[row][0]="70以上";
|
||||
data[row][0]="70以上";
|
||||
}else if(i==-8){
|
||||
data[row][0]="-70以下";
|
||||
data[row][0]="-70以下";
|
||||
}else{
|
||||
data[row][0]=(i*10)+"~"+((i+1)*10);
|
||||
}
|
||||
@@ -830,15 +830,15 @@ public class AverageStatisticsController {
|
||||
x.remove(0);
|
||||
String[] sites = {"soufang_new","anjuke_new","sina_new","cric_new","soufang_esf","anjuke_esf","sina_esf","cric_esf","ganji_esf"};
|
||||
Map<String,String> citiesNamesMap =new HashMap<String,String>();
|
||||
citiesNamesMap.put("soufang_new", "搜房新房");
|
||||
citiesNamesMap.put("anjuke_new", "安居客新房");
|
||||
citiesNamesMap.put("sina_new", "新浪新房");
|
||||
citiesNamesMap.put("cric_new", "克尔瑞新房");
|
||||
citiesNamesMap.put("soufang_esf", "搜房二手房");
|
||||
citiesNamesMap.put("anjuke_esf", "安居客二手房");
|
||||
citiesNamesMap.put("sina_esf", "新浪二手房");
|
||||
citiesNamesMap.put("cric_esf", "克尔瑞二手房");
|
||||
citiesNamesMap.put("ganji_esf", "赶集网二手房");
|
||||
citiesNamesMap.put("soufang_new", "搜房新房");
|
||||
citiesNamesMap.put("anjuke_new", "安居客新房");
|
||||
citiesNamesMap.put("sina_new", "新浪新房");
|
||||
citiesNamesMap.put("cric_new", "克尔瑞新房");
|
||||
citiesNamesMap.put("soufang_esf", "搜房二手房");
|
||||
citiesNamesMap.put("anjuke_esf", "安居客二手房");
|
||||
citiesNamesMap.put("sina_esf", "新浪二手房");
|
||||
citiesNamesMap.put("cric_esf", "克尔瑞二手房");
|
||||
citiesNamesMap.put("ganji_esf", "赶集网二手房");
|
||||
BasicDBList y = new BasicDBList();
|
||||
BasicDBObject unit ;
|
||||
for(String site:sites){
|
||||
@@ -885,9 +885,9 @@ public class AverageStatisticsController {
|
||||
int row =0;
|
||||
for(int i=7;i>=-8;i--){
|
||||
if(i==7){
|
||||
data[row][0]="70以上";
|
||||
data[row][0]="70以上";
|
||||
}else if(i==-8){
|
||||
data[row][0]="-70以下";
|
||||
data[row][0]="-70以下";
|
||||
}else{
|
||||
data[row][0]=(i*10)+"~"+((i+1)*10);
|
||||
}
|
||||
@@ -937,9 +937,9 @@ public class AverageStatisticsController {
|
||||
int row =0;
|
||||
for(int i=7;i>=-8;i--){
|
||||
if(i==7){
|
||||
data[row][0]="70以上";
|
||||
data[row][0]="70以上";
|
||||
}else if(i==-8){
|
||||
data[row][0]="-70以下";
|
||||
data[row][0]="-70以下";
|
||||
}else{
|
||||
data[row][0]=(i*10)+"~"+((i+1)*10);
|
||||
}
|
||||
@@ -962,7 +962,7 @@ public class AverageStatisticsController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询基准数据
|
||||
* 查询基准数据
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -977,18 +977,18 @@ public class AverageStatisticsController {
|
||||
public Object expectAction(AverageStatisticsModel model) {
|
||||
List<List<String>> data=new ArrayList<List<String>>();
|
||||
List<String> list=new ArrayList<String>();
|
||||
list.add("城市");
|
||||
list.add("区域");
|
||||
list.add("小区名");
|
||||
list.add("价格");
|
||||
list.add("是否加入指导价");
|
||||
list.add("调查时间");
|
||||
list.add("调查人");
|
||||
list.add("来源");
|
||||
list.add("来源小区名");
|
||||
list.add("城市");
|
||||
list.add("区域");
|
||||
list.add("小区名");
|
||||
list.add("价格");
|
||||
list.add("是否加入指导价");
|
||||
list.add("调查时间");
|
||||
list.add("调查人");
|
||||
list.add("来源");
|
||||
list.add("来源小区名");
|
||||
data.add(list);
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
HSSFSheet sheet = workbook.createSheet("导入模板");
|
||||
HSSFSheet sheet = workbook.createSheet("导入模板");
|
||||
HSSFRow row = sheet.createRow(0);
|
||||
HSSFCell cell0 = row.createCell(0);
|
||||
HSSFCell cell1 = row.createCell(1);
|
||||
@@ -999,15 +999,15 @@ public class AverageStatisticsController {
|
||||
HSSFCell cell6 = row.createCell(6);
|
||||
HSSFCell cell7 = row.createCell(7);
|
||||
HSSFCell cell8 = row.createCell(8);
|
||||
cell0.setCellValue("城市");
|
||||
cell1.setCellValue("区域");
|
||||
cell2.setCellValue("小区名");
|
||||
cell3.setCellValue("价格");
|
||||
cell4.setCellValue("是否加入指导价");
|
||||
cell5.setCellValue("调查时间");
|
||||
cell6.setCellValue("调查人");
|
||||
cell7.setCellValue("来源");
|
||||
cell8.setCellValue("来源小区名");
|
||||
cell0.setCellValue("城市");
|
||||
cell1.setCellValue("区域");
|
||||
cell2.setCellValue("小区名");
|
||||
cell3.setCellValue("价格");
|
||||
cell4.setCellValue("是否加入指导价");
|
||||
cell5.setCellValue("调查时间");
|
||||
cell6.setCellValue("调查人");
|
||||
cell7.setCellValue("来源");
|
||||
cell8.setCellValue("来源小区名");
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/x-download;charset=UTF-8");
|
||||
@@ -1024,7 +1024,7 @@ public class AverageStatisticsController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 调查数据
|
||||
* 调查数据
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -1043,7 +1043,7 @@ public class AverageStatisticsController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存调查结果
|
||||
* 保存调查结果
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -1072,7 +1072,7 @@ public class AverageStatisticsController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核调查结果
|
||||
* 审核调查结果
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -1102,7 +1102,7 @@ public class AverageStatisticsController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询准确率
|
||||
* 查询准确率
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -1149,7 +1149,7 @@ public class AverageStatisticsController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取调查记录列表
|
||||
* 获取调查记录列表
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ public class AveragerConfigController {
|
||||
List<ServerAreaBo> serverAreas = serverAreaService.findAllServerArea();
|
||||
Map<String, AveragerConfig> averagerConfigMap = getAllCityAveragerConfigMap();
|
||||
for (ServerAreaBo serverAreaBo : serverAreas) {
|
||||
if ("全国".equals(serverAreaBo.getDisplay())) {
|
||||
if ("全国".equals(serverAreaBo.getDisplay())) {
|
||||
continue;
|
||||
}
|
||||
AveragerConfig averagerConfig = averagerConfigMap.get(serverAreaBo.getDisplay());
|
||||
|
||||
+103
-103
@@ -72,9 +72,9 @@ import com.mongodb.DBObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* 说明:负责均价更新任务的管理工作
|
||||
* 说明:负责均价更新任务的管理工作
|
||||
*
|
||||
* @author 王文艳
|
||||
* @author 王文艳
|
||||
*
|
||||
*/
|
||||
public class AvgPriceUpdateController {
|
||||
@@ -96,17 +96,17 @@ public class AvgPriceUpdateController {
|
||||
private SeawaterService seawaterService;
|
||||
private static final List<String> IPS = Arrays.asList("fangjia-priceanalysis-0");
|
||||
|
||||
private static final List<String> HOT_CITIES = Arrays.asList("上海", "北京", "广州", "深圳", "天津", "重庆", "成都", "杭州", "南京", "长沙",
|
||||
"武汉", "西安", "沈阳");
|
||||
private static final List<String> HOT_CITIES = Arrays.asList("上海", "北京", "广州", "深圳", "天津", "重庆", "成都", "杭州", "南京", "长沙",
|
||||
"武汉", "西安", "沈阳");
|
||||
|
||||
public Object listQRAction(AvgPriceUpdateModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
Date sunday = DateUtil.getThisSunday(new Date());
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(sunday)));
|
||||
}
|
||||
|
||||
@@ -123,12 +123,12 @@ public class AvgPriceUpdateController {
|
||||
|
||||
public Object listSQRAction(AvgPriceUpdateModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
Date sunday = DateUtil.getThisSunday(new Date());
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(sunday)));
|
||||
}
|
||||
|
||||
@@ -144,12 +144,12 @@ public class AvgPriceUpdateController {
|
||||
|
||||
public Object loadQRDataAction(AvgPriceUpdateModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
Date sunday = DateUtil.getThisSunday(new Date());
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(sunday)));
|
||||
}
|
||||
|
||||
@@ -164,12 +164,12 @@ public class AvgPriceUpdateController {
|
||||
|
||||
public Object loadSQRDataAction(AvgPriceUpdateModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
Date sunday = DateUtil.getThisSunday(new Date());
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(sunday)));
|
||||
}
|
||||
|
||||
@@ -193,9 +193,9 @@ public class AvgPriceUpdateController {
|
||||
pt5 = new JSONArray(), pt6 = new JSONArray(), pt7 = new JSONArray(), pt8 = new JSONArray();
|
||||
|
||||
if("1".equals(stype)) {
|
||||
jo1.put("name", "一个月<10小区量");
|
||||
jo2.put("name", "一个月<30小区量");
|
||||
jo3.put("name", "一个月<100小区量");
|
||||
jo1.put("name", "一个月<10小区量");
|
||||
jo2.put("name", "一个月<30小区量");
|
||||
jo3.put("name", "一个月<100小区量");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + sqr.getMonthCount1() + "]"));
|
||||
@@ -203,9 +203,9 @@ public class AvgPriceUpdateController {
|
||||
pt3.add(JSONArray.fromObject("[" + tms + "," + sqr.getMonthCount3() + "]"));
|
||||
}
|
||||
}else if("2".equals(stype)) {
|
||||
jo1.put("name", "一个月<10比例");
|
||||
jo2.put("name", "一个月<30比例");
|
||||
jo3.put("name", "一个月<100比例");
|
||||
jo1.put("name", "一个月<10比例");
|
||||
jo2.put("name", "一个月<30比例");
|
||||
jo3.put("name", "一个月<100比例");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + (int)((double)sqr.getMonthCount1() / (double)sqr.getDistrictCount() * 1000.0) / 10.0 + "]"));
|
||||
@@ -213,9 +213,9 @@ public class AvgPriceUpdateController {
|
||||
pt3.add(JSONArray.fromObject("[" + tms + "," + (int)((double)sqr.getMonthCount3() / (double)sqr.getDistrictCount() * 1000.0) / 10.0+ "]"));
|
||||
}
|
||||
}else if("3".equals(stype)) {
|
||||
jo1.put("name", "季度<10小区量");
|
||||
jo2.put("name", "季度<30小区量");
|
||||
jo3.put("name", "季度<100小区量");
|
||||
jo1.put("name", "季度<10小区量");
|
||||
jo2.put("name", "季度<30小区量");
|
||||
jo3.put("name", "季度<100小区量");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + sqr.getQuarCount1() + "]"));
|
||||
@@ -223,9 +223,9 @@ public class AvgPriceUpdateController {
|
||||
pt3.add(JSONArray.fromObject("[" + tms + "," + sqr.getQuarCount3() + "]"));
|
||||
}
|
||||
}else if("4".equals(stype)) {
|
||||
jo1.put("name", "季度<10比例");
|
||||
jo2.put("name", "季度<30比例");
|
||||
jo3.put("name", "季度<100比例");
|
||||
jo1.put("name", "季度<10比例");
|
||||
jo2.put("name", "季度<30比例");
|
||||
jo3.put("name", "季度<100比例");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + (int)((double)sqr.getQuarCount1() / (double)sqr.getDistrictCount() * 1000.0) / 10.0 + "]"));
|
||||
@@ -233,9 +233,9 @@ public class AvgPriceUpdateController {
|
||||
pt3.add(JSONArray.fromObject("[" + tms + "," + (int)((double)sqr.getQuarCount3() / (double)sqr.getDistrictCount() * 1000.0) / 10.0+ "]"));
|
||||
}
|
||||
}else if("5".equals(stype)) {
|
||||
jo1.put("name", "半年<10小区量");
|
||||
jo2.put("name", "半年<30小区量");
|
||||
jo3.put("name", "半年<100小区量");
|
||||
jo1.put("name", "半年<10小区量");
|
||||
jo2.put("name", "半年<30小区量");
|
||||
jo3.put("name", "半年<100小区量");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + sqr.getHalfCount1() + "]"));
|
||||
@@ -243,9 +243,9 @@ public class AvgPriceUpdateController {
|
||||
pt3.add(JSONArray.fromObject("[" + tms + "," + sqr.getHalfCount3() + "]"));
|
||||
}
|
||||
}else if("6".equals(stype)) {
|
||||
jo1.put("name", "半年<10比例");
|
||||
jo2.put("name", "半年<30比例");
|
||||
jo3.put("name", "半年<100比例");
|
||||
jo1.put("name", "半年<10比例");
|
||||
jo2.put("name", "半年<30比例");
|
||||
jo3.put("name", "半年<100比例");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + (int)((double)sqr.getHalfCount1() / (double)sqr.getDistrictCount() * 1000.0) / 10.0 + "]"));
|
||||
@@ -253,9 +253,9 @@ public class AvgPriceUpdateController {
|
||||
pt3.add(JSONArray.fromObject("[" + tms + "," + (int)((double)sqr.getHalfCount3() / (double)sqr.getDistrictCount() * 1000.0) / 10.0+ "]"));
|
||||
}
|
||||
}else if("7".equals(stype)) {
|
||||
jo1.put("name", "一年<10小区量");
|
||||
jo2.put("name", "一年<30小区量");
|
||||
jo3.put("name", "一年<100小区量");
|
||||
jo1.put("name", "一年<10小区量");
|
||||
jo2.put("name", "一年<30小区量");
|
||||
jo3.put("name", "一年<100小区量");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + sqr.getYearCount1() + "]"));
|
||||
@@ -263,9 +263,9 @@ public class AvgPriceUpdateController {
|
||||
pt3.add(JSONArray.fromObject("[" + tms + "," + sqr.getYearCount3() + "]"));
|
||||
}
|
||||
}else if("8".equals(stype)) {
|
||||
jo1.put("name", "一年<10比例");
|
||||
jo2.put("name", "一年<30比例");
|
||||
jo3.put("name", "一年<100比例");
|
||||
jo1.put("name", "一年<10比例");
|
||||
jo2.put("name", "一年<30比例");
|
||||
jo3.put("name", "一年<100比例");
|
||||
for(SampleQualityReport sqr : sampleQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(sqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + (int)((double)sqr.getYearCount1() / (double)sqr.getDistrictCount() * 1000.0) / 10.0 + "]"));
|
||||
@@ -299,14 +299,14 @@ public class AvgPriceUpdateController {
|
||||
JSONArray pt1 = new JSONArray(), pt2 = new JSONArray(), pt3 = new JSONArray(), pt4 = new JSONArray(),
|
||||
pt5 = new JSONArray(), pt6 = new JSONArray(), pt7 = new JSONArray(), pt8 = new JSONArray();
|
||||
if("1".equals(stype)) {
|
||||
jo1.put("name", "小区量(全部)");
|
||||
jo2.put("name", "小区量(无法计算)");
|
||||
jo3.put("name", "小区量(指导价)");
|
||||
jo4.put("name", "小区量(自身样本)");
|
||||
jo5.put("name", "小区量(第三方)");
|
||||
jo6.put("name", "小区量(成交数据)");
|
||||
jo7.put("name", "小区量(周边小区)");
|
||||
jo8.put("name", "小区量(推算)");
|
||||
jo1.put("name", "小区量(全部)");
|
||||
jo2.put("name", "小区量(无法计算)");
|
||||
jo3.put("name", "小区量(指导价)");
|
||||
jo4.put("name", "小区量(自身样本)");
|
||||
jo5.put("name", "小区量(第三方)");
|
||||
jo6.put("name", "小区量(成交数据)");
|
||||
jo7.put("name", "小区量(周边小区)");
|
||||
jo8.put("name", "小区量(推算)");
|
||||
for(AveragerQualityReport aqr : averagerQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(aqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + aqr.getDistrictCount() + "]"));
|
||||
@@ -319,14 +319,14 @@ public class AvgPriceUpdateController {
|
||||
pt8.add(JSONArray.fromObject("[" + tms + "," + aqr.getDeriCount() + "]"));
|
||||
}
|
||||
}else if("2".equals(stype)) {
|
||||
jo1.put("name", "平均可信度(全部)");
|
||||
jo2.put("name", "平均可信度(无法计算)");
|
||||
jo3.put("name", "平均可信度(指导价)");
|
||||
jo4.put("name", "平均可信度(自身样本)");
|
||||
jo5.put("name", "平均可信度(第三方)");
|
||||
jo6.put("name", "平均可信度(成交数据)");
|
||||
jo7.put("name", "平均可信度(周边小区)");
|
||||
jo8.put("name", "平均可信度(推算)");
|
||||
jo1.put("name", "平均可信度(全部)");
|
||||
jo2.put("name", "平均可信度(无法计算)");
|
||||
jo3.put("name", "平均可信度(指导价)");
|
||||
jo4.put("name", "平均可信度(自身样本)");
|
||||
jo5.put("name", "平均可信度(第三方)");
|
||||
jo6.put("name", "平均可信度(成交数据)");
|
||||
jo7.put("name", "平均可信度(周边小区)");
|
||||
jo8.put("name", "平均可信度(推算)");
|
||||
for(AveragerQualityReport aqr : averagerQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(aqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
pt1.add(JSONArray.fromObject("[" + tms + "," + (int)(aqr.getAvgCredit() * 100000) + "]"));
|
||||
@@ -339,14 +339,14 @@ public class AvgPriceUpdateController {
|
||||
pt8.add(JSONArray.fromObject("[" + tms + "," + (int)(aqr.getDeriCredit() * 100000) + "]"));
|
||||
}
|
||||
}else if("3".equals(stype)) {
|
||||
jo1.put("name", "测试案例数量(全部)");
|
||||
jo2.put("name", "测试案例数量(无法计算)");
|
||||
jo3.put("name", "测试案例数量(指导价)");
|
||||
jo4.put("name", "测试案例数量(自身样本)");
|
||||
jo5.put("name", "测试案例数量(第三方)");
|
||||
jo6.put("name", "测试案例数量(成交数据)");
|
||||
jo7.put("name", "测试案例数量(周边小区)");
|
||||
jo8.put("name", "测试案例数量(推算)");
|
||||
jo1.put("name", "测试案例数量(全部)");
|
||||
jo2.put("name", "测试案例数量(无法计算)");
|
||||
jo3.put("name", "测试案例数量(指导价)");
|
||||
jo4.put("name", "测试案例数量(自身样本)");
|
||||
jo5.put("name", "测试案例数量(第三方)");
|
||||
jo6.put("name", "测试案例数量(成交数据)");
|
||||
jo7.put("name", "测试案例数量(周边小区)");
|
||||
jo8.put("name", "测试案例数量(推算)");
|
||||
for(AveragerQualityReport aqr : averagerQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(aqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
int allTest = aqr.getNoneTest() + aqr.getGuidingTest() + aqr.getOwnTest() + aqr.getThirdTest() + aqr.getDealTest() + aqr.getAroundTest() + aqr.getDeriTest();
|
||||
@@ -360,14 +360,14 @@ public class AvgPriceUpdateController {
|
||||
pt8.add(JSONArray.fromObject("[" + tms + "," + aqr.getDeriTest() + "]"));
|
||||
}
|
||||
}else if("4".equals(stype)) {
|
||||
jo1.put("name", "案例差比<10%量(全部)");
|
||||
jo2.put("name", "案例差比<10%量(无法计算)");
|
||||
jo3.put("name", "案例差比<10%量(指导价)");
|
||||
jo4.put("name", "案例差比<10%量(自身样本)");
|
||||
jo5.put("name", "案例差比<10%量(第三方)");
|
||||
jo6.put("name", "案例差比<10%量(成交数据)");
|
||||
jo7.put("name", "案例差比<10%量(周边小区)");
|
||||
jo8.put("name", "案例差比<10%量(推算)");
|
||||
jo1.put("name", "案例差比<10%量(全部)");
|
||||
jo2.put("name", "案例差比<10%量(无法计算)");
|
||||
jo3.put("name", "案例差比<10%量(指导价)");
|
||||
jo4.put("name", "案例差比<10%量(自身样本)");
|
||||
jo5.put("name", "案例差比<10%量(第三方)");
|
||||
jo6.put("name", "案例差比<10%量(成交数据)");
|
||||
jo7.put("name", "案例差比<10%量(周边小区)");
|
||||
jo8.put("name", "案例差比<10%量(推算)");
|
||||
for(AveragerQualityReport aqr : averagerQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(aqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
int allTest = aqr.getNoneTest() + aqr.getGuidingTest() + aqr.getOwnTest() + aqr.getThirdTest() + aqr.getDealTest() + aqr.getAroundTest() + aqr.getDeriTest();
|
||||
@@ -382,14 +382,14 @@ public class AvgPriceUpdateController {
|
||||
pt8.add(JSONArray.fromObject("[" + tms + "," + (int)((double)aqr.getDeriAccu1() / (double)allTest * 10000) / 100.0 + "]"));
|
||||
}
|
||||
}else if("5".equals(stype)) {
|
||||
jo1.put("name", "案例差比<20%量(全部)");
|
||||
jo2.put("name", "案例差比<20%量(无法计算)");
|
||||
jo3.put("name", "案例差比<20%量(指导价)");
|
||||
jo4.put("name", "案例差比<20%量(自身样本)");
|
||||
jo5.put("name", "案例差比<20%量(第三方)");
|
||||
jo6.put("name", "案例差比<20%量(成交数据)");
|
||||
jo7.put("name", "案例差比<20%量(周边小区)");
|
||||
jo8.put("name", "案例差比<20%量(推算)");
|
||||
jo1.put("name", "案例差比<20%量(全部)");
|
||||
jo2.put("name", "案例差比<20%量(无法计算)");
|
||||
jo3.put("name", "案例差比<20%量(指导价)");
|
||||
jo4.put("name", "案例差比<20%量(自身样本)");
|
||||
jo5.put("name", "案例差比<20%量(第三方)");
|
||||
jo6.put("name", "案例差比<20%量(成交数据)");
|
||||
jo7.put("name", "案例差比<20%量(周边小区)");
|
||||
jo8.put("name", "案例差比<20%量(推算)");
|
||||
for(AveragerQualityReport aqr : averagerQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(aqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
int allTest = aqr.getNoneTest() + aqr.getGuidingTest() + aqr.getOwnTest() + aqr.getThirdTest() + aqr.getDealTest() + aqr.getAroundTest() + aqr.getDeriTest();
|
||||
@@ -404,14 +404,14 @@ public class AvgPriceUpdateController {
|
||||
pt8.add(JSONArray.fromObject("[" + tms + "," + (int)((double)aqr.getDeriAccu2() / (double)allTest * 10000) / 100.0 + "]"));
|
||||
}
|
||||
}else if("6".equals(stype)) {
|
||||
jo1.put("name", "案例差比<30%量(全部)");
|
||||
jo2.put("name", "案例差比<30%量(无法计算)");
|
||||
jo3.put("name", "案例差比<30%量(指导价)");
|
||||
jo4.put("name", "案例差比<30%量(自身样本)");
|
||||
jo5.put("name", "案例差比<30%量(第三方)");
|
||||
jo6.put("name", "案例差比<30%量(成交数据)");
|
||||
jo7.put("name", "案例差比<30%量(周边小区)");
|
||||
jo8.put("name", "案例差比<30%量(推算)");
|
||||
jo1.put("name", "案例差比<30%量(全部)");
|
||||
jo2.put("name", "案例差比<30%量(无法计算)");
|
||||
jo3.put("name", "案例差比<30%量(指导价)");
|
||||
jo4.put("name", "案例差比<30%量(自身样本)");
|
||||
jo5.put("name", "案例差比<30%量(第三方)");
|
||||
jo6.put("name", "案例差比<30%量(成交数据)");
|
||||
jo7.put("name", "案例差比<30%量(周边小区)");
|
||||
jo8.put("name", "案例差比<30%量(推算)");
|
||||
for(AveragerQualityReport aqr : averagerQualityReports) {
|
||||
long tms = DateUtil.parseDate(String.valueOf(aqr.getWeekend()), "yyyyMMdd").getTime();
|
||||
int allTest = aqr.getNoneTest() + aqr.getGuidingTest() + aqr.getOwnTest() + aqr.getThirdTest() + aqr.getDealTest() + aqr.getAroundTest() + aqr.getDeriTest();
|
||||
@@ -585,7 +585,7 @@ public class AvgPriceUpdateController {
|
||||
if(startDate != null && endDate != null) {
|
||||
List<Date> weekends = DateUtil.getWeekendBetweenDates(startDate, endDate);
|
||||
if (weekends.isEmpty()) {
|
||||
json.put("msg", "你选择的日期不包含周末,请重新选择");
|
||||
json.put("msg", "你选择的日期不包含周末,请重新选择");
|
||||
return model;
|
||||
}
|
||||
for (Date weekend : weekends) {
|
||||
@@ -601,9 +601,9 @@ public class AvgPriceUpdateController {
|
||||
}
|
||||
|
||||
calcCommandService.save(cmds);
|
||||
json.put("msg", "任务保存成功,共保存" + cmds.size() + "条任务");
|
||||
json.put("msg", "任务保存成功,共保存" + cmds.size() + "条任务");
|
||||
|
||||
//均价修改,让小区也修改,为了福州可以识别被修改小区
|
||||
//均价修改,让小区也修改,为了福州可以识别被修改小区
|
||||
if(commands.size()>0){
|
||||
for (int i = 0, len = commands.size(); i < len; i++) {
|
||||
JSONObject command = (JSONObject) commands.get(i);
|
||||
@@ -644,7 +644,7 @@ public class AvgPriceUpdateController {
|
||||
cmd.setCalcType(1);
|
||||
} else {
|
||||
if (command.containsKey("startDate") && StringUtils.isNotBlank(command.getString("startDate"))) {
|
||||
Date startDate = DateUtil.parseDate(command.getString("startDate"), "yyyy-MM-dd");// 均价开始时间
|
||||
Date startDate = DateUtil.parseDate(command.getString("startDate"), "yyyy-MM-dd");// 均价开始时间
|
||||
if (weekend.before(startDate)) {
|
||||
return null;
|
||||
}
|
||||
@@ -704,13 +704,13 @@ public class AvgPriceUpdateController {
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String, Object> resMap = new HashMap<String, Object>();
|
||||
if(model.getAvgPrice() <= 0) {
|
||||
resMap.put("msg", "价格错误!");
|
||||
resMap.put("msg", "价格错误!");
|
||||
jsonModel.setJsonModel(resMap);
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
if(model.getWeekend() == null || model.getWeekend().getDay() > 0) {
|
||||
resMap.put("msg", "日期错误!");
|
||||
resMap.put("msg", "日期错误!");
|
||||
jsonModel.setJsonModel(resMap);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -723,25 +723,25 @@ public class AvgPriceUpdateController {
|
||||
city = model.getCityDisplay();
|
||||
region = model.getRegion();
|
||||
block = model.getBlock();
|
||||
cat = "板块";
|
||||
cat = "板块";
|
||||
}else if(StringUtils.isNotBlank(model.getCityDisplay()) && StringUtils.isNotBlank(model.getRegion()) && StringUtils.isBlank(model.getBlock())) {
|
||||
city = model.getCityDisplay();
|
||||
region = model.getRegion();
|
||||
cat = "区域";
|
||||
cat = "区域";
|
||||
}else if(StringUtils.isNotBlank(model.getCityDisplay()) && StringUtils.isBlank(model.getRegion()) && StringUtils.isBlank(model.getBlock())) {
|
||||
city = model.getCityDisplay();
|
||||
cat = "城市";
|
||||
cat = "城市";
|
||||
}
|
||||
|
||||
if(city == null || region == null || block == null) {
|
||||
resMap.put("msg", "城市区域板块错误!");
|
||||
resMap.put("msg", "城市区域板块错误!");
|
||||
jsonModel.setJsonModel(resMap);
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
RegionStat regionStat = regionStatService.findRegionStat(city, region, block, model.getWeekend());
|
||||
if (regionStat != null) {
|
||||
resMap.put("msg", "均价数据已存在!");
|
||||
resMap.put("msg", "均价数据已存在!");
|
||||
jsonModel.setJsonModel(resMap);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -790,7 +790,7 @@ public class AvgPriceUpdateController {
|
||||
}
|
||||
|
||||
/**a
|
||||
* 加载某个小区的房源信息
|
||||
* 加载某个小区的房源信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -843,7 +843,7 @@ public class AvgPriceUpdateController {
|
||||
|
||||
Set<String> regionsList = new LinkedHashSet<String>();
|
||||
regionsList.add(district.getRegion());
|
||||
//只有进行区域区分,才可以使用区域别名
|
||||
//只有进行区域区分,才可以使用区域别名
|
||||
if (isCaseRegion && isUseRegionAlias) {
|
||||
List<String> regionAlias = RegionData.getRegionAlias(district.getCity(), district.getRegion());
|
||||
if (regionAlias != null) {
|
||||
@@ -922,10 +922,10 @@ public class AvgPriceUpdateController {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (district.getEstateType2() != null && district.getEstateType2().indexOf("别墅") > -1) {
|
||||
district.setEstateType2("别墅");
|
||||
if (district.getEstateType2() != null && district.getEstateType2().indexOf("别墅") > -1) {
|
||||
district.setEstateType2("别墅");
|
||||
} else {
|
||||
district.setEstateType2("普通住宅");
|
||||
district.setEstateType2("普通住宅");
|
||||
}
|
||||
|
||||
model.setId(district.getId());
|
||||
@@ -970,7 +970,7 @@ public class AvgPriceUpdateController {
|
||||
|
||||
Map<DistrictKey, DistrictStatBo> statMap = districtStatService.findDistrictStat(Arrays.asList(districtKey), false);
|
||||
if(statMap != null && statMap.containsKey(districtKey)) {
|
||||
if (district.getEstateType2() != null && district.getEstateType2().indexOf("别墅") > -1) {
|
||||
if (district.getEstateType2() != null && district.getEstateType2().indexOf("别墅") > -1) {
|
||||
model.setDistrictStat(statMap.get(districtKey).getVillaDistrictStat());
|
||||
} else {
|
||||
model.setDistrictStat(statMap.get(districtKey).getDistrictStat());
|
||||
@@ -994,7 +994,7 @@ public class AvgPriceUpdateController {
|
||||
guiding.setCity(district.getCity());
|
||||
guiding.setRegion(district.getRegion());
|
||||
guiding.setName(district.getName());
|
||||
guiding.setEstateType(district.getEstateType2().indexOf("别墅") > -1 ? "别墅" : "普通住宅");
|
||||
guiding.setEstateType(district.getEstateType2().indexOf("别墅") > -1 ? "别墅" : "普通住宅");
|
||||
guidingPriceService.save(guiding);
|
||||
|
||||
JsonModel model = new JsonModel();
|
||||
@@ -1042,7 +1042,7 @@ public class AvgPriceUpdateController {
|
||||
guiding.setCity(district.getCity());
|
||||
guiding.setRegion(district.getRegion());
|
||||
guiding.setName(district.getName());
|
||||
guiding.setEstateType(district.getEstateType2().indexOf("别墅") > -1 ? "别墅" : "普通住宅");
|
||||
guiding.setEstateType(district.getEstateType2().indexOf("别墅") > -1 ? "别墅" : "普通住宅");
|
||||
guidingPriceService.save(guiding);
|
||||
json.setJsonModel(model);
|
||||
return json;
|
||||
|
||||
+7
-7
@@ -42,7 +42,7 @@ public class BeansController {
|
||||
private FjtUsersService fjtUsersService;
|
||||
private ServerAreaService serverAreaService;
|
||||
/**
|
||||
* 查询列表,默认空
|
||||
* 查询列表,默认空
|
||||
* @throws DateParseException
|
||||
*/
|
||||
public Object listAction(BeansModel model){
|
||||
@@ -309,23 +309,23 @@ public class BeansController {
|
||||
}
|
||||
|
||||
private void addNewBeanTask(){
|
||||
System.out.println("开始时间:"+new Date());
|
||||
System.out.println("开始时间:"+new Date());
|
||||
|
||||
List<ServerArea> serverAreas = serverAreaService.findAll();
|
||||
|
||||
String[] columns = {"city","region","block", "name","address","householdCount","developer","estateCompany","estateCharge","buildArea","allArea","finishBuildingDate","carSiteCount","undergroundCarSite"};
|
||||
|
||||
for(ServerArea serverArea : serverAreas){
|
||||
if(serverArea.getDisplay().equals("全国")){
|
||||
if(serverArea.getDisplay().equals("全国")){
|
||||
continue;
|
||||
}
|
||||
|
||||
addRows(serverArea.getDisplay(), "district", columns);
|
||||
//删除之前的任务
|
||||
//删除之前的任务
|
||||
beansTaskService.deleteBeansTaskByParams(serverArea.getDisplay(), DateUtil.truncateDay(new Date()));
|
||||
//beansTaskService.deleteBeansTaskByParams(serverArea.getDisplay(), null);
|
||||
}
|
||||
System.out.println("结束时间:"+new Date());
|
||||
System.out.println("结束时间:"+new Date());
|
||||
}
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ public class BeansController {
|
||||
params.add(new QueryParam("visible", 0));
|
||||
List<District> districts = districtService.findAllByParams(params, null, 0, 100000, columns);
|
||||
for(District district : districts){
|
||||
//信息字段在3个以下的,添到后台任务表
|
||||
//信息字段在3个以下的,添到后台任务表
|
||||
int score = getScore(district, columns);
|
||||
if(score < 3){
|
||||
BeansTask beansTask = new BeansTask();
|
||||
@@ -386,7 +386,7 @@ public class BeansController {
|
||||
}else if(obj instanceof String){
|
||||
if(StringUtils.isNotBlank(obj.toString())){
|
||||
String s = obj.toString().trim();
|
||||
List<String> list = Arrays.asList("无","暂无","暂无数据","暂无资料","暂无数据","待定","未知","不详","年","0.0","0000-00-00","-","--","---");
|
||||
List<String> list = Arrays.asList("无","暂无","暂无数据","暂无资料","暂无数据","待定","未知","不详","年","0.0","0000-00-00","-","--","---");
|
||||
if(s.length() > 0 && !list.contains(s)){
|
||||
System.out.println(s);
|
||||
score ++;
|
||||
|
||||
+7
-7
@@ -20,7 +20,7 @@ public class BuildingRatioController {
|
||||
private BuildingRatioService buildingRatioService;
|
||||
|
||||
/**
|
||||
* 新建楼栋系数信息
|
||||
* 新建楼栋系数信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -46,10 +46,10 @@ public class BuildingRatioController {
|
||||
buildingRatio.setAvg_price(model.getAvg_price());
|
||||
this.buildingRatioService.save(buildingRatio);
|
||||
|
||||
model.setMsg("新建成功!");
|
||||
model.setMsg("新建成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
model.setMsg("新建失败!");
|
||||
model.setMsg("新建失败!");
|
||||
}
|
||||
model.redirect("/buildingRatio/add?msg=" + URLEncoder.encode(model.getMsg(), "UTF-8"));
|
||||
return model;
|
||||
@@ -65,7 +65,7 @@ public class BuildingRatioController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改楼栋系数信息
|
||||
* 修改楼栋系数信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -127,7 +127,7 @@ public class BuildingRatioController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑api用户信息
|
||||
* 编辑api用户信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -149,7 +149,7 @@ public class BuildingRatioController {
|
||||
|
||||
model.setBuildingRatioBo(bo);
|
||||
if (StringUtils.isNotBlank(model.getMsg()) && model.getMsg().equals("success")) {
|
||||
model.setMsg("更新成功!");
|
||||
model.setMsg("更新成功!");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class BuildingRatioController {
|
||||
model.setViewParam("config", null);
|
||||
List<BuildingRatio> buildingRatioList = buildingRatioService.findAllByBuildingName(model.getCity_name(),model.getRegion(),model.getDistrict(),model.getBuilding_name());
|
||||
if (buildingRatioList.size()>0) {
|
||||
model.setMsg("此楼栋名称已经存在!");
|
||||
model.setMsg("此楼栋名称已经存在!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
+12
-12
@@ -38,7 +38,7 @@ public class BusinessController {
|
||||
pager.setPageSize(30);
|
||||
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("上海");
|
||||
model.setCityDisplay("上海");
|
||||
}
|
||||
|
||||
List<Object> mallIds = null;
|
||||
@@ -101,16 +101,16 @@ public class BusinessController {
|
||||
public Object getTagsAction(BusinessModel model) {
|
||||
model.setViewType("json");
|
||||
Map<String, List<String>> map = new HashMap<String, List<String>>();
|
||||
map.put("餐厅", Arrays.asList("本帮菜","蟹宴","杭帮菜","绍兴菜","宁波菜","淮扬菜","农家菜","其他江浙菜"));
|
||||
map.put("休闲娱乐", Arrays.asList("星巴克","上岛咖啡","真锅咖啡厅","迪欧咖啡"));
|
||||
map.put("丽人", Arrays.asList("美发","美容/SPA","瑜伽","舞蹈","美甲","瘦身纤体","化妆品","个性写真","齿科","整形"));
|
||||
map.put("结婚", Arrays.asList("婚纱摄影","婚宴","婚戒首饰","婚纱礼服"));
|
||||
map.put("亲子", Arrays.asList("幼儿教育","亲子摄影","亲子游乐","亲子购物"));
|
||||
// map.put("爱车", Arrays.asList("","","",""));
|
||||
// map.put("家装", Arrays.asList("","","",""));
|
||||
// map.put("生活服务", Arrays.asList("","","",""));
|
||||
// map.put("运动健身", Arrays.asList("","","",""));
|
||||
// map.put("购物", Arrays.asList("","","",""));
|
||||
map.put("餐厅", Arrays.asList("本帮菜","蟹宴","杭帮菜","绍兴菜","宁波菜","淮扬菜","农家菜","其他江浙菜"));
|
||||
map.put("休闲娱乐", Arrays.asList("星巴克","上岛咖啡","真锅咖啡厅","迪欧咖啡"));
|
||||
map.put("丽人", Arrays.asList("美发","美容/SPA","瑜伽","舞蹈","美甲","瘦身纤体","化妆品","个性写真","齿科","整形"));
|
||||
map.put("结婚", Arrays.asList("婚纱摄影","婚宴","婚戒首饰","婚纱礼服"));
|
||||
map.put("亲子", Arrays.asList("幼儿教育","亲子摄影","亲子游乐","亲子购物"));
|
||||
// map.put("爱车", Arrays.asList("","","",""));
|
||||
// map.put("家装", Arrays.asList("","","",""));
|
||||
// map.put("生活服务", Arrays.asList("","","",""));
|
||||
// map.put("运动健身", Arrays.asList("","","",""));
|
||||
// map.put("购物", Arrays.asList("","","",""));
|
||||
model.setTagsList(map.get(model.getBusinessType()));
|
||||
return model;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public class BusinessController {
|
||||
model.setMallId(districts.get(0).getId());
|
||||
}else{
|
||||
|
||||
model.setErrMsg("没有名称为:[ "+model.getMallName()+" ]的商铺!");
|
||||
model.setErrMsg("没有名称为:[ "+model.getMallName()+" ]的商铺!");
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class BusinessLoanController {
|
||||
|
||||
BusinessLoan businessLoan = model.getBusinessLoan();
|
||||
if (StringUtils.isNotBlank(businessLoan.getCity())) {
|
||||
businessLoan.setCitys(Arrays.asList(businessLoan.getCity().split(",|,")));
|
||||
businessLoan.setCitys(Arrays.asList(businessLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
businessLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class CarLoanController {
|
||||
|
||||
CarLoan carLoan = model.getCarLoan();
|
||||
if (StringUtils.isNotBlank(carLoan.getCity())) {
|
||||
carLoan.setCitys(Arrays.asList(carLoan.getCity().split(",|,")));
|
||||
carLoan.setCitys(Arrays.asList(carLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
carLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+149
-149
@@ -72,33 +72,33 @@ public class CityController {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(CityController.class);
|
||||
|
||||
/**
|
||||
* 按字母分组列表
|
||||
* 按字母分组列表
|
||||
*
|
||||
* @param serverAreaMap
|
||||
* @return
|
||||
*/
|
||||
private static Map<String, String> CITY_CODE_MAP = new HashMap<String, String>();
|
||||
static {
|
||||
CITY_CODE_MAP.put("大兴安岭", "大兴安岭地区");
|
||||
CITY_CODE_MAP.put("塔城", "塔城地区");
|
||||
CITY_CODE_MAP.put("山南", "山南地区");
|
||||
CITY_CODE_MAP.put("日喀则", "日喀则地区");
|
||||
CITY_CODE_MAP.put("毕节", "毕节地区");
|
||||
CITY_CODE_MAP.put("海东", "海东地区");
|
||||
CITY_CODE_MAP.put("海北", "海北藏族自治州");
|
||||
CITY_CODE_MAP.put("海南", "海南藏族自治州");
|
||||
CITY_CODE_MAP.put("铜仁", "铜仁地区");
|
||||
CITY_CODE_MAP.put("阿里", "阿里地区");
|
||||
CITY_CODE_MAP.put("昌都", "昌都地区");
|
||||
CITY_CODE_MAP.put("林芝", "林芝地区");
|
||||
CITY_CODE_MAP.put("那曲", "那曲地区");
|
||||
CITY_CODE_MAP.put("阿勒泰", "阿勒泰地区");
|
||||
CITY_CODE_MAP.put("巴音郭楞", "巴音郭楞蒙古自治州");
|
||||
CITY_CODE_MAP.put("哈密", "哈密地区");
|
||||
CITY_CODE_MAP.put("和田", "和田地区");
|
||||
CITY_CODE_MAP.put("喀什", "喀什地区");
|
||||
CITY_CODE_MAP.put("吐鲁番", "吐鲁番地区");
|
||||
CITY_CODE_MAP.put("双鸭山", "双鸭山市");
|
||||
CITY_CODE_MAP.put("大兴安岭", "大兴安岭地区");
|
||||
CITY_CODE_MAP.put("塔城", "塔城地区");
|
||||
CITY_CODE_MAP.put("山南", "山南地区");
|
||||
CITY_CODE_MAP.put("日喀则", "日喀则地区");
|
||||
CITY_CODE_MAP.put("毕节", "毕节地区");
|
||||
CITY_CODE_MAP.put("海东", "海东地区");
|
||||
CITY_CODE_MAP.put("海北", "海北藏族自治州");
|
||||
CITY_CODE_MAP.put("海南", "海南藏族自治州");
|
||||
CITY_CODE_MAP.put("铜仁", "铜仁地区");
|
||||
CITY_CODE_MAP.put("阿里", "阿里地区");
|
||||
CITY_CODE_MAP.put("昌都", "昌都地区");
|
||||
CITY_CODE_MAP.put("林芝", "林芝地区");
|
||||
CITY_CODE_MAP.put("那曲", "那曲地区");
|
||||
CITY_CODE_MAP.put("阿勒泰", "阿勒泰地区");
|
||||
CITY_CODE_MAP.put("巴音郭楞", "巴音郭楞蒙古自治州");
|
||||
CITY_CODE_MAP.put("哈密", "哈密地区");
|
||||
CITY_CODE_MAP.put("和田", "和田地区");
|
||||
CITY_CODE_MAP.put("喀什", "喀什地区");
|
||||
CITY_CODE_MAP.put("吐鲁番", "吐鲁番地区");
|
||||
CITY_CODE_MAP.put("双鸭山", "双鸭山市");
|
||||
}
|
||||
|
||||
private Map<String, List<ServerAreaBo>> getSortedServerAreaBoMap(List<ServerArea> serverAreaList) {
|
||||
@@ -106,24 +106,24 @@ public class CityController {
|
||||
// List<ServerAreaBo>>();
|
||||
// for (ServerArea serverArea : serverAreaList) {
|
||||
// String cityInitial = StringUtil.getFirstSpell(serverArea.getSpell(),
|
||||
// true);// 城市首字母
|
||||
// true);// 城市首字母
|
||||
// List<ServerAreaBo> serverAreaBoList =
|
||||
// getCachedServerAreaByInitial(serverAreaBoMap, cityInitial);//
|
||||
// 按首字母加载城市列表
|
||||
// // 设置FLASH ICO
|
||||
// 按首字母加载城市列表
|
||||
// // 设置FLASH ICO
|
||||
// ServerAreaBo serverAreaBo = new ServerAreaBo(serverArea);
|
||||
// serverAreaBo.setExistFalsh(filesService.fileExist(serverAreaBo.getFlashId()));
|
||||
// serverAreaBo.setExistCityIco(filesService.fileExist(serverAreaBo.getIcoId()));
|
||||
// serverAreaBoList.add(serverAreaBo);
|
||||
// sort(serverAreaBoList);// 字母内排序
|
||||
// sort(serverAreaBoList);// 字母内排序
|
||||
// serverAreaBoMap.put(cityInitial, serverAreaBoList);
|
||||
// }
|
||||
// // TreeMap按KEY默认排序
|
||||
// // TreeMap按KEY默认排序
|
||||
// return new TreeMap<String, List<ServerAreaBo>>(serverAreaBoMap);
|
||||
|
||||
Map<String, List<ServerAreaBo>> ret = new LinkedHashMap<String, List<ServerAreaBo>>();
|
||||
for (ServerArea serverArea : serverAreaList) {
|
||||
if ("全国".equals(serverArea.getDisplay()) || StringUtils.isBlank(serverArea.getProvince())) {
|
||||
if ("全国".equals(serverArea.getDisplay()) || StringUtils.isBlank(serverArea.getProvince())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 按KEY获取Map值
|
||||
* 按KEY获取Map值
|
||||
*
|
||||
* @param serverAreaBoMap
|
||||
* @param cityInitial
|
||||
@@ -160,7 +160,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 城市字母内排序
|
||||
* 城市字母内排序
|
||||
*
|
||||
* @param serverAreaBoList
|
||||
*/
|
||||
@@ -183,7 +183,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面查询条件
|
||||
* 页面查询条件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -194,19 +194,19 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 城市列表页面
|
||||
* 城市列表页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object listAction(ServerAreaModel model) {
|
||||
Pager pager = model.getPager(1000);
|
||||
model.setCityFirstLetters(Arrays.asList(getCityFirstLetter()));// 页面字母查询条件
|
||||
model.setCityFirstLetters(Arrays.asList(getCityFirstLetter()));// 页面字母查询条件
|
||||
if (StringUtils.isNotBlank(model.getType())) {
|
||||
List<ServerArea> serverAreaList = serverAreaService.findAllBySort();// Load城市列表
|
||||
if ("all".equals(model.getType())) {// 字母分组列表
|
||||
List<ServerArea> serverAreaList = serverAreaService.findAllBySort();// Load城市列表
|
||||
if ("all".equals(model.getType())) {// 字母分组列表
|
||||
model.setServerAreasMap(getSortedServerAreaBoMap(serverAreaList));
|
||||
} else { // 首字母分组查询
|
||||
} else { // 首字母分组查询
|
||||
List<ServerAreaBo> serverAreaBoList = new ArrayList<ServerAreaBo>();
|
||||
for (ServerArea serverArea : serverAreaList) {
|
||||
if (StringUtil.getFirstSpell(serverArea.getSpell(), true).equals(model.getType())) {
|
||||
@@ -217,7 +217,7 @@ public class CityController {
|
||||
model.setServerAreaBoList(serverAreaBoList);
|
||||
}
|
||||
} else {
|
||||
// 默认分页列表,按序列号升序查询
|
||||
// 默认分页列表,按序列号升序查询
|
||||
pager = model.getPager(1000);
|
||||
List<ServerAreaBo> serverAreaBoList = serverAreaService.findAllServerArea();
|
||||
settingFlashAndCityIco(serverAreaBoList);
|
||||
@@ -227,7 +227,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置城市FLASH和图片信息
|
||||
* 设置城市FLASH和图片信息
|
||||
*
|
||||
* @param serverAreaBoList
|
||||
*/
|
||||
@@ -253,7 +253,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新建城市
|
||||
* 新建城市
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -263,7 +263,7 @@ public class CityController {
|
||||
if ("create".equals(model.getMethod())) {
|
||||
|
||||
if (serverAreaService.findByDisplayOrNameOrSpell(model.getDisplay(), model.getName(), model.getSpell(), null)) {
|
||||
model.setMsg("城市名称/简拼/全拼已存在");
|
||||
model.setMsg("城市名称/简拼/全拼已存在");
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ public class CityController {
|
||||
serverArea.setAlias(alias);
|
||||
}
|
||||
serverAreaService.save(serverArea);
|
||||
model.setMsg("新建成功");
|
||||
model.setMsg("新建成功");
|
||||
|
||||
} else {
|
||||
|
||||
@@ -296,7 +296,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑修改城市
|
||||
* 编辑修改城市
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -306,7 +306,7 @@ public class CityController {
|
||||
if (StringUtils.isNotBlank(model.getId())) {
|
||||
if (serverAreaService.findByDisplayOrNameOrSpell(model.getDisplay(), model.getName(), model.getSpell(),
|
||||
model.getId())) {
|
||||
model.setMsg("城市名称/简拼/全拼已存在");
|
||||
model.setMsg("城市名称/简拼/全拼已存在");
|
||||
return model;
|
||||
}
|
||||
ServerArea serverArea = serverAreaService.findById(model.getId());
|
||||
@@ -343,9 +343,9 @@ public class CityController {
|
||||
// ServerArea serverArea = new ServerArea();
|
||||
// BeanUtils.copyProperties(model, serverArea);
|
||||
serverAreaService.update(serverArea);
|
||||
model.setMsg("修改成功");
|
||||
model.setMsg("修改成功");
|
||||
} else {
|
||||
model.setMsg("修改有问题");
|
||||
model.setMsg("修改有问题");
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(model.getId())) {
|
||||
@@ -355,7 +355,7 @@ public class CityController {
|
||||
model.setAlias(StringUtils.join(serverArea.getAlias(), "\r\n"));
|
||||
}
|
||||
} else {
|
||||
model.setMsg("ID 错了");
|
||||
model.setMsg("ID 错了");
|
||||
}
|
||||
}
|
||||
return model;
|
||||
@@ -384,7 +384,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* Flash 上传
|
||||
* Flash 上传
|
||||
*
|
||||
* @param model
|
||||
* @param request
|
||||
@@ -418,7 +418,7 @@ public class CityController {
|
||||
filesService.deleteFilesByIds(Arrays.asList(new String[] { flashFile.getId() }));
|
||||
filesService.save(flashFile);
|
||||
model.setExistFalsh(true);
|
||||
model.setMsg("Flash 编辑成功 ! ");
|
||||
model.setMsg("Flash 编辑成功 ! ");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -438,7 +438,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 城市背景图片 上传
|
||||
* 城市背景图片 上传
|
||||
*
|
||||
* @param model
|
||||
* @param request
|
||||
@@ -469,7 +469,7 @@ public class CityController {
|
||||
filesService.deleteFilesByIds(Arrays.asList(new String[] { flashFile.getId() }));
|
||||
filesService.save(flashFile);
|
||||
model.setExistCityIco(true);
|
||||
model.setMsg("Flash 图片编辑成功 ! ");
|
||||
model.setMsg("Flash 图片编辑成功 ! ");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -495,19 +495,19 @@ public class CityController {
|
||||
}
|
||||
|
||||
if (0 == model.getStatus()) {
|
||||
// 城市下线
|
||||
// 城市下线
|
||||
Map<String, Object> data = new HashMap<String, Object>(1);
|
||||
data.put("status", 0);
|
||||
serverAreaService.updateById(data, model.getId());
|
||||
return model;
|
||||
} else {
|
||||
// 城市上线
|
||||
// 城市上线
|
||||
ServerArea city = checkData(model.getId(), model);
|
||||
if (model.isPassCheck()) {
|
||||
Map<String, Object> data = new HashMap<String, Object>(1);
|
||||
data.put("status", 2);
|
||||
serverAreaService.updateById(data, model.getId());
|
||||
// 如果过检测,则异步导入基础数据
|
||||
// 如果过检测,则异步导入基础数据
|
||||
if (city != null) {
|
||||
// processBaseData(city.getDisplay());
|
||||
}
|
||||
@@ -522,7 +522,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 城市列表页面
|
||||
* 城市列表页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -646,7 +646,7 @@ public class CityController {
|
||||
return cityBo;
|
||||
}
|
||||
|
||||
// 统计有小区覆盖的城市数量
|
||||
// 统计有小区覆盖的城市数量
|
||||
private long calculateCountsCityHaveDist(Map<String, List<CityBo>> cityInProvinceMap) {
|
||||
long counts = 0;
|
||||
for (String province : cityInProvinceMap.keySet()) {
|
||||
@@ -660,7 +660,7 @@ public class CityController {
|
||||
return counts;
|
||||
}
|
||||
|
||||
// 统计城市小区数量
|
||||
// 统计城市小区数量
|
||||
private Map<String, List<CityBo>> ensureInfoInCity(final String cat, Map<String, List<CityBo>> cityInProvinceMap) {
|
||||
/*for (String province : cityInProvinceMap.keySet()) {
|
||||
List<CityBo> citiesInProvince = cityInProvinceMap.get(province);
|
||||
@@ -710,7 +710,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入自动完成的基础数据
|
||||
* 导入自动完成的基础数据
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -720,9 +720,9 @@ public class CityController {
|
||||
// processBaseData(model.getDisplay());
|
||||
// return model;
|
||||
// }
|
||||
// 准备基础数据
|
||||
// 准备基础数据
|
||||
// private void processBaseData(final String cityName) {
|
||||
// // 把小区导入到自动完成中
|
||||
// // 把小区导入到自动完成中
|
||||
// Thread thread = new Thread() {
|
||||
// public void run() {
|
||||
// LOGGER.info("{}: import data to auto start at {}", new Object[] {
|
||||
@@ -735,7 +735,7 @@ public class CityController {
|
||||
// thread.start();
|
||||
// }
|
||||
/**
|
||||
* 把小区导入到自动完成
|
||||
* 把小区导入到自动完成
|
||||
*
|
||||
* @param cityName
|
||||
*/
|
||||
@@ -746,7 +746,7 @@ public class CityController {
|
||||
// }
|
||||
// DBCollection knowBaseCollection =
|
||||
// MongoService.getInstance().getCollection("know_base");
|
||||
// // 从知识库取当前城市的所有区域
|
||||
// // 从知识库取当前城市的所有区域
|
||||
// DBObject query = new BasicDBObject();
|
||||
// query.put("cat", "district_name");
|
||||
// query.put("extra_data.city", cityName);
|
||||
@@ -816,7 +816,7 @@ public class CityController {
|
||||
// districtAutos.clear();
|
||||
// }
|
||||
//
|
||||
// // 先删除,再添加
|
||||
// // 先删除,再添加
|
||||
// if (addressAutos.size() > 100) {
|
||||
// List<String> tmp = new ArrayList<String>();
|
||||
// for (Auto addr : addressAutos) {
|
||||
@@ -827,7 +827,7 @@ public class CityController {
|
||||
// addressAutos.clear();
|
||||
// }
|
||||
//
|
||||
// // 先删除,再添加
|
||||
// // 先删除,再添加
|
||||
// if (aliasAutos.size() > 100) {
|
||||
// List<String> tmp = new ArrayList<String>();
|
||||
// for (Auto alias : aliasAutos) {
|
||||
@@ -841,14 +841,14 @@ public class CityController {
|
||||
//
|
||||
// autoService.saveAutoKeywords(districtAutos);
|
||||
//
|
||||
// // 先删除,再添加
|
||||
// // 先删除,再添加
|
||||
// List<String> tmp = new ArrayList<String>();
|
||||
// for (Auto addr : addressAutos) {
|
||||
// tmp.add(addr.getKeyword());
|
||||
// }
|
||||
// autoService.saveAutoKeywords(addressAutos);
|
||||
//
|
||||
// // 先删除,再添加
|
||||
// // 先删除,再添加
|
||||
// tmp = new ArrayList<String>();
|
||||
// for (Auto alias : aliasAutos) {
|
||||
// tmp.add(alias.getKeyword());
|
||||
@@ -856,89 +856,89 @@ public class CityController {
|
||||
// autoService.saveAutoKeywords(aliasAutos);
|
||||
// }
|
||||
/**
|
||||
* 城市上线验证
|
||||
* 城市上线验证
|
||||
*/
|
||||
private ServerArea checkData(String cityId, ServerAreaModel model) {
|
||||
boolean ret = true;
|
||||
|
||||
List<String> retList = new ArrayList<String>();
|
||||
|
||||
// 检查城市信息
|
||||
// 检查城市信息
|
||||
ServerArea cityArea = serverAreaService.findById(cityId);
|
||||
if (null == cityArea) {
|
||||
// 城市ID有误
|
||||
retList.add("城市ID_ERROR");
|
||||
// 城市ID有误
|
||||
retList.add("城市ID_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
retList.add("城市ID_OK");
|
||||
retList.add("城市ID_OK");
|
||||
}
|
||||
|
||||
if (null == filesService.findById(cityId + ((null != cityArea.getFalshVersion()) ? cityArea.getFalshVersion() : "")
|
||||
+ "#m")) {
|
||||
// 没有Flash
|
||||
retList.add("城市Flash_ERROR");
|
||||
// 没有Flash
|
||||
retList.add("城市Flash_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
retList.add("城市Flash_OK");
|
||||
retList.add("城市Flash_OK");
|
||||
}
|
||||
|
||||
if (null == filesService
|
||||
.findById(cityId + ((null != cityArea.getIcoVersion()) ? cityArea.getIcoVersion() : "") + "ico#m")) {
|
||||
// 没有图片
|
||||
retList.add("城市图片_ERROR");
|
||||
// 没有图片
|
||||
retList.add("城市图片_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
retList.add("城市图片_OK");
|
||||
retList.add("城市图片_OK");
|
||||
}
|
||||
|
||||
if (cityArea.getLat() > 53.5 || cityArea.getLat() < 4 || cityArea.getLng() > 135.083 || cityArea.getLng() < 73.6667) {
|
||||
// 经纬度不正确
|
||||
retList.add("城市经纬度_ERROR");
|
||||
// 经纬度不正确
|
||||
retList.add("城市经纬度_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
retList.add("城市经纬度_OK");
|
||||
retList.add("城市经纬度_OK");
|
||||
}
|
||||
|
||||
if (cityArea.getHomeMapId() <= 0) {
|
||||
// 没有设置全国地图MapId
|
||||
retList.add("城市的FlashMapId_ERROR");
|
||||
// 没有设置全国地图MapId
|
||||
retList.add("城市的FlashMapId_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
retList.add("城市的FlashMapId_OK");
|
||||
retList.add("城市的FlashMapId_OK");
|
||||
}
|
||||
|
||||
if (cityArea.getCityGrade() != 1 && cityArea.getCityGrade() != 2 && cityArea.getCityGrade() != 3) {
|
||||
// 没有设置城市级别
|
||||
retList.add("城市级别_ERROR");
|
||||
// 没有设置城市级别
|
||||
retList.add("城市级别_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
retList.add("城市级别_OK");
|
||||
retList.add("城市级别_OK");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(cityArea.getSection())) {
|
||||
// 没有设置城市所属区域
|
||||
retList.add("城市所属区域(如华东)_ERROR");
|
||||
// 没有设置城市所属区域
|
||||
retList.add("城市所属区域(如华东)_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
retList.add("城市所属区域_OK");
|
||||
retList.add("城市所属区域_OK");
|
||||
}
|
||||
|
||||
// 检查区域信息
|
||||
// 检查区域信息
|
||||
List<RegionBlockBo> boList = regionBlockService.findRegionBlockBoList(cityArea.getDisplay(), cityArea.isSupportBlock());
|
||||
if (CollectionUtils.isEmpty(boList)) {
|
||||
// 没有区域信息
|
||||
retList.add("城市下辖区域_ERROR");
|
||||
// 没有区域信息
|
||||
retList.add("城市下辖区域_ERROR");
|
||||
ret = false;
|
||||
} else {
|
||||
for (RegionBlockBo regionBo : boList) {
|
||||
if (null == regionBo.getMapId() || regionBo.getMapId() < 0) {
|
||||
retList.add("城市下辖区域FlashMapId_ERROR");
|
||||
retList.add("城市下辖区域FlashMapId_ERROR");
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(regionBo.getOrgName())) {
|
||||
retList.add("城市下辖区域显示名称_ERROR");
|
||||
retList.add("城市下辖区域显示名称_ERROR");
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
@@ -947,7 +947,7 @@ public class CityController {
|
||||
if (cityArea.isSupportBlock() && CollectionUtils.isNotEmpty(blockList)) {
|
||||
for (RegionBlock block : blockList) {
|
||||
if (StringUtils.isBlank(block.getOrgName())) {
|
||||
retList.add("城市下辖板块显示名称_ERROR");
|
||||
retList.add("城市下辖板块显示名称_ERROR");
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
@@ -963,7 +963,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所属省份,拆分城市 (只包含县级市)
|
||||
* 根据所属省份,拆分城市 (只包含县级市)
|
||||
*
|
||||
* @param allCitys
|
||||
* @return
|
||||
@@ -988,9 +988,9 @@ public class CityController {
|
||||
String province = "";
|
||||
if (city.getProvince() == null || city.getProvince() == "") {
|
||||
province = null;
|
||||
} else if (city.getProvince().equals("上海") || city.getProvince().equals("北京") || city.getProvince().equals("天津")
|
||||
|| city.getProvince().equals("重庆")) {
|
||||
province = "直辖市";
|
||||
} else if (city.getProvince().equals("上海") || city.getProvince().equals("北京") || city.getProvince().equals("天津")
|
||||
|| city.getProvince().equals("重庆")) {
|
||||
province = "直辖市";
|
||||
} else {
|
||||
province = city.getProvince();
|
||||
}
|
||||
@@ -1028,7 +1028,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所属省份,拆分城市
|
||||
* 根据所属省份,拆分城市
|
||||
*
|
||||
* @param allCitys
|
||||
* @return
|
||||
@@ -1043,9 +1043,9 @@ public class CityController {
|
||||
String province = "";
|
||||
if (city.getProvince() == null || city.getProvince() == "") {
|
||||
province = null;
|
||||
} else if (city.getProvince().equals("上海") || city.getProvince().equals("北京") || city.getProvince().equals("天津")
|
||||
|| city.getProvince().equals("重庆")) {
|
||||
province = "直辖市";
|
||||
} else if (city.getProvince().equals("上海") || city.getProvince().equals("北京") || city.getProvince().equals("天津")
|
||||
|| city.getProvince().equals("重庆")) {
|
||||
province = "直辖市";
|
||||
} else {
|
||||
province = city.getProvince();
|
||||
}
|
||||
@@ -1075,7 +1075,7 @@ public class CityController {
|
||||
|
||||
for (int i = 0; i < langth; i++) {
|
||||
|
||||
if (provinceArr[i].equals("直辖市")) {
|
||||
if (provinceArr[i].equals("直辖市")) {
|
||||
|
||||
String temp = provinceArr[i];
|
||||
provinceArr[i] = provinceArr[0];
|
||||
@@ -1085,59 +1085,59 @@ public class CityController {
|
||||
|
||||
Map<String, String> provincePinyinMap = new HashMap<String, String>();
|
||||
for (int i = 1; i < langth; i++) {
|
||||
if (provinceArr[i].equals("黑龙江")) {
|
||||
if (provinceArr[i].equals("黑龙江")) {
|
||||
provincePinyinMap.put("heilongjiang", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("吉林")) {
|
||||
} else if (provinceArr[i].equals("吉林")) {
|
||||
provincePinyinMap.put("jilin", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("辽宁")) {
|
||||
} else if (provinceArr[i].equals("辽宁")) {
|
||||
provincePinyinMap.put("liaoning", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("河北")) {
|
||||
} else if (provinceArr[i].equals("河北")) {
|
||||
provincePinyinMap.put("hebei", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("山东")) {
|
||||
} else if (provinceArr[i].equals("山东")) {
|
||||
provincePinyinMap.put("shandong", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("江苏")) {
|
||||
} else if (provinceArr[i].equals("江苏")) {
|
||||
provincePinyinMap.put("jiangsu", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("浙江")) {
|
||||
} else if (provinceArr[i].equals("浙江")) {
|
||||
provincePinyinMap.put("zhejiang", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("福建")) {
|
||||
} else if (provinceArr[i].equals("福建")) {
|
||||
provincePinyinMap.put("fujian", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("广东")) {
|
||||
} else if (provinceArr[i].equals("广东")) {
|
||||
provincePinyinMap.put("guangdong", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("海南")) {
|
||||
} else if (provinceArr[i].equals("海南")) {
|
||||
provincePinyinMap.put("hainan", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("云南")) {
|
||||
} else if (provinceArr[i].equals("云南")) {
|
||||
provincePinyinMap.put("yunnan", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("四川")) {
|
||||
} else if (provinceArr[i].equals("四川")) {
|
||||
provincePinyinMap.put("sichuan", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("青海")) {
|
||||
} else if (provinceArr[i].equals("青海")) {
|
||||
provincePinyinMap.put("qinghai", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("甘肃")) {
|
||||
} else if (provinceArr[i].equals("甘肃")) {
|
||||
provincePinyinMap.put("gansu", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("贵州")) {
|
||||
} else if (provinceArr[i].equals("贵州")) {
|
||||
provincePinyinMap.put("guzhou", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("湖南")) {
|
||||
} else if (provinceArr[i].equals("湖南")) {
|
||||
provincePinyinMap.put("hunan", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("湖北")) {
|
||||
} else if (provinceArr[i].equals("湖北")) {
|
||||
provincePinyinMap.put("hubei", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("江西")) {
|
||||
} else if (provinceArr[i].equals("江西")) {
|
||||
provincePinyinMap.put("jiangxi", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("安徽")) {
|
||||
} else if (provinceArr[i].equals("安徽")) {
|
||||
provincePinyinMap.put("anhui", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("河南")) {
|
||||
} else if (provinceArr[i].equals("河南")) {
|
||||
provincePinyinMap.put("henan", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("山西")) {
|
||||
} else if (provinceArr[i].equals("山西")) {
|
||||
provincePinyinMap.put("shanxi", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("陕西")) {
|
||||
} else if (provinceArr[i].equals("陕西")) {
|
||||
provincePinyinMap.put("shanxi2", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("新疆")) {
|
||||
} else if (provinceArr[i].equals("新疆")) {
|
||||
provincePinyinMap.put("xinjiang", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("西藏")) {
|
||||
} else if (provinceArr[i].equals("西藏")) {
|
||||
provincePinyinMap.put("xizang", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("宁夏")) {
|
||||
} else if (provinceArr[i].equals("宁夏")) {
|
||||
provincePinyinMap.put("ningxia", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("广西")) {
|
||||
} else if (provinceArr[i].equals("广西")) {
|
||||
provincePinyinMap.put("guangxi", provinceArr[i]);
|
||||
} else if (provinceArr[i].equals("内蒙古")) {
|
||||
} else if (provinceArr[i].equals("内蒙古")) {
|
||||
provincePinyinMap.put("neimenggu", provinceArr[i]);
|
||||
}
|
||||
|
||||
@@ -1160,8 +1160,8 @@ public class CityController {
|
||||
private String spell;
|
||||
private String name;
|
||||
private List<RegionBlock> cityRegion;
|
||||
private int haveDistrict; // 0:没有 , > 0:有
|
||||
private Map<String, Integer> cityRegionHaveDistrict; // 区域有无小区统计 0:没有
|
||||
private int haveDistrict; // 0:没有 , > 0:有
|
||||
private Map<String, Integer> cityRegionHaveDistrict; // 区域有无小区统计 0:没有
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
@@ -1243,9 +1243,9 @@ public class CityController {
|
||||
public Object exportExcelAction(ServerAreaModel model) {
|
||||
List<ServerAreaBo> serverAreaBoList = serverAreaService.findAllServerArea();
|
||||
|
||||
Map<String, List<CityBo>> cityInProvinceMap = splitCityAllRegionInProvince(serverAreaBoList); // 得到城市信息
|
||||
Map<String, List<CityBo>> cityInProvinceMap = splitCityAllRegionInProvince(serverAreaBoList); // 得到城市信息
|
||||
|
||||
cityInProvinceMap = ensureInfoInCity(model.getCat(), cityInProvinceMap); // 统计城市覆盖情况
|
||||
cityInProvinceMap = ensureInfoInCity(model.getCat(), cityInProvinceMap); // 统计城市覆盖情况
|
||||
|
||||
String[] provinceArr = new String[cityInProvinceMap.keySet().size()];
|
||||
provinceArr = cityInProvinceMap.keySet().toArray(provinceArr);
|
||||
@@ -1259,7 +1259,7 @@ public class CityController {
|
||||
CityBo cityBo = citys.get(num);
|
||||
List<RegionBlock> regionBlocks = cityBo.getCityRegion();
|
||||
if (regionBlocks != null) {
|
||||
cityBo = ensureInfoInCityRegion(model.getCat(), cityBo); // 统计城市区域覆盖情况
|
||||
cityBo = ensureInfoInCityRegion(model.getCat(), cityBo); // 统计城市区域覆盖情况
|
||||
citys.set(num, cityBo);
|
||||
}
|
||||
}
|
||||
@@ -1271,18 +1271,18 @@ public class CityController {
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
HSSFWorkbook wb = createExcel(model);
|
||||
String fileName = model.getCat() + "信息数量统计(" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
String fileName = model.getCat() + "信息数量统计(" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
// response.reset();// 清空输出流
|
||||
// response.reset();// 清空输出流
|
||||
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();
|
||||
} catch (Exception e) {
|
||||
@@ -1304,7 +1304,7 @@ public class CityController {
|
||||
|
||||
private HSSFWorkbook createExcel(ServerAreaModel model) {
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
HSSFSheet fieldSheet = wb.createSheet(model.getCat() + "统计");
|
||||
HSSFSheet fieldSheet = wb.createSheet(model.getCat() + "统计");
|
||||
|
||||
int rowInx = 0;
|
||||
HSSFRow row = fieldSheet.createRow(rowInx);
|
||||
@@ -1337,7 +1337,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
HSSFCell prov = cityInfoRow.createCell(0);
|
||||
if (("直辖市").equals(province)) {
|
||||
if (("直辖市").equals(province)) {
|
||||
prov.setCellValue(cityName);
|
||||
} else {
|
||||
prov.setCellValue(province);
|
||||
@@ -1367,7 +1367,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
HSSFCell provcell = cityRegionInfoRow.createCell(0);
|
||||
if (("直辖市").equals(province)) {
|
||||
if (("直辖市").equals(province)) {
|
||||
provcell.setCellValue(cityName);
|
||||
} else {
|
||||
provcell.setCellValue(province);
|
||||
@@ -1394,7 +1394,7 @@ public class CityController {
|
||||
}
|
||||
|
||||
HSSFCell provcell = regionInfoRow.createCell(0);
|
||||
if (("直辖市").equals(province)) {
|
||||
if (("直辖市").equals(province)) {
|
||||
provcell.setCellValue(cityName);
|
||||
} else {
|
||||
provcell.setCellValue(province);
|
||||
@@ -1430,31 +1430,31 @@ public class CityController {
|
||||
private HSSFRow setTableHeader(HSSFRow row) {
|
||||
int cellInx = 0;
|
||||
HSSFCell provCell = row.createCell(cellInx);
|
||||
provCell.setCellValue("省份");
|
||||
provCell.setCellValue("省份");
|
||||
|
||||
cellInx = 1;
|
||||
HSSFCell cityCell = row.createCell(cellInx);
|
||||
cityCell.setCellValue("城市");
|
||||
cityCell.setCellValue("城市");
|
||||
|
||||
cellInx = 2;
|
||||
HSSFCell cityCountsCell = row.createCell(cellInx);
|
||||
cityCountsCell.setCellValue("总量");
|
||||
cityCountsCell.setCellValue("总量");
|
||||
|
||||
cellInx = 3;
|
||||
HSSFCell cityRegionCell = row.createCell(cellInx);
|
||||
cityRegionCell.setCellValue("县级市");
|
||||
cityRegionCell.setCellValue("县级市");
|
||||
|
||||
cellInx = 4;
|
||||
HSSFCell cityRegionCountsCell = row.createCell(cellInx);
|
||||
cityRegionCountsCell.setCellValue("总量");
|
||||
cityRegionCountsCell.setCellValue("总量");
|
||||
|
||||
cellInx = 5;
|
||||
HSSFCell regionCell = row.createCell(cellInx);
|
||||
regionCell.setCellValue("区县");
|
||||
regionCell.setCellValue("区县");
|
||||
|
||||
cellInx = 6;
|
||||
HSSFCell regionCountsCell = row.createCell(cellInx);
|
||||
regionCountsCell.setCellValue("总量");
|
||||
regionCountsCell.setCellValue("总量");
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
+8
-8
@@ -38,7 +38,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入“新增页面”页面
|
||||
* 进入“新增页面”页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -48,7 +48,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入“新增模块”页面
|
||||
* 进入“新增模块”页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -61,7 +61,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增的页面
|
||||
* 保存新增的页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -78,7 +78,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增的模块
|
||||
* 保存新增的模块
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -96,7 +96,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除页面
|
||||
* 删除页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -110,7 +110,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模块
|
||||
* 删除模块
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -124,7 +124,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改页面
|
||||
* 修改页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -147,7 +147,7 @@ public class ClickPageController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改模块
|
||||
* 修改模块
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
|
||||
+10
-10
@@ -24,12 +24,12 @@ public class ComparePriceController {
|
||||
|
||||
public Object listQRAction(ComparePriceModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
Date sunday = DateUtil.getThisSunday(new Date());
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(sunday)));
|
||||
}
|
||||
|
||||
@@ -51,12 +51,12 @@ public class ComparePriceController {
|
||||
|
||||
public Object loadQRDataAction(AvgPriceUpdateModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
|
||||
if(model.getSdateStart() <= 0 || model.getSdateEnd() <= 0) {
|
||||
Date sunday = DateUtil.getThisSunday(new Date());
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateStart(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(DateUtil.getBeforeDay(sunday, 13 * 7)))); //最近一季度
|
||||
model.setSdateEnd(Integer.parseInt(DateUtil.formatToTightYYYYMMDD(sunday)));
|
||||
}
|
||||
|
||||
@@ -72,12 +72,12 @@ public class ComparePriceController {
|
||||
jo5 = new JSONObject(), jo6 = new JSONObject();
|
||||
JSONArray pt1 = new JSONArray(), pt2 = new JSONArray(), pt3 = new JSONArray(), pt4 = new JSONArray(),
|
||||
pt5 = new JSONArray(), pt6 = new JSONArray();
|
||||
jo1.put("name", "近一个月人工支持度%");
|
||||
jo2.put("name", "近一个月系统支持度%");
|
||||
jo3.put("name", "近半年人工支持度%");
|
||||
jo4.put("name", "近半年系统支持度%");
|
||||
jo5.put("name", "历史数据人工支持度%");
|
||||
jo6.put("name", "历史数据系统支持度%");
|
||||
jo1.put("name", "近一个月人工支持度%");
|
||||
jo2.put("name", "近一个月系统支持度%");
|
||||
jo3.put("name", "近半年人工支持度%");
|
||||
jo4.put("name", "近半年系统支持度%");
|
||||
jo5.put("name", "历史数据人工支持度%");
|
||||
jo6.put("name", "历史数据系统支持度%");
|
||||
for(ComparePriceCity aqr : comparePriceCitys) {
|
||||
String dateStr = DateUtil.formatToTightYYYYMMDD(aqr.getCreationDate());
|
||||
Integer date = Integer.valueOf(dateStr);
|
||||
|
||||
+44
-44
@@ -33,46 +33,46 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
/**客户地址分析
|
||||
/**客户地址分析
|
||||
* Created by ideoj on 2016/7/29.
|
||||
*/
|
||||
public class ConsumerAddressController {
|
||||
Map<String, String> locations = new HashMap<String, String>(){
|
||||
{
|
||||
put("上海", "121.487899486,31.24916171");
|
||||
put("北京", "116.395645038,39.9299857781");
|
||||
put("天津", "117.210813092,39.1439299033");
|
||||
put("重庆", "106.530635013,29.5446061089");
|
||||
put("上海", "121.487899486,31.24916171");
|
||||
put("北京", "116.395645038,39.9299857781");
|
||||
put("天津", "117.210813092,39.1439299033");
|
||||
put("重庆", "106.530635013,29.5446061089");
|
||||
|
||||
put("黑龙江", "126.657716855,45.7732246332");
|
||||
put("吉林", "125.313642427,43.8983376071");
|
||||
put("辽宁", "123.432790922,41.8086447835");
|
||||
put("河北", "114.522081844,38.0489583146");
|
||||
put("甘肃", "103.823305441,36.064225525");
|
||||
put("青海", "101.76792099,36.640738612");
|
||||
put("陕西", "108.953098279,34.2777998978");
|
||||
put("河南", "113.64964385,34.7566100641");
|
||||
put("山东", "117.024967066,36.6827847272");
|
||||
put("山西", "112.550863589,37.890277054");
|
||||
put("安徽", "117.282699092,31.8669422607");
|
||||
put("湖北", "114.316200103,30.5810841269");
|
||||
put("湖南", "112.979352788,28.2134782309");
|
||||
put("江苏", "118.778074408,32.0572355018");
|
||||
put("四川", "104.067923463,30.6799428454");
|
||||
put("贵州", "106.709177096,26.6299067414");
|
||||
put("云南", "102.714601139,25.0491531005");
|
||||
put("浙江", "120.219375416,30.2592444615");
|
||||
put("江西", "115.893527546,28.6895780001");
|
||||
put("广东", "113.307649675,23.1200491021");
|
||||
put("福建", "119.330221107,26.0471254966");
|
||||
put("台湾", "114.130474436,22.3748329286");
|
||||
put("海南", "110.330801848,20.022071277");
|
||||
put("黑龙江", "126.657716855,45.7732246332");
|
||||
put("吉林", "125.313642427,43.8983376071");
|
||||
put("辽宁", "123.432790922,41.8086447835");
|
||||
put("河北", "114.522081844,38.0489583146");
|
||||
put("甘肃", "103.823305441,36.064225525");
|
||||
put("青海", "101.76792099,36.640738612");
|
||||
put("陕西", "108.953098279,34.2777998978");
|
||||
put("河南", "113.64964385,34.7566100641");
|
||||
put("山东", "117.024967066,36.6827847272");
|
||||
put("山西", "112.550863589,37.890277054");
|
||||
put("安徽", "117.282699092,31.8669422607");
|
||||
put("湖北", "114.316200103,30.5810841269");
|
||||
put("湖南", "112.979352788,28.2134782309");
|
||||
put("江苏", "118.778074408,32.0572355018");
|
||||
put("四川", "104.067923463,30.6799428454");
|
||||
put("贵州", "106.709177096,26.6299067414");
|
||||
put("云南", "102.714601139,25.0491531005");
|
||||
put("浙江", "120.219375416,30.2592444615");
|
||||
put("江西", "115.893527546,28.6895780001");
|
||||
put("广东", "113.307649675,23.1200491021");
|
||||
put("福建", "119.330221107,26.0471254966");
|
||||
put("台湾", "114.130474436,22.3748329286");
|
||||
put("海南", "110.330801848,20.022071277");
|
||||
|
||||
put("新疆", "87.5649877411,43.8403803472");
|
||||
put("内蒙古", "111.66035052,40.8283188731");
|
||||
put("宁夏", "106.206478608,38.5026210119");
|
||||
put("广西", "108.297233556,22.8064929356");
|
||||
put("西藏", "91.111890896,29.6625570621");
|
||||
put("新疆", "87.5649877411,43.8403803472");
|
||||
put("内蒙古", "111.66035052,40.8283188731");
|
||||
put("宁夏", "106.206478608,38.5026210119");
|
||||
put("广西", "108.297233556,22.8064929356");
|
||||
put("西藏", "91.111890896,29.6625570621");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ConsumerAddressController {
|
||||
|
||||
public Object uploadAction(HttpServletRequest request, ConsumerAddressModel model) {
|
||||
CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(request.getSession().getServletContext());
|
||||
if(multipartResolver.isMultipart(request)) {//先判断request中是否包涵multipart类型的数据
|
||||
if(multipartResolver.isMultipart(request)) {//先判断request中是否包涵multipart类型的数据
|
||||
Map<String, Object[]> params = ActionContext.getContext().getParameters();
|
||||
String name = (String)(params.get("fileFileName")[0]);
|
||||
FileInputStream fileInputStream = (FileInputStream)(params.get("fileInputStream")[0]);
|
||||
@@ -134,7 +134,7 @@ public class ConsumerAddressController {
|
||||
for (int i = 0; i < sheetCount; ++i) {
|
||||
HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(i);
|
||||
String sheetName = hssfSheet.getSheetName();
|
||||
if(sheetName.contains("总表")) {
|
||||
if(sheetName.contains("总表")) {
|
||||
continue;
|
||||
}
|
||||
for(int j=hssfSheet.getFirstRowNum()+1; j<=hssfSheet.getLastRowNum(); ++j) {
|
||||
@@ -157,7 +157,7 @@ public class ConsumerAddressController {
|
||||
}
|
||||
|
||||
ConsumerAddress findObj = consumerAddressService.findByNameAndAddress(name, address);
|
||||
if(findObj != null || StringUtils.isBlank(address) || StringUtils.isBlank(name)) {//根据名称和地址找到匹配项,则跳过;否则,入库
|
||||
if(findObj != null || StringUtils.isBlank(address) || StringUtils.isBlank(name)) {//根据名称和地址找到匹配项,则跳过;否则,入库
|
||||
continue;
|
||||
}
|
||||
ConsumerAddress consumerAddress = new ConsumerAddress();
|
||||
@@ -185,7 +185,7 @@ public class ConsumerAddressController {
|
||||
for (int i = 0; i < sheetCount; ++i) {
|
||||
XSSFSheet xssfSheet = xssfWorkbook.getSheetAt(i);
|
||||
String sheetName = xssfSheet.getSheetName();
|
||||
if(sheetName.contains("总表")) {
|
||||
if(sheetName.contains("总表")) {
|
||||
continue;
|
||||
}
|
||||
for(int j=xssfSheet.getFirstRowNum()+1; j<=xssfSheet.getLastRowNum(); ++j) {
|
||||
@@ -208,7 +208,7 @@ public class ConsumerAddressController {
|
||||
}
|
||||
|
||||
ConsumerAddress findObj = consumerAddressService.findByNameAndAddress(name, address);
|
||||
if(findObj != null || StringUtils.isBlank(address)) {//根据名称和地址找到匹配项,则跳过;否则,入库
|
||||
if(findObj != null || StringUtils.isBlank(address)) {//根据名称和地址找到匹配项,则跳过;否则,入库
|
||||
continue;
|
||||
}
|
||||
ConsumerAddress consumerAddress = new ConsumerAddress();
|
||||
@@ -235,7 +235,7 @@ public class ConsumerAddressController {
|
||||
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
Map<String, Integer> consumerAddressMap = Maps.newHashMap();
|
||||
resortConsumerAddress(findObjs, consumerAddressMap);//按行业进行分类
|
||||
resortConsumerAddress(findObjs, consumerAddressMap);//按行业进行分类
|
||||
result.put("status", 0);
|
||||
result.put("counts", consumerAddressMap);
|
||||
result.put("datas", findObjs);
|
||||
@@ -315,12 +315,12 @@ public class ConsumerAddressController {
|
||||
HSSFSheet hssfSheet = hssfWorkbook.getSheet(consumerAddress.getCat());
|
||||
if(hssfSheet==null) {
|
||||
hssfSheet = hssfWorkbook.createSheet(consumerAddress.getCat());
|
||||
//生成表头
|
||||
//生成表头
|
||||
HSSFRow hssfRow = hssfSheet.createRow(0);
|
||||
hssfRow.createCell(0).setCellValue("名称");
|
||||
hssfRow.createCell(1).setCellValue("地址");
|
||||
hssfRow.createCell(2).setCellValue("联系方式");
|
||||
hssfRow.createCell(3).setCellValue("邮箱");
|
||||
hssfRow.createCell(0).setCellValue("名称");
|
||||
hssfRow.createCell(1).setCellValue("地址");
|
||||
hssfRow.createCell(2).setCellValue("联系方式");
|
||||
hssfRow.createCell(3).setCellValue("邮箱");
|
||||
}
|
||||
int lastRowNum = hssfSheet.getLastRowNum();
|
||||
HSSFRow row = hssfSheet.createRow(lastRowNum + 1);
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class ConsumptionLoanController {
|
||||
|
||||
ConsumptionLoan consumptionLoan = model.getConsumptionLoan();
|
||||
if (StringUtils.isNotBlank(consumptionLoan.getCity())) {
|
||||
consumptionLoan.setCitys(Arrays.asList(consumptionLoan.getCity().split(",|,")));
|
||||
consumptionLoan.setCitys(Arrays.asList(consumptionLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
consumptionLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+8
-8
@@ -11,8 +11,8 @@ import com.fangjia.dal.mongo.fangjia.model.CopyrightConfig;
|
||||
import com.fangjia.service.mongo.fangjia.CopyrightConfigService;
|
||||
|
||||
/**
|
||||
* 版权配置管理
|
||||
* H5投放使用
|
||||
* 版权配置管理
|
||||
* H5投放使用
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ public class CopyrightConfigController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表页面
|
||||
* 列表页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -47,10 +47,10 @@ public class CopyrightConfigController {
|
||||
copyrightConfig.setModifyDate(new Date());
|
||||
copyrightConfigService.update(copyrightConfig);
|
||||
data.put("success", true);
|
||||
data.put("msg", "修改成功");
|
||||
data.put("msg", "修改成功");
|
||||
} else {
|
||||
data.put("success", false);
|
||||
data.put("msg", "编号不存在");
|
||||
data.put("msg", "编号不存在");
|
||||
}
|
||||
jsonModel.setJsonModel(data);
|
||||
return jsonModel;
|
||||
@@ -69,10 +69,10 @@ public class CopyrightConfigController {
|
||||
copyrightConfig.setModifyDate(new Date());
|
||||
copyrightConfigService.save(copyrightConfig);
|
||||
data.put("success", true);
|
||||
data.put("msg", "添加成功");
|
||||
data.put("msg", "添加成功");
|
||||
} else {
|
||||
data.put("success", false);
|
||||
data.put("msg", "编号重复");
|
||||
data.put("msg", "编号重复");
|
||||
}
|
||||
jsonModel.setJsonModel(data);
|
||||
return jsonModel;
|
||||
@@ -82,7 +82,7 @@ public class CopyrightConfigController {
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
data.put("success", true);
|
||||
data.put("msg", "删除成功");
|
||||
data.put("msg", "删除成功");
|
||||
copyrightConfigService.remove(model.getNumber());
|
||||
jsonModel.setJsonModel(data);
|
||||
return jsonModel;
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public class CrawlTemplateController {
|
||||
params.add(new QueryParam("jobId",model.getJobId()));
|
||||
List<CrawlTemplate> crawlTemplates = crawlTemplateDao.findAllByParams(params);
|
||||
if((crawlTemplates != null) && !crawlTemplates.isEmpty()){
|
||||
model.setErrMsg("此任务号已存在!");
|
||||
model.setErrMsg("此任务号已存在!");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
+8
-8
@@ -30,8 +30,8 @@ import org.sothis.web.mvc.ActionContext;
|
||||
|
||||
/**
|
||||
*
|
||||
* 说明:FangJia China 用户咨询
|
||||
* @author 王文艳
|
||||
* 说明:FangJia China 用户咨询
|
||||
* @author 王文艳
|
||||
*
|
||||
*/
|
||||
public class CustomerConsultController {
|
||||
@@ -81,9 +81,9 @@ public class CustomerConsultController {
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
|
||||
String[] columns = {"姓名","公司","邮箱","手机","来源","内容","咨询日期","IP"};
|
||||
String[] columns = {"姓名","公司","邮箱","手机","来源","内容","咨询日期","IP"};
|
||||
HSSFWorkbook wb= new HSSFWorkbook();
|
||||
Sheet sheet = wb.createSheet("信息详情");
|
||||
Sheet sheet = wb.createSheet("信息详情");
|
||||
Row row = sheet.createRow(0);
|
||||
for(int i =0 ;i < columns.length ; i++){
|
||||
row.createCell(i).setCellValue(columns[i]);
|
||||
@@ -101,18 +101,18 @@ public class CustomerConsultController {
|
||||
row.createCell(6).setCellValue(DateUtil.formatByPattern(log.getCreateDate(), "yyyy-MM-dd HH:mm"));
|
||||
row.createCell(7).setCellValue(log.getIp());
|
||||
}
|
||||
String fileName = "FangjiaChina用户信息" + "(" + DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
String fileName = "FangjiaChina用户信息" + "(" + DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
|
||||
+11
-11
@@ -75,7 +75,7 @@ public class CustomqueryController {
|
||||
queryBean.setType(model.getType());
|
||||
List<CustomqueryBo> customqueryBoList = customqueryService.findByQueryBean(queryBean);
|
||||
if (customqueryBoList != null && customqueryBoList.size() > 0) {
|
||||
model.flash().setAttribute("message", model.getName() + "已经存在");
|
||||
model.flash().setAttribute("message", model.getName() + "已经存在");
|
||||
return model.redirect("/customquery/create");
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class CustomqueryController {
|
||||
customquery.setName(model.getName());
|
||||
customquery.setCaption(model.getCaption());
|
||||
if (StringUtils.isBlank(model.getDisplay())) {
|
||||
customquery.setCity("全国");
|
||||
customquery.setCity("全国");
|
||||
} else {
|
||||
customquery.setCity(model.getDisplay());
|
||||
}
|
||||
@@ -127,10 +127,10 @@ public class CustomqueryController {
|
||||
customquery.setStatus(0);
|
||||
customqueryService.save(customquery);
|
||||
if (StringUtils.isNotBlank(customquery.getId())) {
|
||||
model.flash().setAttribute("message", "ID: " + customquery.getId() + " 保存成功");
|
||||
model.flash().setAttribute("message", "ID: " + customquery.getId() + " 保存成功");
|
||||
return model.redirect("/customquery/show?id=" + customquery.getId());
|
||||
} else {
|
||||
model.flash().setAttribute("message", "Customquery 保存失败");
|
||||
model.flash().setAttribute("message", "Customquery 保存失败");
|
||||
return model.redirect("/customquery/create");
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class CustomqueryController {
|
||||
public Object showAction(CustomqueryModel model) {
|
||||
Customquery customquery = customqueryService.findById(model.getId());
|
||||
if (null == customquery) {
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 没找到结果");
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 没找到结果");
|
||||
return model.redirect("/customquery/list");
|
||||
} else {
|
||||
model.setCustomqueryBo(new CustomqueryBo(customquery));
|
||||
@@ -150,7 +150,7 @@ public class CustomqueryController {
|
||||
public Object editAction(CustomqueryModel model) {
|
||||
Customquery customquery = customqueryService.findById(model.getId());
|
||||
if (null == customquery) {
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 没找到结果");
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 没找到结果");
|
||||
return model.redirect("/customquery/list");
|
||||
} else {
|
||||
model.setCustomqueryBo(new CustomqueryBo(customquery));
|
||||
@@ -165,14 +165,14 @@ public class CustomqueryController {
|
||||
try {
|
||||
BeanUtils.copyProperties(model.getCustomqueryBo(), customquery);
|
||||
customqueryService.update(customquery);
|
||||
model.flash().setAttribute("message", "ID: " + model.getCustomqueryBo().getId() + " 更新成功");
|
||||
model.flash().setAttribute("message", "ID: " + model.getCustomqueryBo().getId() + " 更新成功");
|
||||
return model.redirect("/customquery/show?id=" + model.getCustomqueryBo().getId());
|
||||
} catch (Exception e) {
|
||||
model.flash().setAttribute("message", "ID: " + model.getCustomqueryBo().getId() + " 更新失败");
|
||||
model.flash().setAttribute("message", "ID: " + model.getCustomqueryBo().getId() + " 更新失败");
|
||||
return model.redirect("/customquery/edit");
|
||||
}
|
||||
} else {
|
||||
model.flash().setAttribute("message", "ID: " + model.getCustomqueryBo().getId() + " 没找到结果");
|
||||
model.flash().setAttribute("message", "ID: " + model.getCustomqueryBo().getId() + " 没找到结果");
|
||||
return model.redirect("/customquery/list");
|
||||
}
|
||||
}
|
||||
@@ -182,10 +182,10 @@ public class CustomqueryController {
|
||||
Customquery customquery = customqueryService.findById(model.getId());
|
||||
customquery.setStatus(1);
|
||||
customqueryService.update(customquery);
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除成功");
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除成功");
|
||||
return model.redirect("/customquery/list");
|
||||
} else {
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除失败");
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除失败");
|
||||
return model.redirect("/customquery/list");
|
||||
}
|
||||
}
|
||||
|
||||
+256
-256
@@ -127,12 +127,12 @@ public class DataController {
|
||||
}
|
||||
|
||||
final Map<String,Integer> levelMap=new HashMap<String,Integer>();
|
||||
levelMap.put("一线", 1000);
|
||||
levelMap.put("新一线", 1000);
|
||||
levelMap.put("二线", 2000);
|
||||
levelMap.put("三线", 3000);
|
||||
levelMap.put("四线", 4000);
|
||||
levelMap.put("五线", 5000);
|
||||
levelMap.put("一线", 1000);
|
||||
levelMap.put("新一线", 1000);
|
||||
levelMap.put("二线", 2000);
|
||||
levelMap.put("三线", 3000);
|
||||
levelMap.put("四线", 4000);
|
||||
levelMap.put("五线", 5000);
|
||||
Collections.sort(allCityInfos,new Comparator<CityInfo>(){
|
||||
|
||||
@Override
|
||||
@@ -160,7 +160,7 @@ public class DataController {
|
||||
});
|
||||
model.setAllCityInfos(allCityInfos);
|
||||
|
||||
// 城市Flash和图片信息
|
||||
// 城市Flash和图片信息
|
||||
List<ServerAreaBo> serverAreaBoList = new ArrayList<ServerAreaBo>();
|
||||
for (ServerArea serverArea : serverAreaList) {
|
||||
serverAreaBoList.add(new ServerAreaBo(serverArea));
|
||||
@@ -283,7 +283,7 @@ public class DataController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置城市FLASH和图片信息
|
||||
* 设置城市FLASH和图片信息
|
||||
*
|
||||
* @param serverAreaBoList
|
||||
*/
|
||||
@@ -311,7 +311,7 @@ public class DataController {
|
||||
public Object regionAction(DataModel model) {
|
||||
String city = model.getCityDisplay();
|
||||
if (StringUtils.isBlank(city)) {
|
||||
city = "上海";
|
||||
city = "上海";
|
||||
model.setCityDisplay(city);
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ public class DataController {
|
||||
|
||||
private List<QueryParam> buildDealPriceStatParams(DataModel model) {
|
||||
List<QueryParam> params = Lists.newArrayList();
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
if(StringUtils.isNotBlank(model.getRegion())){
|
||||
@@ -379,7 +379,7 @@ public class DataController {
|
||||
|
||||
private List<QueryParam> buildDealPriceParams(DataModel model) {
|
||||
List<QueryParam> params = Lists.newArrayList();
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
if(StringUtils.isNotBlank(model.getSource())){
|
||||
@@ -405,7 +405,7 @@ public class DataController {
|
||||
|
||||
private List<QueryParam> buildDealCountStatParams(DealCountStatModel model) {
|
||||
List<QueryParam> params = Lists.newArrayList();
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
|
||||
@@ -424,7 +424,7 @@ public class DataController {
|
||||
List<QueryParam> queryParams = buildNewHouseParams(model);
|
||||
List<SortParam> sortParams = buildSortParams(model);
|
||||
int countNewHouse = dataService.countNewHouse(queryParams);
|
||||
//TODO 获取详细列表总数
|
||||
//TODO 获取详细列表总数
|
||||
int countNewHouseDetail = 0;
|
||||
model.setSumCount(countNewHouse);
|
||||
model.setDetailCount(countNewHouseDetail);
|
||||
@@ -444,7 +444,7 @@ public class DataController {
|
||||
private List<QueryParam> buildNewHouseParams(DataModel model) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())){
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())){
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
if(StringUtils.isNotBlank(model.getRegion())){
|
||||
@@ -600,18 +600,18 @@ public class DataController {
|
||||
BufferedOutputStream fos = null;
|
||||
HSSFWorkbook wb = createExcel(model);
|
||||
//Date weekend = DateUtil.getFirstDayOfWeek(new Date());
|
||||
String fileName = "城市覆盖率统计(" + model.getWeekend() + ").xls";
|
||||
String fileName = "城市覆盖率统计(" + model.getWeekend() + ").xls";
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
@@ -637,7 +637,7 @@ public class DataController {
|
||||
Map<String, Object> resultModel = Maps.newHashMap();
|
||||
if(StringUtils.isBlank(email)) {
|
||||
resultModel.put("status", 0);
|
||||
resultModel.put("msg", "邮箱不能为空");
|
||||
resultModel.put("msg", "邮箱不能为空");
|
||||
jsonModel.setJsonModel(resultModel);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -645,20 +645,20 @@ public class DataController {
|
||||
List<String> cities = ServerAreaData.getServerAreaDisplayList(1000);
|
||||
Mail mail = new Mail();
|
||||
if(districtsHasLoudong.get() < cities.size()) {
|
||||
//统计程序正在运行
|
||||
//统计程序正在运行
|
||||
if(districtsHasLoudong.get() > 0) {
|
||||
resultModel.put("status", 200);
|
||||
resultModel.put("msg", "统计程序正在运行,已统计["+districtsHasLoudong.get()+"]个城市");
|
||||
resultModel.put("msg", "统计程序正在运行,已统计["+districtsHasLoudong.get()+"]个城市");
|
||||
jsonModel.setJsonModel(resultModel);
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
//统计并拼接成结果
|
||||
mail.setSubject("最新统计数据 — 有楼栋的房号库");
|
||||
//统计并拼接成结果
|
||||
mail.setSubject("最新统计数据 — 有楼栋的房号库");
|
||||
StringBuffer emailMsg = new StringBuffer();
|
||||
emailMsg.append("<table border='1'>")
|
||||
.append("<caption>有楼栋的房号库</caption><tr>")
|
||||
.append("<th>城市</th><th>小区数</th><th>有楼栋的房号库</th></tr>");
|
||||
.append("<caption>有楼栋的房号库</caption><tr>")
|
||||
.append("<th>城市</th><th>小区数</th><th>有楼栋的房号库</th></tr>");
|
||||
|
||||
for(String city : cities) {
|
||||
long districtCount = districtService.findCityDistrictCount(city);
|
||||
@@ -666,33 +666,33 @@ public class DataController {
|
||||
emailMsg.append("<tr><td>").append(city).append("</td><td>")
|
||||
.append(districtCount).append("</td><td>").append(districtHasLoudongCount)
|
||||
.append("</td></tr>");
|
||||
//更新缓存
|
||||
//更新缓存
|
||||
districtsHasLoudong.incrementAndGet();
|
||||
}
|
||||
emailMsg.append("</table>");
|
||||
mail.setContent(emailMsg.toString());
|
||||
}
|
||||
|
||||
//发送邮件
|
||||
//发送邮件
|
||||
for(String receiveEmail : receiveEmails) {
|
||||
try {
|
||||
mail.setReceiver(new MailUser(receiveEmail));
|
||||
emailService.sendMail(mail);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("统计邮件发送失败 -> " + receiveEmail + "\n" + e.getMessage());
|
||||
LOGGER.error("统计邮件发送失败 -> " + receiveEmail + "\n" + e.getMessage());
|
||||
}
|
||||
}
|
||||
receiveEmails.clear();
|
||||
districtsHasLoudong.set(0);
|
||||
|
||||
resultModel.put("status", 200);
|
||||
resultModel.put("msg", "统计程序运行结束");
|
||||
resultModel.put("msg", "统计程序运行结束");
|
||||
jsonModel.setJsonModel(resultModel);
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据城市查询有楼栋的小区数
|
||||
* 根据城市查询有楼栋的小区数
|
||||
* @param city
|
||||
* @return
|
||||
*/
|
||||
@@ -735,18 +735,18 @@ public class DataController {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
createSheet(wb, 0, "小区", weekend);
|
||||
createSheet(wb, 1, "写字楼", weekend);
|
||||
createSheet(wb, 2, "房号", weekend);
|
||||
createSheet(wb, 3, "商铺", weekend);
|
||||
createSheet(wb, 4, "楼栋", weekend);
|
||||
createSheet(wb, 0, "小区", weekend);
|
||||
createSheet(wb, 1, "写字楼", weekend);
|
||||
createSheet(wb, 2, "房号", weekend);
|
||||
createSheet(wb, 3, "商铺", weekend);
|
||||
createSheet(wb, 4, "楼栋", weekend);
|
||||
return wb;
|
||||
}
|
||||
|
||||
|
||||
public HSSFWorkbook createSheet(HSSFWorkbook wb, int sheetIndex, String cat, Date weekend){
|
||||
HSSFSheet s = wb.createSheet();
|
||||
wb.setSheetName(sheetIndex, cat+"字段覆盖率");
|
||||
wb.setSheetName(sheetIndex, cat+"字段覆盖率");
|
||||
List<CityInfo> results = dataService.findAllCityInfo(weekend);
|
||||
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
|
||||
List<String> outfields = new ArrayList<String>();
|
||||
@@ -765,7 +765,7 @@ public class DataController {
|
||||
outfields.add("city");
|
||||
outfields.add("cityLevel");
|
||||
outfields.add("rankingLevel");
|
||||
if(cat.equals("小区")){
|
||||
if(cat.equals("小区")){
|
||||
outfields.add("existingDistrictCount");
|
||||
outfields.add("districtsHasLoudong");
|
||||
outfields.add("districtsHasFanghao");
|
||||
@@ -784,9 +784,9 @@ public class DataController {
|
||||
outfields.add("licence");
|
||||
outfields.add("buildStructure");
|
||||
|
||||
}else if(cat.equals("写字楼")){
|
||||
}else if(cat.equals("写字楼")){
|
||||
outfields.add("existingOfficeCount");
|
||||
}else if(cat.equals("商铺")){
|
||||
}else if(cat.equals("商铺")){
|
||||
outfields.add("existingShopCount");
|
||||
}
|
||||
|
||||
@@ -798,7 +798,7 @@ public class DataController {
|
||||
map.put("province",cityMap.get(cityInfo.getCity()));
|
||||
map.put("cityLevel", cityInfo.getCityLevel());
|
||||
map.put("rankingLevel", rankMap.get(cityInfo.getCity()));
|
||||
if(cat.equals("小区")){
|
||||
if(cat.equals("小区")){
|
||||
map.put("existingDistrictCount", cityInfo.getExistingDistrictCount());
|
||||
map.put("districtsHasLoudong", cityInfo.getDistrictsHasLoudong() == null ? 0 : cityInfo.getDistrictsHasLoudong());
|
||||
map.put("districtsHasFanghao", cityInfo.getDistrictsHasFanghao() == null ? 0 : cityInfo.getDistrictsHasFanghao());
|
||||
@@ -808,23 +808,23 @@ public class DataController {
|
||||
map.put("priceCreditGte66Coverage", cityInfo.getPriceCreditGte66Coverage());
|
||||
map.put("priceCreditGte60Coverage", cityInfo.getPriceCreditGte60Coverage());
|
||||
map.put("priceCreditGte00Coverage", cityInfo.getPriceCreditGte00Coverage());
|
||||
}else if(cat.equals("写字楼")){
|
||||
}else if(cat.equals("写字楼")){
|
||||
map.put("existingOfficeCount", cityInfo.getExistingOfficeCount());
|
||||
}else if(cat.equals("商铺")){
|
||||
}else if(cat.equals("商铺")){
|
||||
map.put("existingShopCount", cityInfo.getExistingShopCount());
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> detailMap = null;
|
||||
if(cat.equals("小区")){
|
||||
if(cat.equals("小区")){
|
||||
detailMap = cityInfo.getDistrictDetail();
|
||||
}else if(cat.equals("写字楼")){
|
||||
}else if(cat.equals("写字楼")){
|
||||
detailMap = cityInfo.getOfficeDetail();
|
||||
}else if(cat.equals("房号")){
|
||||
}else if(cat.equals("房号")){
|
||||
detailMap = cityInfo.getHouseLoudongDetail();
|
||||
}else if(cat.equals("商铺")){
|
||||
}else if(cat.equals("商铺")){
|
||||
detailMap = cityInfo.getShopDetail();
|
||||
}else if(cat.equals("楼栋")){
|
||||
}else if(cat.equals("楼栋")){
|
||||
detailMap = cityInfo.getLoudongDetail();
|
||||
}
|
||||
if(null != detailMap){
|
||||
@@ -844,7 +844,7 @@ public class DataController {
|
||||
Map displayMap = getFliedDisplay(cat);
|
||||
|
||||
/*
|
||||
以displayMap为准 移除outfields中多余字段
|
||||
以displayMap为准 移除outfields中多余字段
|
||||
*/
|
||||
Iterator<String> it = outfields.iterator();
|
||||
while(it.hasNext()) {
|
||||
@@ -860,9 +860,9 @@ public class DataController {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
//因 写字楼导出仅展示写字楼后台的字段需求 改动
|
||||
//因 写字楼导出仅展示写字楼后台的字段需求 改动
|
||||
// for(String key : outfields){
|
||||
// if(cat.equals("商铺")){
|
||||
// if(cat.equals("商铺")){
|
||||
// if(key.equals("bedKind")){
|
||||
// continue;
|
||||
// }
|
||||
@@ -881,7 +881,7 @@ public class DataController {
|
||||
int index = 0;
|
||||
for (String key : outfields) {
|
||||
Object obj = map.get(key);
|
||||
if(cat.equals("商铺")){
|
||||
if(cat.equals("商铺")){
|
||||
if(key.equals("bedKind")){
|
||||
continue;
|
||||
}
|
||||
@@ -913,233 +913,233 @@ public class DataController {
|
||||
|
||||
public Map<String, String> getFliedDisplay(String cat){
|
||||
Map<String, String> map = new HashMap<String, String>(){ {
|
||||
put( "province" , "省份" );
|
||||
put( "city" , "城市" );
|
||||
put( "cityLevel" , "城市等级" );
|
||||
put( "rankingLevel" , "行政区划" );
|
||||
put( "latLng" , "mapabc经纬度" );
|
||||
put( "latLng2" , "百度经纬度" );
|
||||
put( "province" , "省份" );
|
||||
put( "city" , "城市" );
|
||||
put( "cityLevel" , "城市等级" );
|
||||
put( "rankingLevel" , "行政区划" );
|
||||
put( "latLng" , "mapabc经纬度" );
|
||||
put( "latLng2" , "百度经纬度" );
|
||||
|
||||
// put( "floorplanPics" , "楼层平面图" );
|
||||
// put( "outPics" , "外景图" );
|
||||
// put( "rentPrice" , "租金" );
|
||||
// put( "houseFloor" , "楼层" );
|
||||
// put( "houseHeight" , "楼高" );
|
||||
// put( "houseArea" , "面积" );
|
||||
// put( "room" , "室" );
|
||||
// put( "hall" , "厅" );
|
||||
// put( "direction" , "朝向" );
|
||||
// put( "toilet" , "卫" );
|
||||
// put( "noise" , "噪音" );
|
||||
// put( "fitmentRank" , "装修" );
|
||||
// put( "fitmentAge" , "装修年限" );
|
||||
// put( "leaseTerm","租赁年限");
|
||||
// put( "paymentPattern","付款方式");
|
||||
// put( "sellPrice","出售价格");
|
||||
// put( "mobile","电话");
|
||||
// put( "liveDate","开业时间");
|
||||
// put( "divisible","是否可分割");
|
||||
// put( "unifiedManage","是否统一管理");
|
||||
// put( "metroInfo","地铁沿线");
|
||||
// put( "metroNames","地铁站名");
|
||||
// put( "facilities","配套设施");
|
||||
// put( "propertyInfo","物业概况");
|
||||
// put( "traffic","交通情况");
|
||||
// put( "surrounding","周边情况");
|
||||
// put( "rentType","租售类型");
|
||||
// put( "price","价格");
|
||||
// put("schools","对口学校");
|
||||
// put("estateType" , "物业类型" );
|
||||
// put("estateType2","物业类型");
|
||||
// put("buildDate","建筑年代");
|
||||
// put( "floorplanPics" , "楼层平面图" );
|
||||
// put( "outPics" , "外景图" );
|
||||
// put( "rentPrice" , "租金" );
|
||||
// put( "houseFloor" , "楼层" );
|
||||
// put( "houseHeight" , "楼高" );
|
||||
// put( "houseArea" , "面积" );
|
||||
// put( "room" , "室" );
|
||||
// put( "hall" , "厅" );
|
||||
// put( "direction" , "朝向" );
|
||||
// put( "toilet" , "卫" );
|
||||
// put( "noise" , "噪音" );
|
||||
// put( "fitmentRank" , "装修" );
|
||||
// put( "fitmentAge" , "装修年限" );
|
||||
// put( "leaseTerm","租赁年限");
|
||||
// put( "paymentPattern","付款方式");
|
||||
// put( "sellPrice","出售价格");
|
||||
// put( "mobile","电话");
|
||||
// put( "liveDate","开业时间");
|
||||
// put( "divisible","是否可分割");
|
||||
// put( "unifiedManage","是否统一管理");
|
||||
// put( "metroInfo","地铁沿线");
|
||||
// put( "metroNames","地铁站名");
|
||||
// put( "facilities","配套设施");
|
||||
// put( "propertyInfo","物业概况");
|
||||
// put( "traffic","交通情况");
|
||||
// put( "surrounding","周边情况");
|
||||
// put( "rentType","租售类型");
|
||||
// put( "price","价格");
|
||||
// put("schools","对口学校");
|
||||
// put("estateType" , "物业类型" );
|
||||
// put("estateType2","物业类型");
|
||||
// put("buildDate","建筑年代");
|
||||
} };//
|
||||
|
||||
if(cat.equals("小区")){
|
||||
if(cat.equals("小区")){
|
||||
map = setDistrictFields(map);
|
||||
}else if(cat.equals("写字楼")){
|
||||
}else if(cat.equals("写字楼")){
|
||||
map = setOfficeFields(map);
|
||||
}else if(cat.equals("房号")){
|
||||
}else if(cat.equals("房号")){
|
||||
map = setRoomNumberFields(map);
|
||||
}else if(cat.equals("商铺")){
|
||||
}else if(cat.equals("商铺")){
|
||||
map = setShopsFields(map);
|
||||
}else if(cat.equals("楼栋")){
|
||||
}else if(cat.equals("楼栋")){
|
||||
map = setBuildingFields(map);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
private Map setDistrictFields (Map map){
|
||||
map.put( "existingDistrictCount" , "小区数量" );
|
||||
map.put( "districtsHasLoudong" , "有楼栋的小区数量" );
|
||||
map.put( "districtsHasFanghao" , "有房号的小区数量" );
|
||||
map.put( "priceCoverage" , "价格覆盖率" );
|
||||
map.put("districtAliasTotalCount", "别名总量");
|
||||
map.put( "priceCreditGte80Coverage", "0.8≤价格可信度");
|
||||
map.put( "priceCreditGte66Coverage", "0.66≤价格可信度<0.8");
|
||||
map.put( "priceCreditGte60Coverage", "0.6≤价格可信度<0.66");
|
||||
map.put( "priceCreditGte00Coverage", "价格可信度<0.6");
|
||||
map.put( "businessQuarter","商圈");
|
||||
map.put( "startBuildingDate","开工时间");
|
||||
map.put( "liveDate","交房时间");
|
||||
map.put( "loopLineInfo","环线");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put( "houseProperty","产权性质");
|
||||
map.put( "licence","预售许可证");
|
||||
map.put( "buildStructure","建筑结构");
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
map.put( "estateType2" , "物业类型" );
|
||||
map.put( "householdCount" , "户数" );
|
||||
map.put( "openDate" , "开盘时间" );
|
||||
map.put("buildDate","建筑年代");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "cubagePercent" , "容积率" );
|
||||
map.put( "virescencePercent" , "绿化率" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
map.put("streetCommunity","街道社区");
|
||||
map.put("committee","居委会");
|
||||
map.put("schools","对口小学");
|
||||
map.put("houseStructure","房屋结构");
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
map.put("mainTypeArea","主力面积");
|
||||
map.put("loudongCount","楼栋数");
|
||||
map.put( "carSiteCount" , "停车位描述" );
|
||||
map.put("mappingAlias","映射别名");
|
||||
map.put("elevator","电梯");
|
||||
map.put("township","乡镇街道");
|
||||
map.put("kindergartens","对口幼儿园");
|
||||
map.put("mainType","主力户型");
|
||||
map.put("landProperty","权属类别");
|
||||
map.put("usageCard","土地使用权证号");
|
||||
map.put("occupancyRate","入住率");
|
||||
map.put("landUsageStart","土地使用年限");
|
||||
map.put( "rentPrice","出租价格");
|
||||
map.put("realUsePercent","得房率");
|
||||
map.put( "existingDistrictCount" , "小区数量" );
|
||||
map.put( "districtsHasLoudong" , "有楼栋的小区数量" );
|
||||
map.put( "districtsHasFanghao" , "有房号的小区数量" );
|
||||
map.put( "priceCoverage" , "价格覆盖率" );
|
||||
map.put("districtAliasTotalCount", "别名总量");
|
||||
map.put( "priceCreditGte80Coverage", "0.8≤价格可信度");
|
||||
map.put( "priceCreditGte66Coverage", "0.66≤价格可信度<0.8");
|
||||
map.put( "priceCreditGte60Coverage", "0.6≤价格可信度<0.66");
|
||||
map.put( "priceCreditGte00Coverage", "价格可信度<0.6");
|
||||
map.put( "businessQuarter","商圈");
|
||||
map.put( "startBuildingDate","开工时间");
|
||||
map.put( "liveDate","交房时间");
|
||||
map.put( "loopLineInfo","环线");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put( "houseProperty","产权性质");
|
||||
map.put( "licence","预售许可证");
|
||||
map.put( "buildStructure","建筑结构");
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
map.put( "estateType2" , "物业类型" );
|
||||
map.put( "householdCount" , "户数" );
|
||||
map.put( "openDate" , "开盘时间" );
|
||||
map.put("buildDate","建筑年代");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "cubagePercent" , "容积率" );
|
||||
map.put( "virescencePercent" , "绿化率" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
map.put("streetCommunity","街道社区");
|
||||
map.put("committee","居委会");
|
||||
map.put("schools","对口小学");
|
||||
map.put("houseStructure","房屋结构");
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
map.put("mainTypeArea","主力面积");
|
||||
map.put("loudongCount","楼栋数");
|
||||
map.put( "carSiteCount" , "停车位描述" );
|
||||
map.put("mappingAlias","映射别名");
|
||||
map.put("elevator","电梯");
|
||||
map.put("township","乡镇街道");
|
||||
map.put("kindergartens","对口幼儿园");
|
||||
map.put("mainType","主力户型");
|
||||
map.put("landProperty","权属类别");
|
||||
map.put("usageCard","土地使用权证号");
|
||||
map.put("occupancyRate","入住率");
|
||||
map.put("landUsageStart","土地使用年限");
|
||||
map.put( "rentPrice","出租价格");
|
||||
map.put("realUsePercent","得房率");
|
||||
return map;
|
||||
}
|
||||
private Map setOfficeFields (Map map){
|
||||
map.put( "existingOfficeCount" , "写字楼数量" );
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
// map.put( "estateType2" , "物业类型" );
|
||||
// map.put( "openDate" , "开盘时间" );
|
||||
// map.put( "liveDate","交房时间");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
// map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "cubagePercent" , "容积率" );
|
||||
map.put( "virescencePercent" , "绿化率" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
// map.put( "startBuildingDate","开工时间");
|
||||
// map.put( "carSiteCount" , "停车位描述" );
|
||||
map.put( "bedKind" , "写字楼等级" );
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
// map.put( "businessQuarter","商圈");
|
||||
map.put( "loopLineInfo","环线");
|
||||
// map.put( "floorInfo","楼层状况");
|
||||
map.put("undergroundCarSite", "地下车位数");
|
||||
map.put("landCarSite", "地上车位数");
|
||||
map.put("parkingFee", "车位月租金");
|
||||
map.put( "bayArea","开间面积");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put("elevatorsCount","电梯数量");
|
||||
map.put("personElevatorsCount","客梯数");
|
||||
map.put("goodsElevatorCount","货梯数");
|
||||
map.put("standardHeight", "标准层高");
|
||||
map.put("clearHeight", "净高");
|
||||
map.put("standardArea", "标准层面积");
|
||||
map.put("foreign", "是否涉外");
|
||||
map.put("register", "是否可注册");
|
||||
map.put("lobbyHeight", "大堂层高");
|
||||
// map.put("township","乡镇街道");
|
||||
map.put("divisible", "是否可分割");
|
||||
map.put("landFloor","地上层数");
|
||||
map.put("undergroundFloor","地下层数");
|
||||
map.put("rentPrice","租金价格");
|
||||
map.put("halfYearRentPrice","近半年租金价格");
|
||||
map.put( "existingOfficeCount" , "写字楼数量" );
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
// map.put( "estateType2" , "物业类型" );
|
||||
// map.put( "openDate" , "开盘时间" );
|
||||
// map.put( "liveDate","交房时间");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
// map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "cubagePercent" , "容积率" );
|
||||
map.put( "virescencePercent" , "绿化率" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
// map.put( "startBuildingDate","开工时间");
|
||||
// map.put( "carSiteCount" , "停车位描述" );
|
||||
map.put( "bedKind" , "写字楼等级" );
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
// map.put( "businessQuarter","商圈");
|
||||
map.put( "loopLineInfo","环线");
|
||||
// map.put( "floorInfo","楼层状况");
|
||||
map.put("undergroundCarSite", "地下车位数");
|
||||
map.put("landCarSite", "地上车位数");
|
||||
map.put("parkingFee", "车位月租金");
|
||||
map.put( "bayArea","开间面积");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put("elevatorsCount","电梯数量");
|
||||
map.put("personElevatorsCount","客梯数");
|
||||
map.put("goodsElevatorCount","货梯数");
|
||||
map.put("standardHeight", "标准层高");
|
||||
map.put("clearHeight", "净高");
|
||||
map.put("standardArea", "标准层面积");
|
||||
map.put("foreign", "是否涉外");
|
||||
map.put("register", "是否可注册");
|
||||
map.put("lobbyHeight", "大堂层高");
|
||||
// map.put("township","乡镇街道");
|
||||
map.put("divisible", "是否可分割");
|
||||
map.put("landFloor","地上层数");
|
||||
map.put("undergroundFloor","地下层数");
|
||||
map.put("rentPrice","租金价格");
|
||||
map.put("halfYearRentPrice","近半年租金价格");
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private Map setRoomNumberFields (Map map){
|
||||
map.put( "house_count","房号总量");
|
||||
map.put( "exists_house_dis_count","有房号的小区数量");
|
||||
map.put( "house_num_rate","楼号覆盖率");
|
||||
map.put( "unit_num_rate","单元覆盖率");
|
||||
map.put( "room_num_rate","室号覆盖率");
|
||||
map.put( "area_rate","面积覆盖率");
|
||||
map.put( "room_info_rate","户型覆盖率");
|
||||
map.put( "hourse_structure_rate","户型结构覆盖率");
|
||||
map.put( "actualFloor","实际层覆盖率");
|
||||
map.put( "nominalFloor","名义层覆盖率");
|
||||
map.put( "build_type","建筑类型覆盖率");
|
||||
map.put( "house_count","房号总量");
|
||||
map.put( "exists_house_dis_count","有房号的小区数量");
|
||||
map.put( "house_num_rate","楼号覆盖率");
|
||||
map.put( "unit_num_rate","单元覆盖率");
|
||||
map.put( "room_num_rate","室号覆盖率");
|
||||
map.put( "area_rate","面积覆盖率");
|
||||
map.put( "room_info_rate","户型覆盖率");
|
||||
map.put( "hourse_structure_rate","户型结构覆盖率");
|
||||
map.put( "actualFloor","实际层覆盖率");
|
||||
map.put( "nominalFloor","名义层覆盖率");
|
||||
map.put( "build_type","建筑类型覆盖率");
|
||||
return map;
|
||||
}
|
||||
|
||||
private Map setShopsFields (Map map){
|
||||
map.put( "existingShopCount" , "商铺数量" );
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
map.put( "estateType2" , "物业类型" );
|
||||
map.put( "openDate" , "开盘时间" );
|
||||
map.put( "liveDate","交房时间");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "floor","建筑楼层");
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
map.put( "businessQuarter","商圈");
|
||||
map.put( "startBuildingDate","开工时间");
|
||||
map.put("sight", "开间面积");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put( "businessStatus","经营业态");
|
||||
map.put("parkingFee", "车位月租金");
|
||||
map.put("township","乡镇街道");
|
||||
map.put( "loopLineInfo","环线");
|
||||
map.put("landFloor","地上层数");
|
||||
map.put("undergroundFloor","地下层数");
|
||||
map.put( "existingShopCount" , "商铺数量" );
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
map.put( "estateType2" , "物业类型" );
|
||||
map.put( "openDate" , "开盘时间" );
|
||||
map.put( "liveDate","交房时间");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "floor","建筑楼层");
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
map.put( "businessQuarter","商圈");
|
||||
map.put( "startBuildingDate","开工时间");
|
||||
map.put("sight", "开间面积");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put( "businessStatus","经营业态");
|
||||
map.put("parkingFee", "车位月租金");
|
||||
map.put("township","乡镇街道");
|
||||
map.put( "loopLineInfo","环线");
|
||||
map.put("landFloor","地上层数");
|
||||
map.put("undergroundFloor","地下层数");
|
||||
return map;
|
||||
}
|
||||
private Map setBuildingFields (Map map){
|
||||
map.put( "loudong_count","楼栋总量");
|
||||
map.put( "exists_loudong_dis_count","有楼栋的小区数量");
|
||||
map.put( "unit_num_rate","单元覆盖率");
|
||||
map.put( "loudong_num_rate","楼栋号覆盖率");
|
||||
map.put( "loudong_height_rate","总楼层覆盖率");
|
||||
map.put( "elevatornumber_rate","电梯数覆盖率");
|
||||
map.put( "households_rate","户数覆盖率");
|
||||
map.put( "address_rate","地址覆盖率");
|
||||
map.put( "structure_rate","建筑结构覆盖率");
|
||||
map.put( "build_year_rate","建筑年代覆盖率");
|
||||
map.put( "usage_rate","楼栋用途覆盖率");
|
||||
map.put( "loudong_type_rate","楼栋类型覆盖率");
|
||||
map.put( "floor_type_reate","建筑类型(按楼层)覆盖率");
|
||||
map.put( "archiNature_rate","建筑性质覆盖率");
|
||||
map.put( "totalAreas_rate","建筑总面积覆盖率");
|
||||
map.put( "loudong_count","楼栋总量");
|
||||
map.put( "exists_loudong_dis_count","有楼栋的小区数量");
|
||||
map.put( "unit_num_rate","单元覆盖率");
|
||||
map.put( "loudong_num_rate","楼栋号覆盖率");
|
||||
map.put( "loudong_height_rate","总楼层覆盖率");
|
||||
map.put( "elevatornumber_rate","电梯数覆盖率");
|
||||
map.put( "households_rate","户数覆盖率");
|
||||
map.put( "address_rate","地址覆盖率");
|
||||
map.put( "structure_rate","建筑结构覆盖率");
|
||||
map.put( "build_year_rate","建筑年代覆盖率");
|
||||
map.put( "usage_rate","楼栋用途覆盖率");
|
||||
map.put( "loudong_type_rate","楼栋类型覆盖率");
|
||||
map.put( "floor_type_reate","建筑类型(按楼层)覆盖率");
|
||||
map.put( "archiNature_rate","建筑性质覆盖率");
|
||||
map.put( "totalAreas_rate","建筑总面积覆盖率");
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -1216,7 +1216,7 @@ public class DataController {
|
||||
}
|
||||
|
||||
private void addLngLattask(){
|
||||
System.out.println("开始时间:"+new Date());
|
||||
System.out.println("开始时间:"+new Date());
|
||||
|
||||
isRun = true;
|
||||
|
||||
@@ -1226,14 +1226,14 @@ public class DataController {
|
||||
params.add(new QueryParam("processStatus", 0));
|
||||
List<NoLatlngDistrict> noLatlngDistricts = noLatlngDistrictService.findAllByParams(params);
|
||||
if(noLatlngDistricts.size()==0){
|
||||
//删除老记录
|
||||
//删除老记录
|
||||
noLatlngDistrictService.deleteAll();
|
||||
addNoLatLngDistricts(serverAreas);
|
||||
}
|
||||
|
||||
for(NoLatlngDistrict noLatLngDistrict : noLatlngDistricts){
|
||||
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0;
|
||||
double lat2 = 0;
|
||||
Map resultMap = null;
|
||||
@@ -1290,7 +1290,7 @@ public class DataController {
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println("结束时间:"+new Date());
|
||||
System.out.println("结束时间:"+new Date());
|
||||
isRun = false;
|
||||
}
|
||||
|
||||
@@ -1298,9 +1298,9 @@ public class DataController {
|
||||
private void addNoLatLngDistricts(List<ServerArea> serverAreas){
|
||||
|
||||
String[] columns = {"city","region","name","address","lat","lng","lat2","lng2"};
|
||||
//新增没有经纬度的小区
|
||||
//新增没有经纬度的小区
|
||||
for(ServerArea serverArea : serverAreas){
|
||||
if(serverArea.getDisplay().equals("全国")){
|
||||
if(serverArea.getDisplay().equals("全国")){
|
||||
continue;
|
||||
}
|
||||
addRows(serverArea.getDisplay(), "district", columns);
|
||||
|
||||
+17
-17
@@ -53,14 +53,14 @@ public class DataDealController {
|
||||
private DealRuleDao dealRuleDao;
|
||||
private DistrictDao districtDao;
|
||||
private SurplusDistrictService surplusDistrictService;
|
||||
private static List<String> distTypes = Arrays.asList("多层","小高层","超高层","高层","花园洋房","老洋房","四合院");
|
||||
private static List<String> villaTypes = Arrays.asList("独栋","双拼","联排","叠加");
|
||||
private static List<String> shopTypes = Arrays.asList("多层","小高层","超高层","高层","独栋","双拼","联排","叠加");
|
||||
private static List<String> distTypes = Arrays.asList("多层","小高层","超高层","高层","花园洋房","老洋房","四合院");
|
||||
private static List<String> villaTypes = Arrays.asList("独栋","双拼","联排","叠加");
|
||||
private static List<String> shopTypes = Arrays.asList("多层","小高层","超高层","高层","独栋","双拼","联排","叠加");
|
||||
|
||||
public static int statusFlag=0;
|
||||
|
||||
/**
|
||||
* 查询列表,默认空
|
||||
* 查询列表,默认空
|
||||
* @throws SecurityException
|
||||
* @throws NoSuchMethodException
|
||||
* @throws IllegalAccessException
|
||||
@@ -68,7 +68,7 @@ public class DataDealController {
|
||||
*/
|
||||
public Object listAction(DealModel model) throws Exception {
|
||||
|
||||
//查询所有规则
|
||||
//查询所有规则
|
||||
List<DealRule> ruleList = dealRuleDao.findAll();
|
||||
model.setRuleList(ruleList);
|
||||
|
||||
@@ -202,11 +202,11 @@ public class DataDealController {
|
||||
List<String> result = null;
|
||||
if(tempBuildTypes != null && tempBuildTypes.size() > 0){
|
||||
if(StringUtils.isNotBlank(district.getEstateType2())){
|
||||
if(district.getEstateType2().equals("普通住宅")){
|
||||
if(district.getEstateType2().equals("普通住宅")){
|
||||
result = changeValue(tempBuildTypes, distTypes);
|
||||
}else if(district.getEstateType2().equals("别墅")){
|
||||
}else if(district.getEstateType2().equals("别墅")){
|
||||
result = changeValue(tempBuildTypes, villaTypes);
|
||||
}else if(district.getEstateType2().equals("商住")){
|
||||
}else if(district.getEstateType2().equals("商住")){
|
||||
result = changeValue(tempBuildTypes, shopTypes);
|
||||
}
|
||||
}else{
|
||||
@@ -242,7 +242,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行选择脚本,判断小区是否符合
|
||||
* 执行选择脚本,判断小区是否符合
|
||||
* @param condition
|
||||
* @param district
|
||||
* @return
|
||||
@@ -261,7 +261,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行操作脚本,对数据进行操作
|
||||
* 执行操作脚本,对数据进行操作
|
||||
* @param condition
|
||||
* @param district
|
||||
* @throws ScriptException
|
||||
@@ -287,7 +287,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面点击的方法
|
||||
* 页面点击的方法
|
||||
* @param model
|
||||
* @return
|
||||
* @throws NoSuchMethodException
|
||||
@@ -376,7 +376,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换数据
|
||||
* 转换数据
|
||||
* @param tempBuildTypes
|
||||
* @param types
|
||||
* @return
|
||||
@@ -395,7 +395,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加规则
|
||||
* 添加规则
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -426,7 +426,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除规则
|
||||
* 删除规则
|
||||
*/
|
||||
public Object deleteRuleAction(DealModel model){
|
||||
if(StringUtils.isNotBlank(model.getRuleId())){
|
||||
@@ -436,7 +436,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 规则管理页面
|
||||
* 规则管理页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -465,7 +465,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待编辑的规则数据
|
||||
* 获取待编辑的规则数据
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -479,7 +479,7 @@ public class DataDealController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市下的区域、板块信息(ajax用)
|
||||
* 获取城市下的区域、板块信息(ajax用)
|
||||
*/
|
||||
public Object getRegionsAction(DistrictModel model) {
|
||||
model.setViewType("json");
|
||||
|
||||
+4
-4
@@ -76,9 +76,9 @@ public class DatastoreStatController {
|
||||
List<String> citys = null;
|
||||
|
||||
if(StringUtils.isBlank(model.getCityDisplay())){
|
||||
model.setCityDisplay("上海");
|
||||
model.setCityDisplay("上海");
|
||||
citys = new ArrayList<String>();
|
||||
citys.add("上海");
|
||||
citys.add("上海");
|
||||
}else{
|
||||
if(model.getCityDisplay().indexOf(",")!=-1){
|
||||
citys = getCitys(model.getCityDisplay());
|
||||
@@ -107,9 +107,9 @@ public class DatastoreStatController {
|
||||
List<String> citys = null;
|
||||
|
||||
if(StringUtils.isBlank(model.getCityDisplay())){
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
citys = new ArrayList<String>();
|
||||
citys.add("全国");
|
||||
citys.add("全国");
|
||||
}else{
|
||||
if(model.getCityDisplay().indexOf(",")!=-1){
|
||||
citys = getCitys(model.getCityDisplay());
|
||||
|
||||
+24
-24
@@ -96,16 +96,16 @@ public class DevelopmentZoneController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
ret.setJsonModel(data);
|
||||
if (model.getId() == null) {
|
||||
// name province bdLocation level 不能为空
|
||||
// name province bdLocation level 不能为空
|
||||
if (StringUtils.isBlank(model.getProvince()) || StringUtils.isBlank(model.getName()) || StringUtils.isBlank(model.getLevel())) {
|
||||
data.put("msg", "保存失败(开发区名称,所在省份,级别不能为空)");
|
||||
data.put("msg", "保存失败(开发区名称,所在省份,级别不能为空)");
|
||||
return ret;
|
||||
}
|
||||
DevelopmentZone entity = new DevelopmentZone();
|
||||
// name province bdLocation level 不能为空/
|
||||
// name province bdLocation level 不能为空/
|
||||
entity.setName(model.getName());
|
||||
entity.setProvince(model.getProvince());
|
||||
// 新加开发区,围栏不是必须有的
|
||||
// 新加开发区,围栏不是必须有的
|
||||
if (model.getBdShape() != null && !model.getBdShape().toString().equals("[]")) {
|
||||
String locationStr = model.getBdShape().toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(" ", "");
|
||||
List<List<Double>> bdLocationList = new ArrayList<List<Double>>();
|
||||
@@ -117,25 +117,25 @@ public class DevelopmentZoneController {
|
||||
location.add(Double.parseDouble(splitStr2[1]));
|
||||
bdLocationList.add(location);
|
||||
}
|
||||
//加上第一个,形成首尾闭合
|
||||
//加上第一个,形成首尾闭合
|
||||
bdLocationList.add(bdLocationList.get(0));
|
||||
model.setBdShape(bdLocationList);
|
||||
// 百度经纬度
|
||||
// 百度经纬度
|
||||
Map<String, Object> bdShape = new HashMap<String, Object>();
|
||||
bdShape.put("type", "polygon");
|
||||
bdShape.put("coordinates", model.getBdShape());
|
||||
entity.setBdShape(bdShape);
|
||||
// 高德经纬度
|
||||
// 高德经纬度
|
||||
Map<String, Object> shape = new HashMap<String, Object>();
|
||||
shape.put("type", "polygon");
|
||||
Object coordinates = convertGeoList(model.getBdShape());
|
||||
shape.put("coordinates", coordinates);
|
||||
entity.setShape(shape);
|
||||
entity.setOperateResult("已处理");
|
||||
entity.setOperateResult("已处理");
|
||||
}
|
||||
|
||||
entity.setLevel(model.getLevel());
|
||||
String aliasString = model.getAlias().replaceAll(",", ",");
|
||||
String aliasString = model.getAlias().replaceAll(",", ",");
|
||||
List<String> alias = Arrays.asList(aliasString.split("\\s*,\\s*"));
|
||||
entity.setAlias(alias);
|
||||
entity.setAddress(StringUtils.isBlank(model.getAddress()) ? "" : model.getAddress());
|
||||
@@ -151,10 +151,10 @@ public class DevelopmentZoneController {
|
||||
entity.setDistrict(StringUtils.isBlank(model.getDistrict()) ? "" : model.getDistrict());
|
||||
entity.setImgUrl(StringUtils.isBlank(model.getImgUrl()) ? "" : model.getImgUrl());
|
||||
entity.setOperateResult(StringUtils.isBlank(model.getOperateResult()) ? "" : model.getOperateResult());
|
||||
//记录操作人员
|
||||
//记录操作人员
|
||||
entity.setOperator(user.getRealName());
|
||||
developmentZoneService.saveDevelopmentZone(entity);
|
||||
data.put("msg", "保存成功");
|
||||
data.put("msg", "保存成功");
|
||||
} else {
|
||||
// DevelopmentZone entity = developmentZoneService.findDevelopmentZone(model.getId());
|
||||
Map<String, Object> udata = new HashMap<String, Object>();
|
||||
@@ -178,25 +178,25 @@ public class DevelopmentZoneController {
|
||||
location.add(Double.parseDouble(splitStr2[1]));
|
||||
bdLocationList.add(location);
|
||||
}
|
||||
//加上第一个,形成首尾闭合
|
||||
//加上第一个,形成首尾闭合
|
||||
bdLocationList.add(bdLocationList.get(0));
|
||||
model.setBdShape(bdLocationList);
|
||||
// 百度经纬度
|
||||
// 百度经纬度
|
||||
Map<String, Object> bdShape = new HashMap<String, Object>();
|
||||
bdShape.put("type", "polygon");
|
||||
bdShape.put("coordinates", model.getBdShape());
|
||||
udata.put("bdShape", bdShape);
|
||||
// 高德经纬度
|
||||
// 高德经纬度
|
||||
Map<String, Object> shape = new HashMap<String, Object>();
|
||||
shape.put("type", "polygon");
|
||||
Object coordinates = convertGeoList(model.getBdShape());
|
||||
shape.put("coordinates", coordinates);
|
||||
udata.put("shape", shape);
|
||||
udata.put("operateResult", "已处理");
|
||||
udata.put("operateResult", "已处理");
|
||||
}
|
||||
if (StringUtils.isNotBlank(model.getAlias())) {
|
||||
String aliasString = model.getAlias().replaceAll(",", ",");
|
||||
List<String> alias = Arrays.asList(aliasString.split("\\s*,\\s*"));
|
||||
String aliasString = model.getAlias().replaceAll(",", ",");
|
||||
List<String> alias = Arrays.asList(aliasString.split("\\s*,\\s*"));
|
||||
udata.put("alias", alias);
|
||||
}
|
||||
if (StringUtils.isNotBlank(model.getAddress())) {
|
||||
@@ -236,10 +236,10 @@ public class DevelopmentZoneController {
|
||||
udata.put("operateResult", model.getOperateResult());
|
||||
}
|
||||
udata.put("createTime", new Date());
|
||||
//记录操作人员
|
||||
//记录操作人员
|
||||
udata.put("operator", user.getRealName());
|
||||
developmentZoneService.updateDevelopmentZone(udata, model.getId());
|
||||
data.put("msg", "修改成功");
|
||||
data.put("msg", "修改成功");
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -273,15 +273,15 @@ public class DevelopmentZoneController {
|
||||
public void setBkoffUsersService(BkoffUsersService bkoffUsersService) {
|
||||
this.bkoffUsersService = bkoffUsersService;
|
||||
}
|
||||
//将百度坐标转为高德坐标
|
||||
//将百度坐标转为高德坐标
|
||||
|
||||
public List<List<Double>> convertGeoList(List<List<Double>> bdLocationList) {
|
||||
List<List<Double>> gdLocationList = new ArrayList<List<Double>>();
|
||||
|
||||
// 使用增强的 for 循环遍历列表
|
||||
// 使用增强的 for 循环遍历列表
|
||||
for (List<Double> bdLocation : bdLocationList) {
|
||||
List<Double> gdLocation = new ArrayList<Double>();
|
||||
// 将百度坐标转为高德坐标
|
||||
// 将百度坐标转为高德坐标
|
||||
Map<String, Double> map = GeoUtils.bd09ToGcj02(bdLocation.get(0), bdLocation.get(1));
|
||||
gdLocation.add(map.get(LAT));
|
||||
gdLocation.add(map.get(LNG));
|
||||
@@ -298,11 +298,11 @@ public class DevelopmentZoneController {
|
||||
.field("file", file)
|
||||
.field("token", "F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB")
|
||||
.asString();
|
||||
// 获取返回的链接
|
||||
// 获取返回的链接
|
||||
JSONObject jsonResponse = new JSONObject(response.getBody());
|
||||
String link = jsonResponse.getJSONObject("result").getString("link");
|
||||
data.put("imgUrl", link);
|
||||
data.put("msg", "图片上传成功");
|
||||
data.put("msg", "图片上传成功");
|
||||
ret.setJsonModel(data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
+11
-11
@@ -40,7 +40,7 @@ public class DictionaryController {
|
||||
|
||||
public Object saveAction(DictionaryModel model) {
|
||||
if (StringUtils.isBlank(model.getDictionaryBo().getName()) || StringUtils.isBlank(model.getDictionaryBo().getCat())) {
|
||||
model.flash().setAttribute("message", "信息输入不完整");
|
||||
model.flash().setAttribute("message", "信息输入不完整");
|
||||
return model.redirect("/dictionary/create");
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class DictionaryController {
|
||||
queryBean.setName(model.getDictionaryBo().getName());
|
||||
List<DictionaryBo> boList = dictionaryService.findByQueryBean(queryBean);
|
||||
if (boList != null && boList.size() > 0) {
|
||||
model.flash().setAttribute("message", "该类型的词已经存在");
|
||||
model.flash().setAttribute("message", "该类型的词已经存在");
|
||||
return model.redirect("/dictionary/create");
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ public class DictionaryController {
|
||||
dictionary.setCDate(new Date());
|
||||
dictionaryService.save(dictionary);
|
||||
if (StringUtils.isNotBlank(dictionary.getId())) {
|
||||
model.flash().setAttribute("message", "ID: " + dictionary.getId() + " 保存成功");
|
||||
model.flash().setAttribute("message", "ID: " + dictionary.getId() + " 保存成功");
|
||||
return model.redirect("/dictionary/show?id=" + dictionary.getId());
|
||||
} else {
|
||||
model.flash().setAttribute("message", "Dictionary 保存失败");
|
||||
model.flash().setAttribute("message", "Dictionary 保存失败");
|
||||
return model.redirect("/dictionary/create");
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class DictionaryController {
|
||||
public Object showAction(DictionaryModel model) {
|
||||
Dictionary dictionary = dictionaryService.findById(model.getId());
|
||||
if (null == dictionary) {
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 没找到结果");
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 没找到结果");
|
||||
return model.redirect("/dictionary/list");
|
||||
} else {
|
||||
DictionaryBo bo = new DictionaryBo(dictionary);
|
||||
@@ -89,7 +89,7 @@ public class DictionaryController {
|
||||
// Dictionary dictionary = dictionaryService.findById(model.getId());
|
||||
// if (null == dictionary) {
|
||||
// model.flash().setAttribute("message", "ID: " + model.getId() +
|
||||
// " 没找到结果");
|
||||
// " 没找到结果");
|
||||
// return model.redirect("/dictionary/list");
|
||||
// } else {
|
||||
// model.setDictionaryBo(new DictionaryBo(dictionary));
|
||||
@@ -107,17 +107,17 @@ public class DictionaryController {
|
||||
// BeanUtils.copyProperties(model.getDictionaryBo(), dictionary);
|
||||
// dictionaryService.update(dictionary);
|
||||
// model.flash().setAttribute("message", "ID: " +
|
||||
// model.getDictionaryBo().getId() + " 更新成功");
|
||||
// model.getDictionaryBo().getId() + " 更新成功");
|
||||
// return model.redirect("/dictionary/show?id=" +
|
||||
// model.getDictionaryBo().getId());
|
||||
// } catch (Exception e) {
|
||||
// model.flash().setAttribute("message", "ID: " +
|
||||
// model.getDictionaryBo().getId() + " 更新失败");
|
||||
// model.getDictionaryBo().getId() + " 更新失败");
|
||||
// return model.redirect("/dictionary/edit");
|
||||
// }
|
||||
// } else {
|
||||
// model.flash().setAttribute("message", "ID: " +
|
||||
// model.getDictionaryBo().getId() + " 没找到结果");
|
||||
// model.getDictionaryBo().getId() + " 没找到结果");
|
||||
// return model.redirect("/dictionary/list");
|
||||
// }
|
||||
|
||||
@@ -127,10 +127,10 @@ public class DictionaryController {
|
||||
public Object deleteAction(DictionaryModel model) {
|
||||
if (StringUtils.isNotBlank(model.getId())) {
|
||||
dictionaryService.deleteById(model.getId());
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除成功");
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除成功");
|
||||
return model.redirect("/dictionary/list");
|
||||
} else {
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除失败");
|
||||
model.flash().setAttribute("message", "ID: " + model.getId() + " 删除失败");
|
||||
return model.redirect("/dictionary/list");
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -21,7 +21,7 @@ import com.fangjia.service.bkoff.DikuaiService;
|
||||
import com.fangjia.service.mongo.fangjia.RegionBlockService;
|
||||
|
||||
/**
|
||||
* 地块控制器
|
||||
* 地块控制器
|
||||
*
|
||||
* @author yinjihuan
|
||||
*
|
||||
@@ -38,7 +38,7 @@ public class DikuaiController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询页
|
||||
* 列表查询页
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -60,7 +60,7 @@ public class DikuaiController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* 删除数据
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -72,7 +72,7 @@ public class DikuaiController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入编辑页面
|
||||
* 进入编辑页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -116,7 +116,7 @@ public class DikuaiController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存和修改
|
||||
* 保存和修改
|
||||
* @param diKuai
|
||||
* @return
|
||||
*/
|
||||
@@ -131,7 +131,7 @@ public class DikuaiController {
|
||||
} else {
|
||||
diKuai.setId(null);
|
||||
diKuai.setCreateDate(new Date());
|
||||
diKuai.setFrom("人工");
|
||||
diKuai.setFrom("人工");
|
||||
dikuaiService.save(diKuai);
|
||||
}
|
||||
return new JsonModel();
|
||||
|
||||
+21
-21
@@ -71,7 +71,7 @@ public class District2Controller {
|
||||
private OfficeStatService officeStatService;
|
||||
private RentStatDao rentStatDao;
|
||||
/**
|
||||
* 查询列表,默认空
|
||||
* 查询列表,默认空
|
||||
*/
|
||||
public Object listAction(DistrictModel model) {
|
||||
Pager pager = model.getPager(20);
|
||||
@@ -85,7 +85,7 @@ public class District2Controller {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("category", "shop"));
|
||||
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())&&!"全国".equals(model.getCityDisplay())) {
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())&&!"全国".equals(model.getCityDisplay())) {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ public class District2Controller {
|
||||
List<QueryParam> queryparams = new ArrayList<QueryParam>();
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("category", "office"));
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())&&!"全国".equals(model.getCityDisplay())) {
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())&&!"全国".equals(model.getCityDisplay())) {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
|
||||
@@ -369,14 +369,14 @@ public class District2Controller {
|
||||
Date weekend=DateUtil.getFirstDayOfWeek(new Date());
|
||||
DistrictStatBo bo=new DistrictStatBo();
|
||||
if(district.getCategory().equals("shop")){
|
||||
type = "商铺";
|
||||
type = "商铺";
|
||||
bo =shopStatService.findAllShopStat(new DistrictKey(district.getCity(), district.getRegion(), district.getName()), weekend);
|
||||
ShopStat stat = bo.getShopStat();
|
||||
if(null != stat){
|
||||
map.put("avg_price", stat.getAvgPrice());
|
||||
}
|
||||
}else if(district.getCategory().equals("office")){
|
||||
type = "写字楼";
|
||||
type = "写字楼";
|
||||
bo = officeStatService.findOfficeStat(new DistrictKey(district.getCity(), district.getRegion(), district.getName()), weekend);
|
||||
OfficeStat stat = bo.getOfficeStat();
|
||||
if(null != stat){
|
||||
@@ -411,7 +411,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入新增页
|
||||
* 进入新增页
|
||||
*/
|
||||
public Object addAction(DistrictModel model) {
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())) {
|
||||
@@ -423,7 +423,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入新增页
|
||||
* 进入新增页
|
||||
*/
|
||||
public Object addOfficeAction(DistrictModel model) {
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())) {
|
||||
@@ -435,7 +435,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增小区
|
||||
* 保存新增小区
|
||||
*/
|
||||
public Object doAddOfficeAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
District district = model.getDistrict();
|
||||
@@ -497,7 +497,7 @@ public class District2Controller {
|
||||
return model;
|
||||
}
|
||||
/**
|
||||
* 保存新增小区
|
||||
* 保存新增小区
|
||||
*/
|
||||
public Object doAddAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
District district = model.getDistrict();
|
||||
@@ -583,7 +583,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区编辑页
|
||||
* 进入小区编辑页
|
||||
*/
|
||||
public Object editAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -633,7 +633,7 @@ public class District2Controller {
|
||||
|
||||
|
||||
/**
|
||||
* 进入写字楼编辑页
|
||||
* 进入写字楼编辑页
|
||||
*/
|
||||
public Object editOfficeAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -664,7 +664,7 @@ public class District2Controller {
|
||||
return model;
|
||||
}
|
||||
/**
|
||||
* 保存小区修改
|
||||
* 保存小区修改
|
||||
*/
|
||||
public Object saveAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
District district = model.getDistrict();
|
||||
@@ -837,7 +837,7 @@ public class District2Controller {
|
||||
data.put("realUsePercent", district.getRealUsePercent());
|
||||
}
|
||||
districtService.updateById(data, district.getId());
|
||||
msg="保存成功!";
|
||||
msg="保存成功!";
|
||||
}
|
||||
|
||||
model.setViewType("redirect");
|
||||
@@ -850,7 +850,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区(status置1)
|
||||
* 删除小区(status置1)
|
||||
*/
|
||||
public Object deleteAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isNotBlank(model.getId()) && ObjectId.isValid(model.getId())) {
|
||||
@@ -880,7 +880,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区ajax(status置1)
|
||||
* 删除小区ajax(status置1)
|
||||
*/
|
||||
public Object deleteajaxAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
JsonModel ret = new JsonModel();
|
||||
@@ -896,7 +896,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复小区(status置0)
|
||||
* 恢复小区(status置0)
|
||||
*/
|
||||
public Object restoreAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isNotBlank(model.getId()) && ObjectId.isValid(model.getId())) {
|
||||
@@ -917,7 +917,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入图片编辑页
|
||||
* 进入图片编辑页
|
||||
*/
|
||||
public Object editPicAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
model.setViewParam("path", "/district2/editPic");
|
||||
@@ -1482,7 +1482,7 @@ public class District2Controller {
|
||||
district.setAddress(model.getAddress());
|
||||
Map<String,Object> markMap = district.getMarkMap();
|
||||
if(markMap == null || !markMap.containsKey("baiDuCoordLock") || !new Integer(1).equals(markMap.get("baiDuCoordLock"))){
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0;
|
||||
double lat2 = 0;
|
||||
Map<String, Object> infomap = AddressParser.getLngLatByAddress(district.getCity(), model.getAddress());
|
||||
@@ -1527,7 +1527,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入编辑边框页面
|
||||
* 进入编辑边框页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -1548,7 +1548,7 @@ public class District2Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置写字楼百度边框
|
||||
* 设置写字楼百度边框
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -1556,7 +1556,7 @@ public class District2Controller {
|
||||
DistrictJsonModel json = new DistrictJsonModel();
|
||||
if (StringUtils.isBlank(model.getId()) || StringUtils.isBlank(model.getBaiduBorder())) {
|
||||
json.setSuccess(false);
|
||||
json.setMsg("参数不能为空");
|
||||
json.setMsg("参数不能为空");
|
||||
return json;
|
||||
}
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
|
||||
+195
-195
@@ -90,9 +90,9 @@ public class DistrictController {
|
||||
private AverageStatisticsService averageStatisticsService;
|
||||
|
||||
|
||||
private static List<String> distTypes = Arrays.asList("多层", "小高层", "超高层", "高层", "花园洋房", "老洋房", "四合院");
|
||||
private static List<String> villaTypes = Arrays.asList("独栋", "双拼", "联排", "叠加");
|
||||
private static List<String> shopTypes = Arrays.asList("多层", "小高层", "超高层", "高层", "独栋", "双拼", "联排", "叠加");
|
||||
private static List<String> distTypes = Arrays.asList("多层", "小高层", "超高层", "高层", "花园洋房", "老洋房", "四合院");
|
||||
private static List<String> villaTypes = Arrays.asList("独栋", "双拼", "联排", "叠加");
|
||||
private static List<String> shopTypes = Arrays.asList("多层", "小高层", "超高层", "高层", "独栋", "双拼", "联排", "叠加");
|
||||
|
||||
private static Map<String, String> CITY_CODE_MAP = new HashMap<String, String>();
|
||||
public static int statusFlag = 0;
|
||||
@@ -104,26 +104,26 @@ public class DistrictController {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(DistrictController.class);
|
||||
|
||||
static {
|
||||
CITY_CODE_MAP.put("大兴安岭", "大兴安岭地区");
|
||||
CITY_CODE_MAP.put("塔城", "塔城地区");
|
||||
CITY_CODE_MAP.put("山南", "山南地区");
|
||||
CITY_CODE_MAP.put("日喀则", "日喀则地区");
|
||||
CITY_CODE_MAP.put("毕节", "毕节地区");
|
||||
CITY_CODE_MAP.put("海东", "海东地区");
|
||||
CITY_CODE_MAP.put("海北", "海北藏族自治州");
|
||||
CITY_CODE_MAP.put("海南", "海南藏族自治州");
|
||||
CITY_CODE_MAP.put("铜仁", "铜仁地区");
|
||||
CITY_CODE_MAP.put("阿里", "阿里地区");
|
||||
CITY_CODE_MAP.put("昌都", "昌都地区");
|
||||
CITY_CODE_MAP.put("林芝", "林芝地区");
|
||||
CITY_CODE_MAP.put("那曲", "那曲地区");
|
||||
CITY_CODE_MAP.put("阿勒泰", "阿勒泰地区");
|
||||
CITY_CODE_MAP.put("巴音郭楞", "巴音郭楞蒙古自治州");
|
||||
CITY_CODE_MAP.put("哈密", "哈密地区");
|
||||
CITY_CODE_MAP.put("和田", "和田地区");
|
||||
CITY_CODE_MAP.put("喀什", "喀什地区");
|
||||
CITY_CODE_MAP.put("吐鲁番", "吐鲁番地区");
|
||||
CITY_CODE_MAP.put("双鸭山", "双鸭山市");
|
||||
CITY_CODE_MAP.put("大兴安岭", "大兴安岭地区");
|
||||
CITY_CODE_MAP.put("塔城", "塔城地区");
|
||||
CITY_CODE_MAP.put("山南", "山南地区");
|
||||
CITY_CODE_MAP.put("日喀则", "日喀则地区");
|
||||
CITY_CODE_MAP.put("毕节", "毕节地区");
|
||||
CITY_CODE_MAP.put("海东", "海东地区");
|
||||
CITY_CODE_MAP.put("海北", "海北藏族自治州");
|
||||
CITY_CODE_MAP.put("海南", "海南藏族自治州");
|
||||
CITY_CODE_MAP.put("铜仁", "铜仁地区");
|
||||
CITY_CODE_MAP.put("阿里", "阿里地区");
|
||||
CITY_CODE_MAP.put("昌都", "昌都地区");
|
||||
CITY_CODE_MAP.put("林芝", "林芝地区");
|
||||
CITY_CODE_MAP.put("那曲", "那曲地区");
|
||||
CITY_CODE_MAP.put("阿勒泰", "阿勒泰地区");
|
||||
CITY_CODE_MAP.put("巴音郭楞", "巴音郭楞蒙古自治州");
|
||||
CITY_CODE_MAP.put("哈密", "哈密地区");
|
||||
CITY_CODE_MAP.put("和田", "和田地区");
|
||||
CITY_CODE_MAP.put("喀什", "喀什地区");
|
||||
CITY_CODE_MAP.put("吐鲁番", "吐鲁番地区");
|
||||
CITY_CODE_MAP.put("双鸭山", "双鸭山市");
|
||||
|
||||
try {
|
||||
SEAWEED = new DataStore("seaweed.db.fangjia.com", 27007).getCollection("fangjia.seaweed");
|
||||
@@ -171,7 +171,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表,默认空
|
||||
* 查询列表,默认空
|
||||
*/
|
||||
public Object listAction(DistrictModel model) {
|
||||
if (StringUtils.isBlank(model.getColumnIds()) || model.getColumnIds().equals("null")) {
|
||||
@@ -185,7 +185,7 @@ public class DistrictController {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
List<QueryParam> queryparams = new ArrayList<QueryParam>();
|
||||
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
params.add(new QueryParam("category", "district"));
|
||||
@@ -327,7 +327,7 @@ public class DistrictController {
|
||||
int districtValidCount = (int) districtService.findDistrictCount(0, params);
|
||||
int districtInvalidCount = (int) districtService.findDistrictCount(1, params);
|
||||
|
||||
// 分期数据量
|
||||
// 分期数据量
|
||||
List<QueryParam> fenQiParams = new ArrayList<QueryParam>();
|
||||
for (QueryParam pa : params) {
|
||||
fenQiParams.add(pa);
|
||||
@@ -372,7 +372,7 @@ public class DistrictController {
|
||||
districts.add(districtService.findById(dist.getSid()));
|
||||
}
|
||||
} else if (model.getValid() != null && model.getValid() == 3) {
|
||||
// 分期数据处理
|
||||
// 分期数据处理
|
||||
params.add(new QueryParam("visible", 0));
|
||||
params.add(new QueryParam("masterDistrictName", "master"));
|
||||
districts = districtService.findDistrictList(pager, params, sortParams);
|
||||
@@ -431,11 +431,11 @@ public class DistrictController {
|
||||
List<String> result = null;
|
||||
if (tempBuildTypes != null && tempBuildTypes.size() > 0) {
|
||||
if (StringUtils.isNotBlank(district.getEstateType2())) {
|
||||
if (district.getEstateType2().equals("普通住宅")) {
|
||||
if (district.getEstateType2().equals("普通住宅")) {
|
||||
result = changeValue(tempBuildTypes, distTypes);
|
||||
} else if (district.getEstateType2().equals("别墅")) {
|
||||
} else if (district.getEstateType2().equals("别墅")) {
|
||||
result = changeValue(tempBuildTypes, villaTypes);
|
||||
} else if (district.getEstateType2().equals("商住")) {
|
||||
} else if (district.getEstateType2().equals("商住")) {
|
||||
result = changeValue(tempBuildTypes, shopTypes);
|
||||
}
|
||||
} else {
|
||||
@@ -543,7 +543,7 @@ public class DistrictController {
|
||||
|
||||
List<BasicDBObject> baiduSearch(String city, String name, String cat) {
|
||||
List<BasicDBObject> dbObjects = new ArrayList<BasicDBObject>();
|
||||
name = name.toString().replace("小区", "").replace("住宅", "");
|
||||
name = name.toString().replace("小区", "").replace("住宅", "");
|
||||
JSONObject resp = BaiDuApiUtils.search(city, name, null, 2, 10, 0);
|
||||
boolean hasSameNameDistrict = false;
|
||||
if (resp != null && resp.getInt("status") == 0 && resp.containsKey("results")) {
|
||||
@@ -584,7 +584,7 @@ public class DistrictController {
|
||||
dbo.append("tag", detailInfo.get("tag"));
|
||||
dbo.append("detailUrl", detailInfo.get("detail_url"));
|
||||
}
|
||||
String itemName = dbo.getString("name").replace(".", "").replace("·", "");
|
||||
String itemName = dbo.getString("name").replace(".", "").replace("·", "");
|
||||
if (!hasSameNameDistrict || name.equals(itemName)) {
|
||||
dbObjects.add(dbo);
|
||||
}
|
||||
@@ -597,7 +597,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表,默认空
|
||||
* 查询列表,默认空
|
||||
*/
|
||||
public Object listForRemoveAction(DistrictModel model) {
|
||||
|
||||
@@ -645,8 +645,8 @@ public class DistrictController {
|
||||
String region = dis.getRegion();
|
||||
String name = dis.getName();
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
if (name.indexOf("期") != -1) {
|
||||
int temp = name.indexOf("期");
|
||||
if (name.indexOf("期") != -1) {
|
||||
int temp = name.indexOf("期");
|
||||
if (temp > 2) {
|
||||
String districtName = "";
|
||||
districtName = name.substring(0, temp - 1);
|
||||
@@ -712,13 +712,13 @@ public class DistrictController {
|
||||
objname = arrs[2];
|
||||
}
|
||||
Map<String, Object> agingMap = new HashMap<String, Object>();
|
||||
if (objname.indexOf("期") != -1) {
|
||||
int temp = objname.indexOf('期');
|
||||
if (objname.indexOf("期") != -1) {
|
||||
int temp = objname.indexOf('期');
|
||||
if (temp > 2) {
|
||||
String districtName = "";
|
||||
districtName = objname.substring(0, temp - 1);
|
||||
|
||||
String[] agArray = { "", "一期", "二期", "三期", "四期", "五期", "六期", "七期" };
|
||||
String[] agArray = { "", "一期", "二期", "三期", "四期", "五期", "六期", "七期" };
|
||||
String[] fieldArr = { "loopLineInfo", "block", "businessQuarter", "estateCompany", "developer",
|
||||
"facilities", "relateInfo", "estateCharge", "streetCommunity", "cubagePercent",
|
||||
"virescencePercent", "houseProperty", "floorInfo", "traffic", "fitmentMaterials", "outPics",
|
||||
@@ -742,12 +742,12 @@ public class DistrictController {
|
||||
}
|
||||
if (StringUtils.isBlank(estateType2)) {
|
||||
if (null != districtValue.getEstateType2()
|
||||
&& "商住".equals(districtValue.getEstateType2())) {
|
||||
&& "商住".equals(districtValue.getEstateType2())) {
|
||||
estateType2 = districtValue.getEstateType2();
|
||||
agingMap.put("propertyLife", "50年");
|
||||
agingMap.put("propertyLife", "50年");
|
||||
} else {
|
||||
estateType2 = districtValue.getEstateType2();
|
||||
agingMap.put("propertyLife", "70年");
|
||||
agingMap.put("propertyLife", "70年");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -832,7 +832,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入图片编辑页
|
||||
* 进入图片编辑页
|
||||
*/
|
||||
public Object editPicAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
model.setViewParam("path", "/district/editPic");
|
||||
@@ -840,7 +840,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存图片修改
|
||||
* 保存图片修改
|
||||
*/
|
||||
public Object savePicAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
model.setViewType("redirect");
|
||||
@@ -902,11 +902,11 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理图片(从FS删除图片,保存新图片到FS,更新小区图片url列表)
|
||||
* 处理图片(从FS删除图片,保存新图片到FS,更新小区图片url列表)
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void processPics(District district, DistrictModel model) {
|
||||
// 删除图片
|
||||
// 删除图片
|
||||
fileService.delPics(model.getDelPics(), FileServiceImpl.SIZE_ORIGINAL);
|
||||
|
||||
// List<String> floorplanPics = new ArrayList<String>();
|
||||
@@ -1003,7 +1003,7 @@ public class DistrictController {
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void processFjtPics(FjtEvaluation fjtEvaluation, DistrictModel model) {
|
||||
// 删除图片
|
||||
// 删除图片
|
||||
fileService.delPics(model.getDelPics(), FileServiceImpl.SIZE_ORIGINAL);
|
||||
|
||||
List<String> delPics = model.getDelPics();
|
||||
@@ -1085,7 +1085,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存图片到FS
|
||||
* 保存图片到FS
|
||||
*/
|
||||
private List<String> savePics(String districtId, List<File> pics) {
|
||||
List<String> ret = new ArrayList<String>(pics.size());
|
||||
@@ -1116,7 +1116,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证图片文件类型,目前支持gif、jpg
|
||||
* 验证图片文件类型,目前支持gif、jpg
|
||||
*
|
||||
* @param pic
|
||||
* @return
|
||||
@@ -1154,7 +1154,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入新增页
|
||||
* 进入新增页
|
||||
*/
|
||||
public Object addAction(DistrictModel model) {
|
||||
District district = new District();
|
||||
@@ -1164,7 +1164,7 @@ public class DistrictController {
|
||||
district.setId(null);
|
||||
model.setUrlFrom("copy");
|
||||
} else {
|
||||
district.setEstateType2("普通住宅");
|
||||
district.setEstateType2("普通住宅");
|
||||
}
|
||||
model.setDistrict(district);
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())) {
|
||||
@@ -1202,7 +1202,7 @@ public class DistrictController {
|
||||
return model;
|
||||
}
|
||||
/**
|
||||
* 校验小区名是否为其他小区的别名
|
||||
* 校验小区名是否为其他小区的别名
|
||||
*/
|
||||
public Object checkDistrictNameAction(@Param(name = "city") String city, @Param(name = "region") String region,
|
||||
@Param(name = "name") String name, @Param(name = "cat") String cat, @Param(name = "id") String id) {
|
||||
@@ -1234,14 +1234,14 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增小区
|
||||
* 保存新增小区
|
||||
*/
|
||||
public Object doAddAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
District district = model.getDistrict();
|
||||
List<District> districts = districtService.findByKey(district.getCity(), district.getRegion(),
|
||||
district.getName(), "district");
|
||||
if (!districts.isEmpty() && districts.get(0).getName().equals(district.getName())) {
|
||||
model.setMsg("小区名已存在!");
|
||||
model.setMsg("小区名已存在!");
|
||||
return model;
|
||||
}
|
||||
if (StringUtils.isNotBlank(district.getName())) {
|
||||
@@ -1362,7 +1362,7 @@ public class DistrictController {
|
||||
} else {
|
||||
JsonModel ret = new JsonModel();
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("success", "保存成功!");
|
||||
data.put("success", "保存成功!");
|
||||
ret.setJsonModel(data);
|
||||
return ret;
|
||||
}
|
||||
@@ -1372,7 +1372,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市下的区域、板块信息(ajax用)
|
||||
* 获取城市下的区域、板块信息(ajax用)
|
||||
*/
|
||||
public Object getRegionsAction(DistrictModel model) {
|
||||
model.setViewType("json");
|
||||
@@ -1399,7 +1399,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域下版块信息(ajax用)
|
||||
* 获取区域下版块信息(ajax用)
|
||||
*/
|
||||
public Object getBlocksAction(DistrictModel model) {
|
||||
model.setViewType("json");
|
||||
@@ -1478,7 +1478,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区编辑页
|
||||
* 进入小区编辑页
|
||||
*/
|
||||
public Object editAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1500,7 +1500,7 @@ public class DistrictController {
|
||||
districtService.save(district);
|
||||
}
|
||||
|
||||
// modify by shibb 2015-6-9,注释掉过滤器,以便数据部查看我们数据库有但是被过滤器过滤掉的数据
|
||||
// modify by shibb 2015-6-9,注释掉过滤器,以便数据部查看我们数据库有但是被过滤器过滤掉的数据
|
||||
// fieldFilterService.filter(district);
|
||||
if (null != district && "new_district".equals(district.getCategory())) {
|
||||
district = districtService.findNewDistrict(district.getDistrictKey());
|
||||
@@ -1527,7 +1527,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区周边配套页
|
||||
* 进入小区周边配套页
|
||||
*/
|
||||
public Object editNearbyAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1546,32 +1546,32 @@ public class DistrictController {
|
||||
|
||||
Set<String> keyStr = nearByMap.keySet();
|
||||
Iterator it = keyStr.iterator();
|
||||
String[] keywords = { "酒店", "餐馆", "医院", "超市", "银行", "公交车站", "电影院", "加油站" };
|
||||
String[] keywords = { "酒店", "餐馆", "医院", "超市", "银行", "公交车站", "电影院", "加油站" };
|
||||
while (it.hasNext()) {
|
||||
String key = it.next().toString();
|
||||
List<DistrictNearby> nearbyList = new ArrayList<DistrictNearby>();
|
||||
if (key.equals("酒店")) {
|
||||
if (key.equals("酒店")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setHotelList(nearbyList);
|
||||
} else if (key.equals("餐馆")) {
|
||||
} else if (key.equals("餐馆")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setEstaurantList(nearbyList);
|
||||
} else if (key.equals("医院")) {
|
||||
} else if (key.equals("医院")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setHospitalList(nearbyList);
|
||||
} else if (key.equals("超市")) {
|
||||
} else if (key.equals("超市")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setMarketList(nearbyList);
|
||||
} else if (key.equals("银行")) {
|
||||
} else if (key.equals("银行")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setBankList(nearbyList);
|
||||
} else if (key.equals("公交车站")) {
|
||||
} else if (key.equals("公交车站")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setBusList(nearbyList);
|
||||
} else if ("电影院".equals(key)) {
|
||||
} else if ("电影院".equals(key)) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setFilmList(nearbyList);
|
||||
} else if ("加油站".equals(key)) {
|
||||
} else if ("加油站".equals(key)) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setOilList(nearbyList);
|
||||
}
|
||||
@@ -1590,7 +1590,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区周边配套详情页
|
||||
* 进入小区周边配套详情页
|
||||
*/
|
||||
public Object editNearbyNameAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1792,7 +1792,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区周边配套页
|
||||
* 进入小区周边配套页
|
||||
*/
|
||||
public Object districtNearbyAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1812,35 +1812,35 @@ public class DistrictController {
|
||||
|
||||
Set<String> keyStr = nearByMap.keySet();
|
||||
Iterator it = keyStr.iterator();
|
||||
String[] keywords = { "酒店", "餐馆", "医院", "学校", "超市", "银行", "公交车站", "电影院", "加油站" };
|
||||
String[] keywords = { "酒店", "餐馆", "医院", "学校", "超市", "银行", "公交车站", "电影院", "加油站" };
|
||||
while (it.hasNext()) {
|
||||
String key = it.next().toString();
|
||||
List<DistrictNearby> nearbyList = new ArrayList<DistrictNearby>();
|
||||
if (key.equals("酒店")) {
|
||||
if (key.equals("酒店")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setHotelList(nearbyList);
|
||||
} else if (key.equals("餐馆")) {
|
||||
} else if (key.equals("餐馆")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setEstaurantList(nearbyList);
|
||||
} else if (key.equals("医院")) {
|
||||
} else if (key.equals("医院")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setHospitalList(nearbyList);
|
||||
} else if (key.equals("超市")) {
|
||||
} else if (key.equals("超市")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setMarketList(nearbyList);
|
||||
} else if (key.equals("银行")) {
|
||||
} else if (key.equals("银行")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setBankList(nearbyList);
|
||||
} else if (key.equals("公交车站")) {
|
||||
} else if (key.equals("公交车站")) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setBusList(nearbyList);
|
||||
} else if ("电影院".equals(key)) {
|
||||
} else if ("电影院".equals(key)) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setFilmList(nearbyList);
|
||||
} else if ("加油站".equals(key)) {
|
||||
} else if ("加油站".equals(key)) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setOilList(nearbyList);
|
||||
} else if ("学校".equals(key)) {
|
||||
} else if ("学校".equals(key)) {
|
||||
nearbyList = nearByMap.get(key);
|
||||
model.setSchoolList(nearbyList);
|
||||
}
|
||||
@@ -1936,7 +1936,7 @@ public class DistrictController {
|
||||
Map<String, Object> markMap = district.getMarkMap();
|
||||
if (markMap == null || !markMap.containsKey("baiDuCoordLock")
|
||||
|| !new Integer(1).equals(markMap.get("baiDuCoordLock"))) {
|
||||
// 地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
// 地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0;
|
||||
double lat2 = 0;
|
||||
Map<String, Object> infomap = AddressParser.getLngLatByAddress(district.getCity(),
|
||||
@@ -1995,7 +1995,7 @@ public class DistrictController {
|
||||
district = districtNearbyService.findById(model.getId());
|
||||
if (StringUtils.isNotBlank(model.getAddress())) {
|
||||
district.setAddress(model.getAddress());
|
||||
// 地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
// 地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0.0;
|
||||
double lat2 = 0.0;
|
||||
Map<String, Object> infomap = AddressParser.getLngLatByAddress(district.getCity(), model.getAddress());
|
||||
@@ -2027,7 +2027,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存小区修改
|
||||
* 保存小区修改
|
||||
*/
|
||||
public Object saveAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
District district = model.getDistrict();
|
||||
@@ -2045,7 +2045,7 @@ public class DistrictController {
|
||||
if (exist) {
|
||||
model.setViewType("redirect");
|
||||
model.setViewParam("location",
|
||||
"/district/edit?id=" + district.getId() + "&msg=" + URLEncoder.encode("小区名已存在", "UTF-8"));
|
||||
"/district/edit?id=" + district.getId() + "&msg=" + URLEncoder.encode("小区名已存在", "UTF-8"));
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -2285,9 +2285,9 @@ public class DistrictController {
|
||||
data.put("markMap", markMap);
|
||||
data.put("modificationDate", new Date());
|
||||
districtService.updateById(data, district.getId());
|
||||
//创建更新任务,用为更新常州农商行数据
|
||||
//创建更新任务,用为更新常州农商行数据
|
||||
createJnTask(district.getId(), null);
|
||||
msg = "保存成功了!!!";
|
||||
msg = "保存成功了!!!";
|
||||
}
|
||||
|
||||
model.setViewType("redirect");
|
||||
@@ -2421,7 +2421,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区(status置1)
|
||||
* 删除小区(status置1)
|
||||
*/
|
||||
public Object deleteAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (ObjectId.isValid(model.getId())) {
|
||||
@@ -2463,7 +2463,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区ajax(status置1)
|
||||
* 删除小区ajax(status置1)
|
||||
*/
|
||||
public Object deleteajaxAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
JsonModel ret = new JsonModel();
|
||||
@@ -2481,7 +2481,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复小区(status置0)
|
||||
* 恢复小区(status置0)
|
||||
*/
|
||||
public Object restoreAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (ObjectId.isValid(model.getId())) {
|
||||
@@ -2502,7 +2502,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新盘转小区
|
||||
* 新盘转小区
|
||||
*/
|
||||
public Object toDistrictAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
int count = 0;
|
||||
@@ -2519,7 +2519,7 @@ public class DistrictController {
|
||||
"/district/list?cityDisplay="
|
||||
+ URLEncoder.encode(StringUtils.trimToEmpty(model.getCityDisplay()), "UTF-8") + "&keyword="
|
||||
+ URLEncoder.encode(StringUtils.trimToEmpty(model.getKeyword()), "UTF-8") + "&cat="
|
||||
+ model.getCat() + "&msg=" + URLEncoder.encode("已将" + count + "个新盘转成小区!!!", "UTF-8"));
|
||||
+ model.getCat() + "&msg=" + URLEncoder.encode("已将" + count + "个新盘转成小区!!!", "UTF-8"));
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -2668,7 +2668,7 @@ public class DistrictController {
|
||||
return jsonModel;
|
||||
}
|
||||
Map<String, Object> seaweedUpdate = new HashMap<String, Object>();
|
||||
if (fieldName.contains("lias")) {// 别名和地址别名需要转成List
|
||||
if (fieldName.contains("lias")) {// 别名和地址别名需要转成List
|
||||
List<String> v = new ArrayList<String>(Arrays.asList(fieldValue.split("\n")));
|
||||
Iterator<String> it = v.iterator();
|
||||
while (it.hasNext()) {
|
||||
@@ -2727,7 +2727,7 @@ public class DistrictController {
|
||||
String cityDisplay = model.getCityDisplay();
|
||||
if (StringUtils.isEmpty(model.getKeyword())) {
|
||||
if (StringUtils.isEmpty(cityDisplay)) {
|
||||
cityDisplay = "上海";
|
||||
cityDisplay = "上海";
|
||||
}
|
||||
ServerArea cityDis = ServerAreaData.getServerAreaByDisplay(cityDisplay);
|
||||
model.setCityLat(cityDis.getLat());
|
||||
@@ -2766,11 +2766,11 @@ public class DistrictController {
|
||||
String categoryStr = "";
|
||||
|
||||
if (cityDisplay != null && keyword != null) {
|
||||
if (keyword.indexOf("写字") != -1 || keyword.indexOf("办公") != -1) {
|
||||
if (keyword.indexOf("写字") != -1 || keyword.indexOf("办公") != -1) {
|
||||
categoryStr = "office";
|
||||
} else if (keyword.indexOf("商铺") != -1) {
|
||||
} else if (keyword.indexOf("商铺") != -1) {
|
||||
categoryStr = "shop";
|
||||
} else if (keyword.indexOf("住宅") != -1) {
|
||||
} else if (keyword.indexOf("住宅") != -1) {
|
||||
categoryStr = "district";
|
||||
}
|
||||
List<Baidulog> baidulogList = baidulogService.findByBaidulog(cityDisplay, categoryStr);
|
||||
@@ -2822,7 +2822,7 @@ public class DistrictController {
|
||||
district.setEstateType2(model.getEstateType());
|
||||
if (StringUtils.isNotBlank(model.getAddress())) {
|
||||
district.setAddress(model.getAddress());
|
||||
// 地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
// 地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0;
|
||||
double lat2 = 0;
|
||||
Map<String, Object> infomap = AddressParser.getLngLatByAddress(model.getCityDisplay(), model.getAddress());
|
||||
@@ -2890,11 +2890,11 @@ public class DistrictController {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
List<QueryParam> queryparams = new ArrayList<QueryParam>();
|
||||
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay()) && !"全国".equals(model.getCityDisplay())) {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
|
||||
boolean isDistrict = false;// 标示查询的数据是不是小区
|
||||
boolean isDistrict = false;// 标示查询的数据是不是小区
|
||||
if (StringUtils.isNotBlank(model.getCat())) {
|
||||
params.add(new QueryParam("category", model.getCat()));
|
||||
if ("district".equals(model.getCategory())) {
|
||||
@@ -3133,14 +3133,14 @@ public class DistrictController {
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
// response.reset();// 清空输出流
|
||||
// response.reset();// 清空输出流
|
||||
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();
|
||||
} catch (Exception e) {
|
||||
@@ -3164,16 +3164,16 @@ public class DistrictController {
|
||||
Map<String, Double> changedMarkupMap, Map<String, Integer> avgPriceMap, Map<String, Double> creditMap,
|
||||
Map<String, String> calcTypeMap, Map<String, Map<String, Integer>> otherAvgPrice) throws Exception {
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
// createSheet(wb, 0, "住宅");
|
||||
// createSheet(wb, 0, "住宅");
|
||||
HSSFSheet s = wb.createSheet();
|
||||
if (StringUtils.isNotBlank(model.getCat())) {
|
||||
if (model.getCat().equals("shop")) {
|
||||
wb.setSheetName(0, "商铺");
|
||||
wb.setSheetName(0, "商铺");
|
||||
} else if (model.getCat().equals("office")) {
|
||||
wb.setSheetName(0, "写字楼");
|
||||
wb.setSheetName(0, "写字楼");
|
||||
}
|
||||
} else {
|
||||
wb.setSheetName(0, "住宅");
|
||||
wb.setSheetName(0, "住宅");
|
||||
}
|
||||
|
||||
List<String> outFields = Arrays.asList(s3);
|
||||
@@ -3313,73 +3313,73 @@ public class DistrictController {
|
||||
public Map<String, String> getFliedDisplay() {
|
||||
Map<String, String> map = new HashMap<String, String>() {
|
||||
{
|
||||
put("sid", "编号");
|
||||
put("city", "城市");
|
||||
put("name", "名称");
|
||||
put("region", "区域");
|
||||
put("block", "板块");
|
||||
put("address", "地址");
|
||||
put("estateType2", "物业类型");
|
||||
put("streetCommunity", "街道社区");
|
||||
put("householdCount", "户数");
|
||||
put("openDate", "开盘时间");
|
||||
put("licence", "预售证");
|
||||
put("latLng", "mapabc经纬度");
|
||||
put("latLng2", "百度经纬度");
|
||||
put("allArea", "占地面积");
|
||||
put("buildArea", "建筑面积");
|
||||
put("buildType", "建筑类型");
|
||||
put("alias", "名称别名");
|
||||
put("addrAlias", "地址别名");
|
||||
put("developer", "开发商");
|
||||
put("estateCompany", "物业公司");
|
||||
put("cubagePercent", "容积率");
|
||||
put("virescencePercent", "绿化率");
|
||||
put("carSite", "停车位(描述)");
|
||||
put("estateCharge", "物业费");
|
||||
put("floorplanPics", "楼层平面图");
|
||||
put("outPics", "外景图");
|
||||
put("rentPrice", "租金");
|
||||
put("bedKind", "写字楼等级");
|
||||
put("houseFloor", "楼层");
|
||||
put("houseHeight", "楼高");
|
||||
put("leaseTerm", "租赁年限");
|
||||
put("paymentPattern", "付款方式");
|
||||
put("rentPrice", "出租价格");
|
||||
put("sellPrice", "出售价格");
|
||||
put("floor", "建筑楼层");
|
||||
put("floorInfo", "楼层状况");
|
||||
put("bayArea", "开间面积");
|
||||
put("finishBuildingDate", "竣工时间");
|
||||
put("liveDate", "开业时间");
|
||||
put("divisible", "是否可分割");
|
||||
put("unifiedManage", "是否统一管理");
|
||||
put("carSiteCount", "停车位");
|
||||
put("metroInfo", "地铁沿线");
|
||||
put("metroNames", "地铁站名");
|
||||
put("facilities", "配套设施");
|
||||
put("propertyInfo", "物业概况");
|
||||
put("traffic", "交通情况");
|
||||
put("surrounding", "周边情况");
|
||||
put("businessStatus", "经营业态");
|
||||
put("rentType", "租售类型");
|
||||
put("price", "价格");
|
||||
put("businessQuarter", "商圈");
|
||||
put("status", "状态");
|
||||
put("standardHeight", "标准层高");
|
||||
put("foreign", "是否涉外");
|
||||
put("register", "是否注册");
|
||||
put("realUsePercent", "实用率");
|
||||
put("liveDate", "交房时间");
|
||||
put("changedMarkup", "周变化");
|
||||
put("avgPrice", "均价");
|
||||
put("calcType", "计算方式");
|
||||
put("lat2", "百度纬度");
|
||||
put("lng2", "百度经度");
|
||||
put("lat", "高德纬度");
|
||||
put("lng", "高德经度");
|
||||
put("loopLineInfo", "环线位置");
|
||||
put("intelligenceLevel", "智能水平");
|
||||
put("sid", "编号");
|
||||
put("city", "城市");
|
||||
put("name", "名称");
|
||||
put("region", "区域");
|
||||
put("block", "板块");
|
||||
put("address", "地址");
|
||||
put("estateType2", "物业类型");
|
||||
put("streetCommunity", "街道社区");
|
||||
put("householdCount", "户数");
|
||||
put("openDate", "开盘时间");
|
||||
put("licence", "预售证");
|
||||
put("latLng", "mapabc经纬度");
|
||||
put("latLng2", "百度经纬度");
|
||||
put("allArea", "占地面积");
|
||||
put("buildArea", "建筑面积");
|
||||
put("buildType", "建筑类型");
|
||||
put("alias", "名称别名");
|
||||
put("addrAlias", "地址别名");
|
||||
put("developer", "开发商");
|
||||
put("estateCompany", "物业公司");
|
||||
put("cubagePercent", "容积率");
|
||||
put("virescencePercent", "绿化率");
|
||||
put("carSite", "停车位(描述)");
|
||||
put("estateCharge", "物业费");
|
||||
put("floorplanPics", "楼层平面图");
|
||||
put("outPics", "外景图");
|
||||
put("rentPrice", "租金");
|
||||
put("bedKind", "写字楼等级");
|
||||
put("houseFloor", "楼层");
|
||||
put("houseHeight", "楼高");
|
||||
put("leaseTerm", "租赁年限");
|
||||
put("paymentPattern", "付款方式");
|
||||
put("rentPrice", "出租价格");
|
||||
put("sellPrice", "出售价格");
|
||||
put("floor", "建筑楼层");
|
||||
put("floorInfo", "楼层状况");
|
||||
put("bayArea", "开间面积");
|
||||
put("finishBuildingDate", "竣工时间");
|
||||
put("liveDate", "开业时间");
|
||||
put("divisible", "是否可分割");
|
||||
put("unifiedManage", "是否统一管理");
|
||||
put("carSiteCount", "停车位");
|
||||
put("metroInfo", "地铁沿线");
|
||||
put("metroNames", "地铁站名");
|
||||
put("facilities", "配套设施");
|
||||
put("propertyInfo", "物业概况");
|
||||
put("traffic", "交通情况");
|
||||
put("surrounding", "周边情况");
|
||||
put("businessStatus", "经营业态");
|
||||
put("rentType", "租售类型");
|
||||
put("price", "价格");
|
||||
put("businessQuarter", "商圈");
|
||||
put("status", "状态");
|
||||
put("standardHeight", "标准层高");
|
||||
put("foreign", "是否涉外");
|
||||
put("register", "是否注册");
|
||||
put("realUsePercent", "实用率");
|
||||
put("liveDate", "交房时间");
|
||||
put("changedMarkup", "周变化");
|
||||
put("avgPrice", "均价");
|
||||
put("calcType", "计算方式");
|
||||
put("lat2", "百度纬度");
|
||||
put("lng2", "百度经度");
|
||||
put("lat", "高德纬度");
|
||||
put("lng", "高德经度");
|
||||
put("loopLineInfo", "环线位置");
|
||||
put("intelligenceLevel", "智能水平");
|
||||
}
|
||||
};//
|
||||
return map;
|
||||
@@ -3413,17 +3413,17 @@ public class DistrictController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
jsonModel.setJsonModel(data);
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {
|
||||
data.put("msg", "城市不能为空");
|
||||
data.put("msg", "城市不能为空");
|
||||
return jsonModel;
|
||||
}
|
||||
if (StringUtils.isBlank(model.getDestRegion()) || StringUtils.isBlank(model.getOrgRegion())) {
|
||||
data.put("msg", "原区域和目标区域不能为空");
|
||||
data.put("msg", "原区域和目标区域不能为空");
|
||||
return jsonModel;
|
||||
}
|
||||
String orgRegion = model.getOrgRegion();
|
||||
String destRegion = model.getDestRegion();
|
||||
if (orgRegion.equals(destRegion)) {
|
||||
data.put("msg", "原区域和目标区域不能相同");
|
||||
data.put("msg", "原区域和目标区域不能相同");
|
||||
return jsonModel;
|
||||
}
|
||||
List<String> existsDistrict = new ArrayList<String>();
|
||||
@@ -3458,7 +3458,7 @@ public class DistrictController {
|
||||
districtUpdateTaskService.createTask(district.getId(), 1, null, null);
|
||||
}
|
||||
}
|
||||
data.put("msg", "数据迁移完成:迁移小区" + count + "个,由于目标区域存在被删除小区" + deleteCount + "个");
|
||||
data.put("msg", "数据迁移完成:迁移小区" + count + "个,由于目标区域存在被删除小区" + deleteCount + "个");
|
||||
data.put("success", true);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -3472,7 +3472,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据小区ID查询小区信息
|
||||
* 根据小区ID查询小区信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -3491,7 +3491,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加小区分期数据
|
||||
* 添加小区分期数据
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -3504,7 +3504,7 @@ public class DistrictController {
|
||||
String[] stages = str.split("##");
|
||||
District masterDistrict = null;
|
||||
Set<String> cityRegions = new TreeSet<String>();
|
||||
// 检测这个小区是否已经是主小区
|
||||
// 检测这个小区是否已经是主小区
|
||||
for (String stage : stages) {
|
||||
String[] stas = stage.split("__");
|
||||
String id = stas[0];
|
||||
@@ -3516,14 +3516,14 @@ public class DistrictController {
|
||||
if (dis != null && dis.getMasterDistrictName() != null
|
||||
&& dis.getMasterDistrictName().equals("master")) {
|
||||
json.setSuccess(false);
|
||||
json.setMsg(dis.getName() + "已经是主小区了");
|
||||
json.setMsg(dis.getName() + "已经是主小区了");
|
||||
return json;
|
||||
}
|
||||
cityRegions.add(dis.getCity() + dis.getRegion());
|
||||
}
|
||||
if (cityRegions.size() > 1) {
|
||||
json.setSuccess(false);
|
||||
json.setMsg("所有小区必须在同一城市和区域下");
|
||||
json.setMsg("所有小区必须在同一城市和区域下");
|
||||
return json;
|
||||
}
|
||||
for (String stage : stages) {
|
||||
@@ -3534,7 +3534,7 @@ public class DistrictController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("masterDistrictName", "master");
|
||||
districtService.updateById(data, id);
|
||||
// 设置为人工操作分期标识
|
||||
// 设置为人工操作分期标识
|
||||
districtService.setPersonOperate(id);
|
||||
} else {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
@@ -3547,7 +3547,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 为主小区添加从小区
|
||||
* 为主小区添加从小区
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -3563,13 +3563,13 @@ public class DistrictController {
|
||||
District slaveDistrict = districtService.findById(slaveId);
|
||||
if (slaveDistrict == null) {
|
||||
json.setSuccess(false);
|
||||
json.setMsg("小区不存在,请检查是否输入正确");
|
||||
json.setMsg("小区不存在,请检查是否输入正确");
|
||||
return json;
|
||||
}
|
||||
if (slaveDistrict.getMasterDistrictName() != null
|
||||
&& slaveDistrict.getMasterDistrictName().equals("master")) {
|
||||
json.setSuccess(false);
|
||||
json.setMsg(slaveDistrict.getName() + "已经是主小区了");
|
||||
json.setMsg(slaveDistrict.getName() + "已经是主小区了");
|
||||
return json;
|
||||
}
|
||||
District masterDistrict = districtService.findById(masterId);
|
||||
@@ -3578,11 +3578,11 @@ public class DistrictController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("masterDistrictName", masterDistrict.getName());
|
||||
districtService.updateById(data, slaveId);
|
||||
// 设置为人工操作分期标识
|
||||
// 设置为人工操作分期标识
|
||||
districtService.setPersonOperate(masterDistrict.getId());
|
||||
} else {
|
||||
json.setSuccess(false);
|
||||
json.setMsg("城市区域不一致");
|
||||
json.setMsg("城市区域不一致");
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@@ -3590,7 +3590,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分期
|
||||
* 删除分期
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -3605,7 +3605,7 @@ public class DistrictController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("masterDistrictName", null);
|
||||
districtService.updateById(data, model.getId());
|
||||
// 设置为人工操作分期标识
|
||||
// 设置为人工操作分期标识
|
||||
if (masterDistrict != null) {
|
||||
districtService.setPersonOperate(masterDistrict.getId());
|
||||
}
|
||||
@@ -3614,7 +3614,7 @@ public class DistrictController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 解散分期
|
||||
* 解散分期
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -3632,14 +3632,14 @@ public class DistrictController {
|
||||
districtService.updateById(data, district.getId());
|
||||
}
|
||||
districtService.updateById(data, masterDistrict.getId());
|
||||
// 取消分期人工操作标识
|
||||
// 取消分期人工操作标识
|
||||
districtService.unsetPersonOperate(masterDistrict.getId());
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置为主小区
|
||||
* 设置为主小区
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -3658,7 +3658,7 @@ public class DistrictController {
|
||||
List<District> list = districtService.findAllByParams(params);
|
||||
if (list == null || list.size() == 0) {
|
||||
json.setSuccess(false);
|
||||
json.setMsg("没找到对应的主小区");
|
||||
json.setMsg("没找到对应的主小区");
|
||||
return json;
|
||||
}
|
||||
String masterId = list.get(0).getId();
|
||||
@@ -3671,7 +3671,7 @@ public class DistrictController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("masterDistrictName", "master");
|
||||
districtService.updateById(data, district.getId());
|
||||
// 设置为人工操作分期标识
|
||||
// 设置为人工操作分期标识
|
||||
districtService.setPersonOperate(district.getId());
|
||||
} else {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import java.util.*;
|
||||
|
||||
public class DistrictCoverController {
|
||||
|
||||
private final static String NO_THING = "ÔÝÎÞ×ÊÁÏ";
|
||||
private final static String NO_THING = "暂无资料";
|
||||
private DistrictService districtService;
|
||||
private HouseService houseService;
|
||||
private RentHouseService rentHouseService;
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public class DistrictHouseStatController {
|
||||
pager.setPageSize(30);
|
||||
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("上海");
|
||||
model.setCityDisplay("上海");
|
||||
}
|
||||
String sortField = null;
|
||||
String sortWay = null;
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ public class DistrictHouseTypeController {
|
||||
public Object roomListAction(DistrictHouseTypeModel model){
|
||||
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}else{
|
||||
Date lastMonthDate = null;
|
||||
|
||||
@@ -92,7 +92,7 @@ public Object addAction(DistrictRentModel model){
|
||||
|
||||
DistrictHousetype districtHouseType = districtHousetypeService.findAllByParams(model.getCityDisplay(), model.getRegion(),model.getDistrictName(), model.getRoom());
|
||||
if(districtHouseType!=null){
|
||||
data.put("data", "此记录已存在!");
|
||||
data.put("data", "此记录已存在!");
|
||||
json.setJsonModel(data);
|
||||
return json;
|
||||
}
|
||||
|
||||
+10
-10
@@ -62,7 +62,7 @@ public class DistrictRentController {
|
||||
model.setDates(dates);
|
||||
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
} else {
|
||||
|
||||
Pager pager = model.getPager(10);
|
||||
@@ -172,7 +172,7 @@ public class DistrictRentController {
|
||||
Date lastDate = DateUtil.truncateDay(DateUtil
|
||||
.getLastDayOfMonth(statDate));
|
||||
if (statDate.getTime() != lastDate.getTime()) {
|
||||
data.put("data", "请选择月末");
|
||||
data.put("data", "请选择月末");
|
||||
json.setJsonModel(data);
|
||||
return json;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public class DistrictRentController {
|
||||
.getRegion(), model.getDistrictName()),
|
||||
statDate, model.getRoom());
|
||||
if (stat != null) {
|
||||
data.put("data", "此记录已存在!");
|
||||
data.put("data", "此记录已存在!");
|
||||
json.setJsonModel(data);
|
||||
return json;
|
||||
}
|
||||
@@ -290,8 +290,8 @@ public class DistrictRentController {
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("name", room + "室");
|
||||
// jo.put("color", "室");
|
||||
jo.put("name", room + "室");
|
||||
// jo.put("color", "室");
|
||||
jo.put("data", datas);
|
||||
result.add(jo);
|
||||
}
|
||||
@@ -345,11 +345,11 @@ public class DistrictRentController {
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("name", room + "室");
|
||||
jo.put("name", room + "室");
|
||||
jo.put("data", datas);
|
||||
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("name", room + "室(原)");
|
||||
jo1.put("name", room + "室(原)");
|
||||
jo1.put("data", oldDatas);
|
||||
if (i == 0) {
|
||||
jo.put("visible", true);
|
||||
@@ -395,8 +395,8 @@ public class DistrictRentController {
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("name", room + "室");
|
||||
// jo.put("color", "室");
|
||||
jo.put("name", room + "室");
|
||||
// jo.put("color", "室");
|
||||
jo.put("data", datas);
|
||||
result.add(jo);
|
||||
}
|
||||
@@ -454,7 +454,7 @@ public class DistrictRentController {
|
||||
model.getRoom(), remark));
|
||||
|
||||
calcCommandService.save(cmds);
|
||||
data.put("msg", "任务保存成功!");
|
||||
data.put("msg", "任务保存成功!");
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
+175
-175
@@ -74,9 +74,9 @@ public class DistrictTmpController {
|
||||
private FieldFilterService fieldFilterService;
|
||||
private static long MAX_PIC_SIZE = 2 * 1024 * 1024;
|
||||
|
||||
private static List<String> distTypes = Arrays.asList("多层","小高层","超高层","高层","花园洋房","老洋房","四合院");
|
||||
private static List<String> villaTypes = Arrays.asList("独栋","双拼","联排","叠加");
|
||||
private static List<String> shopTypes = Arrays.asList("多层","小高层","超高层","高层","独栋","双拼","联排","叠加");
|
||||
private static List<String> distTypes = Arrays.asList("多层","小高层","超高层","高层","花园洋房","老洋房","四合院");
|
||||
private static List<String> villaTypes = Arrays.asList("独栋","双拼","联排","叠加");
|
||||
private static List<String> shopTypes = Arrays.asList("多层","小高层","超高层","高层","独栋","双拼","联排","叠加");
|
||||
|
||||
private static Map<String,String> CITY_CODE_MAP=new HashMap<String,String>();
|
||||
public static int statusFlag=0;
|
||||
@@ -84,26 +84,26 @@ public class DistrictTmpController {
|
||||
private static DSCollection SEAWEED = null;
|
||||
|
||||
static{
|
||||
CITY_CODE_MAP.put("大兴安岭", "大兴安岭地区");
|
||||
CITY_CODE_MAP.put("塔城", "塔城地区");
|
||||
CITY_CODE_MAP.put("山南", "山南地区");
|
||||
CITY_CODE_MAP.put("日喀则", "日喀则地区");
|
||||
CITY_CODE_MAP.put("毕节", "毕节地区");
|
||||
CITY_CODE_MAP.put("海东", "海东地区");
|
||||
CITY_CODE_MAP.put("海北", "海北藏族自治州");
|
||||
CITY_CODE_MAP.put("海南", "海南藏族自治州");
|
||||
CITY_CODE_MAP.put("铜仁", "铜仁地区");
|
||||
CITY_CODE_MAP.put("阿里", "阿里地区");
|
||||
CITY_CODE_MAP.put("昌都", "昌都地区");
|
||||
CITY_CODE_MAP.put("林芝", "林芝地区");
|
||||
CITY_CODE_MAP.put("那曲", "那曲地区");
|
||||
CITY_CODE_MAP.put("阿勒泰", "阿勒泰地区");
|
||||
CITY_CODE_MAP.put("巴音郭楞", "巴音郭楞蒙古自治州");
|
||||
CITY_CODE_MAP.put("哈密", "哈密地区");
|
||||
CITY_CODE_MAP.put("和田", "和田地区");
|
||||
CITY_CODE_MAP.put("喀什", "喀什地区");
|
||||
CITY_CODE_MAP.put("吐鲁番", "吐鲁番地区");
|
||||
CITY_CODE_MAP.put("双鸭山", "双鸭山市");
|
||||
CITY_CODE_MAP.put("大兴安岭", "大兴安岭地区");
|
||||
CITY_CODE_MAP.put("塔城", "塔城地区");
|
||||
CITY_CODE_MAP.put("山南", "山南地区");
|
||||
CITY_CODE_MAP.put("日喀则", "日喀则地区");
|
||||
CITY_CODE_MAP.put("毕节", "毕节地区");
|
||||
CITY_CODE_MAP.put("海东", "海东地区");
|
||||
CITY_CODE_MAP.put("海北", "海北藏族自治州");
|
||||
CITY_CODE_MAP.put("海南", "海南藏族自治州");
|
||||
CITY_CODE_MAP.put("铜仁", "铜仁地区");
|
||||
CITY_CODE_MAP.put("阿里", "阿里地区");
|
||||
CITY_CODE_MAP.put("昌都", "昌都地区");
|
||||
CITY_CODE_MAP.put("林芝", "林芝地区");
|
||||
CITY_CODE_MAP.put("那曲", "那曲地区");
|
||||
CITY_CODE_MAP.put("阿勒泰", "阿勒泰地区");
|
||||
CITY_CODE_MAP.put("巴音郭楞", "巴音郭楞蒙古自治州");
|
||||
CITY_CODE_MAP.put("哈密", "哈密地区");
|
||||
CITY_CODE_MAP.put("和田", "和田地区");
|
||||
CITY_CODE_MAP.put("喀什", "喀什地区");
|
||||
CITY_CODE_MAP.put("吐鲁番", "吐鲁番地区");
|
||||
CITY_CODE_MAP.put("双鸭山", "双鸭山市");
|
||||
|
||||
try {
|
||||
SEAWEED = new DataStore("seaweed.db.fangjia.com", 27007).getCollection("fangjia.seaweed");
|
||||
@@ -132,7 +132,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表,默认空
|
||||
* 查询列表,默认空
|
||||
*/
|
||||
public Object listAction(DistrictModel model) {
|
||||
|
||||
@@ -311,11 +311,11 @@ public class DistrictTmpController {
|
||||
List<String> result = null;
|
||||
if(tempBuildTypes != null && tempBuildTypes.size() > 0){
|
||||
if(StringUtils.isNotBlank(district.getEstateType2())){
|
||||
if(district.getEstateType2().equals("普通住宅")){
|
||||
if(district.getEstateType2().equals("普通住宅")){
|
||||
result = changeValue(tempBuildTypes, distTypes);
|
||||
}else if(district.getEstateType2().equals("别墅")){
|
||||
}else if(district.getEstateType2().equals("别墅")){
|
||||
result = changeValue(tempBuildTypes, villaTypes);
|
||||
}else if(district.getEstateType2().equals("商住")){
|
||||
}else if(district.getEstateType2().equals("商住")){
|
||||
result = changeValue(tempBuildTypes, shopTypes);
|
||||
}
|
||||
}else{
|
||||
@@ -377,7 +377,7 @@ public class DistrictTmpController {
|
||||
|
||||
List<BasicDBObject> baiduSearch(String city,String name,String cat) {
|
||||
List<BasicDBObject> dbObjects = new ArrayList<BasicDBObject>();
|
||||
name = name.toString().replace("小区","").replace("住宅","");
|
||||
name = name.toString().replace("小区","").replace("住宅","");
|
||||
JSONObject resp = BaiDuApiUtils.search(city, name, null, 2, 10, 0);
|
||||
boolean hasSameNameDistrict = false;
|
||||
if (resp != null && resp.getInt("status") == 0 && resp.containsKey("results")) {
|
||||
@@ -418,7 +418,7 @@ public class DistrictTmpController {
|
||||
dbo.append("tag",detailInfo.get("tag"));
|
||||
dbo.append("detailUrl",detailInfo.get("detail_url"));
|
||||
}
|
||||
String itemName = dbo.getString("name").replace(".","").replace("·","");
|
||||
String itemName = dbo.getString("name").replace(".","").replace("·","");
|
||||
if(!hasSameNameDistrict || name.equals(itemName)){
|
||||
dbObjects.add(dbo);
|
||||
}
|
||||
@@ -431,7 +431,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表,默认空
|
||||
* 查询列表,默认空
|
||||
*/
|
||||
public Object listForRemoveAction(DistrictModel model) {
|
||||
|
||||
@@ -479,8 +479,8 @@ public class DistrictTmpController {
|
||||
String region=dis.getRegion();
|
||||
String name=dis.getName();
|
||||
if(StringUtils.isNotBlank(name)){
|
||||
if(name.indexOf("期")!=-1){
|
||||
int temp=name.indexOf("期");
|
||||
if(name.indexOf("期")!=-1){
|
||||
int temp=name.indexOf("期");
|
||||
if(temp>2){
|
||||
String districtName="";
|
||||
districtName=name.substring(0,temp-1);
|
||||
@@ -546,13 +546,13 @@ public class DistrictTmpController {
|
||||
objname=arrs[2];
|
||||
}
|
||||
Map<String,Object> agingMap = new HashMap<String,Object>();
|
||||
if(objname.indexOf("期")!=-1){
|
||||
int temp=objname.indexOf('期');
|
||||
if(objname.indexOf("期")!=-1){
|
||||
int temp=objname.indexOf('期');
|
||||
if(temp>2){
|
||||
String districtName="";
|
||||
districtName=objname.substring(0,temp-1);
|
||||
|
||||
String[] agArray={"","一期","二期","三期","四期","五期","六期","七期"};
|
||||
String[] agArray={"","一期","二期","三期","四期","五期","六期","七期"};
|
||||
String [] fieldArr={"loopLineInfo","block","businessQuarter","estateCompany","developer","facilities","relateInfo",
|
||||
"estateCharge","streetCommunity","cubagePercent","virescencePercent","houseProperty","floorInfo","traffic","fitmentMaterials","outPics","buildStructure"};
|
||||
|
||||
@@ -575,12 +575,12 @@ public class DistrictTmpController {
|
||||
continue;
|
||||
}
|
||||
if(StringUtils.isBlank(estateType2)){
|
||||
if(null !=districtValue.getEstateType2() && "商住".equals(districtValue.getEstateType2())){
|
||||
if(null !=districtValue.getEstateType2() && "商住".equals(districtValue.getEstateType2())){
|
||||
estateType2=districtValue.getEstateType2();
|
||||
agingMap.put("propertyLife", "50年");
|
||||
agingMap.put("propertyLife", "50年");
|
||||
}else{
|
||||
estateType2=districtValue.getEstateType2();
|
||||
agingMap.put("propertyLife", "70年");
|
||||
agingMap.put("propertyLife", "70年");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,7 +664,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入图片编辑页
|
||||
* 进入图片编辑页
|
||||
*/
|
||||
public Object editPicAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
model.setViewParam("path", "/district/editPic");
|
||||
@@ -672,7 +672,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存图片修改
|
||||
* 保存图片修改
|
||||
*/
|
||||
public Object savePicAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
model.setViewType("redirect");
|
||||
@@ -731,11 +731,11 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理图片(从FS删除图片,保存新图片到FS,更新小区图片url列表)
|
||||
* 处理图片(从FS删除图片,保存新图片到FS,更新小区图片url列表)
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void processPics(District district, DistrictModel model) {
|
||||
// 删除图片
|
||||
// 删除图片
|
||||
fileService.delPics(model.getDelPics(), FileServiceImpl.SIZE_ORIGINAL);
|
||||
|
||||
// List<String> floorplanPics = new ArrayList<String>();
|
||||
@@ -834,7 +834,7 @@ public class DistrictTmpController {
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void processFjtPics(FjtEvaluation fjtEvaluation, DistrictModel model) {
|
||||
// 删除图片
|
||||
// 删除图片
|
||||
fileService.delPics(model.getDelPics(), FileServiceImpl.SIZE_ORIGINAL);
|
||||
|
||||
List<String> delPics = model.getDelPics();
|
||||
@@ -916,7 +916,7 @@ public class DistrictTmpController {
|
||||
return s;
|
||||
}
|
||||
/**
|
||||
* 保存图片到FS
|
||||
* 保存图片到FS
|
||||
*/
|
||||
private List<String> savePics(String districtId, List<File> pics) {
|
||||
List<String> ret = new ArrayList<String>(pics.size());
|
||||
@@ -947,7 +947,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证图片文件类型,目前支持gif、jpg
|
||||
* 验证图片文件类型,目前支持gif、jpg
|
||||
*
|
||||
* @param pic
|
||||
* @return
|
||||
@@ -985,7 +985,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入新增页
|
||||
* 进入新增页
|
||||
*/
|
||||
public Object addAction(DistrictModel model) {
|
||||
District district = new District();
|
||||
@@ -995,7 +995,7 @@ public class DistrictTmpController {
|
||||
district.setId(null);
|
||||
model.setUrlFrom("copy");
|
||||
}else{
|
||||
district.setEstateType2("普通住宅");
|
||||
district.setEstateType2("普通住宅");
|
||||
}
|
||||
model.setDistrict(district);
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())) {
|
||||
@@ -1030,13 +1030,13 @@ public class DistrictTmpController {
|
||||
|
||||
|
||||
/**
|
||||
* 保存新增小区
|
||||
* 保存新增小区
|
||||
*/
|
||||
public Object doAddAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
District district = model.getDistrict();
|
||||
List<District> districts=districtService.findByKey(district.getCity(), district.getRegion(), district.getName(), "district");
|
||||
if(!districts.isEmpty()){
|
||||
model.setMsg("小区名已存在!");
|
||||
model.setMsg("小区名已存在!");
|
||||
return model;
|
||||
}
|
||||
if(StringUtils.isNotBlank(district.getName())){
|
||||
@@ -1114,7 +1114,7 @@ public class DistrictTmpController {
|
||||
} else {
|
||||
JsonModel ret = new JsonModel();
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("success", "保存成功!");
|
||||
data.put("success", "保存成功!");
|
||||
ret.setJsonModel(data);
|
||||
return ret;
|
||||
}
|
||||
@@ -1124,7 +1124,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市下的区域、板块信息(ajax用)
|
||||
* 获取城市下的区域、板块信息(ajax用)
|
||||
*/
|
||||
public Object getRegionsAction(DistrictModel model) {
|
||||
model.setViewType("json");
|
||||
@@ -1153,7 +1153,7 @@ public class DistrictTmpController {
|
||||
|
||||
|
||||
/**
|
||||
* 获取区域下版块信息(ajax用)
|
||||
* 获取区域下版块信息(ajax用)
|
||||
*/
|
||||
public Object getBlocksAction(DistrictModel model) {
|
||||
model.setViewType("json");
|
||||
@@ -1233,7 +1233,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区编辑页
|
||||
* 进入小区编辑页
|
||||
*/
|
||||
public Object editAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1244,7 +1244,7 @@ public class DistrictTmpController {
|
||||
return model;
|
||||
}
|
||||
District district = districtService.findById(model.getId());
|
||||
//modify by shibb 2015-6-9,注释掉过滤器,以便数据部查看我们数据库有但是被过滤器过滤掉的数据
|
||||
//modify by shibb 2015-6-9,注释掉过滤器,以便数据部查看我们数据库有但是被过滤器过滤掉的数据
|
||||
// fieldFilterService.filter(district);
|
||||
if (null != district && "new_district".equals(district.getCategory())) {
|
||||
district = districtService.findNewDistrict(district.getDistrictKey());
|
||||
@@ -1272,7 +1272,7 @@ public class DistrictTmpController {
|
||||
|
||||
|
||||
/**
|
||||
* 进入小区周边配套页
|
||||
* 进入小区周边配套页
|
||||
*/
|
||||
public Object editNearbyAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1290,32 +1290,32 @@ public class DistrictTmpController {
|
||||
|
||||
Set<String> keyStr=nearByMap.keySet();
|
||||
Iterator it=keyStr.iterator();
|
||||
String[] keywords={"酒店","餐馆","医院","超市","银行","公交车站","电影院","加油站"};
|
||||
String[] keywords={"酒店","餐馆","医院","超市","银行","公交车站","电影院","加油站"};
|
||||
while(it.hasNext()){
|
||||
String key= it.next().toString();
|
||||
List<DistrictNearby> nearbyList=new ArrayList<DistrictNearby>();
|
||||
if(key.equals("酒店")){
|
||||
if(key.equals("酒店")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setHotelList(nearbyList);
|
||||
}else if(key.equals("餐馆")){
|
||||
}else if(key.equals("餐馆")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setEstaurantList(nearbyList);
|
||||
}else if(key.equals("医院")){
|
||||
}else if(key.equals("医院")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setHospitalList(nearbyList);
|
||||
}else if(key.equals("超市")){
|
||||
}else if(key.equals("超市")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setMarketList(nearbyList);
|
||||
}else if(key.equals("银行")){
|
||||
}else if(key.equals("银行")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setBankList(nearbyList);
|
||||
}else if(key.equals("公交车站")){
|
||||
}else if(key.equals("公交车站")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setBusList(nearbyList);
|
||||
}else if("电影院".equals(key)){
|
||||
}else if("电影院".equals(key)){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setFilmList(nearbyList);
|
||||
}else if("加油站".equals(key)){
|
||||
}else if("加油站".equals(key)){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setOilList(nearbyList);
|
||||
}
|
||||
@@ -1333,7 +1333,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区周边配套详情页
|
||||
* 进入小区周边配套详情页
|
||||
*/
|
||||
public Object editNearbyNameAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1391,19 +1391,19 @@ public class DistrictTmpController {
|
||||
headRow.createCell(5).setCellValue("Grid_SW_Lat_WGS84");
|
||||
headRow.createCell(6).setCellValue("Grid_SW_Lon_WGS84");
|
||||
headRow.createCell(7).setCellValue("format_city");
|
||||
headRow.createCell(8).setCellValue("1公里内");
|
||||
headRow.createCell(9).setCellValue("周边1公里");
|
||||
headRow.createCell(10).setCellValue("周边2公里");
|
||||
headRow.createCell(11).setCellValue("周边3公里");
|
||||
headRow.createCell(12).setCellValue("周边4公里");
|
||||
headRow.createCell(13).setCellValue("周边5公里");
|
||||
headRow.createCell(14).setCellValue("周边6公里");
|
||||
headRow.createCell(15).setCellValue("周边7公里");
|
||||
headRow.createCell(16).setCellValue("周边8公里");
|
||||
headRow.createCell(17).setCellValue("周边9公里");
|
||||
headRow.createCell(18).setCellValue("周边10公里");
|
||||
headRow.createCell(19).setCellValue("百度经度");
|
||||
headRow.createCell(20).setCellValue("百度纬度");
|
||||
headRow.createCell(8).setCellValue("1公里内");
|
||||
headRow.createCell(9).setCellValue("周边1公里");
|
||||
headRow.createCell(10).setCellValue("周边2公里");
|
||||
headRow.createCell(11).setCellValue("周边3公里");
|
||||
headRow.createCell(12).setCellValue("周边4公里");
|
||||
headRow.createCell(13).setCellValue("周边5公里");
|
||||
headRow.createCell(14).setCellValue("周边6公里");
|
||||
headRow.createCell(15).setCellValue("周边7公里");
|
||||
headRow.createCell(16).setCellValue("周边8公里");
|
||||
headRow.createCell(17).setCellValue("周边9公里");
|
||||
headRow.createCell(18).setCellValue("周边10公里");
|
||||
headRow.createCell(19).setCellValue("百度经度");
|
||||
headRow.createCell(20).setCellValue("百度纬度");
|
||||
|
||||
while(cur.hasNext()) {
|
||||
DBObject dbo = cur.next();
|
||||
@@ -1490,7 +1490,7 @@ public class DistrictTmpController {
|
||||
response.setContentType("application/x-download;charset=UTF-8");
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
@@ -1596,7 +1596,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入小区周边配套页
|
||||
* 进入小区周边配套页
|
||||
*/
|
||||
public Object districtNearbyAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())) {
|
||||
@@ -1615,35 +1615,35 @@ public class DistrictTmpController {
|
||||
|
||||
Set<String> keyStr=nearByMap.keySet();
|
||||
Iterator it=keyStr.iterator();
|
||||
String[] keywords={"酒店","餐馆","医院","学校","超市","银行","公交车站","电影院","加油站"};
|
||||
String[] keywords={"酒店","餐馆","医院","学校","超市","银行","公交车站","电影院","加油站"};
|
||||
while(it.hasNext()){
|
||||
String key= it.next().toString();
|
||||
List<DistrictNearby> nearbyList=new ArrayList<DistrictNearby>();
|
||||
if(key.equals("酒店")){
|
||||
if(key.equals("酒店")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setHotelList(nearbyList);
|
||||
}else if(key.equals("餐馆")){
|
||||
}else if(key.equals("餐馆")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setEstaurantList(nearbyList);
|
||||
}else if(key.equals("医院")){
|
||||
}else if(key.equals("医院")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setHospitalList(nearbyList);
|
||||
}else if(key.equals("超市")){
|
||||
}else if(key.equals("超市")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setMarketList(nearbyList);
|
||||
}else if(key.equals("银行")){
|
||||
}else if(key.equals("银行")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setBankList(nearbyList);
|
||||
}else if(key.equals("公交车站")){
|
||||
}else if(key.equals("公交车站")){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setBusList(nearbyList);
|
||||
}else if("电影院".equals(key)){
|
||||
}else if("电影院".equals(key)){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setFilmList(nearbyList);
|
||||
}else if("加油站".equals(key)){
|
||||
}else if("加油站".equals(key)){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setOilList(nearbyList);
|
||||
}else if("学校".equals(key)){
|
||||
}else if("学校".equals(key)){
|
||||
nearbyList=nearByMap.get(key);
|
||||
model.setSchoolList(nearbyList);
|
||||
}
|
||||
@@ -1715,7 +1715,7 @@ public class DistrictTmpController {
|
||||
district.setAddress(model.getAddress());
|
||||
Map<String,Object> markMap = district.getMarkMap();
|
||||
if(markMap == null || !markMap.containsKey("baiDuCoordLock") || !new Integer(1).equals(markMap.get("baiDuCoordLock"))){
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0;
|
||||
double lat2 = 0;
|
||||
Map<String, Object> infomap = AddressParser.getLngLatByAddress(district.getCity(), model.getAddress());
|
||||
@@ -1772,7 +1772,7 @@ public class DistrictTmpController {
|
||||
district=districtNearbyService.findById(model.getId());
|
||||
if(StringUtils.isNotBlank(model.getAddress())){
|
||||
district.setAddress(model.getAddress());
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0.0;
|
||||
double lat2 = 0.0;
|
||||
Map<String, Object> infomap = AddressParser.getLngLatByAddress(district.getCity(), model.getAddress());
|
||||
@@ -1803,7 +1803,7 @@ public class DistrictTmpController {
|
||||
return model;
|
||||
}
|
||||
/**
|
||||
* 保存小区修改
|
||||
* 保存小区修改
|
||||
*/
|
||||
public Object saveAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
District district = model.getDistrict();
|
||||
@@ -1819,7 +1819,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
if(exist){
|
||||
model.setViewType("redirect");
|
||||
model.setViewParam("location", "/district/edit?id=" + district.getId() + "&msg=" + URLEncoder.encode("小区名已存在", "UTF-8"));
|
||||
model.setViewParam("location", "/district/edit?id=" + district.getId() + "&msg=" + URLEncoder.encode("小区名已存在", "UTF-8"));
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -1951,7 +1951,7 @@ public class DistrictTmpController {
|
||||
data.put("markMap", orgDis.getMarkMap());
|
||||
data.put("modificationDate", new Date());
|
||||
districtService.updateById(data, district.getId());
|
||||
msg = "保存成功了!!!";
|
||||
msg = "保存成功了!!!";
|
||||
}
|
||||
|
||||
model.setViewType("redirect");
|
||||
@@ -2069,7 +2069,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区(status置1)
|
||||
* 删除小区(status置1)
|
||||
*/
|
||||
public Object deleteAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isNotBlank(model.getId()) && ObjectId.isValid(model.getId())) {
|
||||
@@ -2109,7 +2109,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区ajax(status置1)
|
||||
* 删除小区ajax(status置1)
|
||||
*/
|
||||
public Object deleteajaxAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
JsonModel ret = new JsonModel();
|
||||
@@ -2124,7 +2124,7 @@ public class DistrictTmpController {
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* 恢复小区(status置0)
|
||||
* 恢复小区(status置0)
|
||||
*/
|
||||
public Object restoreAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
if (StringUtils.isNotBlank(model.getId()) && ObjectId.isValid(model.getId())) {
|
||||
@@ -2145,7 +2145,7 @@ public class DistrictTmpController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新盘转小区
|
||||
* 新盘转小区
|
||||
*/
|
||||
public Object toDistrictAction(DistrictModel model) throws UnsupportedEncodingException {
|
||||
int count = 0;
|
||||
@@ -2162,7 +2162,7 @@ public class DistrictTmpController {
|
||||
"location",
|
||||
"/district/list?cityDisplay=" + URLEncoder.encode(StringUtils.trimToEmpty(model.getCityDisplay()), "UTF-8")
|
||||
+ "&keyword=" + URLEncoder.encode(StringUtils.trimToEmpty(model.getKeyword()), "UTF-8") + "&cat="
|
||||
+ model.getCat() + "&msg=" + URLEncoder.encode("已将" + count + "个新盘转成小区!!!", "UTF-8"));
|
||||
+ model.getCat() + "&msg=" + URLEncoder.encode("已将" + count + "个新盘转成小区!!!", "UTF-8"));
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -2307,7 +2307,7 @@ public class DistrictTmpController {
|
||||
return jsonModel;
|
||||
}
|
||||
Map<String, Object> seaweedUpdate = new HashMap<String, Object>();
|
||||
if(fieldName.contains("lias")){//别名和地址别名需要转成List
|
||||
if(fieldName.contains("lias")){//别名和地址别名需要转成List
|
||||
List<String> v = new ArrayList<String>(Arrays.asList(fieldValue.split("\n")));
|
||||
Iterator<String> it = v.iterator();
|
||||
while(it.hasNext()){
|
||||
@@ -2365,7 +2365,7 @@ public class DistrictTmpController {
|
||||
String cityDisplay=model.getCityDisplay();
|
||||
if(StringUtils.isEmpty(model.getKeyword())){
|
||||
if(StringUtils.isEmpty(cityDisplay)){
|
||||
cityDisplay="上海";
|
||||
cityDisplay="上海";
|
||||
}
|
||||
ServerArea cityDis = ServerAreaData.getServerAreaByDisplay(cityDisplay);
|
||||
model.setCityLat(cityDis.getLat());
|
||||
@@ -2404,11 +2404,11 @@ public class DistrictTmpController {
|
||||
String categoryStr="";
|
||||
|
||||
if(cityDisplay !=null && keyword!=null){
|
||||
if(keyword.indexOf("写字")!=-1 || keyword.indexOf("办公")!=-1){
|
||||
if(keyword.indexOf("写字")!=-1 || keyword.indexOf("办公")!=-1){
|
||||
categoryStr="office";
|
||||
}else if(keyword.indexOf("商铺")!=-1){
|
||||
}else if(keyword.indexOf("商铺")!=-1){
|
||||
categoryStr="shop";
|
||||
}else if(keyword.indexOf("住宅")!=-1){
|
||||
}else if(keyword.indexOf("住宅")!=-1){
|
||||
categoryStr="district";
|
||||
}
|
||||
List<Baidulog> baidulogList=baidulogService.findByBaidulog(cityDisplay, categoryStr);
|
||||
@@ -2457,7 +2457,7 @@ public class DistrictTmpController {
|
||||
district.setEstateType2(model.getEstateType());
|
||||
if(StringUtils.isNotBlank(model.getAddress())){
|
||||
district.setAddress(model.getAddress());
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
//地址改变更改相应的百度经纬度及mapabc经纬度
|
||||
double lng2 = 0;
|
||||
double lat2 = 0;
|
||||
Map<String, Object> infomap = AddressParser.getLngLatByAddress(model.getCityDisplay(), model.getAddress());
|
||||
@@ -2531,7 +2531,7 @@ public class DistrictTmpController {
|
||||
params.add(new QueryParam("city", model.getCityDisplay()));
|
||||
}
|
||||
|
||||
boolean isDistrict = false;//标示查询的数据是不是小区
|
||||
boolean isDistrict = false;//标示查询的数据是不是小区
|
||||
if(StringUtils.isNotBlank(model.getCat())){
|
||||
params.add(new QueryParam("category", model.getCat()));
|
||||
if("district".equals(model.getCategory())){
|
||||
@@ -2639,14 +2639,14 @@ public class DistrictTmpController {
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
@@ -2668,16 +2668,16 @@ public class DistrictTmpController {
|
||||
|
||||
private HSSFWorkbook createExcel(DistrictModel model, List<District> districts, String[] s3) throws Exception{
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
//createSheet(wb, 0, "住宅");
|
||||
//createSheet(wb, 0, "住宅");
|
||||
HSSFSheet s = wb.createSheet();
|
||||
if(StringUtils.isNotBlank(model.getCat())){
|
||||
if(model.getCat().equals("shop")){
|
||||
wb.setSheetName(0, "商铺");
|
||||
wb.setSheetName(0, "商铺");
|
||||
}else if(model.getCat().equals("office")){
|
||||
wb.setSheetName(0, "写字楼");
|
||||
wb.setSheetName(0, "写字楼");
|
||||
}
|
||||
}else{
|
||||
wb.setSheetName(0, "住宅");
|
||||
wb.setSheetName(0, "住宅");
|
||||
}
|
||||
|
||||
|
||||
@@ -2768,63 +2768,63 @@ public class DistrictTmpController {
|
||||
|
||||
public Map<String, String> getFliedDisplay(){
|
||||
Map<String, String> map = new HashMap<String, String>(){ {
|
||||
put( "city" , "城市" );
|
||||
put( "name" , "名称" );
|
||||
put( "region" , "区域" );
|
||||
put( "block" , "板块" );
|
||||
put( "address" , "地址" );
|
||||
put( "estateType2" , "物业类型" );
|
||||
put( "streetCommunity" , "街道社区" );
|
||||
put( "householdCount" , "户数" );
|
||||
put( "openDate" , "开盘时间" );
|
||||
put( "licence" , "预售证" );
|
||||
put( "latLng" , "mapabc经纬度" );
|
||||
put( "latLng2" , "百度经纬度" );
|
||||
put( "allArea" , "占地面积" );
|
||||
put( "buildArea" , "建筑面积" );
|
||||
put( "buildType" , "建筑类型" );
|
||||
put( "alias" , "名称别名" );
|
||||
put( "addrAlias" , "地址别名" );
|
||||
put( "developer" , "开发商" );
|
||||
put( "estateCompany" , "物业公司" );
|
||||
put( "cubagePercent" , "容积率" );
|
||||
put( "virescencePercent" , "绿化率" );
|
||||
put( "carSite" , "停车位(描述)" );
|
||||
put( "estateCharge" , "物业费" );
|
||||
put( "floorplanPics" , "楼层平面图" );
|
||||
put( "outPics" , "外景图" );
|
||||
put( "rentPrice" , "租金" );
|
||||
put( "bedKind" , "写字楼等级" );
|
||||
put( "houseFloor" , "楼层" );
|
||||
put( "houseHeight" , "楼高" );
|
||||
put( "leaseTerm","租赁年限");
|
||||
put( "paymentPattern","付款方式");
|
||||
put( "rentPrice","出租价格");
|
||||
put( "sellPrice","出售价格");
|
||||
put( "floor","建筑楼层");
|
||||
put( "floorInfo","楼层状况");
|
||||
put( "bayArea","开间面积");
|
||||
put( "finishBuildingDate","竣工时间");
|
||||
put( "liveDate","开业时间");
|
||||
put( "divisible","是否可分割");
|
||||
put( "unifiedManage","是否统一管理");
|
||||
put( "carSiteCount","停车位");
|
||||
put( "metroInfo","地铁沿线");
|
||||
put( "metroNames","地铁站名");
|
||||
put( "facilities","配套设施");
|
||||
put( "propertyInfo","物业概况");
|
||||
put( "traffic","交通情况");
|
||||
put( "surrounding","周边情况");
|
||||
put( "businessStatus","经营业态");
|
||||
put( "rentType","租售类型");
|
||||
put( "price","价格");
|
||||
put( "businessQuarter","商圈");
|
||||
put( "status","状态");
|
||||
put( "standardHeight","标准层高");
|
||||
put( "foreign","是否涉外");
|
||||
put( "register","是否注册");
|
||||
put( "realUsePercent","实用率");
|
||||
put( "liveDate","交房时间");
|
||||
put( "city" , "城市" );
|
||||
put( "name" , "名称" );
|
||||
put( "region" , "区域" );
|
||||
put( "block" , "板块" );
|
||||
put( "address" , "地址" );
|
||||
put( "estateType2" , "物业类型" );
|
||||
put( "streetCommunity" , "街道社区" );
|
||||
put( "householdCount" , "户数" );
|
||||
put( "openDate" , "开盘时间" );
|
||||
put( "licence" , "预售证" );
|
||||
put( "latLng" , "mapabc经纬度" );
|
||||
put( "latLng2" , "百度经纬度" );
|
||||
put( "allArea" , "占地面积" );
|
||||
put( "buildArea" , "建筑面积" );
|
||||
put( "buildType" , "建筑类型" );
|
||||
put( "alias" , "名称别名" );
|
||||
put( "addrAlias" , "地址别名" );
|
||||
put( "developer" , "开发商" );
|
||||
put( "estateCompany" , "物业公司" );
|
||||
put( "cubagePercent" , "容积率" );
|
||||
put( "virescencePercent" , "绿化率" );
|
||||
put( "carSite" , "停车位(描述)" );
|
||||
put( "estateCharge" , "物业费" );
|
||||
put( "floorplanPics" , "楼层平面图" );
|
||||
put( "outPics" , "外景图" );
|
||||
put( "rentPrice" , "租金" );
|
||||
put( "bedKind" , "写字楼等级" );
|
||||
put( "houseFloor" , "楼层" );
|
||||
put( "houseHeight" , "楼高" );
|
||||
put( "leaseTerm","租赁年限");
|
||||
put( "paymentPattern","付款方式");
|
||||
put( "rentPrice","出租价格");
|
||||
put( "sellPrice","出售价格");
|
||||
put( "floor","建筑楼层");
|
||||
put( "floorInfo","楼层状况");
|
||||
put( "bayArea","开间面积");
|
||||
put( "finishBuildingDate","竣工时间");
|
||||
put( "liveDate","开业时间");
|
||||
put( "divisible","是否可分割");
|
||||
put( "unifiedManage","是否统一管理");
|
||||
put( "carSiteCount","停车位");
|
||||
put( "metroInfo","地铁沿线");
|
||||
put( "metroNames","地铁站名");
|
||||
put( "facilities","配套设施");
|
||||
put( "propertyInfo","物业概况");
|
||||
put( "traffic","交通情况");
|
||||
put( "surrounding","周边情况");
|
||||
put( "businessStatus","经营业态");
|
||||
put( "rentType","租售类型");
|
||||
put( "price","价格");
|
||||
put( "businessQuarter","商圈");
|
||||
put( "status","状态");
|
||||
put( "standardHeight","标准层高");
|
||||
put( "foreign","是否涉外");
|
||||
put( "register","是否注册");
|
||||
put( "realUsePercent","实用率");
|
||||
put( "liveDate","交房时间");
|
||||
} };//
|
||||
return map;
|
||||
}
|
||||
@@ -2857,17 +2857,17 @@ public class DistrictTmpController {
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
jsonModel.setJsonModel(data);
|
||||
if(StringUtils.isBlank(model.getCityDisplay())){
|
||||
data.put("msg","城市不能为空");
|
||||
data.put("msg","城市不能为空");
|
||||
return jsonModel;
|
||||
}
|
||||
if(StringUtils.isBlank(model.getDestRegion()) || StringUtils.isBlank(model.getOrgRegion())){
|
||||
data.put("msg","原区域和目标区域不能为空");
|
||||
data.put("msg","原区域和目标区域不能为空");
|
||||
return jsonModel;
|
||||
}
|
||||
String orgRegion = model.getOrgRegion();
|
||||
String destRegion = model.getDestRegion();
|
||||
if(orgRegion.equals(destRegion)){
|
||||
data.put("msg","原区域和目标区域不能相同");
|
||||
data.put("msg","原区域和目标区域不能相同");
|
||||
return jsonModel;
|
||||
}
|
||||
List<String> existsDistrict = new ArrayList<String>();
|
||||
@@ -2900,7 +2900,7 @@ public class DistrictTmpController {
|
||||
districtUpdateTaskService.createTask(district.getId(), 1, null, null);
|
||||
}
|
||||
}
|
||||
data.put("msg","数据迁移完成:迁移小区" + count + "个,由于目标区域存在被删除小区" + deleteCount + "个");
|
||||
data.put("msg","数据迁移完成:迁移小区" + count + "个,由于目标区域存在被删除小区" + deleteCount + "个");
|
||||
data.put("success",true);
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
+4
-4
@@ -24,7 +24,7 @@ public class ElevateWordController {
|
||||
private ServerAreaService serverAreaService;
|
||||
|
||||
/**
|
||||
* 精品词列表
|
||||
* 精品词列表
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -86,7 +86,7 @@ public class ElevateWordController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* 保存
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -122,7 +122,7 @@ public class ElevateWordController {
|
||||
dataMap.put("seoIndexDescription", model.getSeoIndexDescription());
|
||||
|
||||
elevateWordService.updateById(model.getId(), dataMap);
|
||||
model.setMsg("修改成功");
|
||||
model.setMsg("修改成功");
|
||||
} else {
|
||||
ElevateWord elevateWord = new ElevateWord();
|
||||
elevateWord.setCategory(model.getCategory());
|
||||
@@ -157,7 +157,7 @@ public class ElevateWordController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* 删除
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ public class EntityClassController {
|
||||
flag=true;
|
||||
}
|
||||
}
|
||||
// AccessibleTest类中的成员变量为private,故必须进行此操作
|
||||
// AccessibleTest类中的成员变量为private,故必须进行此操作
|
||||
if(flag==false){
|
||||
fields[i].setAccessible(true);
|
||||
Class<?> type=fields[i].getType();
|
||||
|
||||
+7
-7
@@ -60,7 +60,7 @@ public class EvaluateController {
|
||||
}
|
||||
|
||||
if (model.getQualifications() != null) {
|
||||
List<String> qs = Arrays.asList(StringUtils.split(model.getQualifications(), "\r\n|、|,|,"));
|
||||
List<String> qs = Arrays.asList(StringUtils.split(model.getQualifications(), "\r\n|、|,|,"));
|
||||
List<String> qualifications = new ArrayList<String>(5);
|
||||
for (String q : qs) {
|
||||
if (StringUtils.isNotBlank(q)) {
|
||||
@@ -71,7 +71,7 @@ public class EvaluateController {
|
||||
}
|
||||
|
||||
if (model.getRegions() != null) {
|
||||
List<String> rs = Arrays.asList(StringUtils.split(model.getRegions(), "\r\n|、|,|,"));
|
||||
List<String> rs = Arrays.asList(StringUtils.split(model.getRegions(), "\r\n|、|,|,"));
|
||||
List<String> regions = new ArrayList<String>(5);
|
||||
for (String r : rs) {
|
||||
if (StringUtils.isNotBlank(r)) {
|
||||
@@ -82,7 +82,7 @@ public class EvaluateController {
|
||||
}
|
||||
|
||||
if (model.getExpertRegions() != null) {
|
||||
List<String> rs = Arrays.asList(StringUtils.split(model.getExpertRegions(), "\r\n|、|,|,"));
|
||||
List<String> rs = Arrays.asList(StringUtils.split(model.getExpertRegions(), "\r\n|、|,|,"));
|
||||
List<String> regions = new ArrayList<String>(5);
|
||||
for (String r : rs) {
|
||||
if (StringUtils.isNotBlank(r)) {
|
||||
@@ -101,9 +101,9 @@ public class EvaluateController {
|
||||
}
|
||||
}
|
||||
|
||||
if (cats.contains("全部")) {
|
||||
if (cats.contains("全部")) {
|
||||
cats = new ArrayList<String>(1);
|
||||
cats.add("全部");
|
||||
cats.add("全部");
|
||||
}
|
||||
|
||||
entity.setMainCategory(cats);
|
||||
@@ -237,8 +237,8 @@ public class EvaluateController {
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("有房价网").append(bo.getApplication().getUserName()).append("(手机").append(bo.getApplication().getMobile())
|
||||
.append(")申请估价师服务,请您立刻回电!");
|
||||
sb.append("有房价网").append(bo.getApplication().getUserName()).append("(手机").append(bo.getApplication().getMobile())
|
||||
.append(")申请估价师服务,请您立刻回电!");
|
||||
try {
|
||||
smsService.sendForRongshidai(bo.getMaster().getMobile(), sb.toString());
|
||||
evaluateApplicationService.updateStatus1(model.getId());
|
||||
|
||||
+27
-27
@@ -60,7 +60,7 @@ public class EvaluationAuditController {
|
||||
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(EvaluationAuditController.class);
|
||||
public Object listAction(EvaluationAuditModel model){
|
||||
//重新重复地址时先查出全部后面再分页
|
||||
//重新重复地址时先查出全部后面再分页
|
||||
Pager pager = model.getPager(20);
|
||||
if(model.isRepeat()){
|
||||
pager = new Pager(Integer.MAX_VALUE);
|
||||
@@ -168,7 +168,7 @@ public class EvaluationAuditController {
|
||||
bo.setBuildType(eval.getBuildType());
|
||||
bo.setFloorDesc(eval.getFloorDesc());
|
||||
bos.add(bo);
|
||||
//根据地址,楼栋号判断是否是同一套房
|
||||
//根据地址,楼栋号判断是否是同一套房
|
||||
List<FjtEvaluation> evaluations = fjtEvaluationService.findAllFjtEvaluationByConditions(eval.getCity(), eval.getRegion(), bo.getAddress(), eval.getHouseNum(), eval.getRoomNum());
|
||||
if(evaluations!=null && evaluations.size()>=2){
|
||||
List<String> ids = new ArrayList<String>();
|
||||
@@ -192,7 +192,7 @@ public class EvaluationAuditController {
|
||||
for(EvaluationAuditBo audit:model.getEvaluationAuditBoList()){
|
||||
UserTrades userTrade = userTradesService.findUserTradesByEvaluationId(audit.getEvaluationId());
|
||||
if(userTrade==null || StringUtils.isBlank(userTrade.getReconcile())){
|
||||
audit.setReconcile("未结账");
|
||||
audit.setReconcile("未结账");
|
||||
}else{
|
||||
audit.setReconcile(userTrade.getReconcile());
|
||||
}
|
||||
@@ -206,7 +206,7 @@ public class EvaluationAuditController {
|
||||
FjtEvaluation eval = fjtEvaluationService.findEvaluationById(Long.parseLong(model.getEvaluationId()));
|
||||
if(eval==null) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("更新失败:根据Id查询evaluation信息失败!");
|
||||
model.setMsg("更新失败:根据Id查询evaluation信息失败!");
|
||||
return model;
|
||||
}
|
||||
eval.setAccountChecker(model.getAccountChecker());
|
||||
@@ -218,7 +218,7 @@ public class EvaluationAuditController {
|
||||
|
||||
|
||||
/**
|
||||
* 手写根据地址分组
|
||||
* 手写根据地址分组
|
||||
*/
|
||||
private List<EvaluationAuditBo> sortByAddress(List<EvaluationAuditBo> bos,Pager pager){
|
||||
List<EvaluationAuditBo> list = new ArrayList<EvaluationAuditBo>();
|
||||
@@ -228,16 +228,16 @@ public class EvaluationAuditController {
|
||||
for(EvaluationAuditBo bo:bos){
|
||||
String key = bo.getAddress()+bo.getHouseNum()+bo.getRoomNum();
|
||||
if(StringUtils.isNotBlank(key)){
|
||||
if(map.containsKey(key)){ //map中已存在,将该数据存放到同一个key的map中
|
||||
if(map.containsKey(key)){ //map中已存在,将该数据存放到同一个key的map中
|
||||
map.get(key).add(bo);
|
||||
}else{ //map中不存在,新建key,用来存放数据
|
||||
}else{ //map中不存在,新建key,用来存放数据
|
||||
List<EvaluationAuditBo> boList = new ArrayList<EvaluationAuditBo>();
|
||||
boList.add(bo);
|
||||
map.put(key, boList);
|
||||
}
|
||||
}
|
||||
}
|
||||
//遍历
|
||||
//遍历
|
||||
for (List<EvaluationAuditBo> value : map.values()) {
|
||||
if(value.size() > 1){
|
||||
list.addAll(value);
|
||||
@@ -325,9 +325,9 @@ public class EvaluationAuditController {
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
|
||||
String[] columns = {"城市","输入","地址","用户名","公司","面积","总价","估价日期","输入成交价","调查价","终审价格","对账情况","对账老师","报告收费","审核时间","操作人","备注"};
|
||||
String[] columns = {"城市","输入","地址","用户名","公司","面积","总价","估价日期","输入成交价","调查价","终审价格","对账情况","对账老师","报告收费","审核时间","操作人","备注"};
|
||||
HSSFWorkbook wb= new HSSFWorkbook();
|
||||
Sheet sheet = wb.createSheet("审核价格");
|
||||
Sheet sheet = wb.createSheet("审核价格");
|
||||
Row row = sheet.createRow(0);
|
||||
for(int i =0 ;i < columns.length ; i++){
|
||||
row.createCell(i).setCellValue(columns[i]);
|
||||
@@ -397,16 +397,16 @@ public class EvaluationAuditController {
|
||||
for(EvaluationAuditBo bo:bos){
|
||||
String key = bo.getAddress()+bo.getHouseNum()+bo.getRoomNum();
|
||||
if(StringUtils.isNotBlank(key)){
|
||||
if(map.containsKey(key)){ //map中已存在,将该数据存放到同一个key的map中
|
||||
if(map.containsKey(key)){ //map中已存在,将该数据存放到同一个key的map中
|
||||
map.get(key).add(bo);
|
||||
}else{ //map中不存在,新建key,用来存放数据
|
||||
}else{ //map中不存在,新建key,用来存放数据
|
||||
List<EvaluationAuditBo> boList = new ArrayList<EvaluationAuditBo>();
|
||||
boList.add(bo);
|
||||
map.put(key, boList);
|
||||
}
|
||||
}
|
||||
}
|
||||
//遍历
|
||||
//遍历
|
||||
for (List<EvaluationAuditBo> value : map.values()) {
|
||||
if(value.size() > 1){
|
||||
auditList.addAll(value);
|
||||
@@ -420,16 +420,16 @@ public class EvaluationAuditController {
|
||||
for(EvaluationAuditBo audit:auditList){
|
||||
UserTrades userTrade = userTradesService.findUserTradesByEvaluationId(audit.getEvaluationId());
|
||||
if(userTrade==null || StringUtils.isBlank(userTrade.getReconcile())){
|
||||
audit.setReconcile("未结账");
|
||||
audit.setReconcile("未结账");
|
||||
}else{
|
||||
audit.setReconcile(userTrade.getReconcile());
|
||||
}
|
||||
String address = audit.getAddress();
|
||||
if(StringUtils.isNotBlank(audit.getHouseNum())){
|
||||
address = address +audit.getHouseNum()+"栋";
|
||||
address = address +audit.getHouseNum()+"栋";
|
||||
}
|
||||
if(StringUtils.isNotBlank(audit.getRoomNum())){
|
||||
address = address + audit.getRoomNum()+"室";
|
||||
address = address + audit.getRoomNum()+"室";
|
||||
}
|
||||
row = sheet.createRow(i++);
|
||||
row.createCell(0).setCellValue(audit.getCity());
|
||||
@@ -438,24 +438,24 @@ public class EvaluationAuditController {
|
||||
row.createCell(3).setCellValue(audit.getUserName());
|
||||
row.createCell(4).setCellValue(audit.getCompany());
|
||||
row.createCell(5).setCellValue(audit.getHouseArea());
|
||||
row.createCell(6).setCellValue(audit.getTotalPrice()+ "万元");
|
||||
row.createCell(7).setCellValue(DateUtil.formatByPattern(audit.getLastUpdated(), "yyyy年MM月dd日 HH:mm"));
|
||||
row.createCell(6).setCellValue(audit.getTotalPrice()+ "万元");
|
||||
row.createCell(7).setCellValue(DateUtil.formatByPattern(audit.getLastUpdated(), "yyyy年MM月dd日 HH:mm"));
|
||||
if(audit.getDealPrice() != null){
|
||||
row.createCell(8).setCellValue(audit.getDealPrice() + "万元");
|
||||
row.createCell(8).setCellValue(audit.getDealPrice() + "万元");
|
||||
}
|
||||
if(audit.getInvestigatePrice()!=null){
|
||||
row.createCell(9).setCellValue(audit.getInvestigatePrice() + "万元");
|
||||
row.createCell(9).setCellValue(audit.getInvestigatePrice() + "万元");
|
||||
}
|
||||
if(audit.getAuditPrice() != null){
|
||||
row.createCell(10).setCellValue(audit.getAuditPrice()+ "万元");
|
||||
row.createCell(10).setCellValue(audit.getAuditPrice()+ "万元");
|
||||
}
|
||||
row.createCell(11).setCellValue(audit.getReconcile());
|
||||
row.createCell(12).setCellValue(audit.getAccountChecker());
|
||||
if(audit.getCharge() != null){
|
||||
row.createCell(13).setCellValue(audit.getCharge() + "元");
|
||||
row.createCell(13).setCellValue(audit.getCharge() + "元");
|
||||
}
|
||||
if(audit.getAuditDate() != null){
|
||||
row.createCell(14).setCellValue(DateUtil.formatByPattern(audit.getAuditDate(),"yyyy年MM月dd日 HH:mm"));
|
||||
row.createCell(14).setCellValue(DateUtil.formatByPattern(audit.getAuditDate(),"yyyy年MM月dd日 HH:mm"));
|
||||
}
|
||||
if(audit.getAuditor()!=null){
|
||||
row.createCell(15).setCellValue(audit.getAuditor());
|
||||
@@ -465,18 +465,18 @@ public class EvaluationAuditController {
|
||||
}
|
||||
}
|
||||
|
||||
String fileName = "价格审核" + "(" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
String fileName = "价格审核" + "(" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class EvaluationConditionController {
|
||||
evaluationCondition.setCondition(model.getCondition());
|
||||
evaluationCondition.setConditionEN(model.getConditionEN());
|
||||
evaluationCondition.setSeq(1);
|
||||
evaluationCondition.setShowType("데朞움");
|
||||
evaluationCondition.setShowType("单选框");
|
||||
String condition = evaluationCondition.getCondition();
|
||||
String estateType = evaluationCondition.getEstateType();
|
||||
if(evaluationCondition.getId()==null){
|
||||
|
||||
+17
-17
@@ -94,8 +94,8 @@ public class EvaluationController {
|
||||
|
||||
private static long MAX_PIC_SIZE = 2 * 1024 * 1024;
|
||||
|
||||
private static String POSITIVE_WORD = "好,佳,漂亮,喜欢,满意,值得,美丽,不错,挺好,方便,崭新,快捷,便利,干净,整洁,态度好,服务好,物业好,素质高,环境优美,绿化面积大,小区环境好,安全,干净,整洁,电梯快,美丽,离地铁近,公交方便,四通八达,有大卖场,有超市,房价便宜,得房率高,租金便宜,公园,空气好,有菜场,配套齐全,出行方便,近医院,学区房,有名校,性价比高,风水好,公交多,档次高,商铺多,停车方便,有车库,朝向好,视野佳,保安好";
|
||||
private static String NEGATIVE_WORD = "脏,乱,差,难,恶劣,厌恶,讨厌,恶心,后悔,难过,晕,烦,头疼,郁闷,麻烦,恨,陈旧,不方便,慢,臭,危险环境差,绿化少,保安差,物业差,态度差,态度恶劣,质量差,漏水, 裂缝,失窃,不安全,物业不作为,服务差,得房率低,电梯老,电梯慢,乱堆杂物,停车难,无车位,配套少,维修慢,推销,小偷,陌生人,黑三轮,黑车,小广告,乱扔垃圾,臭水沟,交通不方便,没有超市,失窃,偷车,出行不便,沿马路,有噪音,吵闹,没医院,扰民,遮挡光线,素质差,群租房,房龄老";
|
||||
private static String POSITIVE_WORD = "好,佳,漂亮,喜欢,满意,值得,美丽,不错,挺好,方便,崭新,快捷,便利,干净,整洁,态度好,服务好,物业好,素质高,环境优美,绿化面积大,小区环境好,安全,干净,整洁,电梯快,美丽,离地铁近,公交方便,四通八达,有大卖场,有超市,房价便宜,得房率高,租金便宜,公园,空气好,有菜场,配套齐全,出行方便,近医院,学区房,有名校,性价比高,风水好,公交多,档次高,商铺多,停车方便,有车库,朝向好,视野佳,保安好";
|
||||
private static String NEGATIVE_WORD = "脏,乱,差,难,恶劣,厌恶,讨厌,恶心,后悔,难过,晕,烦,头疼,郁闷,麻烦,恨,陈旧,不方便,慢,臭,危险环境差,绿化少,保安差,物业差,态度差,态度恶劣,质量差,漏水, 裂缝,失窃,不安全,物业不作为,服务差,得房率低,电梯老,电梯慢,乱堆杂物,停车难,无车位,配套少,维修慢,推销,小偷,陌生人,黑三轮,黑车,小广告,乱扔垃圾,臭水沟,交通不方便,没有超市,失窃,偷车,出行不便,沿马路,有噪音,吵闹,没医院,扰民,遮挡光线,素质差,群租房,房龄老";
|
||||
|
||||
public Object listAction(EvaluationExportModel model) {
|
||||
|
||||
@@ -183,8 +183,8 @@ public class EvaluationController {
|
||||
evaluation.getDistrictName());
|
||||
model.setMetros(metros);
|
||||
|
||||
model.setPositives(Arrays.asList(POSITIVE_WORD.split(",")));
|
||||
model.setNegatives(Arrays.asList(NEGATIVE_WORD.split(",")));
|
||||
model.setPositives(Arrays.asList(POSITIVE_WORD.split(",")));
|
||||
model.setNegatives(Arrays.asList(NEGATIVE_WORD.split(",")));
|
||||
if (StringUtils.isNotEmpty(district.getDeveloper())) {
|
||||
model.setDeveloperObj(developerService.findByName(null, district.getDeveloper()));
|
||||
}
|
||||
@@ -337,7 +337,7 @@ public class EvaluationController {
|
||||
} else {
|
||||
Mail mail = new Mail();
|
||||
mail.setReceiver(new MailUser(model.getEmail()));
|
||||
mail.setSubject("房价网—房产专业调查分析报告");
|
||||
mail.setSubject("房价网—房产专业调查分析报告");
|
||||
Date _now = new Date();
|
||||
String email_content = "";
|
||||
EmailTemplate sd = new EmailTemplate("reportEmail.ftl");
|
||||
@@ -352,8 +352,8 @@ public class EvaluationController {
|
||||
mail.setContent(email_content);
|
||||
mail.setImportant(true);
|
||||
mail.setAttachment(true);
|
||||
mail.setAttachmentDes("房产专业调查分析报告");
|
||||
mail.setAttachmentName("房产专业调查分析报告.pdf");
|
||||
mail.setAttachmentDes("房产专业调查分析报告");
|
||||
mail.setAttachmentName("房产专业调查分析报告.pdf");
|
||||
if (report.getCat() != 0) {
|
||||
mail.setAttachmentUrl("http://sh.fangjia.com/report2?eid=" + SecurityUtil.encode(model.getEvaluationId()));
|
||||
} else {
|
||||
@@ -418,15 +418,15 @@ public class EvaluationController {
|
||||
String text = document.toString();
|
||||
Document doc = DocumentHelper.parseText(text);
|
||||
Element root = (Element) doc.getRootElement();
|
||||
String is_success = root.elementText("is_success");// is_success为T
|
||||
// 为确认发货成功
|
||||
String is_success = root.elementText("is_success");// is_success为T
|
||||
// 为确认发货成功
|
||||
|
||||
// if(is_success.equals("T")){
|
||||
String content = "";
|
||||
if (isAlipay) {
|
||||
content = "尊敬的客户,《房调报告》已发送您指定邮箱,请注意查收,并在支付宝确认收货,谢谢!客服热线:021-62391139";
|
||||
content = "尊敬的客户,《房调报告》已发送您指定邮箱,请注意查收,并在支付宝确认收货,谢谢!客服热线:021-62391139";
|
||||
} else {
|
||||
content = "尊敬的客户,《房调报告》已发送您指定邮箱,请注意查收,谢谢!客服热线:021-62391139";
|
||||
content = "尊敬的客户,《房调报告》已发送您指定邮箱,请注意查收,谢谢!客服热线:021-62391139";
|
||||
}
|
||||
smsService.send(report.getPhone(), content);
|
||||
// }
|
||||
@@ -455,7 +455,7 @@ public class EvaluationController {
|
||||
}
|
||||
|
||||
try {
|
||||
String content = "尊敬的用户,恭喜您获得了房价网《房调报告》的免费体验,报告需人工审核,将在24小时内发送您提供的邮箱,请耐心等待,谢谢关注!客服电话:021-62391139";
|
||||
String content = "尊敬的用户,恭喜您获得了房价网《房调报告》的免费体验,报告需人工审核,将在24小时内发送您提供的邮箱,请耐心等待,谢谢关注!客服电话:021-62391139";
|
||||
smsService.send(taste.getUserMobile(), content);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -907,7 +907,7 @@ public class EvaluationController {
|
||||
|
||||
private void processOutPics(District district, EvaluationExportModel model) {
|
||||
// System.out.println(model.getDelPics());
|
||||
// // 删除图片
|
||||
// // 删除图片
|
||||
// fileService.delPics(model.getDelPics(),
|
||||
// FileServiceImpl.SIZE_ORIGINAL);
|
||||
List<String> old_outPics = district.getOutPics();
|
||||
@@ -950,7 +950,7 @@ public class EvaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理图片(从FS删除图片,保存新图片到FS,更新小区图片url列表)
|
||||
* 处理图片(从FS删除图片,保存新图片到FS,更新小区图片url列表)
|
||||
*/
|
||||
private void processFloorPics(District district, EvaluationExportModel model) {
|
||||
|
||||
@@ -993,7 +993,7 @@ public class EvaluationController {
|
||||
}
|
||||
}
|
||||
|
||||
// 删除图片
|
||||
// 删除图片
|
||||
// fileService.delPics(model.getDelPics(),
|
||||
// FileServiceImpl.SIZE_ORIGINAL);
|
||||
//
|
||||
@@ -1036,7 +1036,7 @@ public class EvaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存图片到FS
|
||||
* 保存图片到FS
|
||||
*/
|
||||
private List<String> savePics(String districtId, List<File> pics) {
|
||||
List<String> ret = new ArrayList<String>(pics.size());
|
||||
@@ -1067,7 +1067,7 @@ public class EvaluationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证图片文件类型,目前支持gif、jpg
|
||||
* 验证图片文件类型,目前支持gif、jpg
|
||||
*
|
||||
* @param pic
|
||||
* @return
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 房价网1.1 用户分析
|
||||
* 房价网1.1 用户分析
|
||||
* @author zhangran
|
||||
*
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ public class EvaluationPurposeAnalysisController {
|
||||
pager.getStartRow(),pager.getPageSize());
|
||||
for(EvaluationPurposeAnalysis purposeAnalysis : list) {
|
||||
if(StringUtils.isBlank(purposeAnalysis.getLeadsSource())) {
|
||||
purposeAnalysis.setLeadsSource("房价网");
|
||||
purposeAnalysis.setLeadsSource("房价网");
|
||||
}
|
||||
}
|
||||
model.setList(list);
|
||||
@@ -57,7 +57,7 @@ public class EvaluationPurposeAnalysisController {
|
||||
model.getVisitTime(),model.getReportType(),model.getStartDate(),model.getEndDate(),0,Integer.MAX_VALUE);
|
||||
for(EvaluationPurposeAnalysis purposeAnalysis : list) {
|
||||
if(StringUtils.isBlank(purposeAnalysis.getLeadsSource())) {
|
||||
purposeAnalysis.setLeadsSource("房价网");
|
||||
purposeAnalysis.setLeadsSource("房价网");
|
||||
}
|
||||
}
|
||||
if ( list.size() > 65536) {
|
||||
@@ -69,7 +69,7 @@ public class EvaluationPurposeAnalysisController {
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
|
||||
ExcelZipUtil.excuteStream(response, workbookMap, "用户分析","UserAnalysis");
|
||||
ExcelZipUtil.excuteStream(response, workbookMap, "用户分析","UserAnalysis");
|
||||
|
||||
model.setViewType("stream");
|
||||
return model;
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class FjBusinessLoanController {
|
||||
|
||||
FjBusinessLoan businessLoan = model.getBusinessLoan();
|
||||
if (StringUtils.isNotBlank(businessLoan.getCity())) {
|
||||
businessLoan.setCitys(Arrays.asList(businessLoan.getCity().split(",|,")));
|
||||
businessLoan.setCitys(Arrays.asList(businessLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
businessLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class FjCarLoanController {
|
||||
|
||||
FjCarLoan carLoan = model.getCarLoan();
|
||||
if (StringUtils.isNotBlank(carLoan.getCity())) {
|
||||
carLoan.setCitys(Arrays.asList(carLoan.getCity().split(",|,")));
|
||||
carLoan.setCitys(Arrays.asList(carLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
carLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class FjConsumptionLoanController {
|
||||
|
||||
FjConsumptionLoan consumptionLoan = model.getConsumptionLoan();
|
||||
if (StringUtils.isNotBlank(consumptionLoan.getCity())) {
|
||||
consumptionLoan.setCitys(Arrays.asList(consumptionLoan.getCity().split(",|,")));
|
||||
consumptionLoan.setCitys(Arrays.asList(consumptionLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
consumptionLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class FjHouseLoanController {
|
||||
|
||||
FjHouseLoan houseLoan = model.getHouseLoan();
|
||||
if (StringUtils.isNotBlank(houseLoan.getCity())) {
|
||||
houseLoan.setCitys(Arrays.asList(houseLoan.getCity().split(",|,")));
|
||||
houseLoan.setCitys(Arrays.asList(houseLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
houseLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+11
-11
@@ -143,7 +143,7 @@ public class FjLoanerInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 给用户发送短信
|
||||
* 给用户发送短信
|
||||
*/
|
||||
private void sendUserMsg(FjLoanBo productInfo, FjBaseLoan loanInfo, FjLoanOfficer officerInfo, String mobile) {
|
||||
String callNumber = getOfficerCallNumber(officerInfo);
|
||||
@@ -154,9 +154,9 @@ public class FjLoanerInfoController {
|
||||
StringBuffer msg = new StringBuffer();
|
||||
msg.append(productInfo.getAgencyName()).append(" ");
|
||||
msg.append(loanInfo.getProductName()).append(" ");
|
||||
msg.append("信贷员 ").append(officerInfo.getName()).append("的联系方式为").append(callNumber);
|
||||
msg.append("信贷员 ").append(officerInfo.getName()).append("的联系方式为").append(callNumber);
|
||||
|
||||
msg.append(" 贷款产品尽在sh.fangjia.com");
|
||||
msg.append(" 贷款产品尽在sh.fangjia.com");
|
||||
|
||||
try {
|
||||
smsService.send(mobile, msg.toString());
|
||||
@@ -165,7 +165,7 @@ public class FjLoanerInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 给信贷员发送短信
|
||||
* 给信贷员发送短信
|
||||
*/
|
||||
private void sendOfficerMsg(FjBaseLoan loanInfo, FjLoanOfficer officerInfo, FjLoanerInfo loanerInfo) {
|
||||
String mobile = getOfficerMobile(officerInfo);
|
||||
@@ -174,16 +174,16 @@ public class FjLoanerInfoController {
|
||||
}
|
||||
|
||||
StringBuffer msg = new StringBuffer();
|
||||
msg.append(loanerInfo.getUserName()).append("(手机").append(loanerInfo.getMobile()).append(")选择了您发布的“")
|
||||
.append(loanInfo.getProductName()).append("”。");
|
||||
msg.append(loanerInfo.getUserName()).append("(手机").append(loanerInfo.getMobile()).append(")选择了您发布的“")
|
||||
.append(loanInfo.getProductName()).append("”。");
|
||||
|
||||
Evaluation evaluation = evaluationService.findEvaluationById(loanerInfo.getEvaId());
|
||||
if (null != evaluation) {
|
||||
msg.append("房产信息:").append(evaluation.getRegion()).append(evaluation.getDistrictName())
|
||||
.append(evaluation.getHouseNum()).append("号").append(evaluation.getRoomNum()).append("室")
|
||||
.append(evaluation.getArea()).append("平米,估价").append((int) (evaluation.getTotalPrice() / 10000))
|
||||
.append("万,申请").append(loanerInfo.getLoanAmount()).append("万贷款,期限").append(loanerInfo.getLoanMonth())
|
||||
.append("个月。");
|
||||
msg.append("房产信息:").append(evaluation.getRegion()).append(evaluation.getDistrictName())
|
||||
.append(evaluation.getHouseNum()).append("号").append(evaluation.getRoomNum()).append("室")
|
||||
.append(evaluation.getArea()).append("平米,估价").append((int) (evaluation.getTotalPrice() / 10000))
|
||||
.append("万,申请").append(loanerInfo.getLoanAmount()).append("万贷款,期限").append(loanerInfo.getLoanMonth())
|
||||
.append("个月。");
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
+13
-13
@@ -153,13 +153,13 @@ public class FjtArtificialController {
|
||||
fjtEvaluationService.updateEvaluation(fjtEvaluation);
|
||||
}
|
||||
|
||||
saveDistrictProcessResult(fjtEvaluation,model);//保存处理结果
|
||||
//发短信
|
||||
saveDistrictProcessResult(fjtEvaluation,model);//保存处理结果
|
||||
//发短信
|
||||
String content = "";
|
||||
if(StringUtils.isNotBlank(userDetail.getName())){
|
||||
content = userDetail.getName() +",";
|
||||
}
|
||||
content = content + "您好!您需要处理的"+fjtEvaluation.getAddress()+",已处理完成!请在房价通中查看!";
|
||||
content = content + "您好!您需要处理的"+fjtEvaluation.getAddress()+",已处理完成!请在房价通中查看!";
|
||||
try {
|
||||
smsService.send(userDetail.getMobile(), content);
|
||||
} catch (Exception e) {
|
||||
@@ -203,12 +203,12 @@ public class FjtArtificialController {
|
||||
FjtEvaluation fjtEvaluation = fjtEvaluationService.findEvaluationById(evaluationTask.getEvaluationId());
|
||||
UsersDetail userDetail = usersDetailService.findById(evaluationTask.getUserId());
|
||||
if(userDetail != null && StringUtils.isNotBlank(userDetail.getMobile())){
|
||||
//发短信
|
||||
//发短信
|
||||
String content = "";
|
||||
if(StringUtils.isNotBlank(userDetail.getName())){
|
||||
content = userDetail.getName() +",";
|
||||
}
|
||||
content = content + "您好!您需要处理的"+fjtEvaluation.getAddress()+",暂时未找到相关的信息,请仔细检查您的输入是否正确!";
|
||||
content = content + "您好!您需要处理的"+fjtEvaluation.getAddress()+",暂时未找到相关的信息,请仔细检查您的输入是否正确!";
|
||||
try {
|
||||
smsService.send(userDetail.getMobile(), content);
|
||||
} catch (Exception e) {
|
||||
@@ -224,7 +224,7 @@ public class FjtArtificialController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存人工处理结果
|
||||
* 保存人工处理结果
|
||||
* @param fjtEvaluation
|
||||
* @param model
|
||||
*/
|
||||
@@ -238,15 +238,15 @@ public class FjtArtificialController {
|
||||
cat = "office";
|
||||
}else if(fjtEvaluation.getBuildType() == 3 || fjtEvaluation.getBuildType() == 8){
|
||||
cat = "district";
|
||||
estateType = "普通住宅";
|
||||
estateType = "普通住宅";
|
||||
}else if(fjtEvaluation.getBuildType() >=4 && fjtEvaluation.getBuildType() <=7){
|
||||
cat = "district";
|
||||
estateType = "别墅";
|
||||
estateType = "别墅";
|
||||
}
|
||||
if(cat != null) {//已知物业类型
|
||||
if(cat != null) {//已知物业类型
|
||||
model.setDistrictName(model.getDistrictName().replaceAll("(^\\s{1,})|(\\s{1,}$)", ""));
|
||||
List<District> districts = districtService.findByKey(fjtEvaluation.getCity(), model.getRegion(), model.getDistrictName(), cat);
|
||||
if (districts.isEmpty()) {//如果小区不存在则入库
|
||||
if (districts.isEmpty()) {//如果小区不存在则入库
|
||||
District district = new District();
|
||||
district.setCity(fjtEvaluation.getCity());
|
||||
district.setRegion(model.getRegion());
|
||||
@@ -264,7 +264,7 @@ public class FjtArtificialController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 为小区添加指导价
|
||||
* 为小区添加指导价
|
||||
* @param district
|
||||
* @param avgPrice
|
||||
* @param operator
|
||||
@@ -288,7 +288,7 @@ public class FjtArtificialController {
|
||||
}
|
||||
guidingPriceService.save(guiding);
|
||||
|
||||
String remark = MessageFormat.format("房价通->人工处理添加 添加人:{0}", new String[]{operator});
|
||||
String remark = MessageFormat.format("房价通->人工处理添加 添加人:{0}", new String[]{operator});
|
||||
CalcCommand cmd = new CalcCommand();
|
||||
cmd.setCity(district.getCity());
|
||||
cmd.setRegion(district.getRegion());
|
||||
@@ -349,7 +349,7 @@ public class FjtArtificialController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//对未分配的任务进行分配
|
||||
//对未分配的任务进行分配
|
||||
public Object tasksAction(EvaluationTaskModel model){
|
||||
String name = (String) ActionContext.getContext().getRequest().getSession().getAttribute("realName");
|
||||
List<EvaluationTask> tasks = evaluationTaskService.findEvaluationTasks(null, 1, null, name, null, null, "asc", 0, 0);
|
||||
|
||||
+11
-11
@@ -51,7 +51,7 @@ public class FjtController {
|
||||
private CitysService citysService;
|
||||
|
||||
/**
|
||||
* 根据角色获用户信息
|
||||
* 根据角色获用户信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -72,7 +72,7 @@ public class FjtController {
|
||||
return model;
|
||||
}
|
||||
|
||||
/**用户管理*/
|
||||
/**用户管理*/
|
||||
public Object userlistAction(FjtModel model){
|
||||
Pager pager = model.getPager(20);
|
||||
pager.setTotalRows((int) fjtUsersService.findUserCont(model.getEmail(), model.getRole(), model.getMobile()));
|
||||
@@ -113,7 +113,7 @@ public class FjtController {
|
||||
List<ServerArea> serverAreas = serverAreaService.findAll();
|
||||
List<String> allCitys = new ArrayList<String>();
|
||||
for(ServerArea serverArea : serverAreas){
|
||||
if(!serverArea.getDisplay().equals("全国")){
|
||||
if(!serverArea.getDisplay().equals("全国")){
|
||||
allCitys.add(serverArea.getDisplay());
|
||||
}
|
||||
}
|
||||
@@ -124,11 +124,11 @@ public class FjtController {
|
||||
for (ServerArea serverArea : serverAreas) {
|
||||
//if(serverArea.isSupportGujia()){
|
||||
if(names.contains(serverArea.getDisplay())){
|
||||
String cityInitial = StringUtil.getFirstSpell(serverArea.getSpell(), true);// 城市首字母
|
||||
List<ServerAreaBo> serverAreaBoList = getCachedServerAreaByInitial(serverAreaBoMap, cityInitial);// 按首字母加载城市列表
|
||||
String cityInitial = StringUtil.getFirstSpell(serverArea.getSpell(), true);// 城市首字母
|
||||
List<ServerAreaBo> serverAreaBoList = getCachedServerAreaByInitial(serverAreaBoMap, cityInitial);// 按首字母加载城市列表
|
||||
ServerAreaBo serverAreaBo = new ServerAreaBo(serverArea);
|
||||
serverAreaBoList.add(serverAreaBo);
|
||||
sort(serverAreaBoList);// 字母内排序
|
||||
sort(serverAreaBoList);// 字母内排序
|
||||
if(!firstWords.contains(cityInitial)){
|
||||
firstWords.add(cityInitial);
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class FjtController {
|
||||
|
||||
|
||||
/**
|
||||
* 城市字母内排序
|
||||
* 城市字母内排序
|
||||
*
|
||||
* @param serverAreaBoList
|
||||
*/
|
||||
@@ -329,7 +329,7 @@ public class FjtController {
|
||||
model.setViewType("json");
|
||||
FjtUsers user = fjtUsersService.findByEmail(model.getEmail());
|
||||
if(user != null){
|
||||
model.setErrMsg("此帐号已存在!");
|
||||
model.setErrMsg("此帐号已存在!");
|
||||
}
|
||||
|
||||
return model;
|
||||
@@ -413,7 +413,7 @@ public class FjtController {
|
||||
logs.setGoldCount(Math.abs(model.getChongzhiCount()));
|
||||
logs.setUserId(user.getId());
|
||||
logs.setStatus(1);
|
||||
logs.setContent("淘宝充值");
|
||||
logs.setContent("淘宝充值");
|
||||
logs.setActionType(0);
|
||||
logs.setDateCreated(new Date());
|
||||
logs.setLastUpdated(new Date());
|
||||
@@ -425,7 +425,7 @@ public class FjtController {
|
||||
logs.setGoldCount(Math.abs(model.getZengsongCount()));
|
||||
logs.setUserId(user.getId());
|
||||
logs.setStatus(1);
|
||||
logs.setContent("淘宝充值赠送");
|
||||
logs.setContent("淘宝充值赠送");
|
||||
logs.setActionType(0);
|
||||
logs.setDateCreated(new Date());
|
||||
logs.setLastUpdated(new Date());
|
||||
@@ -436,7 +436,7 @@ public class FjtController {
|
||||
logs.setGoldCount(Math.abs(model.getChexiaoCount()));
|
||||
logs.setUserId(user.getId());
|
||||
logs.setStatus(2);
|
||||
logs.setContent("系统撤消");
|
||||
logs.setContent("系统撤消");
|
||||
logs.setActionType(0);
|
||||
logs.setDateCreated(new Date());
|
||||
logs.setLastUpdated(new Date());
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ public class FjtMenuController {
|
||||
|
||||
private FjtMenuService fjtMenuService;
|
||||
private RoleMenuService roleMenuService;
|
||||
/**菜单管理*/
|
||||
/**菜单管理*/
|
||||
public Object menulistAction(FjtmenuModel model){
|
||||
List<FjtMenu> menus = fjtMenuService.findAllMenus();
|
||||
model.setFjtmenus(menus);
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ public class FpkMenuController {
|
||||
|
||||
private FpkMenuService fpkMenuService;
|
||||
/**
|
||||
* 菜单管理
|
||||
* 菜单管理
|
||||
* */
|
||||
public Object menulistAction(FpkMenuModel model){
|
||||
List<FpkMenu> menus = fpkMenuService.findAllMenus();
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ public class FpkPriceController {
|
||||
|
||||
public Object listAction(FpkPriceModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
PricePredict pricePredict = pricePredictService.findPredictResult(model.getCityDisplay(), model.getCategory(), model.getRegion(),model.getKeyword());
|
||||
model.setPricePredict(pricePredict);
|
||||
@@ -77,7 +77,7 @@ public class FpkPriceController {
|
||||
|
||||
public Object addAction(FpkPriceModel model) {
|
||||
if(StringUtils.isBlank(model.getCityDisplay())) {
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(model.getId())){
|
||||
|
||||
+7
-7
@@ -27,7 +27,7 @@ public class FpkUsersController {
|
||||
static final String PASSWORD_MASK = "********";
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
* 用户管理
|
||||
* */
|
||||
public Object userlistAction(FpkUsersModel model){
|
||||
|
||||
@@ -53,7 +53,7 @@ public class FpkUsersController {
|
||||
List<ServerArea> serverAreas = serverAreaService.findAll();
|
||||
List<String> allCitys = new ArrayList<String>();
|
||||
for(ServerArea serverArea : serverAreas){
|
||||
if(!serverArea.getDisplay().equals("全国")){
|
||||
if(!serverArea.getDisplay().equals("全国")){
|
||||
allCitys.add(serverArea.getDisplay());
|
||||
}
|
||||
}
|
||||
@@ -62,11 +62,11 @@ public class FpkUsersController {
|
||||
Map<String, List<ServerAreaBo>> serverAreaBoMap = new HashMap<String, List<ServerAreaBo>>();
|
||||
for (ServerArea serverArea : serverAreas) {
|
||||
if(serverArea.isSupportGujia()){
|
||||
String cityInitial = StringUtil.getFirstSpell(serverArea.getSpell(), true);// 城市首字母
|
||||
List<ServerAreaBo> serverAreaBoList = getCachedServerAreaByInitial(serverAreaBoMap, cityInitial);// 按首字母加载城市列表
|
||||
String cityInitial = StringUtil.getFirstSpell(serverArea.getSpell(), true);// 城市首字母
|
||||
List<ServerAreaBo> serverAreaBoList = getCachedServerAreaByInitial(serverAreaBoMap, cityInitial);// 按首字母加载城市列表
|
||||
ServerAreaBo serverAreaBo = new ServerAreaBo(serverArea);
|
||||
serverAreaBoList.add(serverAreaBo);
|
||||
sort(serverAreaBoList);// 字母内排序
|
||||
sort(serverAreaBoList);// 字母内排序
|
||||
if(!firstWords.contains(cityInitial)){
|
||||
firstWords.add(cityInitial);
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class FpkUsersController {
|
||||
|
||||
|
||||
/**
|
||||
* 城市字母内排序
|
||||
* 城市字母内排序
|
||||
*
|
||||
* @param serverAreaBoList
|
||||
*/
|
||||
@@ -204,7 +204,7 @@ public class FpkUsersController {
|
||||
model.setViewType("json");
|
||||
FpkUsers user = fpkUsersService.findByName(model.getName());
|
||||
if(user != null){
|
||||
model.setErrMsg("此帐号已存在!");
|
||||
model.setErrMsg("此帐号已存在!");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
+8
-8
@@ -29,15 +29,15 @@ public class FriendLinkController {
|
||||
private ServerAreaService serverAreaService;
|
||||
|
||||
/**
|
||||
* 友情链接管理列表
|
||||
* 友情链接管理列表
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object listAction(FriendLinkModel model) {
|
||||
model.setServerAreasList(serverAreaService.findAll());
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {// 分城市友情链接处理
|
||||
model.setCityDisplay("上海");
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {// 分城市友情链接处理
|
||||
model.setCityDisplay("上海");
|
||||
}
|
||||
List<FriendLink> links = friendLinkService.findAllByCity(model.getCityDisplay());
|
||||
List<FriendLink> friendLinkList = getFriendLinkSequence(links);
|
||||
@@ -46,7 +46,7 @@ public class FriendLinkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 全国首页友情链接
|
||||
* 全国首页友情链接
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -60,7 +60,7 @@ public class FriendLinkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装友情链接页面序列
|
||||
* 组装友情链接页面序列
|
||||
*
|
||||
* @param links
|
||||
* @return
|
||||
@@ -199,10 +199,10 @@ public class FriendLinkController {
|
||||
html = getMethod.getResponseBodyAsString();
|
||||
}
|
||||
} catch (HttpException e) {
|
||||
model.setMsg("网络不正常");
|
||||
model.setMsg("网络不正常");
|
||||
return model;
|
||||
} catch (IOException e) {
|
||||
model.setMsg("异常");
|
||||
model.setMsg("异常");
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ public class FriendLinkController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除友情链接
|
||||
* 删除友情链接
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
|
||||
+7
-7
@@ -32,14 +32,14 @@ import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 二手房controller
|
||||
* 二手房controller
|
||||
*
|
||||
* @author liupei
|
||||
*/
|
||||
public class HouseController {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(HouseController.class);
|
||||
/**
|
||||
* 二手房Service
|
||||
* 二手房Service
|
||||
*/
|
||||
private HouseService houseService;
|
||||
private DistrictService districtService;
|
||||
@@ -48,7 +48,7 @@ public class HouseController {
|
||||
private FilesService filesService;
|
||||
|
||||
/**
|
||||
* 列表Action
|
||||
* 列表Action
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -82,7 +82,7 @@ public class HouseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房源
|
||||
* 删除房源
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -100,7 +100,7 @@ public class HouseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入更新房源页面Action
|
||||
* 进入更新房源页面Action
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -114,7 +114,7 @@ public class HouseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行删除房源图片Action
|
||||
* 执行删除房源图片Action
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -160,7 +160,7 @@ public class HouseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析房源id
|
||||
* 解析房源id
|
||||
*
|
||||
* @param idStr
|
||||
* @return
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class HouseLoanController {
|
||||
|
||||
HouseLoan houseLoan = model.getHouseLoan();
|
||||
if (StringUtils.isNotBlank(houseLoan.getCity())) {
|
||||
houseLoan.setCitys(Arrays.asList(houseLoan.getCity().split(",|,")));
|
||||
houseLoan.setCitys(Arrays.asList(houseLoan.getCity().split(",|,")));
|
||||
}
|
||||
|
||||
houseLoan.setFeature(StringUtils.join(model.getFeatures(), ","));
|
||||
|
||||
+19
-19
@@ -130,7 +130,7 @@ public class HouseLoudongController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑房号信息
|
||||
* 编辑房号信息
|
||||
* @param model
|
||||
* @return
|
||||
* @throws UnsupportedEncodingException
|
||||
@@ -460,7 +460,7 @@ public class HouseLoudongController {
|
||||
|
||||
|
||||
/**
|
||||
* 导出Excel,只能导出小区的房号数据
|
||||
* 导出Excel,只能导出小区的房号数据
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -475,21 +475,21 @@ public class HouseLoudongController {
|
||||
if (list == null || list.size() == 0) {
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
data.put("msg", "无数据");
|
||||
data.put("msg", "无数据");
|
||||
jsonModel.setJsonModel(data);
|
||||
return jsonModel;
|
||||
}
|
||||
String fileName = city + "-" + name + "(" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss") + ").xlsx";
|
||||
List<List<String>> datas = new ArrayList<List<String>>();
|
||||
List<String> l = new ArrayList<String>();
|
||||
l.add("城市");
|
||||
l.add("区域");
|
||||
l.add("小区");
|
||||
l.add("楼号");
|
||||
l.add("室号");
|
||||
l.add("单元");
|
||||
l.add("面积");
|
||||
l.add("户型");
|
||||
l.add("城市");
|
||||
l.add("区域");
|
||||
l.add("小区");
|
||||
l.add("楼号");
|
||||
l.add("室号");
|
||||
l.add("单元");
|
||||
l.add("面积");
|
||||
l.add("户型");
|
||||
datas.add(l);
|
||||
for (HouseLoudong house : list) {
|
||||
l = new ArrayList<String>();
|
||||
@@ -510,14 +510,14 @@ public class HouseLoudongController {
|
||||
filePath = ExcelUtil.write(fileName, datas, "sheet");
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();// 取得输出流
|
||||
inputStream = new FileInputStream(filePath);
|
||||
byte[] buffer = new byte[1024];
|
||||
int i = -1;
|
||||
@@ -544,7 +544,7 @@ public class HouseLoudongController {
|
||||
} else {
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
data.put("msg", "请选择城市下的小区进行数据导出");
|
||||
data.put("msg", "请选择城市下的小区进行数据导出");
|
||||
jsonModel.setJsonModel(data);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -552,7 +552,7 @@ public class HouseLoudongController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存房号信息
|
||||
* 保存房号信息
|
||||
* @param model
|
||||
* @return
|
||||
* @throws UnsupportedEncodingException
|
||||
@@ -723,7 +723,7 @@ public class HouseLoudongController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 房号信息列表查询显示
|
||||
* 房号信息列表查询显示
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -853,7 +853,7 @@ public class HouseLoudongController {
|
||||
if (StringUtils.isBlank(model.getCat())) {
|
||||
model.setCat("district");
|
||||
}
|
||||
if("全市".equals(model.getRegion())){
|
||||
if("全市".equals(model.getRegion())){
|
||||
model.setRegion(null);
|
||||
}
|
||||
model.setRegionList(getRegionNameList(model.getCityDisplay()));
|
||||
@@ -905,7 +905,7 @@ public class HouseLoudongController {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
|
||||
String city = model.getCityDisplay();
|
||||
if(StringUtils.isNotBlank(city) && !"全国".equals(city)) {
|
||||
if(StringUtils.isNotBlank(city) && !"全国".equals(city)) {
|
||||
params.add(new QueryParam("city", city));
|
||||
}
|
||||
if(StringUtils.isNotBlank(model.getRegion())) {
|
||||
|
||||
+10
-10
@@ -36,7 +36,7 @@ public class HouseMonitorController {
|
||||
model.setCategoriesX(houseSourceCountService.toChartX(dates));
|
||||
|
||||
if(StringUtils.isBlank(model.getCityDisplay())){
|
||||
model.setCityDisplay("全国");
|
||||
model.setCityDisplay("全国");
|
||||
|
||||
}
|
||||
|
||||
@@ -50,10 +50,10 @@ public class HouseMonitorController {
|
||||
model.setPictrue("line");
|
||||
}
|
||||
|
||||
if(model.getPictrue().equals("pie")){//饼图
|
||||
if(model.getPictrue().equals("pie")){//饼图
|
||||
|
||||
Map<String,Long> houseMap=new HashMap<String,Long>();
|
||||
//增量
|
||||
//增量
|
||||
if(StringUtils.isNotBlank(model.getKind()) && model.getKind().equals("add")){
|
||||
List<HouseSourceCount> houseSourceCounts1 = houseSourceCountService.findHouseBycity(dates.get(0), model.getCityDisplay(), model.getCategory(), model.getSource());
|
||||
List<HouseSourceCount> houseSourceCounts2 = houseSourceCountService.findHouseBycity(dates.get(dates.size()-1), model.getCityDisplay(), model.getCategory(), model.getSource());
|
||||
@@ -78,7 +78,7 @@ public class HouseMonitorController {
|
||||
|
||||
model.setHouseMap(houseMap);
|
||||
model.setChartSeries(houseSourceCountService.createPieChartSeries2(houseMap, model.getCityDisplay(), dates, model.getSource()));
|
||||
}else{//曲线图
|
||||
}else{//曲线图
|
||||
Map<String, Map<String, Object>> chartDataMap = houseSourceCountService.findAllHouseCountData(dates.get(0), dates.get(dates.size()-1), model.getCityDisplay(), model.getCategory(), model.getSource(), model.getKind());
|
||||
String data = createChartData2(dates, chartDataMap, model.getCategory(), model.getCityDisplay(), model.getSource(), model.getKind());
|
||||
model.setChartSeries(data);
|
||||
@@ -119,8 +119,8 @@ public class HouseMonitorController {
|
||||
|
||||
if(StringUtils.isNotBlank(model.getCityDisplay())){
|
||||
|
||||
if(model.getCityDisplay().equals("all")||model.getCityDisplay().equals("全国")){
|
||||
model.setCityDisplay("全国");
|
||||
if(model.getCityDisplay().equals("all")||model.getCityDisplay().equals("全国")){
|
||||
model.setCityDisplay("全国");
|
||||
|
||||
Map<String, Long> dataMap = new HashMap<String, Long>();
|
||||
|
||||
@@ -128,7 +128,7 @@ public class HouseMonitorController {
|
||||
|
||||
List<HouseSourceCount> houseSourceCounts = houseSourceCountService.findChartData(dates.get(dates.size()-2), dates.get(dates.size()-1), null, model.getCategory(), model.getSource());
|
||||
for(HouseSourceCount house : houseSourceCounts){
|
||||
if(!house.getCity().equals("全国")&&house.getAddCount()>0){
|
||||
if(!house.getCity().equals("全国")&&house.getAddCount()>0){
|
||||
dataMap.put(house.getCity(), house.getAddCount());
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public class HouseMonitorController {
|
||||
List<HouseSourceCount> houseSourceCounts = houseSourceCountService.findHouseBycity(dates.get(dates.size()-1), null, model.getCategory(), model.getSource());
|
||||
|
||||
for(HouseSourceCount house : houseSourceCounts){
|
||||
if(!house.getCity().equals("全国")&&house.getTotal()>0){
|
||||
if(!house.getCity().equals("全国")&&house.getTotal()>0){
|
||||
dataMap.put(house.getCity(), house.getTotal());
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ public class HouseMonitorController {
|
||||
List<Map.Entry<String, Long>> infoIds =
|
||||
new ArrayList<Map.Entry<String, Long>>(map.entrySet());
|
||||
|
||||
//排序
|
||||
//排序
|
||||
Collections.sort(infoIds, new Comparator<Map.Entry<String, Long>>() {
|
||||
public int compare(Map.Entry<String, Long> o1, Map.Entry<String, Long> o2) {
|
||||
//return (o2.getValue() - o1.getValue());
|
||||
@@ -257,7 +257,7 @@ public class HouseMonitorController {
|
||||
}
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("data", "["+sb.toString()+"]");
|
||||
jo.put("name", "总增量");
|
||||
jo.put("name", "总增量");
|
||||
jo.put("marker", "{radius: 3}");
|
||||
jo.put("color", "#E0E0E0");
|
||||
jo.put("selected", false);
|
||||
|
||||
+5
-5
@@ -75,29 +75,29 @@ public class HouseQualityController {
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("name", "房型数量");
|
||||
jo.put("name", "房型数量");
|
||||
jo.put("data", data1);
|
||||
result.add(jo);
|
||||
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("name", "小于10个房源小区数");
|
||||
jo1.put("name", "小于10个房源小区数");
|
||||
jo1.put("data", data2);
|
||||
result.add(jo1);
|
||||
|
||||
|
||||
JSONObject jo2 = new JSONObject();
|
||||
jo2.put("name", "房源总量");
|
||||
jo2.put("name", "房源总量");
|
||||
jo2.put("data", data3);
|
||||
result.add(jo2);
|
||||
|
||||
|
||||
JSONObject jo3 = new JSONObject();
|
||||
jo3.put("name", "匹配小区房源总量");
|
||||
jo3.put("name", "匹配小区房源总量");
|
||||
jo3.put("data", data4);
|
||||
result.add(jo3);
|
||||
|
||||
JSONObject jo4 = new JSONObject();
|
||||
jo4.put("name", "小于10个房源小区占比");
|
||||
jo4.put("name", "小于10个房源小区占比");
|
||||
jo4.put("data", data5);
|
||||
result.add(jo4);
|
||||
return result.toString();
|
||||
|
||||
+4
-4
@@ -94,7 +94,7 @@ public class HousesReportController {
|
||||
beforeYesterdayArrs.add(beforeYesterdayDataReason.getJobId());
|
||||
}
|
||||
|
||||
// 今有,前无
|
||||
// 今有,前无
|
||||
for(String dataJobId : arrs) {
|
||||
if(!beforeYesterdayArrs.contains(dataJobId)) {
|
||||
if(beforeYesterdayHousesReportMap.get("1") != null){
|
||||
@@ -109,7 +109,7 @@ public class HousesReportController {
|
||||
}
|
||||
}
|
||||
|
||||
// 今无,前有
|
||||
// 今无,前有
|
||||
for(String dataJobId : beforeYesterdayArrs) {
|
||||
if(!arrs.contains(dataJobId)) {
|
||||
if(beforeYesterdayHousesReportMap.get("0") != null){
|
||||
@@ -145,7 +145,7 @@ public class HousesReportController {
|
||||
yesterdayArrs.add(yesterdayDataReason.getJobId());
|
||||
}
|
||||
|
||||
// 今有,昨无
|
||||
// 今有,昨无
|
||||
for(String dataJobId : arrs) {
|
||||
if(!yesterdayArrs.contains(dataJobId)) {
|
||||
if(yesterdayHousesReportMap.get("1") != null){
|
||||
@@ -160,7 +160,7 @@ public class HousesReportController {
|
||||
}
|
||||
}
|
||||
|
||||
// 今无,昨有
|
||||
// 今无,昨有
|
||||
for(String dataJobId : yesterdayArrs) {
|
||||
if(!arrs.contains(dataJobId)) {
|
||||
if(yesterdayHousesReportMap.get("0") != null){
|
||||
|
||||
+4
-4
@@ -71,11 +71,11 @@ public class ImageManagerController {
|
||||
imageManager.setModifyDate(new Date());
|
||||
imageManagerService.save(imageManager);
|
||||
model.setResultCode(1);
|
||||
model.setMsg("操作成功");
|
||||
model.setMsg("操作成功");
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
@@ -96,11 +96,11 @@ public class ImageManagerController {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
return model;
|
||||
}
|
||||
model.setResultCode(1);
|
||||
model.setMsg("操作成功");
|
||||
model.setMsg("操作成功");
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -45,22 +45,22 @@ public class ImportExcelController extends HttpServlet {
|
||||
public Object expectAction(ImportExcelModel model) {
|
||||
List<List<String>> data=new ArrayList<List<String>>();
|
||||
List<String> list=new ArrayList<String>();
|
||||
list.add("表名");
|
||||
list.add("删除");
|
||||
list.add("表名");
|
||||
list.add("删除");
|
||||
list.add("id");
|
||||
list.add("数据");
|
||||
list.add("数据");
|
||||
data.add(list);
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
HSSFSheet sheet = workbook.createSheet("导入模板");
|
||||
HSSFSheet sheet = workbook.createSheet("导入模板");
|
||||
HSSFRow row = sheet.createRow(0);
|
||||
HSSFCell cell0 = row.createCell(0);
|
||||
HSSFCell cell1 = row.createCell(1);
|
||||
HSSFCell cell2 = row.createCell(2);
|
||||
HSSFCell cell3= row.createCell(3);
|
||||
cell0.setCellValue("表名");
|
||||
cell1.setCellValue("操作");
|
||||
cell0.setCellValue("表名");
|
||||
cell1.setCellValue("操作");
|
||||
cell2.setCellValue("id");
|
||||
cell3.setCellValue("数据");
|
||||
cell3.setCellValue("数据");
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/x-download;charset=UTF-8");
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ public class IndexStatsController {
|
||||
HttpServletRequest request=ActionContext.getContext().getRequest();
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
MultipartFile multipartFile = multipartRequest.getFile("filexls");
|
||||
String sourceName = multipartFile.getOriginalFilename(); // 原始文件名
|
||||
String sourceName = multipartFile.getOriginalFilename(); // 原始文件名
|
||||
String fileTypes = sourceName.substring(sourceName.lastIndexOf("."));
|
||||
|
||||
|
||||
|
||||
+16
-16
@@ -19,7 +19,7 @@ import com.fangjia.dal.mongo.model.InputUserInfo;
|
||||
import com.fangjia.service.mongo.fangjia.InputUserInfoService;
|
||||
|
||||
/**
|
||||
* C to B用户信息收集管理
|
||||
* C to B用户信息收集管理
|
||||
* @author yinjihuan
|
||||
*
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public class InputUserInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出Excel
|
||||
* 导出Excel
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -47,22 +47,22 @@ public class InputUserInfoController {
|
||||
OutputStream os = null;
|
||||
String fileName = null;
|
||||
if (model.getStartDate() == null || model.getEndDate() == null) {
|
||||
fileName = "所有记录"+DateUtil.formatToYYYYMMDDhhmmss(new Date()) + ".xlsx";
|
||||
fileName = "所有记录"+DateUtil.formatToYYYYMMDDhhmmss(new Date()) + ".xlsx";
|
||||
} else {
|
||||
fileName = DateUtil.formatToTightYYYYMMDD(model.getStartDate()) + "至" + DateUtil.formatToTightYYYYMMDD(model.getEndDate()) + ".xlsx";
|
||||
fileName = DateUtil.formatToTightYYYYMMDD(model.getStartDate()) + "至" + DateUtil.formatToTightYYYYMMDD(model.getEndDate()) + ".xlsx";
|
||||
}
|
||||
|
||||
List<List<String>> datas = new ArrayList<List<String>>();
|
||||
List<String> l = new ArrayList<String>();
|
||||
l.add("用户ID");
|
||||
l.add("姓名");
|
||||
l.add("公司");
|
||||
l.add("职务");
|
||||
l.add("城市");
|
||||
l.add("手机");
|
||||
l.add("邮箱");
|
||||
l.add("你通过房价网估价是为了什么?");
|
||||
l.add("反馈日期");
|
||||
l.add("用户ID");
|
||||
l.add("姓名");
|
||||
l.add("公司");
|
||||
l.add("职务");
|
||||
l.add("城市");
|
||||
l.add("手机");
|
||||
l.add("邮箱");
|
||||
l.add("你通过房价网估价是为了什么?");
|
||||
l.add("反馈日期");
|
||||
datas.add(l);
|
||||
List<InputUserInfo> list = inputUserInfoService.list(model.getStartDate(), model.getEndDate());
|
||||
for (InputUserInfo user : list) {
|
||||
@@ -85,14 +85,14 @@ public class InputUserInfoController {
|
||||
filePath = ExcelUtil.write(fileName, datas, "sheet");
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();// 取得输出流
|
||||
inputStream = new FileInputStream(filePath);
|
||||
byte[] buffer = new byte[1024];
|
||||
int i = -1;
|
||||
|
||||
+42
-42
@@ -71,21 +71,21 @@ public class InquiryController {
|
||||
if(null != bkoffUsers.getSupportInquiryTask()){
|
||||
FjtRole role = null;
|
||||
if(1 == bkoffUsers.getSupportInquiryTask().intValue()){
|
||||
role = fjtRoleService.findRolesByName("农行");
|
||||
role = fjtRoleService.findRolesByName("农行");
|
||||
}else if(2 == bkoffUsers.getSupportInquiryTask().intValue()){
|
||||
role = fjtRoleService.findRolesByName("深圳农行");
|
||||
role = fjtRoleService.findRolesByName("深圳农行");
|
||||
}else if(3 == bkoffUsers.getSupportInquiryTask().intValue()){
|
||||
role = fjtRoleService.findRolesByName("大正评估");
|
||||
role = fjtRoleService.findRolesByName("大正评估");
|
||||
}
|
||||
|
||||
List<Long> zqUserIds = userCityService.findUserIdByCity("肇庆");
|
||||
List<Long> zqUserIds = userCityService.findUserIdByCity("肇庆");
|
||||
if(role!=null){
|
||||
List<FjtUsers> users2 = fjtUsersService.findUsers(null, (int) role.getId());
|
||||
if(users2.size() > 0){
|
||||
for(FjtUsers vo2 : users2){
|
||||
if(vo2.getRole()==12){
|
||||
if(!zqUserIds.contains(vo2.getId())){
|
||||
userIds.add(vo2.getId());//农行排除肇庆农行
|
||||
userIds.add(vo2.getId());//农行排除肇庆农行
|
||||
}
|
||||
}else if(vo2.getRole()==16){
|
||||
userIds.add(vo2.getId());
|
||||
@@ -94,8 +94,8 @@ public class InquiryController {
|
||||
}
|
||||
}
|
||||
|
||||
if(role.getName().equals("深圳农行")){
|
||||
userIds.addAll(zqUserIds);//深圳新增肇庆农行
|
||||
if(role.getName().equals("深圳农行")){
|
||||
userIds.addAll(zqUserIds);//深圳新增肇庆农行
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public class InquiryController {
|
||||
InquiryPrice inquiryPrice =inquiryPriceService.findInquiryPriceById(model.getId());
|
||||
if(inquiryPrice==null) {
|
||||
model.setCode("-1");
|
||||
model.setMsg("更新失败:根据Id查询询价信息失败!");
|
||||
model.setMsg("更新失败:根据Id查询询价信息失败!");
|
||||
return model;
|
||||
}
|
||||
inquiryPrice.setAccountChecker(model.getAccountChecker());
|
||||
@@ -243,7 +243,7 @@ public class InquiryController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//首页查询inquirys
|
||||
//首页查询inquirys
|
||||
public Object inquirysAction(InquiryModel model){
|
||||
String name = (String) ActionContext.getContext().getRequest().getSession().getAttribute("realName");
|
||||
BkoffUsers bkoffUsers = bkoffUsersService.findBkoffUsersByRealName(name);
|
||||
@@ -254,9 +254,9 @@ public class InquiryController {
|
||||
// List<InquiryUsers> users = inquiryUsersService.findAllInquiryUsersByStatus();
|
||||
FjtRole role = null;
|
||||
if(null != bkoffUsers.getSupportInquiryTask() && 1 == bkoffUsers.getSupportInquiryTask().intValue()){
|
||||
role = fjtRoleService.findRolesByName("农行");
|
||||
role = fjtRoleService.findRolesByName("农行");
|
||||
}else if(null != bkoffUsers.getSupportInquiryTask() && 2 == bkoffUsers.getSupportInquiryTask().intValue()){
|
||||
role = fjtRoleService.findRolesByName("深圳农行");
|
||||
role = fjtRoleService.findRolesByName("深圳农行");
|
||||
}
|
||||
if(role!=null){
|
||||
List<Long> userIds = new ArrayList<Long>();
|
||||
@@ -330,18 +330,18 @@ public class InquiryController {
|
||||
}
|
||||
List<InquiryPrice> inquiryPrices = inquiryPriceService.findinquiryPricesByIds(model.getStatus(), userIds);
|
||||
HSSFWorkbook wb = createExcel(inquiryPrices);
|
||||
String fileName = "人工询价(" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
String fileName = "人工询价(" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
OutputStream os = null;
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
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();
|
||||
}catch(Exception e) {
|
||||
@@ -363,18 +363,18 @@ public class InquiryController {
|
||||
private HSSFWorkbook createExcel(List<InquiryPrice> inquiryPrices) {
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
HSSFSheet s = wb.createSheet();
|
||||
wb.setSheetName(0, "人工询价");
|
||||
wb.setSheetName(0, "人工询价");
|
||||
HSSFRow onerow = s.createRow(0);
|
||||
fillHead(onerow);//填充头部字段
|
||||
fillHead(onerow);//填充头部字段
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
//塞数据
|
||||
//塞数据
|
||||
for(InquiryPrice vo : inquiryPrices){
|
||||
HSSFRow row = s.createRow(s.getPhysicalNumberOfRows());
|
||||
FjtUsers user = fjtUsersService.findById(vo.getUserId());
|
||||
String buildType = getBuildType(vo.getBuildType());
|
||||
String purpose = getPurpose(vo.getPurpose());
|
||||
String dateCreated = sdf.format(vo.getDateCreated());
|
||||
row.createCell(0).setCellValue(vo.getHouseAddress()+(vo.getHouseNum()==null?"":vo.getHouseNum()+"号")+(vo.getRoomNum()==null?"":vo.getRoomNum()+"室"));
|
||||
row.createCell(0).setCellValue(vo.getHouseAddress()+(vo.getHouseNum()==null?"":vo.getHouseNum()+"号")+(vo.getRoomNum()==null?"":vo.getRoomNum()+"室"));
|
||||
row.createCell(1).setCellValue(user==null?"":user.getEmail());
|
||||
row.createCell(2).setCellValue(vo.getArea());
|
||||
row.createCell(3).setCellValue(buildType);
|
||||
@@ -384,19 +384,19 @@ public class InquiryController {
|
||||
row.createCell(7).setCellValue(vo.getPersonValue());
|
||||
row.createCell(8).setCellValue(dateCreated);
|
||||
row.createCell(8).setCellValue(vo.getAccountChecker());
|
||||
row.createCell(9).setCellValue(vo.getStatus()==1?"已回复":"等待回复");
|
||||
row.createCell(9).setCellValue(vo.getStatus()==1?"已回复":"等待回复");
|
||||
}
|
||||
return wb;
|
||||
}
|
||||
|
||||
private String getPurpose(int purpose) {
|
||||
switch(purpose) {
|
||||
case 1: return"抵押";
|
||||
case 2: return"资产证明";
|
||||
case 3: return"复估";
|
||||
case 4: return"了解市值";
|
||||
case 5: return"测试";
|
||||
case 6: return"其他";
|
||||
case 1: return"抵押";
|
||||
case 2: return"资产证明";
|
||||
case 3: return"复估";
|
||||
case 4: return"了解市值";
|
||||
case 5: return"测试";
|
||||
case 6: return"其他";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
@@ -404,29 +404,29 @@ public class InquiryController {
|
||||
|
||||
private String getBuildType(int buildType) {
|
||||
switch(buildType) {
|
||||
case 1 : return "商铺";
|
||||
case 2 : return "写字楼";
|
||||
case 3 : return "其他";
|
||||
case 4 : return "别墅";
|
||||
case 8 : return "住宅";
|
||||
case 1 : return "商铺";
|
||||
case 2 : return "写字楼";
|
||||
case 3 : return "其他";
|
||||
case 4 : return "别墅";
|
||||
case 8 : return "住宅";
|
||||
default : return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//人工询价Excel头部字段
|
||||
//人工询价Excel头部字段
|
||||
private void fillHead(HSSFRow onerow) {
|
||||
onerow.createCell(0).setCellValue("物业地址");
|
||||
onerow.createCell(1).setCellValue("用户");
|
||||
onerow.createCell(2).setCellValue("面积");
|
||||
onerow.createCell(3).setCellValue("物业类型");
|
||||
onerow.createCell(4).setCellValue("询价目的");
|
||||
onerow.createCell(5).setCellValue("期望值");
|
||||
onerow.createCell(6).setCellValue("房价通估值");
|
||||
onerow.createCell(7).setCellValue("人工估值");
|
||||
onerow.createCell(8).setCellValue("询问日期");
|
||||
onerow.createCell(8).setCellValue("对账老师");
|
||||
onerow.createCell(9).setCellValue("状态");
|
||||
onerow.createCell(0).setCellValue("物业地址");
|
||||
onerow.createCell(1).setCellValue("用户");
|
||||
onerow.createCell(2).setCellValue("面积");
|
||||
onerow.createCell(3).setCellValue("物业类型");
|
||||
onerow.createCell(4).setCellValue("询价目的");
|
||||
onerow.createCell(5).setCellValue("期望值");
|
||||
onerow.createCell(6).setCellValue("房价通估值");
|
||||
onerow.createCell(7).setCellValue("人工估值");
|
||||
onerow.createCell(8).setCellValue("询问日期");
|
||||
onerow.createCell(8).setCellValue("对账老师");
|
||||
onerow.createCell(9).setCellValue("状态");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.fangjia.bkoff.controllers;
|
||||
|
||||
/**
|
||||
* 房价网后台存活监控
|
||||
* 房价网后台存活监控
|
||||
*
|
||||
* @author shenjian
|
||||
* @since 2021/6/7
|
||||
@@ -9,7 +9,7 @@ package com.fangjia.bkoff.controllers;
|
||||
public class K8sController {
|
||||
|
||||
/**
|
||||
* 存活检查
|
||||
* 存活检查
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -18,7 +18,7 @@ public class K8sController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 就绪检查
|
||||
* 就绪检查
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
+14
-14
@@ -63,18 +63,18 @@ public class LandPriceController {
|
||||
year = model.getYears().get(0);
|
||||
}
|
||||
Map<String, List<LandPrice>> landPriceMap = new HashMap<String, List<LandPrice>>();
|
||||
landPriceMap.put("住宅用途", new ArrayList<LandPrice>());
|
||||
landPriceMap.put("工业用途", new ArrayList<LandPrice>());
|
||||
landPriceMap.put("商业用途", new ArrayList<LandPrice>());
|
||||
landPriceMap.put("住宅用途", new ArrayList<LandPrice>());
|
||||
landPriceMap.put("工业用途", new ArrayList<LandPrice>());
|
||||
landPriceMap.put("商业用途", new ArrayList<LandPrice>());
|
||||
if(StringUtils.isNotBlank(year)){
|
||||
landPrices = landPriceService.findAllLandPrice(model.getCityDisplay(), DateUtil.parseDate(year,"yyyy-MM-dd"));
|
||||
for(LandPrice landPrice : landPrices){
|
||||
if("商业用途".equals(landPrice.getPurpose())){
|
||||
landPriceMap.get("商业用途").add(landPrice);
|
||||
}else if("工业用途".equals(landPrice.getPurpose())){
|
||||
landPriceMap.get("工业用途").add(landPrice);
|
||||
}else if("住宅用途".equals(landPrice.getPurpose())){
|
||||
landPriceMap.get("住宅用途").add(landPrice);
|
||||
if("商业用途".equals(landPrice.getPurpose())){
|
||||
landPriceMap.get("商业用途").add(landPrice);
|
||||
}else if("工业用途".equals(landPrice.getPurpose())){
|
||||
landPriceMap.get("工业用途").add(landPrice);
|
||||
}else if("住宅用途".equals(landPrice.getPurpose())){
|
||||
landPriceMap.get("住宅用途").add(landPrice);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,8 +84,8 @@ public class LandPriceController {
|
||||
Collections.sort(landPrices1, new Comparator<LandPrice>() {
|
||||
@Override
|
||||
public int compare(LandPrice o1, LandPrice o2) {
|
||||
Integer level1 = Integer.valueOf(CNNMFilter.cnNumericToArabic(o1.getLevel().replaceAll("级",""), true));
|
||||
Integer level2 = Integer.valueOf(CNNMFilter.cnNumericToArabic(o2.getLevel().replaceAll("级",""), true));
|
||||
Integer level1 = Integer.valueOf(CNNMFilter.cnNumericToArabic(o1.getLevel().replaceAll("级",""), true));
|
||||
Integer level2 = Integer.valueOf(CNNMFilter.cnNumericToArabic(o2.getLevel().replaceAll("级",""), true));
|
||||
return level1.compareTo(level2);
|
||||
}
|
||||
});
|
||||
@@ -118,13 +118,13 @@ public class LandPriceController {
|
||||
List<LandPrice> factoryLandPrices=new ArrayList<LandPrice>();
|
||||
if(landPrices!=null && landPrices.size()>0){
|
||||
for(LandPrice stat:landPrices){
|
||||
if(stat.getPurpose().equals("商业用途")){
|
||||
if(stat.getPurpose().equals("商业用途")){
|
||||
shopLandPrices.add(stat);
|
||||
}
|
||||
if(stat.getPurpose().equals("住宅用途")){
|
||||
if(stat.getPurpose().equals("住宅用途")){
|
||||
districtLandPrices.add(stat);
|
||||
}
|
||||
if(stat.getPurpose().equals("工业用途")){
|
||||
if(stat.getPurpose().equals("工业用途")){
|
||||
factoryLandPrices.add(stat);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ public class LandPriceIndexController {
|
||||
private LandPriceIndexService landPriceIndexService;
|
||||
|
||||
/**
|
||||
*查询
|
||||
*查询
|
||||
* param y:city
|
||||
*/
|
||||
public Object listAction(LandPriceIndexModel model) {
|
||||
@@ -25,7 +25,7 @@ public class LandPriceIndexController {
|
||||
model.setYear(lastYear);
|
||||
}
|
||||
|
||||
if("全国".equals(model.getDisplay())) {
|
||||
if("全国".equals(model.getDisplay())) {
|
||||
model.setDisplay(null);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -56,7 +56,7 @@ public class LatlngPolygonController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
ret.setJsonModel(data);
|
||||
if (StringUtils.isBlank(model.getCityDisplay()) || StringUtils.isBlank(model.getCategory()) || StringUtils.isBlank(model.getName()) || StringUtils.isBlank(model.getLatlngs())) {
|
||||
data.put("msg", "保存失败");
|
||||
data.put("msg", "保存失败");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -68,11 +68,11 @@ public class LatlngPolygonController {
|
||||
entity.setLatlngs(Arrays.asList(model.getLatlngs().split(";")));
|
||||
entity.setCreationDate(new Date());
|
||||
latlngPolygonService.saveLatlngPolygon(entity);
|
||||
data.put("msg", "保存成功");
|
||||
data.put("msg", "保存成功");
|
||||
} else {
|
||||
LatlngPolygon object = latlngPolygonService.findLatlngPolygon(model.getCityDisplay(), model.getCategory(), model.getName());
|
||||
if (object != null) {
|
||||
data.put("msg", "已经该类型名称存在");
|
||||
data.put("msg", "已经该类型名称存在");
|
||||
} else {
|
||||
Map<String, Object> udata = new HashMap<String, Object>();
|
||||
if (StringUtils.isNotBlank(model.getCityDisplay())) {
|
||||
@@ -88,7 +88,7 @@ public class LatlngPolygonController {
|
||||
udata.put("latlngs", Arrays.asList(model.getLatlngs().split(";")));
|
||||
}
|
||||
latlngPolygonService.updateLatlngPolygon(model.getId(), udata);
|
||||
data.put("msg", "更新成功");
|
||||
data.put("msg", "更新成功");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+46
-46
@@ -75,27 +75,27 @@ public class LoanAgreementController {
|
||||
List<LoanAgreement> loanAgreements = loanAgreementService.list(model.getName(),model.getAgreementId(),model.getCardStatus(),model.getSignStatus(),model.getStartDate(),endDate, pager.getStartRow(), pager.getPageSize());
|
||||
List<LoanAgreementVo> loanAgreementVos = new ArrayList<LoanAgreementVo>();
|
||||
for(LoanAgreement l : loanAgreements) {
|
||||
//过期处理
|
||||
//过期处理
|
||||
expireHandle(l);
|
||||
LoanAgreementVo loanAgreementVo = new LoanAgreementVo();
|
||||
toLoanAgreementVo(loanAgreementVo,l);
|
||||
loanAgreementVo.setLoanId(l.getLoanId());
|
||||
|
||||
//获取最新有效的协议 并 重新整理排序
|
||||
//获取最新有效的协议 并 重新整理排序
|
||||
List<String> ids = l.getAgreementIds();
|
||||
List<Agreement> agreements = new ArrayList<Agreement>();
|
||||
if(ids!=null&&ids.size()>0) {
|
||||
agreements = agreementService.list(ids);
|
||||
}
|
||||
List<AgreementVo> agreementVos = new ArrayList<AgreementVo>();//列表展示4条数据
|
||||
List<AgreementVo> extraAgreementVos = new ArrayList<AgreementVo>();//点击按钮展示额外数据
|
||||
List<AgreementVo> agreementVos = new ArrayList<AgreementVo>();//列表展示4条数据
|
||||
List<AgreementVo> extraAgreementVos = new ArrayList<AgreementVo>();//点击按钮展示额外数据
|
||||
boolean deleteAll = false;
|
||||
if(agreements!=null&&agreements.size()>0) {
|
||||
int total = agreements.size();
|
||||
if(total>4) {
|
||||
loanAgreementVo.setShowButton(1);
|
||||
}
|
||||
Agreement a = agreements.get(total-1);//最新的一条
|
||||
Agreement a = agreements.get(total-1);//最新的一条
|
||||
LoanWithHold loanWithHold = loanWithHoldService.findByParam(a.getAgreementId(),null,null);
|
||||
if(loanWithHold==null){
|
||||
loanAgreementVo.setWithHoldStatus(-1);
|
||||
@@ -103,14 +103,14 @@ public class LoanAgreementController {
|
||||
loanAgreementVo.setWithHoldStatus(loanWithHold.getStatus());
|
||||
}
|
||||
getNewest(loanAgreementVo,a);
|
||||
//列表协议展示处理
|
||||
//列表协议展示处理
|
||||
for(int i = total;i>0;i--) {
|
||||
Agreement agreement = agreements.get(i-1);
|
||||
if(agreement.getStatus()==1){
|
||||
deleteAll = true;
|
||||
}
|
||||
AgreementVo agreementVo = new AgreementVo();
|
||||
agreementVo.setAgreementName("协议"+i);
|
||||
agreementVo.setAgreementName("协议"+i);
|
||||
agreementVo.setId(agreement.getId());
|
||||
agreementVo.setStatus(agreement.getStatus());
|
||||
if(i>(total-4)) {
|
||||
@@ -130,19 +130,19 @@ public class LoanAgreementController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否过期并处理
|
||||
* 返回true:说明是过期的(具体处不处理 不确定,可能之前已经处理过)
|
||||
* 返回false:说明未过期
|
||||
* 判断是否过期并处理
|
||||
* 返回true:说明是过期的(具体处不处理 不确定,可能之前已经处理过)
|
||||
* 返回false:说明未过期
|
||||
* @param l
|
||||
* @return
|
||||
*/
|
||||
private boolean expireHandle(LoanAgreement l) {
|
||||
if(l.getConfirmTime()==null) {//废除未新建状态
|
||||
if(l.getConfirmTime()==null) {//废除未新建状态
|
||||
return false;
|
||||
}
|
||||
//过期检查
|
||||
if((new Date().getTime()-l.getConfirmTime().getTime())>(24*60*60*1000)) {//已过期
|
||||
if(l.getCardStatus()==0||l.getSignStatus()==0) {//存在未认证的才处理(初步判断)
|
||||
//过期检查
|
||||
if((new Date().getTime()-l.getConfirmTime().getTime())>(24*60*60*1000)) {//已过期
|
||||
if(l.getCardStatus()==0||l.getSignStatus()==0) {//存在未认证的才处理(初步判断)
|
||||
loanAgreementService.invalid(l);
|
||||
}
|
||||
return true;
|
||||
@@ -155,21 +155,21 @@ public class LoanAgreementController {
|
||||
loanAgreementVo.setLoanId(l.getLoanId());
|
||||
switch(l.getCardStatus()) {
|
||||
case 0:
|
||||
loanAgreementVo.setCardStatus("未认证");break;
|
||||
loanAgreementVo.setCardStatus("未认证");break;
|
||||
case 1:
|
||||
loanAgreementVo.setCardStatus("已认证");break;
|
||||
loanAgreementVo.setCardStatus("已认证");break;
|
||||
case 2:
|
||||
loanAgreementVo.setCardStatus("已失效");break;
|
||||
loanAgreementVo.setCardStatus("已失效");break;
|
||||
}
|
||||
switch(l.getSignStatus()) {
|
||||
case 0:
|
||||
loanAgreementVo.setSignStatus("未签约");break;
|
||||
loanAgreementVo.setSignStatus("未签约");break;
|
||||
case 1:
|
||||
loanAgreementVo.setSignStatus("已签约");break;
|
||||
loanAgreementVo.setSignStatus("已签约");break;
|
||||
case 2:
|
||||
loanAgreementVo.setSignStatus("已失效");break;
|
||||
loanAgreementVo.setSignStatus("已失效");break;
|
||||
case 3:
|
||||
loanAgreementVo.setSignStatus("已拒绝");break;
|
||||
loanAgreementVo.setSignStatus("已拒绝");break;
|
||||
case 4:
|
||||
}
|
||||
if(l.getCardStatus()==1&&l.getSignStatus()==1) {
|
||||
@@ -183,7 +183,7 @@ public class LoanAgreementController {
|
||||
|
||||
|
||||
|
||||
//列表的行数据获取 对应最新的协议数据
|
||||
//列表的行数据获取 对应最新的协议数据
|
||||
private void getNewest(LoanAgreementVo loanAgreementVo, Agreement a) {
|
||||
loanAgreementVo.setName(a.getName());
|
||||
loanAgreementVo.setMobile(a.getMobile()==null?null:a.getMobile().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
|
||||
@@ -220,18 +220,18 @@ public class LoanAgreementController {
|
||||
}
|
||||
}
|
||||
|
||||
//编辑协议(agreement修改同事,LoanAgreement里面部分数据要同步下)
|
||||
//编辑协议(agreement修改同事,LoanAgreement里面部分数据要同步下)
|
||||
private LoanAgreementModel editAgreement(LoanAgreementModel model) {
|
||||
LoanAgreement loanAgreement = loanAgreementService.findById(model.getId());
|
||||
Agreement agreement = agreementService.findById(model.getAgreeId());
|
||||
if(loanAgreement==null||agreement==null) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("查询失败");
|
||||
model.setMsg("查询失败");
|
||||
return model;
|
||||
}
|
||||
if(expireHandle(loanAgreement)) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("协议已过期,请刷新页面获取最新协议状态。");
|
||||
model.setMsg("协议已过期,请刷新页面获取最新协议状态。");
|
||||
return model;
|
||||
}
|
||||
agreement.setName(model.getName());
|
||||
@@ -246,16 +246,16 @@ public class LoanAgreementController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//在原基础上添加一个协议
|
||||
//在原基础上添加一个协议
|
||||
private LoanAgreementModel addAgreement(LoanAgreementModel model) {
|
||||
LoanAgreement loanAgreement = loanAgreementService.findById(model.getId());
|
||||
List<Agreement> agreements = new ArrayList<Agreement>();
|
||||
if(loanAgreement==null) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("查询失败");
|
||||
model.setMsg("查询失败");
|
||||
return model;
|
||||
}
|
||||
//取出最新协议
|
||||
//取出最新协议
|
||||
List<String> ids = loanAgreement.getAgreementIds();
|
||||
if(ids!=null&&ids.size()>0) {
|
||||
agreements = agreementService.list(ids);
|
||||
@@ -263,23 +263,23 @@ public class LoanAgreementController {
|
||||
Agreement a = null;
|
||||
if(agreements!=null&&agreements.size()>0) {
|
||||
int total = agreements.size();
|
||||
a = agreements.get(total-1);//最新的一条
|
||||
a = agreements.get(total-1);//最新的一条
|
||||
if(a.getStatus()==1) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("存在进行中的协议,无法添加新协议。请刷新页面再试。");
|
||||
model.setMsg("存在进行中的协议,无法添加新协议。请刷新页面再试。");
|
||||
return model;
|
||||
}
|
||||
}
|
||||
String name = model.getName();
|
||||
double loanAmount = model.getLoanAmount();
|
||||
double serviceRate = model.getServiceRate();
|
||||
//新协议原贷款编号无需新增
|
||||
//新协议原贷款编号无需新增
|
||||
loanAgreement.setAddTime(new Date());
|
||||
loanAgreement.setModTime(new Date());
|
||||
loanAgreement.setConfirmTime(new Date());
|
||||
loanAgreement.setSignStatus(0);
|
||||
loanAgreement.setName(name);
|
||||
//原最新的协议数据要保留下来
|
||||
//原最新的协议数据要保留下来
|
||||
a.setId(null);
|
||||
a.setAddTime(new Date());
|
||||
a.setAgreementId(getAgreementId());
|
||||
@@ -290,9 +290,9 @@ public class LoanAgreementController {
|
||||
a.setServiceRate(serviceRate);
|
||||
a.setStatus(1);
|
||||
a.setName(name);
|
||||
if(ids==null) {//应该必不为空
|
||||
if(ids==null) {//应该必不为空
|
||||
model.setCode(-1);
|
||||
model.setMsg("查询协议失败,刷新页面再试");
|
||||
model.setMsg("查询协议失败,刷新页面再试");
|
||||
return model;
|
||||
// ids = new ArrayList<String>();
|
||||
// ids.add(a.getId());
|
||||
@@ -314,7 +314,7 @@ public class LoanAgreementController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//添加全新的
|
||||
//添加全新的
|
||||
private LoanAgreementModel addLoanAgreement(LoanAgreementModel model) {
|
||||
String name = model.getName();
|
||||
double loanAmount = model.getLoanAmount();
|
||||
@@ -346,24 +346,24 @@ public class LoanAgreementController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//获取贷款编号
|
||||
//获取贷款编号
|
||||
private String getLoanId() {
|
||||
StringBuilder s = new StringBuilder();
|
||||
s.append("FDD").append(getNowString()).append(getRandomNum(4));
|
||||
return s.toString();
|
||||
}
|
||||
//获取协议编号
|
||||
//获取协议编号
|
||||
private String getAgreementId() {
|
||||
StringBuilder s = new StringBuilder();
|
||||
s.append("HT").append(getNowString()).append(getRandomNum(5));
|
||||
return s.toString();
|
||||
}
|
||||
//当前时间的年月日时分秒毫秒
|
||||
//当前时间的年月日时分秒毫秒
|
||||
private String getNowString() {
|
||||
return DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmssSSS");
|
||||
}
|
||||
|
||||
//随机数
|
||||
//随机数
|
||||
private String getRandomNum(int digit) {
|
||||
Random r = new Random();
|
||||
String num = "";
|
||||
@@ -373,7 +373,7 @@ public class LoanAgreementController {
|
||||
return num;
|
||||
}
|
||||
/**
|
||||
* 查询贷款协议(最新的一条)
|
||||
* 查询贷款协议(最新的一条)
|
||||
* @return
|
||||
*/
|
||||
public Object getLoanAgreementAction(LoanAgreementModel model) {
|
||||
@@ -381,26 +381,26 @@ public class LoanAgreementController {
|
||||
String id = model.getId();
|
||||
if(StringUtils.isBlank(id)) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("贷款协议Id为空,刷新页面再试");
|
||||
model.setMsg("贷款协议Id为空,刷新页面再试");
|
||||
return model;
|
||||
}
|
||||
LoanAgreement loanAgreement = loanAgreementService.findById(id);
|
||||
if(loanAgreement==null) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("查询失败");
|
||||
model.setMsg("查询失败");
|
||||
return model;
|
||||
}
|
||||
LoanAgreementVo loanAgreementVo = new LoanAgreementVo();
|
||||
toLoanAgreementVo(loanAgreementVo, loanAgreement);
|
||||
List<Agreement> agreements = new ArrayList<Agreement>();
|
||||
//取出最新协议
|
||||
//取出最新协议
|
||||
List<String> ids = loanAgreement.getAgreementIds();
|
||||
if(ids!=null&&ids.size()>0) {
|
||||
agreements = agreementService.list(ids);
|
||||
}
|
||||
if(agreements!=null&&agreements.size()>0) {
|
||||
int total = agreements.size();
|
||||
Agreement a = agreements.get(total-1);//最新的一条
|
||||
Agreement a = agreements.get(total-1);//最新的一条
|
||||
getNewest(loanAgreementVo,a);
|
||||
}
|
||||
model.setLoanAgreementVo(loanAgreementVo);
|
||||
@@ -409,7 +409,7 @@ public class LoanAgreementController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 废除协议
|
||||
* 废除协议
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -421,7 +421,7 @@ public class LoanAgreementController {
|
||||
Agreement agreement = agreementService.findById(agreeId);
|
||||
if(loanAgreement==null||agreement==null) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("查询失败");
|
||||
model.setMsg("查询失败");
|
||||
return model;
|
||||
}
|
||||
loanAgreement.setModTime(new Date());
|
||||
|
||||
+2
-2
@@ -67,9 +67,9 @@ public class LoanBurialPointController {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
ExcelZipUtil.excuteStream(response, workbookMap, "评估统计管","LoanBurialPoint");
|
||||
ExcelZipUtil.excuteStream(response, workbookMap, "评估统计管","LoanBurialPoint");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("数据导出异常", e);
|
||||
LOGGER.error("数据导出异常", e);
|
||||
}
|
||||
model.setViewType("stream");
|
||||
return model;
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class LoanKnowledgeController {
|
||||
return model;
|
||||
}
|
||||
|
||||
// ╟╢IDеЗа©╡Ия╞
|
||||
// 按ID批量查询
|
||||
List<String> ids = StringUtil.split(model.getIds(), "[\r\n ]");
|
||||
model.setKnowledgeList(loanKnowledgeService.findByIds(ids));
|
||||
model.setPager(pager);
|
||||
|
||||
+17
-17
@@ -56,7 +56,7 @@ public class LoanLeadsController {
|
||||
pager.setTotalRows(count);
|
||||
List<LoanLeads> list = loanLeadsService.listByParam(model.getQueryName(),model.getQueryValue(), model.getStartDate(),
|
||||
model.getEndDate(),model.getIntentType(),model.getLoanType(),pager.getStartRow(),pager.getPageSize());
|
||||
boolean executeAuth = containRole("执行人权限");
|
||||
boolean executeAuth = containRole("执行人权限");
|
||||
model.setExecuteAuth(executeAuth);
|
||||
if(executeAuth) {
|
||||
for(LoanLeads loanlead : list) {
|
||||
@@ -66,13 +66,13 @@ public class LoanLeadsController {
|
||||
loanlead.setMobile(mobile.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
|
||||
}
|
||||
if(address!=null) {
|
||||
loanlead.setAddress(address.replaceAll("[0-9]|零|一|二|三|四|五|六|七|八|九|十", "*"));
|
||||
loanlead.setAddress(address.replaceAll("[0-9]|零|一|二|三|四|五|六|七|八|九|十", "*"));
|
||||
}
|
||||
}
|
||||
}
|
||||
for(LoanLeads loanlead : list) {
|
||||
if(StringUtils.isBlank(loanlead.getLeads_source())) {
|
||||
loanlead.setLeads_source("房价网");
|
||||
loanlead.setLeads_source("房价网");
|
||||
}
|
||||
}
|
||||
model.setList(list);
|
||||
@@ -81,11 +81,11 @@ public class LoanLeadsController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//是否含有某角色
|
||||
//是否含有某角色
|
||||
private boolean containRole(String role) {
|
||||
String userId = (String) ActionContext.getContext().getRequest().getSession().getAttribute("user_id");
|
||||
if(userId!=null) {
|
||||
List<Role> roles = authorityService.findUserRoles(userId);//用户下的角色
|
||||
List<Role> roles = authorityService.findUserRoles(userId);//用户下的角色
|
||||
if(roles!=null&&roles.size()>0&&role!=null) {
|
||||
for(Role r : roles) {
|
||||
if(role.equals(r.getName())) {
|
||||
@@ -121,17 +121,17 @@ public class LoanLeadsController {
|
||||
}
|
||||
}
|
||||
List<String> plist = new ArrayList<String>(pset);
|
||||
plist.add(0,"请选择");
|
||||
plist.add(0,"请选择");
|
||||
model.setPlist(plist);
|
||||
LoanLeads loanLeads = loanLeadsService.getById(model.getId());
|
||||
if(containRole("执行人权限")) {
|
||||
if(containRole("执行人权限")) {
|
||||
String mobile = loanLeads.getMobile();
|
||||
String address = loanLeads.getAddress();
|
||||
if(mobile!=null) {
|
||||
loanLeads.setMobile(mobile.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
|
||||
}
|
||||
if(address!=null) {
|
||||
loanLeads.setAddress(address.replaceAll("[0-9]|零|一|二|三|四|五|六|七|八|九|十", "*"));
|
||||
loanLeads.setAddress(address.replaceAll("[0-9]|零|一|二|三|四|五|六|七|八|九|十", "*"));
|
||||
}
|
||||
}
|
||||
model.setLoanLeads(loanLeads);
|
||||
@@ -150,14 +150,14 @@ public class LoanLeadsController {
|
||||
public Object batchDeleteAction(LoanLeadsModel model) {
|
||||
model.setViewType("json");
|
||||
if (model.getIds().length == 0) {
|
||||
model.setMsg("参数错误");
|
||||
model.setMsg("参数错误");
|
||||
} else {
|
||||
for (int i = 0; i < model.getIds().length; i++) {
|
||||
LoanLeads loanLeads = loanLeadsService.getById(model.getIds()[i]);
|
||||
loanLeads.setFlag(0);
|
||||
loanLeadsService.update(loanLeads);
|
||||
}
|
||||
model.setMsg("删除成功");
|
||||
model.setMsg("删除成功");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
@@ -194,10 +194,10 @@ public class LoanLeadsController {
|
||||
}
|
||||
LoanLeads oldLoanLeads = loanLeadsService.getById(model.getId());
|
||||
if(oldLoanLeads!=null) {
|
||||
if(loanLeads.getMobile()!=null&&loanLeads.getMobile().contains("*")) {//含*视为未改
|
||||
if(loanLeads.getMobile()!=null&&loanLeads.getMobile().contains("*")) {//含*视为未改
|
||||
loanLeads.setMobile(oldLoanLeads.getMobile());
|
||||
}
|
||||
if(loanLeads.getAddress()!=null&&loanLeads.getAddress().contains("*")) {//含*视为未改
|
||||
if(loanLeads.getAddress()!=null&&loanLeads.getAddress().contains("*")) {//含*视为未改
|
||||
loanLeads.setAddress(oldLoanLeads.getAddress());
|
||||
}
|
||||
}
|
||||
@@ -234,7 +234,7 @@ public class LoanLeadsController {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
ExcelZipUtil.excuteStream(response, workbookMap, "贷款线索","LoanLeads");
|
||||
ExcelZipUtil.excuteStream(response, workbookMap, "贷款线索","LoanLeads");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -247,13 +247,13 @@ public class LoanLeadsController {
|
||||
public Object updateIntentCustomerAction(LoanLeadsModel model) {
|
||||
LoanLeads loanLeads = loanLeadsService.getById(model.getId());
|
||||
if (loanLeads == null) {
|
||||
model.setMsg("更新失败");
|
||||
model.setMsg("更新失败");
|
||||
return model;
|
||||
}
|
||||
else {
|
||||
loanLeads.setIntentCustomer(model.getIntentCustomer());
|
||||
loanLeadsService.update(loanLeads);
|
||||
model.setMsg("更新成功");
|
||||
model.setMsg("更新成功");
|
||||
}
|
||||
model.setViewType("json");
|
||||
return model;
|
||||
@@ -264,7 +264,7 @@ public class LoanLeadsController {
|
||||
public Object updateVisitValueAction(LoanLeadsModel model) {
|
||||
LoanLeads loanLeads = loanLeadsService.getById(model.getId());
|
||||
if (loanLeads == null || model.getUpdateVal() == 1) {
|
||||
model.setMsg("库中无此ID对应的贷款线索");
|
||||
model.setMsg("库中无此ID对应的贷款线索");
|
||||
} else {
|
||||
Map<String,Integer> updateMap = loanLeads.getReturnVisit();
|
||||
|
||||
@@ -274,7 +274,7 @@ public class LoanLeadsController {
|
||||
updateMap.put(model.getUpdateName(),model.getUpdateVal());
|
||||
loanLeads.setReturnVisit(updateMap);
|
||||
loanLeadsService.update(loanLeads);
|
||||
model.setMsg("更新成功");
|
||||
model.setMsg("更新成功");
|
||||
}
|
||||
model.setViewType("json");
|
||||
return model;
|
||||
|
||||
+10
-10
@@ -46,9 +46,9 @@ public class LoanProductController {
|
||||
model.getStartDate(), endDate));
|
||||
List<LoanProduct> LoanProductModel = loanProductService.findAllLoanProduct(model.getName(), "-1".equals(model.getType())?null:model.getType(),
|
||||
model.getStartDate(), endDate, pager.getStartRow(), pager.getPageSize());
|
||||
List<LoanProductTag> loanProductTagList = loanProductTagService.listTag(null);// 所有标签
|
||||
List<Mechanism> mechanismList = mechanismService.findAllMechanism();// 所有合作机构
|
||||
LoanProductPositionEnum[] positionList = LoanProductPositionEnum.values();// 所有投放位置
|
||||
List<LoanProductTag> loanProductTagList = loanProductTagService.listTag(null);// 所有标签
|
||||
List<Mechanism> mechanismList = mechanismService.findAllMechanism();// 所有合作机构
|
||||
LoanProductPositionEnum[] positionList = LoanProductPositionEnum.values();// 所有投放位置
|
||||
Map<String, String> loanProductTagMap = loanProductTagListToMap(loanProductTagList);
|
||||
Map<String, String> mechanismMap = mechanismListToMap(mechanismList);
|
||||
Map<Integer, String> positionMap = positionListToMap(positionList);
|
||||
@@ -79,13 +79,13 @@ public class LoanProductController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
model.setLoanProductType(Arrays.asList("信用贷", "房抵贷"));
|
||||
model.setLoanProductType(Arrays.asList("信用贷", "房抵贷"));
|
||||
model.setLoanProductDtoList(loanProductDtoList);
|
||||
return model;
|
||||
}
|
||||
|
||||
public Object addAction(LoanProductModel model) {
|
||||
model.setLoanProductType(Arrays.asList("信用贷", "房抵贷"));
|
||||
model.setLoanProductType(Arrays.asList("信用贷", "房抵贷"));
|
||||
model.setLoanProductTagList(loanProductTagService.listTag(null));
|
||||
model.setMechanismList(mechanismService.findAllMechanism());
|
||||
model.setPositionList(LoanProductPositionEnum.values());
|
||||
@@ -99,11 +99,11 @@ public class LoanProductController {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
return model;
|
||||
}
|
||||
model.setResultCode(1);
|
||||
model.setMsg("操作成功");
|
||||
model.setMsg("操作成功");
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class LoanProductController {
|
||||
|
||||
LoanProduct loanProduct = loanProductService.findById(model.getId());
|
||||
model.setLoanProduct(loanProduct);
|
||||
model.setLoanProductType(Arrays.asList("信用贷", "房抵贷"));
|
||||
model.setLoanProductType(Arrays.asList("信用贷", "房抵贷"));
|
||||
model.setLoanProductTagList(loanProductTagService.listTag(null));
|
||||
model.setMechanismList(mechanismService.findAllMechanism());
|
||||
model.setPositionList(LoanProductPositionEnum.values());
|
||||
@@ -125,11 +125,11 @@ public class LoanProductController {
|
||||
loanProductService.update(toLoanProductEntity(model));
|
||||
} catch (Exception e) {
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
model.setErrMsg("操作失败,请刷新页面再试");
|
||||
return model;
|
||||
}
|
||||
model.setResultCode(1);
|
||||
model.setMsg("操作成功");
|
||||
model.setMsg("操作成功");
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by luoxf on 2018/12/17.
|
||||
* 贷款推送
|
||||
* 贷款推送
|
||||
*/
|
||||
public class LoanPushController {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class LoanPushController {
|
||||
LoanPush loanPush = loanPushService.getByPhone(model.getPhone());
|
||||
if (loanPush != null) {
|
||||
model.setResult(1);
|
||||
model.setMsg("手机号有重复,建议进行人工记录与处理");
|
||||
model.setMsg("手机号有重复,建议进行人工记录与处理");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -99,25 +99,25 @@ public class LoanPushController {
|
||||
String id = model.getId();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
model.setResult(1);
|
||||
model.setMsg("id为空,刷新页面再试");
|
||||
model.setMsg("id为空,刷新页面再试");
|
||||
return model;
|
||||
}
|
||||
LoanPush loanPush = loanPushService.getById(id);
|
||||
if (loanPush == null) {
|
||||
model.setResult(1);
|
||||
model.setMsg("查询失败");
|
||||
model.setMsg("查询失败");
|
||||
return model;
|
||||
}
|
||||
if (model.getXsyPush() == 1 && loanPush.getXsyPushFlag()!=1) {
|
||||
if (!"北京".equals(loanPush.getCity()) && !"上海".equals(loanPush.getCity())
|
||||
&& !"广州".equals(loanPush.getCity()) && !"深圳".equals(loanPush.getCity())) {
|
||||
if (!"北京".equals(loanPush.getCity()) && !"上海".equals(loanPush.getCity())
|
||||
&& !"广州".equals(loanPush.getCity()) && !"深圳".equals(loanPush.getCity())) {
|
||||
model.setResult(1);
|
||||
model.setMsg("小神鱼线索需求城市不符合条件");
|
||||
model.setMsg("小神鱼线索需求城市不符合条件");
|
||||
return model;
|
||||
}
|
||||
if (loanPush.getMoney() < 50000) {
|
||||
model.setResult(1);
|
||||
model.setMsg("小神鱼需求金额需为50000及50000以上");
|
||||
model.setMsg("小神鱼需求金额需为50000及50000以上");
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
+69
-69
@@ -38,7 +38,7 @@ import com.yeepay.g3.sdk.yop.client.YopRequest;
|
||||
import com.yeepay.g3.sdk.yop.client.YopResponse;
|
||||
|
||||
/**
|
||||
* 代扣管理
|
||||
* 代扣管理
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
@@ -65,18 +65,18 @@ public class LoanWithHoldController {
|
||||
}
|
||||
|
||||
private Map<String,Integer> bankMap = new HashMap<String , Integer>(){{
|
||||
put("中国工商银行", 5000);
|
||||
put("中国农业银行", 1250);
|
||||
put("中国建设银行", 1250);
|
||||
put("招商银行",950);
|
||||
put("中国邮政储蓄银行",5000);
|
||||
put("中国交通银行",950);
|
||||
put("广发银行",1800);
|
||||
put("中国光大银行",700);
|
||||
put("兴业银行",50000);
|
||||
put("平安银行",50000);
|
||||
put("浦东发展银行",950);
|
||||
put("北京银行",200000);
|
||||
put("中国工商银行", 5000);
|
||||
put("中国农业银行", 1250);
|
||||
put("中国建设银行", 1250);
|
||||
put("招商银行",950);
|
||||
put("中国邮政储蓄银行",5000);
|
||||
put("中国交通银行",950);
|
||||
put("广发银行",1800);
|
||||
put("中国光大银行",700);
|
||||
put("兴业银行",50000);
|
||||
put("平安银行",50000);
|
||||
put("浦东发展银行",950);
|
||||
put("北京银行",200000);
|
||||
}};
|
||||
|
||||
public Object listAction(LoanWithHoldModel model) {
|
||||
@@ -133,7 +133,7 @@ public class LoanWithHoldController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 贷款协议列表批量添加至代扣管理
|
||||
* 贷款协议列表批量添加至代扣管理
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -142,7 +142,7 @@ public class LoanWithHoldController {
|
||||
int rightNum = 0;
|
||||
int errorNum = 0;
|
||||
if (model.getIds().length == 0) {
|
||||
model.setMsg("参数错误");
|
||||
model.setMsg("参数错误");
|
||||
} else {
|
||||
for (int i = 0; i < model.getIds().length; i++) {
|
||||
LoanAgreement loanAgreement = loanAgreementService.findById(model.getIds()[i]);
|
||||
@@ -157,7 +157,7 @@ public class LoanWithHoldController {
|
||||
rightNum++;
|
||||
LoanWithHold loanWithHold = new LoanWithHold();
|
||||
loanWithHold.setLoanId(loanAgreement.getLoanId());
|
||||
//获取最新有效的协议 并 重新整理排序
|
||||
//获取最新有效的协议 并 重新整理排序
|
||||
List<String> ids = loanAgreement.getAgreementIds();
|
||||
List<Agreement> agreements = new ArrayList<Agreement>();
|
||||
if(ids!=null&&ids.size()>0) {
|
||||
@@ -165,7 +165,7 @@ public class LoanWithHoldController {
|
||||
}
|
||||
if(agreements!=null&&agreements.size()>0) {
|
||||
int total = agreements.size();
|
||||
Agreement agreement = agreements.get(total-1);//最新的一条
|
||||
Agreement agreement = agreements.get(total-1);//最新的一条
|
||||
loanWithHoldService.deleteByAgreementId(agreement.getAgreementId());
|
||||
getNewest(loanWithHold,agreement);
|
||||
}
|
||||
@@ -173,20 +173,20 @@ public class LoanWithHoldController {
|
||||
loanAgreementService.update(loanAgreement);
|
||||
loanWithHoldService.save(loanWithHold);
|
||||
}
|
||||
model.setMsg("添加成功"+rightNum+"条,失败"+errorNum+"条");
|
||||
model.setMsg("添加成功"+rightNum+"条,失败"+errorNum+"条");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除代扣管理
|
||||
* 批量删除代扣管理
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object batchDeleteAction(LoanWithHoldModel model) {
|
||||
model.setViewType("json");
|
||||
if (model.getIds().length == 0) {
|
||||
model.setMsg("请选择代扣协议");
|
||||
model.setMsg("请选择代扣协议");
|
||||
} else {
|
||||
int count = 0;
|
||||
for (int i = 0; i < model.getIds().length; i++) {
|
||||
@@ -201,13 +201,13 @@ public class LoanWithHoldController {
|
||||
}
|
||||
}
|
||||
}
|
||||
model.setMsg("成功删除"+count+"条");
|
||||
model.setMsg("成功删除"+count+"条");
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改实际放款金额
|
||||
* 修改实际放款金额
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -220,7 +220,7 @@ public class LoanWithHoldController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代扣协议
|
||||
* 查询代扣协议
|
||||
* @return
|
||||
*/
|
||||
public Object getLoanWithHoldAction(LoanWithHoldModel model) {
|
||||
@@ -228,13 +228,13 @@ public class LoanWithHoldController {
|
||||
String id = model.getId();
|
||||
if(StringUtils.isBlank(id)) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("代扣协议Id为空,刷新页面再试");
|
||||
model.setMsg("代扣协议Id为空,刷新页面再试");
|
||||
return model;
|
||||
}
|
||||
LoanWithHold loanWithHold = loanWithHoldService.findById(id);
|
||||
if(loanWithHold==null) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("查询失败");
|
||||
model.setMsg("查询失败");
|
||||
return model;
|
||||
}
|
||||
LoanWithHoldVo loanWithHoldVo = new LoanWithHoldVo();
|
||||
@@ -250,7 +250,7 @@ public class LoanWithHoldController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过协议编号查询代扣协议
|
||||
* 通过协议编号查询代扣协议
|
||||
* @return
|
||||
*/
|
||||
public Object getLoanWithHoldByLoanAgreementIdAction(LoanWithHoldModel model) {
|
||||
@@ -261,7 +261,7 @@ public class LoanWithHoldController {
|
||||
if(StringUtils.isBlank(loanAgreement.getWithHoldId())){
|
||||
LoanWithHold loanWithHold = new LoanWithHold();
|
||||
loanWithHold.setLoanId(loanAgreement.getLoanId());
|
||||
//获取最新有效的协议 并 重新整理排序
|
||||
//获取最新有效的协议 并 重新整理排序
|
||||
List<String> ids = loanAgreement.getAgreementIds();
|
||||
List<Agreement> agreements = new ArrayList<Agreement>();
|
||||
if(ids!=null&&ids.size()>0) {
|
||||
@@ -269,7 +269,7 @@ public class LoanWithHoldController {
|
||||
}
|
||||
if(agreements!=null&&agreements.size()>0) {
|
||||
int total = agreements.size();
|
||||
Agreement agreement = agreements.get(total-1);//最新的一条
|
||||
Agreement agreement = agreements.get(total-1);//最新的一条
|
||||
loanWithHoldVo.setLoanId(loanAgreement.getLoanId());
|
||||
loanWithHoldVo.setName(agreement.getName());
|
||||
loanWithHoldVo.setMobile(agreement.getMobile());
|
||||
@@ -290,7 +290,7 @@ public class LoanWithHoldController {
|
||||
LoanWithHold loanWithHold = loanWithHoldService.findByParam(null,null,loanAgreement.getWithHoldId());
|
||||
if(loanWithHold==null) {
|
||||
model.setCode(-1);
|
||||
model.setMsg("查询失败");
|
||||
model.setMsg("查询失败");
|
||||
return model;
|
||||
}
|
||||
BeanUtils.copyProperties(loanWithHold, loanWithHoldVo);
|
||||
@@ -303,7 +303,7 @@ public class LoanWithHoldController {
|
||||
return model;
|
||||
}
|
||||
|
||||
//列表的行数据获取 对应最新的协议数据
|
||||
//列表的行数据获取 对应最新的协议数据
|
||||
private void getNewest(LoanWithHold loanWithHold, Agreement agreement) {
|
||||
loanWithHold.setMobile(agreement.getMobile());
|
||||
loanWithHold.setAgreementId(agreement.getAgreementId());
|
||||
@@ -314,7 +314,7 @@ public class LoanWithHoldController {
|
||||
loanWithHold.setWithHoldId(getWithHoldId());
|
||||
loanWithHold.setAddTime(new Date());
|
||||
loanWithHold.setUpdateTime(new Date());
|
||||
loanWithHold.setStatus(0);//等待代扣
|
||||
loanWithHold.setStatus(0);//等待代扣
|
||||
}
|
||||
|
||||
private void wrapParam(LoanWithHoldVo loanWithHoldVo, Agreement agreement) {
|
||||
@@ -324,18 +324,18 @@ public class LoanWithHoldController {
|
||||
loanWithHoldVo.setBank(agreement.getBank());
|
||||
}
|
||||
|
||||
//获取代扣编号
|
||||
//获取代扣编号
|
||||
private String getWithHoldId() {
|
||||
StringBuilder s = new StringBuilder();
|
||||
s.append("DK").append(getNowString()).append(getRandomNum(6));
|
||||
return s.toString();
|
||||
}
|
||||
|
||||
//当前时间的年月日时分秒毫秒
|
||||
//当前时间的年月日时分秒毫秒
|
||||
private String getNowString() {
|
||||
return DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmssSSS");
|
||||
}
|
||||
//随机数
|
||||
//随机数
|
||||
private String getRandomNum(int digit) {
|
||||
Random r = new Random();
|
||||
String num = "";
|
||||
@@ -346,7 +346,7 @@ public class LoanWithHoldController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 代扣
|
||||
* 代扣
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -357,52 +357,52 @@ public class LoanWithHoldController {
|
||||
LOGGER.error("loanWithHold id "+model.getId());
|
||||
if(loanWithHold==null){
|
||||
map.put("success", false);
|
||||
map.put("msg", "参数错误");
|
||||
map.put("msg", "参数错误");
|
||||
return JsonUtils.toJson(map);
|
||||
}else if(loanWithHold.getAmount()==0){
|
||||
map.put("success", false);
|
||||
map.put("msg", "请填写代扣金额");
|
||||
map.put("msg", "请填写代扣金额");
|
||||
return JsonUtils.toJson(map);
|
||||
}
|
||||
Agreement agreement = agreementService.findByAgreementId(loanWithHold.getAgreementId());
|
||||
LOGGER.error("loanWithHold agreeementId "+loanWithHold.getAgreementId());
|
||||
if(agreement == null){
|
||||
map.put("success", false);
|
||||
map.put("msg", "参数错误");
|
||||
map.put("msg", "参数错误");
|
||||
return JsonUtils.toJson(map);
|
||||
}
|
||||
int status = 0; //订单状态 0-等待代扣,1-代扣成功,2-代扣失败,3-处理中,4-超时失败,5-系统异常
|
||||
String yborderid = ""; //易宝支付流水号
|
||||
int status = 0; //订单状态 0-等待代扣,1-代扣成功,2-代扣失败,3-处理中,4-超时失败,5-系统异常
|
||||
String yborderid = ""; //易宝支付流水号
|
||||
Map<String,Object> resultMap = withHold(agreement,loanWithHold,response,req);
|
||||
if(resultMap != null){
|
||||
if(resultMap.get("status")!=null){
|
||||
if("PAY_FAIL".equals(resultMap.get("status").toString())){
|
||||
map.put("success", false);
|
||||
map.put("msg", "支付失败");
|
||||
map.put("msg", "支付失败");
|
||||
status = 2;
|
||||
}else if("PROCESSING".equals(resultMap.get("status").toString())){
|
||||
map.put("success", false);
|
||||
map.put("msg", "处理中");
|
||||
map.put("msg", "处理中");
|
||||
status = 3;
|
||||
}else if("TIME_OUT".equals(resultMap.get("status").toString())){
|
||||
map.put("success", false);
|
||||
map.put("msg", "超时失败");
|
||||
map.put("msg", "超时失败");
|
||||
status = 4;
|
||||
}else if("FAIL".equals(resultMap.get("status").toString())){
|
||||
map.put("success", false);
|
||||
map.put("msg", "系统异常");
|
||||
map.put("msg", "系统异常");
|
||||
status = 5;
|
||||
}
|
||||
yborderid = resultMap.get("yborderid").toString();
|
||||
}else{
|
||||
LOGGER.error("doWithHoldAction status is null");
|
||||
map.put("success", false);
|
||||
map.put("msg", "支付失败");
|
||||
map.put("msg", "支付失败");
|
||||
}
|
||||
}else{
|
||||
LOGGER.error("doWithHoldAction resultMap is null");
|
||||
map.put("success", false);
|
||||
map.put("msg", "支付失败");
|
||||
map.put("msg", "支付失败");
|
||||
}
|
||||
loanWithHold.setStatus(status);
|
||||
loanWithHold.setYborderid(yborderid);
|
||||
@@ -411,13 +411,13 @@ public class LoanWithHoldController {
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("doWithHoldAction Exception:"+e);
|
||||
map.put("success", false);
|
||||
map.put("msg", "支付失败");
|
||||
map.put("msg", "支付失败");
|
||||
}
|
||||
return JsonUtils.toJson(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 代扣交易接口
|
||||
* 代扣交易接口
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
@@ -434,10 +434,10 @@ public class LoanWithHoldController {
|
||||
}
|
||||
LOGGER.error("yoprequest param:"+yoprequest.getParams());
|
||||
LOGGER.error("request url:"+BkoffConfig.getConfig().get("authbindcardreqUri","/rest/v1.0/paperorder/unified/pay"));
|
||||
//向YOP发请求
|
||||
//向YOP发请求
|
||||
YopResponse yopresponse = YopClient3.postRsa(BkoffConfig.getConfig().get("authbindcardreqUri","/rest/v1.0/paperorder/unified/pay"), yoprequest);
|
||||
LOGGER.error("yoprequest result:"+yopresponse);
|
||||
//成功则进行相关处理
|
||||
//成功则进行相关处理
|
||||
Map<String,Object> result = new HashMap<String, Object>();
|
||||
if (yopresponse.getStringResult() != null) {
|
||||
result = JXMConvertUtil.JsonConvertHashMap(yopresponse.getStringResult());
|
||||
@@ -446,19 +446,19 @@ public class LoanWithHoldController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装绑卡验证参数
|
||||
* acc_no 银行卡卡号
|
||||
* id_card 身份证号码
|
||||
* id_holder 姓名
|
||||
* mobile 银行预留手机号
|
||||
* 封装绑卡验证参数
|
||||
* acc_no 银行卡卡号
|
||||
* id_card 身份证号码
|
||||
* id_holder 姓名
|
||||
* mobile 银行预留手机号
|
||||
*/
|
||||
private Map<String,String> wrapBindParams(Agreement agreement,LoanWithHold loanWithHold){
|
||||
String merchantno = format(BkoffConfig.getConfig().get("merchantno","10000469946")); //商户编号
|
||||
String requestno = UUID.randomUUID().toString().replace("-", ""); //业务请求号
|
||||
String merchantno = format(BkoffConfig.getConfig().get("merchantno","10000469946")); //商户编号
|
||||
String requestno = UUID.randomUUID().toString().replace("-", ""); //业务请求号
|
||||
|
||||
String identityid = format(agreement.getNumber()); //用户标识
|
||||
String identitytype = "ID_CARD"; //用户标识类型
|
||||
String issms = "false"; //是否有短信验证码
|
||||
String identityid = format(agreement.getNumber()); //用户标识
|
||||
String identitytype = "ID_CARD"; //用户标识类型
|
||||
String issms = "false"; //是否有短信验证码
|
||||
String requesttime = DateUtil.formatByPattern(new Date(),"yyyy-MM-dd HH:mm:ss");;
|
||||
String bankNumber = agreement.getCardNumber();
|
||||
LOGGER.error("loanWithHold bankNumber "+agreement.getCardNumber());
|
||||
@@ -468,21 +468,21 @@ public class LoanWithHoldController {
|
||||
map.put("issms", issms);
|
||||
map.put("identityid", identityid);
|
||||
map.put("identitytype", identitytype);
|
||||
map.put("cardtop", bankNumber.substring(0, 6)); //卡号前六位
|
||||
map.put("cardlast", bankNumber.substring(bankNumber.length()-4, bankNumber.length())); //卡号后四位
|
||||
map.put("amount", String.valueOf(loanWithHold.getAmount())); //还款金额
|
||||
map.put("avaliabletime", "60"); //有效期(默认1小时)
|
||||
map.put("cardtop", bankNumber.substring(0, 6)); //卡号前六位
|
||||
map.put("cardlast", bankNumber.substring(bankNumber.length()-4, bankNumber.length())); //卡号后四位
|
||||
map.put("amount", String.valueOf(loanWithHold.getAmount())); //还款金额
|
||||
map.put("avaliabletime", "60"); //有效期(默认1小时)
|
||||
|
||||
LOGGER.error("cardtop "+bankNumber.substring(0, 6));
|
||||
LOGGER.error("cardlast "+bankNumber.substring(bankNumber.length()-4, bankNumber.length()));
|
||||
|
||||
map.put("productname", "贷款手续费"); //商品名称
|
||||
map.put("callbackurl", "http://www.fangjia.com/withHold/yeepayCallBack"); //回调地址
|
||||
map.put("requesttime", requesttime); //请求时间 yyyy-MM-dd HH:mm:ss
|
||||
map.put("productname", "贷款手续费"); //商品名称
|
||||
map.put("callbackurl", "http://www.fangjia.com/withHold/yeepayCallBack"); //回调地址
|
||||
map.put("requesttime", requesttime); //请求时间 yyyy-MM-dd HH:mm:ss
|
||||
if(bankMap.get(agreement.getBank())!=null && bankMap.get(agreement.getBank())>=loanWithHold.getAmount()){
|
||||
map.put("terminalno", "SQKKSCENE10"); //终端标识码-代扣
|
||||
map.put("terminalno", "SQKKSCENE10"); //终端标识码-代扣
|
||||
}else{
|
||||
map.put("terminalno", "SQKKSCENEKJ010"); //终端标识码-快捷
|
||||
map.put("terminalno", "SQKKSCENEKJ010"); //终端标识码-快捷
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
+6
-6
@@ -48,7 +48,7 @@ public class LoginController {
|
||||
String userId=user.getId();
|
||||
List<UserRole> userRoles = this.userRoleDao.findAllByParams(Arrays.asList(new QueryParam("userId", userId)));
|
||||
if(userRoles.isEmpty()){
|
||||
model.setMsg("<font color='red'>用户信息错误!请联系管理员!</font>");
|
||||
model.setMsg("<font color='red'>用户信息错误!请联系管理员!</font>");
|
||||
return model.forward("index");
|
||||
}else{
|
||||
List<String> roleIds=new ArrayList<String>(userRoles.size());
|
||||
@@ -58,7 +58,7 @@ public class LoginController {
|
||||
|
||||
List<Role> roles = roleDao.findAllByIds(roleIds);
|
||||
for(Role role : roles){
|
||||
if(role.getName().equals("数据编辑角色")){
|
||||
if(role.getName().equals("数据编辑角色")){
|
||||
ActionContext.getContext().getRequest().getSession().setAttribute("showWindow", "true");
|
||||
break;
|
||||
}
|
||||
@@ -78,9 +78,9 @@ public class LoginController {
|
||||
ActionContext.getContext().getRequest().getSession().setAttribute(user.getId() + "_resources", resources);
|
||||
}
|
||||
String ip = AnalyticsUtil.getIpAddress(ActionContext.getContext().getRequest());
|
||||
LOGGER.info("【登录系统】名称:{},登录IP:{},登陆时间:{}", new Object[]{user.getRealName(), ip, DateUtil.formatByPattern(new Date(), "yyyy年MM月dd日HH:mm:ss")});
|
||||
LOGGER.info("【登录系统】名称:{},登录IP:{},登陆时间:{}", new Object[]{user.getRealName(), ip, DateUtil.formatByPattern(new Date(), "yyyy年MM月dd日HH:mm:ss")});
|
||||
if (user.getPassword().equals(DigestUtils.md5Hex("111111"))) {
|
||||
model.flash().setAttribute("message", "您的密码过于简单,请更换密码!");
|
||||
model.flash().setAttribute("message", "您的密码过于简单,请更换密码!");
|
||||
return model.redirect("/users/selfEdit");
|
||||
} else {
|
||||
String forward = StringUtils.defaultIfEmpty(model.getForward(), "/");
|
||||
@@ -92,7 +92,7 @@ public class LoginController {
|
||||
}
|
||||
|
||||
} else {
|
||||
model.setMsg("<font color='red'>用户名或密码错误!</font>");
|
||||
model.setMsg("<font color='red'>用户名或密码错误!</font>");
|
||||
return model.forward("index");
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class LoginController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销
|
||||
* 注销
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
+9
-9
@@ -28,7 +28,7 @@ public class LosePropertyController {
|
||||
|
||||
|
||||
private LosePropertyService losePropertyService;
|
||||
private String[] EXCEL_TITLE_LABEL = new String[]{"城市", "区域", "漏抓小区", "漏抓网站", "网址", "问题反馈人", "创建日期", "状态", "处理人", "技术反馈结果", "备注", "处理时间"};
|
||||
private String[] EXCEL_TITLE_LABEL = new String[]{"城市", "区域", "漏抓小区", "漏抓网站", "网址", "问题反馈人", "创建日期", "状态", "处理人", "技术反馈结果", "备注", "处理时间"};
|
||||
|
||||
public LosePropertyModel listAction(LosePropertyModel model) {
|
||||
Pager pager = model.getPager(20);
|
||||
@@ -48,7 +48,7 @@ public class LosePropertyController {
|
||||
|
||||
List<LoseProperty> list = losePropertyService.findAll(model.getCityDisplay(), model.getName(), model.getWebsite(), model.getStartDate(), model.getEndDate(), model.getStatus(), null, new ArrayList<SortParam>());
|
||||
Workbook wb = new SXSSFWorkbook();
|
||||
Sheet sheet = wb.createSheet("漏抓小区");
|
||||
Sheet sheet = wb.createSheet("漏抓小区");
|
||||
Row row = sheet.createRow(0);
|
||||
for(int i = 0; i < EXCEL_TITLE_LABEL.length; i ++){
|
||||
row.createCell(i).setCellValue(EXCEL_TITLE_LABEL[i]);
|
||||
@@ -66,11 +66,11 @@ public class LosePropertyController {
|
||||
row.createCell(rowNum++).setCellValue(loseProperty.getDiscoverer());
|
||||
row.createCell(rowNum++).setCellValue(DateUtil.formatByPattern(loseProperty.getCreatedDate(), "yyyy-MM-dd HH:mm:ss"));
|
||||
if(loseProperty.getStatus() == 0){
|
||||
row.createCell(rowNum++).setCellValue("未审核");
|
||||
row.createCell(rowNum++).setCellValue("未审核");
|
||||
}else if(loseProperty.getStatus() == 1){
|
||||
row.createCell(rowNum++).setCellValue("已审核");
|
||||
row.createCell(rowNum++).setCellValue("已审核");
|
||||
}else if(loseProperty.getStatus() == 2){
|
||||
row.createCell(rowNum++).setCellValue("已删除");
|
||||
row.createCell(rowNum++).setCellValue("已删除");
|
||||
}
|
||||
row.createCell(rowNum++).setCellValue(loseProperty.getTreatedHuman());
|
||||
row.createCell(rowNum++).setCellValue(loseProperty.getFeedback());
|
||||
@@ -81,19 +81,19 @@ public class LosePropertyController {
|
||||
row.createCell(rowNum++).setCellValue("");
|
||||
}
|
||||
}
|
||||
String fileName = "小区漏抓.xlsx";
|
||||
String fileName = "小区漏抓.xlsx";
|
||||
OutputStream os = null;
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
|
||||
+11
-11
@@ -38,7 +38,7 @@ import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 楼栋信息
|
||||
* 楼栋信息
|
||||
* Created by linxsh on 2016/10/14.
|
||||
*/
|
||||
public class LoudongController {
|
||||
@@ -47,7 +47,7 @@ public class LoudongController {
|
||||
private RegionBlockService regionBlockService;
|
||||
|
||||
/**
|
||||
* 查询楼栋列表信息
|
||||
* 查询楼栋列表信息
|
||||
* @return
|
||||
*/
|
||||
public Object listAction(LoudongModel model) {
|
||||
@@ -59,7 +59,7 @@ public class LoudongController {
|
||||
String from = model.getFrom();
|
||||
String fuzzyMatch = model.getFuzzyMatch();
|
||||
Pager pager = model.getPager(20);
|
||||
if("全国".equals(city)){
|
||||
if("全国".equals(city)){
|
||||
city = "";
|
||||
}
|
||||
if("YES".equalsIgnoreCase(fuzzyMatch)) {
|
||||
@@ -79,7 +79,7 @@ public class LoudongController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出到Excel
|
||||
* 导出到Excel
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -91,10 +91,10 @@ public class LoudongController {
|
||||
String unitNumber = model.getUnitNumber();
|
||||
String from = model.getFrom();
|
||||
String fuzzyMatch = model.getFuzzyMatch();
|
||||
if("全国".equals(city) || StringUtils.isBlank(city)){
|
||||
if("全国".equals(city) || StringUtils.isBlank(city)){
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
data.put("msg", "数据量太大,请联系管理员!");
|
||||
data.put("msg", "数据量太大,请联系管理员!");
|
||||
jsonModel.setJsonModel(data);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class LoudongController {
|
||||
if(workbookMap== null) {
|
||||
JsonModel jsonModel = new JsonModel();
|
||||
Map<String,Object> data = new HashMap<String,Object>();
|
||||
data.put("msg", "数据量太大,请联系管理员!");
|
||||
data.put("msg", "数据量太大,请联系管理员!");
|
||||
jsonModel.setJsonModel(data);
|
||||
return jsonModel;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public class LoudongController {
|
||||
|
||||
|
||||
/**
|
||||
* 查看详情或修改信息
|
||||
* 查看详情或修改信息
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -260,7 +260,7 @@ public class LoudongController {
|
||||
} else {
|
||||
putIfNotNull(data, "createDate", new Date());
|
||||
putIfNotNull(data, "status", 1);
|
||||
putIfNotNull(data, "from", Arrays.asList("人工"));
|
||||
putIfNotNull(data, "from", Arrays.asList("人工"));
|
||||
loudongService.save(data);
|
||||
}
|
||||
return outModel;
|
||||
@@ -312,7 +312,7 @@ public class LoudongController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装查询参数
|
||||
* 封装查询参数
|
||||
* @param city
|
||||
* @param region
|
||||
* @param name
|
||||
@@ -349,7 +349,7 @@ public class LoudongController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建排序参数
|
||||
* 创建排序参数
|
||||
* @param sortName
|
||||
* @param sortType
|
||||
* @return
|
||||
|
||||
+4
-4
@@ -24,7 +24,7 @@ public class Manage400Controller {
|
||||
private RegionBlockService regionBlockService;
|
||||
|
||||
/**
|
||||
* 400 开通城市 设置
|
||||
* 400 开通城市 设置
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -37,7 +37,7 @@ public class Manage400Controller {
|
||||
setting400.setCity(model.getCurrentCityName());
|
||||
setting400.setCategory(model.getCurrentCategory());
|
||||
setting400Service.update(setting400);
|
||||
model.setMessage("修改成功");
|
||||
model.setMessage("修改成功");
|
||||
} else {
|
||||
Setting400 setting400 = new Setting400();
|
||||
BeanUtils.copyProperties(model, setting400);
|
||||
@@ -45,12 +45,12 @@ public class Manage400Controller {
|
||||
setting400.setCategory(model.getCurrentCategory());
|
||||
setting400.setId(null);
|
||||
setting400Service.save(setting400);
|
||||
model.setMessage("新开通成功");
|
||||
model.setMessage("新开通成功");
|
||||
}
|
||||
}
|
||||
String currentCityName = model.getCurrentCityName();
|
||||
if (StringUtils.isBlank(currentCityName)) {
|
||||
currentCityName = "上海";
|
||||
currentCityName = "上海";
|
||||
model.setCurrentCityName(currentCityName);
|
||||
}
|
||||
String currentCategory = model.getCurrentCategory();
|
||||
|
||||
+4
-4
@@ -53,7 +53,7 @@ public class MatchController {
|
||||
|
||||
public Object listAction(MatchModel model) {
|
||||
Pager pager = model.getPager(20);
|
||||
if (model.getCityDisplay() !=null && model.getCityDisplay().equals("全国")){
|
||||
if (model.getCityDisplay() !=null && model.getCityDisplay().equals("全国")){
|
||||
model.setCityDisplay(null);
|
||||
}
|
||||
Integer count = matchService.countByParam(model.getShopName(),model.getSource(),model.getLoanType(),
|
||||
@@ -74,7 +74,7 @@ public class MatchController {
|
||||
matchService.batchDisable(model.getIds());
|
||||
model.setResponseData("1");
|
||||
} catch (Exception e) {
|
||||
logger.info("批量禁用错误 " + e);
|
||||
logger.info("批量禁用错误 " + e);
|
||||
model.setResponseData("0");
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class MatchController {
|
||||
matchService.batchEnable(model.getIds());
|
||||
model.setResponseData("1");
|
||||
} catch (Exception e) {
|
||||
logger.info("批量开启错误 " + e);
|
||||
logger.info("批量开启错误 " + e);
|
||||
model.setResponseData("0");
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class MatchController {
|
||||
try {
|
||||
matchService.delete(model.getId());
|
||||
} catch (Exception e) {
|
||||
logger.info("删除匹配规则错误 " + e);
|
||||
logger.info("删除匹配规则错误 " + e);
|
||||
}
|
||||
}
|
||||
model.setViewType("redirect");
|
||||
|
||||
+8
-8
@@ -20,7 +20,7 @@ public class MechanismController {
|
||||
private MechanismService mechanismService;
|
||||
|
||||
/**
|
||||
* 合作机构列表
|
||||
* 合作机构列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -45,12 +45,12 @@ public class MechanismController {
|
||||
model.setViewType("json");
|
||||
if (model == null || StringUtils.isBlank(model.getName())) {
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("参数有误");
|
||||
model.setErrMsg("参数有误");
|
||||
return model;
|
||||
}
|
||||
if (checkName(model.getName())) {
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("所填写的合作机构名已存在,请重新填写一个合作机构名");
|
||||
model.setErrMsg("所填写的合作机构名已存在,请重新填写一个合作机构名");
|
||||
return model;
|
||||
}
|
||||
Mechanism m = new Mechanism();
|
||||
@@ -60,7 +60,7 @@ public class MechanismController {
|
||||
m.setModifyDate(new Date());
|
||||
mechanismService.save(m);
|
||||
model.setResultCode(1);
|
||||
model.setMsg("操作成功");
|
||||
model.setMsg("操作成功");
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -68,14 +68,14 @@ public class MechanismController {
|
||||
model.setViewType("json");
|
||||
if (model == null || StringUtils.isBlank(model.getId()) || StringUtils.isBlank(model.getName())) {
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("参数有误");
|
||||
model.setErrMsg("参数有误");
|
||||
return model;
|
||||
}
|
||||
Mechanism oldM = mechanismService.findById(model.getId());
|
||||
if (!oldM.getName().equals(model.getName())) {
|
||||
if (checkName(model.getName())) {
|
||||
model.setResultCode(-1);
|
||||
model.setErrMsg("所填写的合作机构名已存在,请重新填写一个合作机构名");
|
||||
model.setErrMsg("所填写的合作机构名已存在,请重新填写一个合作机构名");
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -84,13 +84,13 @@ public class MechanismController {
|
||||
oldM.setModifyDate(new Date());
|
||||
mechanismService.update(oldM);
|
||||
model.setResultCode(1);
|
||||
model.setMsg("操作成功");
|
||||
model.setMsg("操作成功");
|
||||
return model;
|
||||
}
|
||||
|
||||
private boolean checkName(String name) {
|
||||
if (mechanismService.findByName(name) != null) {
|
||||
return true;// 存在同名
|
||||
return true;// 存在同名
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
+3
-3
@@ -62,12 +62,12 @@ public class MessengerController {
|
||||
Map<String,String> response = new HashMap<String,String>();
|
||||
jsonModel.setJsonModel(response);
|
||||
if(StringUtils.isBlank(model.getId()) || !ObjectId.isValid(model.getId())){
|
||||
response.put("msg","操作失败");
|
||||
response.put("msg","操作失败");
|
||||
return jsonModel;
|
||||
}
|
||||
Messenger messenger = messengerService.findById(model.getId());
|
||||
if(messenger ==null){
|
||||
response.put("msg","操作失败");
|
||||
response.put("msg","操作失败");
|
||||
return jsonModel;
|
||||
}
|
||||
String name = (String) ActionContext.getContext().getRequest().getSession().getAttribute("realName");
|
||||
@@ -76,7 +76,7 @@ public class MessengerController {
|
||||
data.put("status",model.getStatus());
|
||||
data.put("readers",messenger.getReaders());
|
||||
messengerService.update(model.getId(),data);
|
||||
response.put("msg","更新成功");
|
||||
response.put("msg","更新成功");
|
||||
return jsonModel;
|
||||
}
|
||||
public MessengerService getMessengerService() {
|
||||
|
||||
+6
-6
@@ -19,7 +19,7 @@ import com.fangjia.service.mongo.fangjia.MetroService;
|
||||
import com.fangjia.service.mongo.fangjia.ServerAreaService;
|
||||
|
||||
/**
|
||||
* 地铁站点管理
|
||||
* 地铁站点管理
|
||||
*
|
||||
* @author yukai
|
||||
*
|
||||
@@ -58,7 +58,7 @@ public class MetroController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新站点信息
|
||||
* 更新站点信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -87,7 +87,7 @@ public class MetroController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入新增页面
|
||||
* 进入新增页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -100,7 +100,7 @@ public class MetroController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步获取城市下的地铁线路
|
||||
* 异步获取城市下的地铁线路
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -114,7 +114,7 @@ public class MetroController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增的站点
|
||||
* 保存新增的站点
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -139,7 +139,7 @@ public class MetroController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地铁站点
|
||||
* 删除地铁站点
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
|
||||
+6
-6
@@ -13,7 +13,7 @@ import com.fangjia.service.mongo.fangjia.MetroLineService;
|
||||
import com.fangjia.service.mongo.fangjia.ServerAreaService;
|
||||
|
||||
/**
|
||||
* 地铁线路管理
|
||||
* 地铁线路管理
|
||||
*
|
||||
* @author yukai
|
||||
*
|
||||
@@ -27,7 +27,7 @@ public class MetroLineController {
|
||||
return model;
|
||||
}
|
||||
|
||||
// 找不到城市返回默认页
|
||||
// 找不到城市返回默认页
|
||||
ServerArea cityArea = serverAreaService.findById(model.getCityId());
|
||||
if (null == cityArea) {
|
||||
return model;
|
||||
@@ -39,7 +39,7 @@ public class MetroLineController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地铁线路
|
||||
* 删除地铁线路
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -55,7 +55,7 @@ public class MetroLineController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新线路信息
|
||||
* 更新线路信息
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -78,7 +78,7 @@ public class MetroLineController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入新增页面
|
||||
* 进入新增页面
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
@@ -88,7 +88,7 @@ public class MetroLineController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增的线路
|
||||
* 保存新增的线路
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@ import com.fangjia.bkoff.model.MobileBlackListModel;
|
||||
import com.fangjia.service.mongo.bkoff.MobileBlackListService;
|
||||
|
||||
/**
|
||||
* 经纪人号码黑名单
|
||||
* 经纪人号码黑名单
|
||||
*
|
||||
* @author yukai
|
||||
*
|
||||
@@ -20,7 +20,7 @@ public class MobileBlackListController {
|
||||
public Object listAction(MobileBlackListModel model) {
|
||||
List<String> phoneNos = null;
|
||||
if (StringUtils.isNotBlank(model.getPhoneNos())) {
|
||||
phoneNos = Arrays.asList(model.getPhoneNos().split(",|,"));
|
||||
phoneNos = Arrays.asList(model.getPhoneNos().split(",|,"));
|
||||
}
|
||||
model.setBlackList(mobileBlackListService.findByNumbers(phoneNos));
|
||||
return model;
|
||||
@@ -29,7 +29,7 @@ public class MobileBlackListController {
|
||||
public Object saveAction(MobileBlackListModel model) {
|
||||
List<String> phoneNos = null;
|
||||
if (StringUtils.isNotBlank(model.getPhoneNos())) {
|
||||
phoneNos = Arrays.asList(model.getPhoneNos().split(",|,"));
|
||||
phoneNos = Arrays.asList(model.getPhoneNos().split(",|,"));
|
||||
}
|
||||
mobileBlackListService.saveAll(phoneNos);
|
||||
|
||||
@@ -41,7 +41,7 @@ public class MobileBlackListController {
|
||||
public Object deleteAction(MobileBlackListModel model) {
|
||||
List<String> ids = null;
|
||||
if (StringUtils.isNotBlank(model.getIdCheck())) {
|
||||
ids = Arrays.asList(model.getIdCheck().split(",|,"));
|
||||
ids = Arrays.asList(model.getIdCheck().split(",|,"));
|
||||
}
|
||||
mobileBlackListService.deleteByIds(ids);
|
||||
|
||||
|
||||
+20
-20
@@ -36,7 +36,7 @@ public class MortgageInfoController {
|
||||
|
||||
public Object listAction(MortgageInfoModel model) {
|
||||
if (model.getCityDisplay() != null
|
||||
&& model.getCityDisplay().equals("全国")) {
|
||||
&& model.getCityDisplay().equals("全国")) {
|
||||
model.setCityDisplay(null);
|
||||
}
|
||||
Pager pager = model.getPager(20);
|
||||
@@ -92,7 +92,7 @@ public class MortgageInfoController {
|
||||
return model;
|
||||
}
|
||||
|
||||
// excel导入
|
||||
// excel导入
|
||||
public Object importExcelAction(MortgageInfoModel model) {
|
||||
Sheet sheet = null;
|
||||
List<List<String>> totalList = new ArrayList<List<String>>();
|
||||
@@ -104,11 +104,11 @@ public class MortgageInfoController {
|
||||
* Workbook wb = null; wb = new XSSFWorkbook(inputStream);
|
||||
*/
|
||||
Workbook wb = WorkbookFactory.create(inputStream);
|
||||
sheet = wb.getSheetAt(0); // 获得第一个表单
|
||||
Iterator<Row> rows = sheet.rowIterator(); // 获得第一个表单的迭代器
|
||||
sheet = wb.getSheetAt(0); // 获得第一个表单
|
||||
Iterator<Row> rows = sheet.rowIterator(); // 获得第一个表单的迭代器
|
||||
while (rows.hasNext()) {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
Row row = rows.next(); // 获得行数据
|
||||
Row row = rows.next(); // 获得行数据
|
||||
if (row.getRowNum() == 0) {
|
||||
continue;
|
||||
} else {
|
||||
@@ -117,24 +117,24 @@ public class MortgageInfoController {
|
||||
if (cell == null) {
|
||||
list.add(i, null);
|
||||
} else {
|
||||
switch (cell.getCellType()) { // 根据cell中的类型来输出数据
|
||||
switch (cell.getCellType()) { // 根据cell中的类型来输出数据
|
||||
case HSSFCell.CELL_TYPE_BLANK:
|
||||
list.add(cell.getColumnIndex(), null);
|
||||
break;
|
||||
case HSSFCell.CELL_TYPE_NUMERIC:
|
||||
String result = new String();
|
||||
if (HSSFDateUtil.isCellDateFormatted(cell)) {// 处理日期格式、时间格式
|
||||
if (HSSFDateUtil.isCellDateFormatted(cell)) {// 处理日期格式、时间格式
|
||||
SimpleDateFormat sdf = null;
|
||||
if (cell.getCellStyle().getDataFormat() == HSSFDataFormat
|
||||
.getBuiltinFormat("h:mm")) {
|
||||
sdf = new SimpleDateFormat("HH:mm");
|
||||
} else {// 日期
|
||||
} else {// 日期
|
||||
sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
}
|
||||
Date date = cell.getDateCellValue();
|
||||
result = sdf.format(date);
|
||||
} else if (cell.getCellStyle().getDataFormat() == 58) {
|
||||
// 处理自定义日期格式:m月d日(通过判断单元格的格式id解决,id的值是58)
|
||||
// 处理自定义日期格式:m月d日(通过判断单元格的格式id解决,id的值是58)
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(
|
||||
"yyyy-MM-dd");
|
||||
double value = cell.getNumericCellValue();
|
||||
@@ -146,7 +146,7 @@ public class MortgageInfoController {
|
||||
CellStyle style = cell.getCellStyle();
|
||||
DecimalFormat format = new DecimalFormat();
|
||||
String temp = style.getDataFormatString();
|
||||
// 单元格设置成常规
|
||||
// 单元格设置成常规
|
||||
if (temp.equals("General")) {
|
||||
format.applyPattern("#");
|
||||
}
|
||||
@@ -177,7 +177,7 @@ public class MortgageInfoController {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 将解析出来的list存进数据库中
|
||||
// 将解析出来的list存进数据库中
|
||||
boolean haveNull = false;
|
||||
if (totalList.size() > 0) {
|
||||
for (List<String> mortgageInfoList : totalList) {
|
||||
@@ -203,12 +203,12 @@ public class MortgageInfoController {
|
||||
public void exportExcelAction(MortgageInfoModel model) {
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
String[] columns = { "城市", "区域", "原始地址", "面积", "来源", "原始小区名称", "匹配城市",
|
||||
"匹配区域", "匹配小区", "均价", "物业类型", "时间" };
|
||||
String[] columns1 = { "上海", "浦东", "华夏东路122号", "100", "某某公司", "沙田公寓",
|
||||
"上海", "浦东", "沙田公寓", "10000", "小区", "2016-09-09" };
|
||||
String[] columns = { "城市", "区域", "原始地址", "面积", "来源", "原始小区名称", "匹配城市",
|
||||
"匹配区域", "匹配小区", "均价", "物业类型", "时间" };
|
||||
String[] columns1 = { "上海", "浦东", "华夏东路122号", "100", "某某公司", "沙田公寓",
|
||||
"上海", "浦东", "沙田公寓", "10000", "小区", "2016-09-09" };
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
Sheet sheet = wb.createSheet("抵押品表");
|
||||
Sheet sheet = wb.createSheet("抵押品表");
|
||||
Row row = sheet.createRow(0);
|
||||
for (int i = 0; i < columns.length; i++) {
|
||||
row.createCell(i).setCellValue(columns[i]);
|
||||
@@ -217,21 +217,21 @@ public class MortgageInfoController {
|
||||
for (int i = 0; i < columns1.length; i++) {
|
||||
row1.createCell(i).setCellValue(columns1[i]);
|
||||
}
|
||||
String fileName = "抵押品模板表.xls";
|
||||
String fileName = "抵押品模板表.xls";
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext()
|
||||
.getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
// response.reset();// 清空输出流
|
||||
// response.reset();// 清空输出流
|
||||
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);
|
||||
model.redirect("/mortgageInfo/list");
|
||||
os = response.getOutputStream();// 取得输出流
|
||||
os = response.getOutputStream();// 取得输出流
|
||||
wb.write(os);
|
||||
os.flush();
|
||||
} catch (Exception e) {
|
||||
|
||||
+11
-11
@@ -38,7 +38,7 @@ public class NetworkPriceController {
|
||||
Integer fggPriceFlag = 0;
|
||||
|
||||
if(StringUtils.isNotBlank(model.getAssociateYgj())){
|
||||
if(model.getAssociateYgj().equals("是")){
|
||||
if(model.getAssociateYgj().equals("是")){
|
||||
ygjPriceFlag = 1;
|
||||
}else{
|
||||
ygjPriceFlag = 2;
|
||||
@@ -46,7 +46,7 @@ public class NetworkPriceController {
|
||||
|
||||
}
|
||||
if(StringUtils.isNotBlank(model.getAssociateFgg())){
|
||||
if(model.getAssociateFgg().equals("是")){
|
||||
if(model.getAssociateFgg().equals("是")){
|
||||
fggPriceFlag = 1;
|
||||
}else{
|
||||
fggPriceFlag = 2;
|
||||
@@ -68,7 +68,7 @@ public class NetworkPriceController {
|
||||
data.put("peopleMark", 1);
|
||||
networkPriceService.updateById(model.getId(), data);
|
||||
|
||||
//修改任务表
|
||||
//修改任务表
|
||||
NetworkPriceTask task = networkPriceTaskService.findByParams(model.getId());
|
||||
if(task==null){
|
||||
task = new NetworkPriceTask();
|
||||
@@ -94,7 +94,7 @@ public class NetworkPriceController {
|
||||
Integer fggPriceFlag = 0;
|
||||
|
||||
if(StringUtils.isNotBlank(model.getAssociateYgj())){
|
||||
if(model.getAssociateYgj().equals("是")){
|
||||
if(model.getAssociateYgj().equals("是")){
|
||||
ygjPriceFlag = 1;
|
||||
}else{
|
||||
ygjPriceFlag = 2;
|
||||
@@ -102,7 +102,7 @@ public class NetworkPriceController {
|
||||
|
||||
}
|
||||
if(StringUtils.isNotBlank(model.getAssociateFgg())){
|
||||
if(model.getAssociateFgg().equals("是")){
|
||||
if(model.getAssociateFgg().equals("是")){
|
||||
fggPriceFlag = 1;
|
||||
}else{
|
||||
fggPriceFlag = 2;
|
||||
@@ -115,9 +115,9 @@ public class NetworkPriceController {
|
||||
OutputStream os = null;
|
||||
BufferedOutputStream fos = null;
|
||||
|
||||
String[] columns = {"城市","区域","小区名","小区自增编号","小区编号","房价网均价","可信度","房估估小区编号","房估估小区名称","房估估小区均价","云估价小区编号","云估价小区名称","云估价小区均价"};
|
||||
String[] columns = {"城市","区域","小区名","小区自增编号","小区编号","房价网均价","可信度","房估估小区编号","房估估小区名称","房估估小区均价","云估价小区编号","云估价小区名称","云估价小区均价"};
|
||||
HSSFWorkbook wb= new HSSFWorkbook();
|
||||
Sheet sheet = wb.createSheet("信息详情");
|
||||
Sheet sheet = wb.createSheet("信息详情");
|
||||
Row row = sheet.createRow(0);
|
||||
for(int i =0 ;i < columns.length ; i++){
|
||||
row.createCell(i).setCellValue(columns[i]);
|
||||
@@ -166,18 +166,18 @@ public class NetworkPriceController {
|
||||
}
|
||||
}
|
||||
|
||||
String fileName = "三家关联信息" + "(" + DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
String fileName = "三家关联信息" + "(" + DateUtil.formatByPattern(new Date(), "yyyyMMddHHmmss") + ").xls";
|
||||
try {
|
||||
HttpServletResponse response = ActionContext.getContext().getResponse();
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
//response.reset();// 清空输出流
|
||||
//response.reset();// 清空输出流
|
||||
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();
|
||||
}catch (Exception e) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user