Commit 1b486f6b authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/developer' into developer

parents 4b467323 860ab5a5
...@@ -37,7 +37,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -37,7 +37,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
and hygf_preparation_money.delivery_time between #{dto.deliveryTimeStart} and #{dto.deliveryTimeEnd} and hygf_preparation_money.delivery_time between #{dto.deliveryTimeStart} and #{dto.deliveryTimeEnd}
</if> </if>
</where> </where>
ORDER BY rec_date DESC ORDER BY hygf_preparation_money.sequence_nbr DESC
</select> </select>
<select id="preparationStation" resultType="java.util.Map"> <select id="preparationStation" resultType="java.util.Map">
...@@ -82,7 +82,13 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -82,7 +82,13 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
</if> </if>
</where> </where>
GROUP BY hygf_peasant_household.sequence_nbr GROUP BY hygf_peasant_household.sequence_nbr
order by hygf_peasant_household.sequence_nbr DESC ) b <if test=" preparationMoneyState == 1 ">
order by hygf_preparation_money.delivery_time DESC
</if>
<if test=" preparationMoneyState == 0 ">
order by hygf_peasant_household.sequence_nbr DESC
</if>
) b
</select> </select>
</mapper> </mapper>
...@@ -1086,6 +1086,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -1086,6 +1086,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
up.set(PeasantHousehold::getPreparationMoneyState, DeliveryStateeEnum.待补货.getName()); up.set(PeasantHousehold::getPreparationMoneyState, DeliveryStateeEnum.待补货.getName());
up.set(PeasantHousehold::getConstructionState, DeliveryStateeEnum.待补货.getName()); up.set(PeasantHousehold::getConstructionState, DeliveryStateeEnum.待补货.getName());
up.in(BaseEntity::getSequenceNbr,collect); up.in(BaseEntity::getSequenceNbr,collect);
preparationMoney.setDeliveryTime(null);
peasantHouseholdMapper.update(null,up); peasantHouseholdMapper.update(null,up);
}else { }else {
preparationMoney.setOrderStatus(DeliveryStateeEnum.待确认.getName()); preparationMoney.setOrderStatus(DeliveryStateeEnum.待确认.getName());
......
spring.application.name=AMOS-JXIOP-ANALYSE-WJ spring.application.name=AMOS-JXIOP-ANALYSE-CZ
server.servlet.context-path=/jxiop-analyse server.servlet.context-path=/jxiop-analyse
server.port=33400 server.port=33400
server.uri-encoding=UTF-8 server.uri-encoding=UTF-8
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
mcb_warning_warning_info log mcb_warning_warning_info log
LEFT JOIN mcb_warning_base_source_attribution source1 ON source1.CODE = log.SOURCE_ATTRIBUTION LEFT JOIN mcb_warning_base_source_attribution source1 ON source1.CODE = log.SOURCE_ATTRIBUTION
<where> <where>
log.CREATE_DATE = CURRENT_DATE DATE_FORMAT(log.CREATE_DATE,'%Y-%m-%d') = CURRENT_DATE
and WARNING_SOURCE_TYPE_CODE in (SELECT code FROM mcb_data_dictionary WHERE remark = 'OVERVIEW' ) and WARNING_SOURCE_TYPE_CODE in (SELECT code FROM mcb_data_dictionary WHERE remark = 'OVERVIEW' )
<if test="projectOrgCodes != null and projectOrgCodes.size() > 0"> <if test="projectOrgCodes != null and projectOrgCodes.size() > 0">
AND SOURCE_ATTRIBUTION IN AND SOURCE_ATTRIBUTION IN
...@@ -89,12 +89,12 @@ ...@@ -89,12 +89,12 @@
) a ) a
LEFT JOIN (SELECT LEFT JOIN (SELECT
IFNULL( count( log.SEQUENCE_NBR ), 0 ) AS seriesData, IFNULL( count( log.SEQUENCE_NBR ), 0 ) AS seriesData,
log.CREATE_DATE AS axisData DATE_FORMAT(log.CREATE_DATE,'%Y-%m-%d') AS axisData
FROM FROM
mcb_warning_warning_info log mcb_warning_warning_info log
WHERE WHERE
log.WARNING_SOURCE_TYPE_CODE IN ( SELECT CODE FROM mcb_data_dictionary WHERE remark = 'OVERVIEW' ) log.WARNING_SOURCE_TYPE_CODE IN ( SELECT CODE FROM mcb_data_dictionary WHERE remark = 'OVERVIEW' )
AND log.CREATE_DATE >= get_time_sub(7,'DAY') AND DATE_FORMAT(log.CREATE_DATE,'%Y-%m-%d') >= get_time_sub(6,'DAY')
<if test="projectOrgCodes != null and projectOrgCodes.size() > 0"> <if test="projectOrgCodes != null and projectOrgCodes.size() > 0">
AND log.SOURCE_ATTRIBUTION IN AND log.SOURCE_ATTRIBUTION IN
<foreach collection="projectOrgCodes" item="item" open="(" separator="," close=")"> <foreach collection="projectOrgCodes" item="item" open="(" separator="," close=")">
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</foreach> </foreach>
</if> </if>
GROUP BY GROUP BY
log.CREATE_DATE ) b ON a.date = b.axisData ORDER BY axisData DATE_FORMAT(log.CREATE_DATE,'%Y-%m-%d') ) b ON a.date = b.axisData ORDER BY axisData
</select> </select>
<select id="queryWarningList" resultType="java.util.Map"> <select id="queryWarningList" resultType="java.util.Map">
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
FROM FROM
mcb_warning_warning_info mcb_warning_warning_info
WHERE WHERE
CREATE_DATE = CURRENT_DATE and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM DATE_FORMAT(CREATE_DATE,'%Y-%m-%d') = CURRENT_DATE and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM
mcb_data_dictionary WHERE remark = 'OVERVIEW') mcb_data_dictionary WHERE remark = 'OVERVIEW')
GROUP BY GROUP BY
SOURCE_ATTRIBUTION SOURCE_ATTRIBUTION
...@@ -381,7 +381,7 @@ ...@@ -381,7 +381,7 @@
LEFT JOIN LEFT JOIN
SubQuery sq ON a.CODE = sq.SOURCE_ATTRIBUTION SubQuery sq ON a.CODE = sq.SOURCE_ATTRIBUTION
LEFT JOIN LEFT JOIN
mcb_warning_warning_info b ON a.CODE = b.SOURCE_ATTRIBUTION AND b.CREATE_DATE = CURRENT_DATE mcb_warning_warning_info b ON a.CODE = b.SOURCE_ATTRIBUTION AND DATE_FORMAT(b.CREATE_DATE,'%Y-%m-%d') = CURRENT_DATE
<where> <where>
<if test="sourceAttribution != null and sourceAttribution != ''"> <if test="sourceAttribution != null and sourceAttribution != ''">
a.CODE LIKE CONCAT(#{sourceAttribution}, '%') a.CODE LIKE CONCAT(#{sourceAttribution}, '%')
......
...@@ -135,18 +135,19 @@ public class LargeScreenImpl { ...@@ -135,18 +135,19 @@ public class LargeScreenImpl {
String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info; String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info;
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String formattedDate = currentDate.format(formatter); LocalDate yesterday = currentDate.minusDays(1);
String formattedDate = yesterday.format(formatter);
JSONObject data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate, JSONObject data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate,
Constants.REQUEST_GET, "", Constants.resovleRule_data); Constants.REQUEST_GET, "", Constants.resovleRule_data);
if (data != null) { if (data != null) {
// 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据 // // 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据
if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) { // if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) {
// 计算昨天日期 // // 计算昨天日期
LocalDate yesterday = currentDate.minusDays(1); // LocalDate yesterday = currentDate.minusDays(1);
formattedDate = yesterday.format(formatter); // formattedDate = yesterday.format(formatter);
data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate, // data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate,
Constants.REQUEST_GET, "", Constants.resovleRule_data); // Constants.REQUEST_GET, "", Constants.resovleRule_data);
} // }
mapdta.put("SS", data.getDouble("average_wind_speed")); mapdta.put("SS", data.getDouble("average_wind_speed"));
mapdta.put("ZFS", data.getDouble("avg_irradiance")); mapdta.put("ZFS", data.getDouble("avg_irradiance"));
mapdta.put("ZFSLJ", data.getDouble("sum_irradiance")); mapdta.put("ZFSLJ", data.getDouble("sum_irradiance"));
...@@ -243,7 +244,7 @@ public class LargeScreenImpl { ...@@ -243,7 +244,7 @@ public class LargeScreenImpl {
} }
@Scheduled(cron = "0/10 * * * * ?") @Scheduled(cron = "0/10 * * * * ?")
@PostConstruct //@PostConstruct
private void sendQYYXZBMqtt() { private void sendQYYXZBMqtt() {
List<StationCacheInfoDto> listStationCacheInfoDto = commonServiceImpl.getListStationCacheInfoDto(); List<StationCacheInfoDto> listStationCacheInfoDto = commonServiceImpl.getListStationCacheInfoDto();
Map<String, List<StationCacheInfoDto>> belongAreaList = listStationCacheInfoDto.stream() Map<String, List<StationCacheInfoDto>> belongAreaList = listStationCacheInfoDto.stream()
...@@ -406,7 +407,8 @@ public class LargeScreenImpl { ...@@ -406,7 +407,8 @@ public class LargeScreenImpl {
String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info; String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info;
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String formattedDate = currentDate.format(formatter); LocalDate yesterday = currentDate.minusDays(1);
String formattedDate = yesterday.format(formatter);
JSONObject data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate + "&code=" + s, JSONObject data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate + "&code=" + s,
Constants.REQUEST_GET, "", Constants.resovleRule_data); Constants.REQUEST_GET, "", Constants.resovleRule_data);
DecimalFormat df = new DecimalFormat("#.0000"); DecimalFormat df = new DecimalFormat("#.0000");
...@@ -430,13 +432,13 @@ public class LargeScreenImpl { ...@@ -430,13 +432,13 @@ public class LargeScreenImpl {
} }
// 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据 // 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据
if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) { // if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) {
// 计算昨天日期 // // 计算昨天日期
LocalDate yesterday = currentDate.minusDays(1); // LocalDate yesterday = currentDate.minusDays(1);
formattedDate = yesterday.format(formatter); // formattedDate = yesterday.format(formatter);
data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate+"&code="+s, Constants.REQUEST_GET, // data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate+"&code="+s, Constants.REQUEST_GET,
"", Constants.resovleRule_data); // "", Constants.resovleRule_data);
} // }
mapdta.put("SS", data.getString("average_wind_speed")); mapdta.put("SS", data.getString("average_wind_speed"));
mapdta.put("ZFS", data.getString("avg_irradiance")); mapdta.put("ZFS", data.getString("avg_irradiance"));
mapdta.put("ZFSLJ", data.getString("sum_irradiance")); mapdta.put("ZFSLJ", data.getString("sum_irradiance"));
......
...@@ -1110,7 +1110,8 @@ public class MonitoringServiceImpl { ...@@ -1110,7 +1110,8 @@ public class MonitoringServiceImpl {
String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info; String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info;
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String formattedDate = currentDate.format(formatter); LocalDate yesterday = currentDate.minusDays(1);
String formattedDate = yesterday.format(formatter);
JSONObject data = httpRequestUtil.getResPonse(requestUrl+"&reporting_data="+formattedDate, Constants.REQUEST_GET, "", JSONObject data = httpRequestUtil.getResPonse(requestUrl+"&reporting_data="+formattedDate, Constants.REQUEST_GET, "",
Constants.resovleRule_data); Constants.resovleRule_data);
DecimalFormat df = new DecimalFormat("#.0000"); DecimalFormat df = new DecimalFormat("#.0000");
......
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