Merge pull request '2024年1月24日测试' (#20) from 2024年1月24日测试 into dev

Reviewed-on: #20
limingyu-20240401-app登录曹实业判断修改
guoyuepeng 2024-02-27 16:40:31 +08:00
commit 65684b80da
6 changed files with 80 additions and 5 deletions

View File

@ -370,7 +370,7 @@ public class AIWarningController extends BaseController {
if (Tools.notEmpty(jsonObject.get("IMG_PATH").toString())) {
String imgName = this.get32UUID() + ".jpg";
String filePath = Const.FILEPATHAITP + "/" + DateUtil.getDays();
Base64Utils.decodeToFile(Const.basePath + filePath + "/" + imgName, jsonObject.get("IMG_PATH").toString().replace("data:image/jpeg;base64,", ""));
Base64Utils.decodeToFile(Smb.basePath + filePath + "/" + imgName, jsonObject.get("IMG_PATH").toString().replace("data:image/jpeg;base64,", ""));
pd.put("IMG_PATH", filePath + "/" + imgName); //报警图片(路径)
} else {
map.put("returnCode", "1001"); //缺少同步信息

View File

@ -983,5 +983,27 @@ public class MapController extends BaseController {
r.put("pd", pd);
return r;
}
/**
*
* ,5s,,使sql,
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/listbymeteorologicalByCorpinfo")
@ResponseBody
public Object listbymeteorologicalByCorpinfo() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = this.getPageData();
//根据条件增加参数或减少参数 都没有 直接返回空
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
map.put("result", errInfo);
return map;
}
pd = meteorologicalinfoService.listbymeteorologicalByCorpinfoId(pd); //列出meteorological列表
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -100,5 +100,8 @@ public interface MeteorologicalinfoMapper {
* @return
*/
List<PageData> tensList(PageData pd);
PageData listbymeteorologicalByCodes(PageData pd);
}

View File

@ -98,6 +98,9 @@ public interface MeteorologicalinfoService {
* @throws Exception
*/
Integer updateMeteorologicalinfo(PageData pageData);
/**
* @throws Exception
*/
public PageData listbymeteorologicalByCorpinfoId(PageData pd)throws Exception;
}

View File

@ -2,6 +2,7 @@ package com.zcloud.service.map.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.map.MeteorologicalMapper;
import com.zcloud.mapper.dsno2.map.MeteorologicalinfoMapper;
import com.zcloud.service.map.DataDockingLogService;
import com.zcloud.service.map.MeteorologicalinfoService;
@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -27,7 +29,8 @@ public class MeteorologicalinfoServiceImpl implements MeteorologicalinfoService
@Autowired
private MeteorologicalinfoMapper meteorologicalinfoMapper;
@Autowired
private MeteorologicalMapper meteorologicalMapper;
@Autowired
private DataDockingLogService dataDockingLogService;
@ -218,5 +221,30 @@ public class MeteorologicalinfoServiceImpl implements MeteorologicalinfoService
public Integer updateMeteorologicalinfo(PageData pageData) {
return meteorologicalinfoMapper.updateMeteorologicalinfo(pageData);
}
/**
* @throws Exception
*/
public PageData listbymeteorologicalByCorpinfoId(PageData pd)throws Exception{
/**
* 使in
* 1.
* 2.,
*/
pd.put("OUTSOURCED_ID",pd.getString("CORPINFO_ID"));
List<PageData> getListByCorpinfoId = meteorologicalMapper.listAll(pd);
if(getListByCorpinfoId.size() > 0){
String codes = "";
for (PageData met : getListByCorpinfoId){
codes += "'" + met.getString("CODE")+"',";
}
System.out.println();
codes = codes.substring(0,codes.length()-1);
pd.put("codes",codes);
return meteorologicalinfoMapper.listbymeteorologicalByCodes(pd);
}
return null;
}
}

View File

@ -510,5 +510,24 @@
where f.CODE = #{CODE}
and ABS(TIMESTAMPDIFF(SECOND, f.OPERATTIME, #{OPERATTIME})) &lt; 10;
</select>
<select id="listbymeteorologicalByCodes" resultType="pd" parameterType="pd">
SELECT
f.TEMPERATURE,
f.HUMIDITY,
f.WINDDIRECTION,
f.WINDSPEED,
f.ISDELETE,
f.OPERATTIME,
f.METEOROLOGICAL_ID,
f.METEOROLOGICALINFO_ID,
f.OPERATOR,
f.CODE
FROM
bus_meteorologicalinfo f
WHERE 1=1
and f.code in ( #{codes})
ORDER BY
f.OPERATTIME DESC
LIMIT 1 ;
</select>
</mapper>