Commit 9c5d95bd authored by 廖旭伟's avatar 廖旭伟

部门窗口绩效汇总bug修改

parent 641d4b70
...@@ -5,6 +5,7 @@ import com.mortals.framework.model.Context; ...@@ -5,6 +5,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity; import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import com.mortals.xhx.module.window.model.WindowPerformSummaryQuery;
import com.mortals.xhx.module.window.service.WindowPerformSummaryService; import com.mortals.xhx.module.window.service.WindowPerformSummaryService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -51,4 +52,17 @@ public class WindowPerformSummaryController extends BaseCRUDJsonBodyMappingContr ...@@ -51,4 +52,17 @@ public class WindowPerformSummaryController extends BaseCRUDJsonBodyMappingContr
// } // }
// } // }
@Override
protected void doListBefore(WindowPerformSummaryEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if(query.getYear()!=null && query.getMonth()!=null) {
List<WindowPerformSummaryEntity> list = this.service.find(new WindowPerformSummaryQuery().year(query.getYear()).month(query.getMonth()));
if (CollectionUtils.isEmpty(list)) {
service.initWindowPerformSummary(query.getYear(), query.getMonth());
}
}else {
throw new AppException("汇总年度和月份不能为空");
}
}
} }
\ No newline at end of file
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