服务指令计划获取及存储优化调整
This commit is contained in:
parent
596271d0a0
commit
165bd7c53f
|
|
@ -66,6 +66,7 @@ public class NuBizNuCustomerElderTag implements Serializable {
|
||||||
/**图标*/
|
/**图标*/
|
||||||
@Excel(name = "图标", width = 15)
|
@Excel(name = "图标", width = 15)
|
||||||
@ApiModelProperty(value = "图标")
|
@ApiModelProperty(value = "图标")
|
||||||
|
@TableField(exist = false)
|
||||||
private java.lang.String pic;
|
private java.lang.String pic;
|
||||||
/**图标*/
|
/**图标*/
|
||||||
@Excel(name = "图标", width = 15)
|
@Excel(name = "图标", width = 15)
|
||||||
|
|
@ -75,6 +76,7 @@ public class NuBizNuCustomerElderTag implements Serializable {
|
||||||
/**焦点图标*/
|
/**焦点图标*/
|
||||||
@Excel(name = "焦点图标", width = 15)
|
@Excel(name = "焦点图标", width = 15)
|
||||||
@ApiModelProperty(value = "焦点图标")
|
@ApiModelProperty(value = "焦点图标")
|
||||||
|
@TableField(exist = false)
|
||||||
private java.lang.String picFocus;
|
private java.lang.String picFocus;
|
||||||
/**图标*/
|
/**图标*/
|
||||||
@Excel(name = "图标", width = 15)
|
@Excel(name = "图标", width = 15)
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysConfigApi sysConfigApi;
|
private ISysConfigApi sysConfigApi;
|
||||||
|
|
||||||
|
private String serverNetUrl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String,Object> getNclist(NuBizNuCustomerServer nuBizNuCustomerServer) {
|
public Map<String,Object> getNclist(NuBizNuCustomerServer nuBizNuCustomerServer) {
|
||||||
Map<String,Object> resMap = new HashMap<>();
|
Map<String,Object> resMap = new HashMap<>();
|
||||||
|
|
@ -54,14 +56,14 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
||||||
nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId());
|
nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId());
|
||||||
nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()),"customer_id",nuBizNuCustomerServer.getCustomerId());
|
nuBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()),"customer_id",nuBizNuCustomerServer.getCustomerId());
|
||||||
List<NuBizNuCustomerServer> groupList = baseMapper.selectList(nuBizNuCustomerServerQueryWrapper);
|
List<NuBizNuCustomerServer> groupList = baseMapper.selectList(nuBizNuCustomerServerQueryWrapper);
|
||||||
String groupPositioning[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"};
|
// String groupPositioning[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"};
|
||||||
List<Map<String,Object>> allList = new ArrayList<>();
|
// List<Map<String,Object>> allList = new ArrayList<>();
|
||||||
for(String groupPositioning1 : groupPositioning){
|
// for(String groupPositioning1 : groupPositioning){
|
||||||
Map<String,Object> posMap = new HashMap<>();
|
// Map<String,Object> posMap = new HashMap<>();
|
||||||
posMap.put("positioning",groupPositioning1);
|
// posMap.put("positioning",groupPositioning1);
|
||||||
List<Map<String,Object>> childrenList = new ArrayList<>();
|
// List<Map<String,Object>> childrenList = new ArrayList<>();
|
||||||
for(NuBizNuCustomerServer par : groupList){
|
for(NuBizNuCustomerServer par : groupList){
|
||||||
if(StringUtils.equals(groupPositioning1,par.getPositioning())){
|
// if(StringUtils.equals(groupPositioning1,par.getPositioning())){
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("nuId",nuBizNuCustomerServer.getNuId());
|
map.put("nuId",nuBizNuCustomerServer.getNuId());
|
||||||
map.put("customerId",nuBizNuCustomerServer.getCustomerId());
|
map.put("customerId",nuBizNuCustomerServer.getCustomerId());
|
||||||
|
|
@ -80,45 +82,46 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
||||||
map.put("positioningLong",par.getPositioningLong());
|
map.put("positioningLong",par.getPositioningLong());
|
||||||
map.put("positioning",par.getPositioning());
|
map.put("positioning",par.getPositioning());
|
||||||
map.put("izPackage",par.getIzPackage());
|
map.put("izPackage",par.getIzPackage());
|
||||||
if(nuBizNuCustomerServer.getImmediateFile()!=null){
|
if(par.getImmediateFile()!=null&&!par.getImmediateFile().equals("")){
|
||||||
String immediateFile = getImageNetUrl(nuBizNuCustomerServer.getImmediateFile());
|
String immediateFile = getImageNetUrl(par.getImmediateFile());
|
||||||
map.put("immediateFile",nuBizNuCustomerServer.getImmediateFile());
|
map.put("immediateFile",par.getImmediateFile());
|
||||||
map.put("netImmediateFile",immediateFile);
|
map.put("netImmediateFile",immediateFile);
|
||||||
}else{
|
}else{
|
||||||
map.put("immediateFile","");
|
map.put("immediateFile","");
|
||||||
map.put("netImmediateFile","");
|
map.put("netImmediateFile","");
|
||||||
}
|
}
|
||||||
if(nuBizNuCustomerServer.getImmediateFileFocus()!=null){
|
if(par.getImmediateFileFocus()!=null&&!par.getImmediateFile().equals("")){
|
||||||
String immediateFileFocus = getImageNetUrl(nuBizNuCustomerServer.getImmediateFileFocus());
|
String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus());
|
||||||
map.put("immediateFileFocus",nuBizNuCustomerServer.getImmediateFileFocus());
|
map.put("immediateFileFocus",par.getImmediateFileFocus());
|
||||||
map.put("netImmediateFileFocus",immediateFileFocus);
|
map.put("netImmediateFileFocus",immediateFileFocus);
|
||||||
}else{
|
}else{
|
||||||
map.put("immediateFileFocus","");
|
map.put("immediateFileFocus","");
|
||||||
map.put("netImmediateFileFocus","");
|
map.put("netImmediateFileFocus","");
|
||||||
}
|
}
|
||||||
if(nuBizNuCustomerServer.getPreviewFile()!=null){
|
if(par.getPreviewFile()!=null&&!par.getImmediateFile().equals("")){
|
||||||
String previewFile = getImageNetUrl(nuBizNuCustomerServer.getPreviewFile());
|
String previewFile = getImageNetUrl(par.getPreviewFile());
|
||||||
map.put("previewFile",nuBizNuCustomerServer.getPreviewFile());
|
map.put("previewFile",par.getPreviewFile());
|
||||||
map.put("netPreviewFile",previewFile);
|
map.put("netPreviewFile",previewFile);
|
||||||
}else{
|
}else{
|
||||||
map.put("previewFile","");
|
map.put("previewFile","");
|
||||||
map.put("netPreviewFile","");
|
map.put("netPreviewFile","");
|
||||||
}
|
}
|
||||||
if(nuBizNuCustomerServer.getPreviewFileSmall()!=null){
|
if(par.getPreviewFileSmall()!=null&&!par.getImmediateFile().equals("")){
|
||||||
String previewFileSmall = getImageNetUrl(nuBizNuCustomerServer.getPreviewFileSmall());
|
String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
|
||||||
map.put("previewFileSmall",nuBizNuCustomerServer.getPreviewFileSmall());
|
map.put("previewFileSmall",par.getPreviewFileSmall());
|
||||||
map.put("netPreviewFileSmall",previewFileSmall);
|
map.put("netPreviewFileSmall",previewFileSmall);
|
||||||
}else{
|
}else{
|
||||||
map.put("previewFileSmall","");
|
map.put("previewFileSmall","");
|
||||||
map.put("netPreviewFileSmall","");
|
map.put("netPreviewFileSmall","");
|
||||||
}
|
}
|
||||||
childrenList.add(map);
|
// childrenList.add(map);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
posMap.put("children",childrenList);
|
// posMap.put("children",childrenList);
|
||||||
allList.add(posMap);
|
// allList.add(posMap);
|
||||||
}
|
// }
|
||||||
resMap.put("serviceList",allList);//服务指令计划
|
// resMap.put("serviceList",allList);//服务指令计划
|
||||||
|
resMap.put("serviceList",groupList);//服务指令计划
|
||||||
//即时指令
|
//即时指令
|
||||||
QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>();
|
||||||
instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId());
|
instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getNuId()),"nu_id",nuBizNuCustomerServer.getNuId());
|
||||||
|
|
@ -241,12 +244,13 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
||||||
List<NuBizNuCustomerServer> serverList = nuBizNuCustomerServer.getServerList();
|
List<NuBizNuCustomerServer> serverList = nuBizNuCustomerServer.getServerList();
|
||||||
if(serverList.size()>0){
|
if(serverList.size()>0){
|
||||||
for(NuBizNuCustomerServer par : serverList){
|
for(NuBizNuCustomerServer par : serverList){
|
||||||
par.setNuId(nuBizNuCustomerServer.getNuId());
|
par.setNuId(nuId);
|
||||||
par.setNuName(nuBizNuCustomerServer.getNuName());
|
par.setNuName(nuBizNuCustomerServer.getNuName());
|
||||||
par.setCustomerId(nuBizNuCustomerServer.getCustomerId());
|
par.setCustomerId(customerId);
|
||||||
par.setCustomerName(nuBizNuCustomerServer.getCustomerName());
|
par.setCustomerName(nuBizNuCustomerServer.getCustomerName());
|
||||||
baseMapper.insert(par);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.saveBatch(serverList);
|
||||||
}
|
}
|
||||||
QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<NuBizNuCustomerServerInstant> instantQueryWrapper = new QueryWrapper<>();
|
||||||
instantQueryWrapper.eq("nu_id",nuId);
|
instantQueryWrapper.eq("nu_id",nuId);
|
||||||
|
|
@ -255,12 +259,13 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
||||||
List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServer.getInstantList();
|
List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServer.getInstantList();
|
||||||
if(instantList.size()>0){
|
if(instantList.size()>0){
|
||||||
for(NuBizNuCustomerServerInstant pari : instantList){
|
for(NuBizNuCustomerServerInstant pari : instantList){
|
||||||
pari.setNuId(nuBizNuCustomerServer.getNuId());
|
pari.setNuId(nuId);
|
||||||
pari.setNuName(nuBizNuCustomerServer.getNuName());
|
pari.setNuName(nuBizNuCustomerServer.getNuName());
|
||||||
pari.setCustomerId(nuBizNuCustomerServer.getCustomerId());
|
pari.setCustomerId(customerId);
|
||||||
pari.setCustomerName(nuBizNuCustomerServer.getCustomerName());
|
pari.setCustomerName(nuBizNuCustomerServer.getCustomerName());
|
||||||
nuBizNuCustomerServerInstantService.save(pari);
|
|
||||||
}
|
}
|
||||||
|
nuBizNuCustomerServerInstantService.saveBatch(instantList);
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryWrapper<NuBizNuCustomerElderTag> tagQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<NuBizNuCustomerElderTag> tagQueryWrapper = new QueryWrapper<>();
|
||||||
|
|
@ -270,12 +275,12 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
||||||
List<NuBizNuCustomerElderTag> tagList = nuBizNuCustomerServer.getTagList();
|
List<NuBizNuCustomerElderTag> tagList = nuBizNuCustomerServer.getTagList();
|
||||||
if(tagList.size()>0){
|
if(tagList.size()>0){
|
||||||
for(NuBizNuCustomerElderTag tg : tagList){
|
for(NuBizNuCustomerElderTag tg : tagList){
|
||||||
tg.setNuId(nuBizNuCustomerServer.getNuId());
|
tg.setNuId(nuId);
|
||||||
tg.setNuName(nuBizNuCustomerServer.getNuName());
|
tg.setNuName(nuBizNuCustomerServer.getNuName());
|
||||||
tg.setCustomerId(nuBizNuCustomerServer.getCustomerId());
|
tg.setCustomerId(customerId);
|
||||||
tg.setCustomerName(nuBizNuCustomerServer.getCustomerName());
|
tg.setCustomerName(nuBizNuCustomerServer.getCustomerName());
|
||||||
nuBizNuCustomerElderTagService.save(tg);
|
|
||||||
}
|
}
|
||||||
|
nuBizNuCustomerElderTagService.saveBatch(tagList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -284,24 +289,21 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
||||||
* 获取管理平台静态资源路径
|
* 获取管理平台静态资源路径
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String getOpeMediaAddress(){
|
private void getOpeMediaAddress(){
|
||||||
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
if(serverNetUrl==null||serverNetUrl.equals("")){
|
||||||
if(json!=null){
|
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||||
String configValue = json.getString("configValue");
|
if(json!=null){
|
||||||
if(!configValue.endsWith("/")){
|
String configValue = json.getString("configValue");
|
||||||
configValue += "/";
|
if(!configValue.endsWith("/")){
|
||||||
|
configValue += "/";
|
||||||
|
}
|
||||||
|
serverNetUrl = configValue;
|
||||||
}
|
}
|
||||||
return configValue;
|
|
||||||
}
|
}
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getImageNetUrl(String imageUrl){
|
private String getImageNetUrl(String imageUrl){
|
||||||
String netUrl = "";
|
getOpeMediaAddress();
|
||||||
String configValue = getOpeMediaAddress();
|
return serverNetUrl + imageUrl;
|
||||||
if(!configValue.equals("")){
|
|
||||||
netUrl = configValue + imageUrl;
|
|
||||||
}
|
|
||||||
return netUrl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue