|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
@ -68,6 +69,7 @@ public class ProjectTypeController extends JeecgController<ProjectType, IProject |
|
|
|
// @RequiresPermissions("projecttype:project_type:add")
|
|
|
|
// @RequiresPermissions("projecttype:project_type:add")
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
public Result<String> add(@RequestBody ProjectType projectType) { |
|
|
|
public Result<String> add(@RequestBody ProjectType projectType) { |
|
|
|
|
|
|
|
projectType.setStatus(projectType.getStatus_dictText()); |
|
|
|
projectTypeService.save(projectType); |
|
|
|
projectTypeService.save(projectType); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -83,6 +85,10 @@ public class ProjectTypeController extends JeecgController<ProjectType, IProject |
|
|
|
// @RequiresPermissions("projecttype:project_type:edit")
|
|
|
|
// @RequiresPermissions("projecttype:project_type:edit")
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
|
|
|
public Result<String> edit(@RequestBody ProjectType projectType) { |
|
|
|
public Result<String> edit(@RequestBody ProjectType projectType) { |
|
|
|
|
|
|
|
projectType.setStatus(projectType.getStatus_dictText()); |
|
|
|
|
|
|
|
if(projectType.getStatus().equals("0")){ |
|
|
|
|
|
|
|
projectType.setAnnualId(""); |
|
|
|
|
|
|
|
} |
|
|
|
projectTypeService.updateById(projectType); |
|
|
|
projectTypeService.updateById(projectType); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|