删除是否开启项目,是否开启考勤字段

master
pd 4 years ago
parent a61dd5d73a
commit 9adae8ada6
  1. 15
      src/main/java/com/yipin/liuwanr/controller/Project_ManagementController.java
  2. 2
      src/main/java/com/yipin/liuwanr/entity/Role.java
  3. 4
      src/main/java/com/yipin/liuwanr/mapper/Project_ManagementMapper.java
  4. 2
      src/main/java/com/yipin/liuwanr/service/Project_ManagementService.java

@ -262,6 +262,21 @@ public class Project_ManagementController {
return resp;
}
@ApiOperation(value = "修改角色", notes = "修改角色")
@PostMapping("/updateRole")
Response updateRole(@ApiParam(name = "Role", value = "角色对象,传入json格式", required = true) @RequestBody Role role) {
Response resp = new Response();
HashMap<String, Object> ret = service.updateRole(role);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 实验数据表格信息的展示根据角色id

@ -13,7 +13,7 @@ import java.io.Serializable;
@ApiModel(value = "Role对象", description = "角色对象Role")
public class Role implements Serializable {
@ApiModelProperty(hidden = true)
//@ApiModelProperty(hidden = true)
protected Integer roleId;// 角色ID
@ApiModelProperty(hidden = true)
private String roleName;// 角色名称

@ -204,8 +204,8 @@ public interface Project_ManagementMapper {
*
* @param management
*/
@Insert("INSERT INTO hr_project_management(projectName,projectPermissions,experimentalGoal,caseDescription,experimentSuggests,state,founder,systemId,creationTime,isstartexperimental,isstartexperimentSuggests,userId,isExperiment,isAttendance,isdel)"
+ " VALUES (#{projectName},#{projectPermissions},#{experimentalGoal},#{caseDescription},#{experimentSuggests},#{state},#{founder},#{systemId},now(),#{isstartexperimental},#{isstartexperimentSuggests},#{userId},0,0,0)")
@Insert("INSERT INTO hr_project_management(projectName,projectPermissions,experimentalGoal,caseDescription,experimentSuggests,state,founder,systemId,creationTime,isstartexperimental,isstartexperimentSuggests,userId)"
+ " VALUES (#{projectName},#{projectPermissions},#{experimentalGoal},#{caseDescription},#{experimentSuggests},#{state},#{founder},#{systemId},now(),#{isstartexperimental},#{isstartexperimentSuggests},#{userId})")
@Options(useGeneratedKeys = true, keyProperty = "projectId", keyColumn = "projectId")
void insertProjectManagement(Project_Management management);

@ -548,7 +548,7 @@ public class Project_ManagementService {
}
//数据库中该判分点未绑定任何项目id
else if (projectIds == null) {
else if (StringUtils.isEmpty(projectIds)) {
buff.append(project);
}
//数据中实验要求不为空,且数据库中的实验要求与前端传来的实验要求信息一致

Loading…
Cancel
Save