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