1.项目预算执行率更改删除方法
2.项目季度考核评价表增加三层 3.立项结束监控器增加添加数据
This commit is contained in:
parent
4877c9a38a
commit
45b1a6eb25
@ -8,9 +8,11 @@ import com.xqopen.kehui.exception.ErrorCode;
|
||||
import com.xqopen.kehui.exception.XQException;
|
||||
import com.xqopen.kehui.flows.service.IFlowsService;
|
||||
import com.xqopen.kehui.project.entity.ProjectInfo;
|
||||
import com.xqopen.kehui.project.entity.ProjectQuarterlyEvaluation;
|
||||
import com.xqopen.kehui.project.entity.ProjectWeekly;
|
||||
import com.xqopen.kehui.project.service.IProjectInfoService;
|
||||
import com.xqopen.kehui.project.service.IProjectWeeklyService;
|
||||
import com.xqopen.kehui.project.service.ProjectQuarterlyEvaluationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.activiti.engine.delegate.DelegateExecution;
|
||||
import org.activiti.engine.delegate.ExecutionListener;
|
||||
@ -34,7 +36,8 @@ public class ProjectInitListener implements ExecutionListener {
|
||||
IProjectInfoService projectInfoService;
|
||||
@Autowired
|
||||
ISystemUserLoginService systemUserLoginService;
|
||||
|
||||
@Autowired
|
||||
ProjectQuarterlyEvaluationService projectQuarterlyEvaluationService;
|
||||
@Override
|
||||
@Transactional
|
||||
public void notify(DelegateExecution execution) throws Exception {
|
||||
@ -67,6 +70,7 @@ public class ProjectInitListener implements ExecutionListener {
|
||||
projectWeekly.setDeptId(a.toString());
|
||||
weeklyArrayList.add(projectWeekly);
|
||||
});
|
||||
|
||||
//添加项目专员/负责人假数据,方便周报填报页面查看所有(暂时)
|
||||
String draftManId = String.valueOf(ext.get("draftManId"));
|
||||
JSONArray projectManagerData = (JSONArray) ext.get("projectManagerData");
|
||||
@ -86,6 +90,13 @@ public class ProjectInitListener implements ExecutionListener {
|
||||
weeklyArrayList.add(projectWeekly);
|
||||
});
|
||||
projectWeeklyService.insertBatch(weeklyArrayList);
|
||||
|
||||
//添加季度审核数据
|
||||
ProjectQuarterlyEvaluation quarterlyEvaluation = new ProjectQuarterlyEvaluation();
|
||||
quarterlyEvaluation.setCreatedBy(projectManager);
|
||||
quarterlyEvaluation.setCreatedAt(new Timestamp(System.currentTimeMillis()));
|
||||
quarterlyEvaluation.setProjectId(String.valueOf(projectInfo.getId()));
|
||||
projectQuarterlyEvaluationService.insert(quarterlyEvaluation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.xqopen.kehui.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.xqopen.kehui.project.entity.ProjectQuarterlyEvaluation;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @description 针对表【project_quarterly_evaluation】的数据库操作Mapper
|
||||
* @createDate 2024-07-09 14:45:38
|
||||
* @Entity .domain.com.xqopen.kehui.project.entity.ProjectQuarterlyEvaluation
|
||||
*/
|
||||
public interface ProjectQuarterlyEvaluationDao extends BaseMapper<ProjectQuarterlyEvaluation> {
|
||||
|
||||
|
||||
}
|
@ -85,16 +85,21 @@ public class ProjectBudgetImplementController implements ProjectBudgetImplementA
|
||||
return ApiResponse.fillFail("操作失败!");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@DeleteMapping(Api.PROJECT_WEEKLY_BUDGET_DEL)
|
||||
public String delete(@RequestHeader Long user,@RequestParam Long id) throws XQException {
|
||||
public String delete(@RequestHeader Long userId,@RequestBody ProjectBudgetImplementAddDto projectBudgetImplement) throws XQException {
|
||||
try {
|
||||
EntityWrapper<ProjectBudgetImplement> wrapper = new EntityWrapper<>();
|
||||
wrapper.eq("is_deleted", "1");
|
||||
ProjectBudgetImplement projectBudgetImplement = new ProjectBudgetImplement();
|
||||
projectBudgetImplement.setId(String.valueOf(id));
|
||||
projectBudgetImplementService.update(projectBudgetImplement, wrapper);
|
||||
return ApiResponse.fillSuccess("操作成功!");
|
||||
if(!StringUtils.isEmpty(projectBudgetImplement)){
|
||||
if(!StringUtils.isEmpty(projectBudgetImplement.getId())){
|
||||
projectBudgetImplement.setUpdatedAt(new Timestamp(System.currentTimeMillis()));
|
||||
projectBudgetImplement.setUpdatedBy(String.valueOf(userId));
|
||||
projectBudgetImplement.setIsDeleted("1");
|
||||
projectBudgetImplementService.updateById(projectBudgetImplement);
|
||||
return ApiResponse.fillSuccess("操作成功!");
|
||||
}
|
||||
}
|
||||
return ApiResponse.fillFail("操作失败!");
|
||||
} catch (Exception e) {
|
||||
log.error("ProjectBudgetImplementController.delete", e);
|
||||
throw new XQException(ErrorCode.PROJECTINFO_EXCEPTION_ERROR, null);
|
||||
|
@ -0,0 +1,4 @@
|
||||
package com.xqopen.kehui.project.action;
|
||||
|
||||
public class ProjectQuarterlyEvaluationController {
|
||||
}
|
@ -30,5 +30,5 @@ public interface ProjectBudgetImplementApi {
|
||||
@ApiImplicitParam(name = "token", value = "登录标识符", required = true, paramType = "header", dataType = "String"),
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true, paramType = "header", dataType = "Long"),
|
||||
})
|
||||
String delete(Long user,Long id) throws XQException;
|
||||
String delete(Long userId,ProjectBudgetImplementAddDto projectBudgetImplement) throws XQException;
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.xqopen.kehui.project.api;
|
||||
|
||||
import com.xqopen.kehui.util.Constants;
|
||||
import io.swagger.annotations.Api;
|
||||
|
||||
@Api(value = "季度考核管理", tags = Constants.MODULE_PROJECT, description = "项目模块")
|
||||
public interface ProjectQuarterlyEvaluationApi {
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.xqopen.kehui.project.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName project_quarterly_evaluation
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_quarterly_evaluation")
|
||||
public class ProjectQuarterlyEvaluation implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Object ext;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String isDeleted;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private java.sql.Timestamp createdAt;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String updatedBy;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private java.sql.Timestamp updatedAt;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.xqopen.kehui.project.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.xqopen.kehui.project.entity.ProjectQuarterlyEvaluation;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @description 针对表【project_quarterly_evaluation】的数据库操作Service
|
||||
* @createDate 2024-07-09 14:45:38
|
||||
*/
|
||||
public interface ProjectQuarterlyEvaluationService extends IService<ProjectQuarterlyEvaluation> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.xqopen.kehui.project.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.xqopen.kehui.mapper.ProjectQuarterlyEvaluationDao;
|
||||
import com.xqopen.kehui.project.entity.ProjectQuarterlyEvaluation;
|
||||
import com.xqopen.kehui.project.service.ProjectQuarterlyEvaluationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @description 针对表【project_quarterly_evaluation】的数据库操作Service实现
|
||||
* @createDate 2024-07-09 14:45:38
|
||||
*/
|
||||
@Service
|
||||
public class ProjectQuarterlyEvaluationServiceImpl extends ServiceImpl<ProjectQuarterlyEvaluationDao, ProjectQuarterlyEvaluation>
|
||||
implements ProjectQuarterlyEvaluationService {
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace=".mapper.ProjectQuarterlyEvaluationMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type=".domain.ProjectQuarterlyEvaluation">
|
||||
<id property="id" column="id_" jdbcType="VARCHAR"/>
|
||||
<result property="projectId" column="project_id" jdbcType="VARCHAR"/>
|
||||
<result property="ext" column="ext_" jdbcType="OTHER"/>
|
||||
<result property="isDeleted" column="is_deleted" jdbcType="VARCHAR"/>
|
||||
<result property="createdBy" column="created_by" jdbcType="VARCHAR"/>
|
||||
<result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
|
||||
<result property="updatedBy" column="updated_by" jdbcType="VARCHAR"/>
|
||||
<result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id_,project_id,ext_,
|
||||
is_deleted,created_by,created_at,
|
||||
updated_by,updated_at
|
||||
</sql>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user