package com.moral.api.controller;
|
|
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiParam;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.util.ObjectUtils;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
import javax.validation.Valid;
|
|
import com.moral.api.pojo.query.allocation.AllocationChangeCond;
|
import com.moral.api.pojo.query.allocation.AllocationCheckCond;
|
import com.moral.api.pojo.vo.allocation.AllocationFindVo;
|
import com.moral.api.service.AllocationService;
|
import com.moral.constant.ResultMessage;
|
|
@Api(tags = {"小程序立行立改"})
|
@RestController
|
@RequestMapping("allocationApp")
|
public class AppAllocationController {
|
|
|
|
@Autowired
|
private AllocationService allocationService;
|
|
|
|
@GetMapping("select")
|
@ApiOperation("小程序查询")
|
public ResultMessage selectSmallRoutine(@RequestParam @ApiParam(value = "state",name = "状态") Integer state,
|
@RequestParam @ApiParam(value = "startTime",name = "开始时间") String startTime,
|
@RequestParam @ApiParam(value = "endTime",name = "结束时间") String endTime){
|
List<AllocationFindVo> allocationFindVos = allocationService.selectSmallRoutine(state,startTime,endTime);
|
return ResultMessage.ok(ObjectUtils.isEmpty(allocationFindVos)? "0":allocationFindVos);
|
}
|
|
|
@PostMapping("changeRoutine")
|
@ApiOperation("小程序整改")
|
public ResultMessage changeSmallRoutine(@Valid @RequestBody AllocationChangeCond changeCond){
|
allocationService.changeSmallRoutine(changeCond);
|
return ResultMessage.ok();
|
}
|
|
|
@PostMapping("checkRoutine")
|
@ApiOperation("小程序审批")
|
public ResultMessage checkSmallRoutine(@Valid @RequestBody AllocationCheckCond checkCond){
|
allocationService.checkSmallRoutine(checkCond);
|
return ResultMessage.ok();
|
}
|
|
}
|