物料申请,增加选填字段 通用程度
This commit is contained in:
parent
582ccdc66a
commit
f1b0f1a9da
|
|
@ -403,6 +403,18 @@ public class MaterialMainApi extends BaseApi {
|
|||
return materialMainService.updateProjectType(paramDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* 申请人才允许更新
|
||||
* @param paramDto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("updateGeneralLevel")
|
||||
@ApiOperation("更新通用程度")
|
||||
public ResultVO<String> updateGeneralLevel(@RequestBody MaterialMainDTO paramDto) {
|
||||
return materialMainService.updateGeneralLevel(paramDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动执行计算推荐度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -190,5 +190,11 @@ public class MaterialMainDTO implements Serializable {
|
|||
@ApiModelProperty(value = "申请部门")
|
||||
private String applyDeptName;
|
||||
|
||||
/**
|
||||
* 通用程度
|
||||
*/
|
||||
@ApiModelProperty("通用程度")
|
||||
private String generalLevel;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -369,6 +369,13 @@ public class MaterialMainEntity implements Serializable {
|
|||
@ApiModelProperty(value = "近两年使用量(新)")
|
||||
private BigDecimal twoYearsUsage;
|
||||
|
||||
/**
|
||||
* 通用程度
|
||||
*/
|
||||
@TableField(value = "general_level")
|
||||
@ApiModelProperty("通用程度")
|
||||
private String generalLevel;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,6 +441,12 @@ public class MaterialMainVO implements Serializable {
|
|||
@ApiModelProperty(value = "项目类别")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 通用程度
|
||||
*/
|
||||
@ApiModelProperty("通用程度")
|
||||
private String generalLevel;
|
||||
|
||||
// 变更弹窗字段 start
|
||||
/**
|
||||
* 变更人
|
||||
|
|
|
|||
|
|
@ -2335,6 +2335,24 @@ public class MaterialMainService extends ServiceImpl<MaterialMainMapper, Materia
|
|||
return ResultVO.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新通用程度
|
||||
* 申请人才允许更新
|
||||
* @param paramDto
|
||||
* @return
|
||||
*/
|
||||
public ResultVO<String> updateGeneralLevel(MaterialMainDTO paramDto) {
|
||||
// 暂且和更新项目类别权限一致
|
||||
if (!checkUpdateProjectTypeByDept(paramDto)) {
|
||||
return ResultVO.error("无法更新本部门外申请物料的通用程度");
|
||||
}
|
||||
MaterialMainEntity entity = new MaterialMainEntity();
|
||||
entity.setRowId(paramDto.getRowId());
|
||||
entity.setGeneralLevel(paramDto.getGeneralLevel());
|
||||
this.updateById(entity);
|
||||
return ResultVO.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过部门判断是否有修改项目类别的权限,以下满足一个即可:
|
||||
* 1、自己申请的物料
|
||||
|
|
|
|||
Loading…
Reference in New Issue