Merge branch 'script_gj' into 'master'

空值判断

See merge request !960
This commit is contained in:
2024-09-27 17:15:55 +08:00
@@ -148,7 +148,7 @@ class ImportIndexStats extends BaseBatch{
startDate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(DateUtils.parseFromTightYYYYMM(year.toString()+month.toString()),-1),"yyyyMMdd")
endDate = DateUtils.formatDateByPattern(DateUtils.getLastDayOfMonth(DateUtils.parseFromTightYYYYMM(year.toString()+month.toString()),-1),"yyyyMMdd")
def lastMonthPrice = findHouse3(city, startDate.toInteger(), endDate.toInteger(), null)
if(lastMonthPrice){
if(curMonthPrice && lastMonthPrice){
markup = curMonthPrice *100/lastMonthPrice
markup = DataUtil.getDoubleRound(1,markup);
}
@@ -161,7 +161,7 @@ class ImportIndexStats extends BaseBatch{
startDate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(DateUtils.parseFromTightYYYYMM((year-1).toString()+month.toString())),"yyyyMMdd")
endDate = DateUtils.formatDateByPattern(DateUtils.getLastDayOfMonth(DateUtils.parseFromTightYYYYMM((year-1).toString()+(month.toString()))),"yyyyMMdd")
def lastYearPrice = findHouse3(city, startDate.toInteger(), endDate.toInteger(), null)
if(lastYearPrice){
if(curMonthPrice && lastYearPrice){
yearMarkup = curMonthPrice * 100/lastYearPrice;
yearMarkup = DataUtil.getRound(1,yearMarkup);
}
@@ -174,7 +174,7 @@ class ImportIndexStats extends BaseBatch{
startDate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(DateUtils.parseFromTightYYYYMMDD2(dingjiYear.toString()+"0101")),"yyyyMMdd")
endDate = DateUtils.formatDateByPattern(DateUtils.getLastDayOfMonth(DateUtils.parseFromTightYYYYMMDD2(dingjiYear.toInteger()+"1231")),"yyyyMMdd")
def dingJiPrice = findHouse3(city, startDate, endDate, null)
if(dingJiPrice){
if(curMonthPrice && dingJiPrice){
dingJiMarkup = curMonthPrice*100/dingJiPrice;
dingJiMarkup = DataUtil.getRound(1,dingJiMarkup);
}