张天森
2022-11-12 3fe9275853e50f6ac76d75a7ddd666150bacab23
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java
@@ -10,6 +10,7 @@
import com.panzhihua.common.model.vos.sanshuo.ComEventConciliationVO;
import com.panzhihua.common.model.vos.sanshuo.ComEventVO;
import com.panzhihua.common.model.vos.sanshuo.ComSanRequestVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.CopyUtil;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.entity.ComEvent;
@@ -19,6 +20,7 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@@ -29,6 +31,7 @@
import java.util.List;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
/**
 * ClassName   ComEventController
@@ -45,6 +48,8 @@
    @Resource
    private IComEventService comEventService;
    @Resource
    private UserService userService;
    /**
@@ -66,6 +71,9 @@
        comEvent.setRequestUserId(loginUser.getUserId());
        comEvent.setRequestUserName(loginUser.getName());
        comEvent.setRequestUserTel(loginUser.getPhone());
        if (isNull(comEventVO.getAppId())){
            comEvent.setAppId(loginUser.getAppId());
        }
        return comEventService.insertComEvent(comEvent);
    }
@@ -154,9 +162,12 @@
    })
    @PostMapping("/page")
    public R page(@RequestBody ComEventVO comEventVO, Long pageNo, Long pageSize) {
        log.info("==============分页参数"+comEventVO);
        Page pagination = new Page(pageNo, pageSize);
        ComEvent comEvent = CopyUtil.copyProperties(comEventVO, ComEvent.class);
        ComEvent comEvent=new ComEvent();
        BeanUtils.copyProperties(comEventVO, comEvent);
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        String appId = loginUserInfo.getAppId();
        comEvent.setAppId(appId);
        return comEventService.pageByComEvent(comEvent, pagination,this.getLoginUserInfo());
    }
@@ -253,8 +264,7 @@
        comEvent.setEventProcessStatus(SanShuoEventStatusEnum.VALID.getCode());
        comEvent.setSpecialistName("待分配");
        comEvent.setSpecialistId(null);
        comEvent.setSpecialistName("待分配");
        comEvent.setSpecialistId(0L);
        comEventService.updateEventStransferRecord(id);
        return R.ok(comEventService.updateById(comEvent));
    }
@@ -338,4 +348,22 @@
    public R eventIndexData(@RequestParam Integer type) {
        return comEventService.eventIndexData(type);
    }
    /**
     *可选街道列表
     * */
    @GetMapping("/streetList")
    public R getStreetId(){
        return comEventService.listStreetScreen();
    }
    /**
     *可选社区列表
     * */
    @GetMapping("/communityList")
    public R getCommunityList(){
        return comEventService.listCommunityScreen();
    }
}