futian.liu
2023-12-22 3e9a4b3480e6508f3c6f7ac8723509d8b1120d20
consum-base/src/main/java/com/consum/base/controller/LWhWarningController.java
@@ -1,21 +1,24 @@
package com.consum.base.controller;
import com.consum.base.BaseController;
import com.consum.base.core.service.LWhWarningCoreServiceImpl;
import com.consum.base.core.utils.CommonUtil;
import com.consum.base.pojo.query.WhWarningQry;
import com.consum.base.service.LWhWarningServiceImpl;
import com.consum.model.po.FinSysTenantUser;
import com.walker.db.page.GenericPager;
import com.walker.infrastructure.utils.DateUtils;
import com.walker.web.ResponseValue;
import io.swagger.annotations.Api;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Map;
import com.consum.base.BaseController;
import com.consum.base.service.core.LWhWarningCoreService;
import com.consum.base.core.utils.CommonUtil;
import com.consum.base.pojo.query.WhWarningQry;
import com.consum.base.service.LWhWarningService;
import com.consum.model.po.FinSysTenantUser;
import com.walker.db.page.GenericPager;
import com.walker.infrastructure.utils.DateUtils;
import com.walker.web.ResponseValue;
import io.swagger.annotations.Api;
/**
 * @ClassName LWhWarningConfigController
@@ -30,7 +33,32 @@
public class LWhWarningController extends BaseController {
    @Resource
    private LWhWarningServiceImpl lWhWarningService;
    private LWhWarningService lWhWarningService;
    @Resource
    private LWhWarningCoreService lWhWarningCoreService;
    @GetMapping("/getWarningTypeNum")
    public ResponseValue getWarningTypeNum() {
        WhWarningQry param = CommonUtil.getObjFromReq(WhWarningQry.class);
        WhWarningQry param2 = new WhWarningQry();
        CommonUtil.copyProperties(param, param2);
        param = param2;
        /*当前登录人只能看到自己机构下的列表*/
        FinSysTenantUser sysInfo = this.getSysInfo();
        String tenantId = sysInfo.getTenantId();
        Long paramAgencyId = param.getAgencyId();
        if (paramAgencyId == null || !paramAgencyId.toString().startsWith(tenantId)) {
            param.setAgencyId(Long.valueOf(tenantId));
        }
        if (param.getStates() == null) {
            param.setStates(1);
        } else if (param.getStates() == 0) {
            param.setStates(null);
        }
        return ResponseValue.success(lWhWarningService.getWarningTypeNum(param));
    }
    @GetMapping("/getList")
    public ResponseValue getList() {
@@ -56,8 +84,6 @@
    }
    @Resource
    private LWhWarningCoreServiceImpl lWhWarningCoreService;
    @GetMapping("/handerChenKuCun")