增加了project_man_month的映射

增加了返回项目管理员Id
master
yang.yongquan 2022-06-30 21:39:31 +08:00
parent 63bcda51d7
commit 0677f9a81d
4 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import org.apache.poi.hpsf.Decimal;
import java.time.LocalDate; import java.time.LocalDate;
@ -38,4 +39,5 @@ public class Project {
@TableLogic @TableLogic
private Boolean isDeleted; private Boolean isDeleted;
private Integer projectCreator; private Integer projectCreator;
private Decimal projectManMonth;
} }

View File

@ -17,6 +17,7 @@ import java.time.LocalDate;
public class ResultProject { public class ResultProject {
Integer projectId; Integer projectId;
String projectName; String projectName;
Integer projectCreator;
Long contractAmount; Long contractAmount;
String projectImportance; String projectImportance;
String projectClassName; String projectClassName;

View File

@ -30,6 +30,7 @@ public interface ProjectMapper extends BaseMapper<Project> {
project_name, project_name,
contract_amount, contract_amount,
project_importance, project_importance,
project_creator,
pt1.project_class_name as project_class_name, pt1.project_class_name as project_class_name,
pt2.project_class_name as project_subclass_name, pt2.project_class_name as project_subclass_name,
is_completed, is_completed,
@ -50,7 +51,8 @@ public interface ProjectMapper extends BaseMapper<Project> {
@Result(column = "project_class_name", property = "projectClassName"), @Result(column = "project_class_name", property = "projectClassName"),
@Result(column = "is_completed", property = "IsCompleted"), @Result(column = "is_completed", property = "IsCompleted"),
@Result(column = "is_deleted", property = "IsDeleted"), @Result(column = "is_deleted", property = "IsDeleted"),
@Result(column = "project_close_time", property = "projectCloseTime") @Result(column = "project_close_time", property = "projectCloseTime"),
@Result(column = "project_creator", property = "projectCreator")
}) })
IPage<ResultProject> findMyProject(IPage<ResultProject> pg, @Param("id") Integer staff_id, @Param(Constants.WRAPPER) Wrapper<Project> wrapper); IPage<ResultProject> findMyProject(IPage<ResultProject> pg, @Param("id") Integer staff_id, @Param(Constants.WRAPPER) Wrapper<Project> wrapper);
} }

View File

@ -40,7 +40,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
Integer pageSize, Integer pageSize,
Map<String, Object> params Map<String, Object> params
) throws TokenException { ) throws TokenException {
Integer staffId = 2; Integer staffId = TokenUtils.getStaffId(token);
IPage<ResultProject> page = new Page<>(pageCurrent, pageSize); IPage<ResultProject> page = new Page<>(pageCurrent, pageSize);
IPage<ResultProject> userPage = baseMapper.findMyProject(page, staffId, WrapperUtils.allEqAndTimeIntervalQueryWrapper(params, false)); IPage<ResultProject> userPage = baseMapper.findMyProject(page, staffId, WrapperUtils.allEqAndTimeIntervalQueryWrapper(params, false));
return (Page<ResultProject>) userPage; return (Page<ResultProject>) userPage;