package com.example.erp.controller.pp;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import com.example.erp.common.Constants;
|
import com.example.erp.common.Result;
|
import com.example.erp.entity.pp.OptimizeProjectMange;
|
import com.example.erp.exception.ServiceException;
|
import com.example.erp.service.pp.GlassOptimizeService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.sql.Date;
|
|
@RestController
|
@Api(value="优化管理controller",tags={"优化管理操作接口"})
|
@RequestMapping("/glassOptimize")
|
public class GlassOptimizeController {
|
@Autowired
|
GlassOptimizeService glassOptimizeService;
|
|
//工程查询流程卡
|
@ApiOperation("创建工程查询流程卡接口")
|
@PostMapping ("/getFlowCardList/{optionVal}/{radio}")
|
public Result getFlowCardList(
|
@PathVariable String optionVal,
|
@PathVariable Integer radio){
|
return Result.seccess(glassOptimizeService.getFlowCardList(optionVal,radio));
|
}
|
|
//工程管理查询
|
@ApiOperation("工程管理查询接口")
|
@PostMapping("/optimizeProjectMange/{startSelectTime}/{endSelectTime}")
|
public Result optimizeProjectMange(
|
@PathVariable Date startSelectTime,
|
@PathVariable Date endSelectTime,
|
@RequestBody OptimizeProjectMange optimizeProjectMange) {
|
return Result.seccess(glassOptimizeService.OptimizeProjectMange(startSelectTime,endSelectTime,optimizeProjectMange));
|
}
|
|
//修改工程状态
|
@ApiOperation("修改工程状态接口")
|
@PostMapping("/updateProjectState/{projectNumber}/{state}")
|
public Result updateProjectState(
|
@PathVariable String projectNumber,
|
@PathVariable Integer state
|
) {
|
if (glassOptimizeService.updateProjectState(projectNumber, state)) {
|
return Result.seccess();
|
} else {
|
throw new ServiceException(Constants.Code_500, "修改失败");
|
|
}
|
}
|
|
}
|