@@ -199,6 +199,9 @@ public class SupplyServiceImpl implements ISupplyService {
*/
@Override
public TrendStatisticsRes trendStatistics(String landType) {
+ if(StringUtils.isBlank(landType) || landType.matches("[0]+")){
+ landType = null;
+ }
//这里合并两部分数据
List<TdgyStatisticsRes> completeList = new ArrayList<>();
List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(null, landType, null, null);
@@ -191,7 +191,7 @@
LEFT JOIN public.land_type land ON land.NAME = gj_gd_data.tdyt
WHERE 1=1
<if test="year != null">
- AND LEFT(gj_gd_data.qdrq, 4) = #{year}
+ AND LEFT(CAST(gj_gd_data.qdrq AS VARCHAR), 4) = #{year}
</if>
<if test="landTypeCode != null">
AND LEFT(land.code,2)=#{landTypeCode}