Commit 131a8089 authored by 廖旭伟's avatar 廖旭伟

bug修改

parent b275987d
...@@ -8,6 +8,7 @@ import com.mortals.xhx.common.pdu.matter.MatterPdu; ...@@ -8,6 +8,7 @@ import com.mortals.xhx.common.pdu.matter.MatterPdu;
import com.mortals.xhx.common.pdu.site.SiteMatterPdu; import com.mortals.xhx.common.pdu.site.SiteMatterPdu;
import com.mortals.xhx.common.pdu.site.SiteThemeMatterPdu; import com.mortals.xhx.common.pdu.site.SiteThemeMatterPdu;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StringUtils;
import com.mortals.xhx.feign.matter.IMatterDatumFeign; import com.mortals.xhx.feign.matter.IMatterDatumFeign;
import com.mortals.xhx.feign.matter.IMatterFeign; import com.mortals.xhx.feign.matter.IMatterFeign;
import com.mortals.xhx.feign.site.ISiteMatterFeign; import com.mortals.xhx.feign.site.ISiteMatterFeign;
...@@ -172,6 +173,12 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD ...@@ -172,6 +173,12 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD
} }
singleEntity.setThemeCode(themeCode.endsWith(",")?themeCode.substring(0,themeCode.indexOf(",")):themeCode); singleEntity.setThemeCode(themeCode.endsWith(",")?themeCode.substring(0,themeCode.indexOf(",")):themeCode);
singleEntity.setThemeName(themeName.endsWith(",")?themeName.substring(0,themeName.indexOf(",")):themeName); singleEntity.setThemeName(themeName.endsWith(",")?themeName.substring(0,themeName.indexOf(",")):themeName);
if(StringUtils.isEmpty(singleEntity.getThemeCode())){
singleEntity.setThemeCode("999");
}
if(StringUtils.isEmpty(singleEntity.getThemeName())){
singleEntity.setThemeName("其他");
}
} }
MatterDatumPdu datumPdu = new MatterDatumPdu(); MatterDatumPdu datumPdu = new MatterDatumPdu();
datumPdu.setMatterId(item.getMatterId()); datumPdu.setMatterId(item.getMatterId());
......
...@@ -358,32 +358,40 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas ...@@ -358,32 +358,40 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
String busiDesc = "查询自助终端应用展示数据" ; String busiDesc = "查询自助终端应用展示数据" ;
int code=1; int code=1;
try { try {
String host = ""; if(query.getSiteId()==null){
String serverName = request.getHeader("server-name"); model.put("showApps", Collections.emptyList());
Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"),0); model.put("hotApps", Collections.emptyList());
if (!ObjectUtils.isEmpty(serverName) && Validator.isIpv4(serverName)) { model.put("allApps", Collections.emptyList());
host = UrlBuilder.ofHttp(serverName).setPort(serverPort > 0 ? serverPort : 11078).build(); model.put("appThemeCount", new HashMap<>());
//host = StrUtil.sub(host, 0, host.length() - 1);
}else { }else {
host=""; String host = "";
} String serverName = request.getHeader("server-name");
if(StringUtils.isNotEmpty(query.getAppName())){ Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"), 0);
query.setAppName("%"+query.getAppName()+"%"); if (!ObjectUtils.isEmpty(serverName) && Validator.isIpv4(serverName)) {
} host = UrlBuilder.ofHttp(serverName).setPort(serverPort > 0 ? serverPort : 11078).build();
log.info("server-name:"+serverName+",server-port:"+serverPort); //host = StrUtil.sub(host, 0, host.length() - 1);
Map<String, Object> sstApps = sstAppsService.getAppListBySite(query.getDeviceCode(),query.getSiteId(),host,query.getAppName()); } else {
model.put("showApps", sstApps.get("showApps")); host = "";
model.put("hotApps", sstApps.get("hotApps")); }
model.put("allApps", sstApps.get("allApps")); if (StringUtils.isNotEmpty(query.getAppName())) {
model.put("appThemeCount",groupAppTheme((List<AppsInfoEntity>)sstApps.get("showApps"))); query.setAppName("%" + query.getAppName() + "%");
AppPdu appPdu = new AppPdu(); }
appPdu.setSiteId(query.getSiteId()); log.info("server-name:" + serverName + ",server-port:" + serverPort);
appPdu.setSize(999); Map<String, Object> sstApps = sstAppsService.getAppListBySite(query.getDeviceCode(), query.getSiteId(), host, query.getAppName());
appPdu.setType(1); model.put("showApps", sstApps.get("showApps"));
appPdu.setShelves(1); model.put("hotApps", sstApps.get("hotApps"));
Rest<RespData<List<AppPdu>>> rest = appFeign.list(appPdu); model.put("allApps", sstApps.get("allApps"));
if (rest.getCode().equals(YesNoEnum.YES.getValue())) { model.put("appThemeCount", groupAppTheme((List<AppsInfoEntity>) sstApps.get("showApps")));
model.put("dict",rest.getData().getDict()); AppPdu appPdu = new AppPdu();
appPdu.setSiteId(query.getSiteId());
appPdu.setSize(999);
appPdu.setType(1);
appPdu.setShelves(1);
Rest<RespData<List<AppPdu>>> rest = appFeign.list(appPdu);
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
model.put("dict", rest.getData().getDict());
}
} }
model.put("message_info", busiDesc + "成功"); model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment