Commit 41994b0b authored by wujiang's avatar wujiang

修改报表站点获取

parent 961fc598
......@@ -50,6 +50,7 @@ public class FirePatrolReportController {
iFirePatrolReportService.download(request, response, stationCode, startDate, endDate);
}
@SuppressWarnings("unchecked")
@ApiOperation(value = "所有站查询列表", notes = "所有站查询列表")
@GetMapping(value = "/allPage")
@TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false)
......
package com.yeejoin.equipmanage.mapper;
import java.util.Date;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
......@@ -19,5 +20,7 @@ import com.yeejoin.equipmanage.common.entity.AnalysisReportLog;
public interface AnalysisReportLogMapper extends BaseMapper<AnalysisReportLog> {
IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, @Param("analysisReportLog")AnalysisReportLog analysisReportLog);
Map<String,Object> getStation(String stationCode);
}
......@@ -50,6 +50,7 @@ import com.github.xiaoymin.knife4j.core.util.StrUtil;
import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto;
import com.yeejoin.equipmanage.common.entity.AnalysisReportLog;
import com.yeejoin.equipmanage.common.enums.WordTemplateTypeEum;
import com.yeejoin.equipmanage.common.exception.BaseException;
import com.yeejoin.equipmanage.common.exception.CommonException;
import com.yeejoin.equipmanage.common.utils.WordTemplateUtils;
import com.yeejoin.equipmanage.mapper.AnalysisReportLogMapper;
......@@ -66,12 +67,19 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
Date endDate) {
WordTemplateUtils instance = WordTemplateUtils.getInstance();
Map<String, Object> map = new HashMap<String, Object>();
// 查询换流站
Map<String, Object> station = analysisReportLogMapper.getStation(code);
if(station==null||station.isEmpty())
{
throw new BaseException("换流站编码不存在");
}
// 文档编号
String timeStr1 = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
String documentNumber = "ZD-XFSBXC" + timeStr1;
map.put("document_number", documentNumber);
// 换流站名称
map.put("station_name", "测试");
String stationName=(String) station.get("biz_org_name");
map.put("station_name", stationName);
// 统计时间
SimpleDateFormat dateStat = new SimpleDateFormat("yyyy年MM月dd日");
String statisticalTime = dateStat.format(startDate) + "-" + dateStat.format(endDate);
......
......@@ -32,4 +32,8 @@
</if>
</where>
</select>
<select id="getStation" resultType="Map">
SELECT * FROM cb_org_usr WHERE biz_org_code = #{stationCode}
</select>
</mapper>
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