Browse Source

bug修改

chenweida 8 years ago
parent
commit
dcfeaf49f3

+ 4 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsAllService.java

@ -271,10 +271,10 @@ public class StatisticsAllService extends BaseService {
     * @param level   级别
     * @return
     */
    public JSONObject getSignRate(String endDate, String area, int level) throws Exception {
    public JSONObject getSignRate(String endDate, String area, int level,String year) throws Exception {
        JSONObject json = new JSONObject();
        long signAmount = getIndexTotal(endDate, area, level, "13");
        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Integer.valueOf(Constant.getNowYear()));
        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Integer.valueOf(year));
        DecimalFormat df = new DecimalFormat("0.0000");
        if (peopleNum != null && peopleNum.getNum() > 0) {
@ -300,10 +300,10 @@ public class StatisticsAllService extends BaseService {
     * @param level   级别
     * @return
     */
    public JSONObject getSignTaskRate(String endDate, String area, int level) throws Exception {
    public JSONObject getSignTaskRate(String endDate, String area, int level,String year) throws Exception {
        JSONObject json = new JSONObject();
        long signAmount = getIndexTotal(endDate, area, level, "13");
        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Integer.valueOf(Constant.getNowYear()));
        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Integer.valueOf(year));
        DecimalFormat df = new DecimalFormat("0.0000");
        if (peopleNum != null && peopleNum.getTaskNum() > 0) {

+ 9 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java

@ -363,17 +363,23 @@ public class StatisticsController extends BaseController {
    public String getAreaSignInfo(@RequestParam(required = true) String endDate,
                                  @RequestParam(required = true) String area,
                                  @RequestParam(required = true) int level,
                                  @RequestParam(required = false) String lowCode
                                  @RequestParam(required = false) String lowCode,
                                  @RequestParam(required = false) String year
    ) {
        try {
            JSONObject result = new JSONObject();
            //year没传默认是今年
            if(org.springframework.util.StringUtils.isEmpty(year)){
                year=Constant.getNowYear();
            }
            if (StringUtils.isEmpty(lowCode)) {
                long sign = statisticsAllService.getIndexTotal(endDate, area, level, "13");
                long weiJf = statisticsAllService.getWeiJiaoFei(endDate, area, level);
                JSONObject jo = statisticsService.getRenewPercent(level + "", area, Constant.getNowYear());
                JSONObject signRate = statisticsAllService.getSignRate(endDate, area, level);
                JSONObject signTaskRate = statisticsAllService.getSignTaskRate(endDate, area, level);
                JSONObject signRate = statisticsAllService.getSignRate(endDate, area, level,year);
                JSONObject signTaskRate = statisticsAllService.getSignTaskRate(endDate, area, level,year);
                result.put("sign", sign);