计划调整
This commit is contained in:
parent
86d74f6819
commit
9c2e31685a
@ -20,6 +20,7 @@ import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IOrganizationDeptService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IOrganizationJobService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.util.MD5;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -28,6 +29,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
@ -51,15 +53,15 @@ public class BaseDataController {
|
||||
@Autowired
|
||||
private IOrganizationJobService organizationJobService;
|
||||
|
||||
@Autowired
|
||||
private IOrganizationDeptService organizationDeptService;
|
||||
|
||||
@Autowired
|
||||
private ISystemUserService systemUserService;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
|
||||
@Autowired
|
||||
private PasswordEncoder passwordEncoder;
|
||||
|
||||
@ApiOperation(value = "获取分部数据进行同步", notes = "获取分部数据进行同步", httpMethod="POST")
|
||||
@GetMapping(value = "/getSubCompanyData")
|
||||
public Result<Map<String, Object>> getSubCompanyData() {
|
||||
@ -169,6 +171,8 @@ public class BaseDataController {
|
||||
organizationJob.setJobName(dept.getString("jobtitlename"));
|
||||
jobList.add(organizationJob);
|
||||
}
|
||||
List<Long> jobIds = jobList.stream().map(j -> j.getId()).collect(Collectors.toList());
|
||||
organizationJobService.remove(Wrappers.<OrganizationJob>lambdaQuery().notIn(OrganizationJob::getId, jobIds));
|
||||
organizationJobService.saveOrUpdateBatch(jobList);
|
||||
}
|
||||
return Result.success(null);
|
||||
@ -205,6 +209,8 @@ public class BaseDataController {
|
||||
systemUser.setSn(myDept.size() > 0 ? myDept.get(0).getCompanySn() : "");
|
||||
systemUser.setAccountType(7);
|
||||
systemUser.setRealName(dept.getString("lastname"));
|
||||
systemUser.setShowPassword("123");
|
||||
systemUser.setPassword(passwordEncoder.encode("123"));
|
||||
String jobtitle = dept.getString("jobtitle");
|
||||
if (StringUtils.isNotBlank(jobtitle)) {
|
||||
systemUser.setJobId(Long.valueOf(dept.getString("jobtitle")));
|
||||
@ -212,6 +218,10 @@ public class BaseDataController {
|
||||
userList.add(systemUser);
|
||||
}
|
||||
}
|
||||
List<Long> userIds = userList.stream().map(j -> j.getUserId()).collect(Collectors.toList());
|
||||
systemUserService.remove(Wrappers.<SystemUser>lambdaQuery()
|
||||
.notIn(SystemUser::getUserId, userIds)
|
||||
.eq(SystemUser::getAccountType, 7));
|
||||
systemUserService.saveOrUpdateBatch(userList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,275 @@
|
||||
package com.zhgd.xmgl.modules.project.controller;
|
||||
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import com.zhgd.xmgl.modules.project.entity.ProgressPanoramaNodePlanChangeRecord;
|
||||
import com.zhgd.xmgl.modules.project.service.IProgressPanoramaNodePlanChangeRecordService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 任务变更记录
|
||||
* @author: pengj
|
||||
* @date: 2024-08-26
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/progressPanoramaNodePlanChangeRecord")
|
||||
@Slf4j
|
||||
@Api(tags = "任务变更记录管理")
|
||||
public class ProgressPanoramaNodePlanChangeRecordController {
|
||||
@Autowired
|
||||
private IProgressPanoramaNodePlanChangeRecordService progressPanoramaNodePlanChangeRecordService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "任务变更记录管理", operType = "分页查询", operDesc = "分页列表查询任务变更记录信息")
|
||||
@ApiOperation(value = " 分页列表查询任务变更记录信息", notes = "分页列表查询任务变更记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
public Result<IPage<ProgressPanoramaNodePlanChangeRecord>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<ProgressPanoramaNodePlanChangeRecord> queryWrapper = QueryGenerator.initPageQueryWrapper(ProgressPanoramaNodePlanChangeRecord.class, map);
|
||||
Page<ProgressPanoramaNodePlanChangeRecord> page = PageUtil.getPage(map);
|
||||
IPage<ProgressPanoramaNodePlanChangeRecord> pageList = progressPanoramaNodePlanChangeRecordService.page(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param progressPanoramaNodePlanChangeRecord
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "任务变更记录管理", operType = "列表查询", operDesc = "列表查询任务变更记录信息")
|
||||
@ApiOperation(value = " 列表查询任务变更记录信息", notes = "列表查询任务变更记录信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<ProgressPanoramaNodePlanChangeRecord>> queryList(@RequestBody ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecord) {
|
||||
QueryWrapper<ProgressPanoramaNodePlanChangeRecord> queryWrapper = QueryGenerator.initQueryWrapper(progressPanoramaNodePlanChangeRecord);
|
||||
List<ProgressPanoramaNodePlanChangeRecord> list = progressPanoramaNodePlanChangeRecordService.list(queryWrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param progressPanoramaNodePlanChangeRecord
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "任务变更记录管理", operType = "新增", operDesc = "添加任务变更记录信息")
|
||||
@ApiOperation(value = " 添加任务变更记录信息", notes = "添加任务变更记录信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecord) {
|
||||
Result<ProgressPanoramaNodePlanChangeRecord> result = new Result<ProgressPanoramaNodePlanChangeRecord>();
|
||||
progressPanoramaNodePlanChangeRecordService.save(progressPanoramaNodePlanChangeRecord);
|
||||
return Result.success("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param progressPanoramaNodePlanChangeRecord
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "任务变更记录管理", operType = "修改", operDesc = "编辑任务变更记录信息")
|
||||
@ApiOperation(value = "编辑任务变更记录信息", notes = "编辑任务变更记录信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<ProgressPanoramaNodePlanChangeRecord> edit(@RequestBody ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecord) {
|
||||
Result<ProgressPanoramaNodePlanChangeRecord> result = new Result<ProgressPanoramaNodePlanChangeRecord>();
|
||||
ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecordEntity = progressPanoramaNodePlanChangeRecordService.getById(progressPanoramaNodePlanChangeRecord.getId());
|
||||
if (progressPanoramaNodePlanChangeRecordEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = progressPanoramaNodePlanChangeRecordService.updateById(progressPanoramaNodePlanChangeRecord);
|
||||
if (ok) {
|
||||
result.success("修改成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "任务变更记录管理", operType = "删除", operDesc = "删除任务变更记录信息")
|
||||
@ApiOperation(value = "删除任务变更记录信息", notes = "删除任务变更记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "任务变更记录ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<ProgressPanoramaNodePlanChangeRecord> delete(@RequestBody ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecord) {
|
||||
Result<ProgressPanoramaNodePlanChangeRecord> result = new Result<ProgressPanoramaNodePlanChangeRecord>();
|
||||
ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecordEntity = progressPanoramaNodePlanChangeRecordService.getById(progressPanoramaNodePlanChangeRecord.getId());
|
||||
if (progressPanoramaNodePlanChangeRecordEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = progressPanoramaNodePlanChangeRecordService.removeById(progressPanoramaNodePlanChangeRecord.getId());
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "任务变更记录管理", operType = "批量删除", operDesc = "批量删除任务变更记录信息")
|
||||
@ApiOperation(value = "批量删除任务变更记录信息", notes = "批量删除任务变更记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "ids", value = "任务变更记录ID字符串", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<ProgressPanoramaNodePlanChangeRecord> deleteBatch(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<ProgressPanoramaNodePlanChangeRecord> result = new Result<ProgressPanoramaNodePlanChangeRecord>();
|
||||
String ids = MapUtils.getString(map, "ids");
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
} else {
|
||||
this.progressPanoramaNodePlanChangeRecordService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "任务变更记录管理", operType = "查询", operDesc = "通过id查询任务变更记录信息")
|
||||
@ApiOperation(value = "通过id查询任务变更记录信息", notes = "通过id查询任务变更记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "任务变更记录ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<ProgressPanoramaNodePlanChangeRecord> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<ProgressPanoramaNodePlanChangeRecord> result = new Result<ProgressPanoramaNodePlanChangeRecord>();
|
||||
ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecord = progressPanoramaNodePlanChangeRecordService.getById(MapUtils.getString(map, "id"));
|
||||
if (progressPanoramaNodePlanChangeRecord == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(progressPanoramaNodePlanChangeRecord);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@ApiOperation(value = "导出excel任务变更记录信息", notes = "导出excel任务变更记录信息", httpMethod = "POST")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<ProgressPanoramaNodePlanChangeRecord> queryWrapper = null;
|
||||
try {
|
||||
String paramsStr = request.getParameter("paramsStr");
|
||||
if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecord = JSON.parseObject(deString, ProgressPanoramaNodePlanChangeRecord.class);
|
||||
queryWrapper = QueryGenerator.initQueryWrapper(progressPanoramaNodePlanChangeRecord, request.getParameterMap());
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<ProgressPanoramaNodePlanChangeRecord> pageList = progressPanoramaNodePlanChangeRecordService.list(queryWrapper);
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "任务变更记录列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, ProgressPanoramaNodePlanChangeRecord.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("任务变更记录列表数据", "导出人:Jeecg", "导出信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过excel导入任务变更记录信息", notes = "通过excel导入任务变更记录信息", httpMethod = "POST")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<ProgressPanoramaNodePlanChangeRecord> listProgressPanoramaNodePlanChangeRecords = ExcelImportUtil.importExcel(file.getInputStream(), ProgressPanoramaNodePlanChangeRecord.class, params);
|
||||
for (ProgressPanoramaNodePlanChangeRecord progressPanoramaNodePlanChangeRecordExcel : listProgressPanoramaNodePlanChangeRecords) {
|
||||
progressPanoramaNodePlanChangeRecordService.save(progressPanoramaNodePlanChangeRecordExcel);
|
||||
}
|
||||
return Result.ok("文件导入成功!数据行数:" + listProgressPanoramaNodePlanChangeRecords.size());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error("文件导入失败!");
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.ok("文件导入失败!");
|
||||
}
|
||||
|
||||
}
|
||||
@ -54,6 +54,12 @@ public class ProgressPanoramaNodePlan implements Serializable {
|
||||
@Excel(name = "节点类型", width = 15)
|
||||
@ApiModelProperty(value = "节点类型")
|
||||
private String levelName;
|
||||
/**
|
||||
* 节点类别
|
||||
*/
|
||||
@Excel(name = "节点类别", width = 15)
|
||||
@ApiModelProperty(value = "节点类别")
|
||||
private String type;
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
@ -168,15 +174,24 @@ public class ProgressPanoramaNodePlan implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(value = "阶段性成果类型ID")
|
||||
private Long resultId;
|
||||
/**
|
||||
* 里程碑类型ID
|
||||
*/
|
||||
@ApiModelProperty(value = "里程碑类型ID")
|
||||
private Long milepostId;
|
||||
/**
|
||||
* 是否已审批(0:未审批;1:审批通过)
|
||||
*/
|
||||
@ApiModelProperty(value = "是否已审批(0:未审批;1:数据已校验;2:审批通过)")
|
||||
private Integer approvalStatue;
|
||||
|
||||
/**
|
||||
* 任务业务类型
|
||||
*/
|
||||
@ApiModelProperty(value = "任务业务类型")
|
||||
private String businessType;
|
||||
/**
|
||||
* 完成标准
|
||||
*/
|
||||
@ApiModelProperty(value = "完成标准")
|
||||
private String completeStandard;
|
||||
}
|
||||
|
||||
@ -0,0 +1,156 @@
|
||||
package com.zhgd.xmgl.modules.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: 任务变更记录
|
||||
* @author: pengj
|
||||
* @date: 2024-08-26
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("progress_panorama_node_plan_change_record")
|
||||
@ApiModel(value = "ProgressPanoramaNodePlanChangeRecord实体类", description = "ProgressPanoramaNodePlanChangeRecord")
|
||||
public class ProgressPanoramaNodePlanChangeRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "recordId")
|
||||
private Long recordId;
|
||||
/**
|
||||
* 计划ID
|
||||
*/
|
||||
@ApiModelProperty(value = "计划ID")
|
||||
private Long id;
|
||||
/**
|
||||
* 变更标识
|
||||
*/
|
||||
@Excel(name = "变更标识", width = 15)
|
||||
@ApiModelProperty(value = "变更标识")
|
||||
private Integer updateFlag;
|
||||
/**
|
||||
* 项目SN
|
||||
*/
|
||||
@Excel(name = "项目SN", width = 15)
|
||||
@ApiModelProperty(value = "项目SN")
|
||||
private String projectSn;
|
||||
/**
|
||||
* 节点编码
|
||||
*/
|
||||
@Excel(name = "节点编码", width = 15)
|
||||
@ApiModelProperty(value = "节点编码")
|
||||
private String nodeCode;
|
||||
/**
|
||||
* 节点名称
|
||||
*/
|
||||
@Excel(name = "节点名称", width = 15)
|
||||
@ApiModelProperty(value = "节点名称")
|
||||
private String nodeName;
|
||||
/**
|
||||
* 节点类型
|
||||
*/
|
||||
@Excel(name = "节点类型", width = 15)
|
||||
@ApiModelProperty(value = "节点类型")
|
||||
private String levelName;
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
@Excel(name = "计划开始时间", width = 15)
|
||||
@ApiModelProperty(value = "计划开始时间")
|
||||
private String planStartDate;
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
@Excel(name = "计划完成时间", width = 15)
|
||||
@ApiModelProperty(value = "计划完成时间")
|
||||
private String planFinishDate;
|
||||
/**
|
||||
* 实际开始时间
|
||||
*/
|
||||
@Excel(name = "实际开始时间", width = 15)
|
||||
@ApiModelProperty(value = "实际开始时间")
|
||||
private String startDate;
|
||||
/**
|
||||
* 实际完成时间
|
||||
*/
|
||||
@Excel(name = "实际完成时间", width = 15)
|
||||
@ApiModelProperty(value = "实际完成时间")
|
||||
private String finishDate;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
/**
|
||||
* 实际偏差
|
||||
*/
|
||||
@Excel(name = "实际偏差", width = 15)
|
||||
@ApiModelProperty(value = "实际偏差")
|
||||
private String diffDate;
|
||||
/**
|
||||
* 节点责任人编号
|
||||
*/
|
||||
@Excel(name = "节点责任人编号", width = 15)
|
||||
@ApiModelProperty(value = "节点责任人编号")
|
||||
private String chargerId;
|
||||
/**
|
||||
* 节点责任人名称
|
||||
*/
|
||||
@Excel(name = "节点责任人名称", width = 15)
|
||||
@ApiModelProperty(value = "节点责任人名称")
|
||||
private String chargerName;
|
||||
/**
|
||||
* 成果物明细
|
||||
*/
|
||||
@Excel(name = "成果物明细", width = 15)
|
||||
@ApiModelProperty(value = "成果物明细")
|
||||
private String deliverable;
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@Excel(name = "父级ID", width = 15)
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
private Integer parentId;
|
||||
/**
|
||||
* 祖级关系
|
||||
*/
|
||||
@Excel(name = "祖级关系", width = 15)
|
||||
@ApiModelProperty(value = "祖级关系")
|
||||
private String ancestors;
|
||||
/**
|
||||
* 工期天数
|
||||
*/
|
||||
@Excel(name = "工期天数", width = 15)
|
||||
@ApiModelProperty(value = "工期天数")
|
||||
private String duration;
|
||||
/**
|
||||
* 是否为关键节点0:否;1:是(默认为0)
|
||||
*/
|
||||
@Excel(name = "是否为关键节点0:否;1:是(默认为0)", width = 15)
|
||||
@ApiModelProperty(value = "是否为关键节点0:否;1:是(默认为0)")
|
||||
private Integer keyNode;
|
||||
/**
|
||||
* 是否为里程碑0:否;1:是(默认为0)
|
||||
*/
|
||||
@Excel(name = "是否为里程碑0:否;1:是(默认为0)", width = 15)
|
||||
@ApiModelProperty(value = "是否为里程碑0:否;1:是(默认为0)")
|
||||
private Integer milepostNode;
|
||||
/**
|
||||
* 是否为阶段性成果节点0:否;1:是(默认为0)
|
||||
*/
|
||||
@Excel(name = "是否为阶段性成果节点0:否;1:是(默认为0)", width = 15)
|
||||
@ApiModelProperty(value = "是否为阶段性成果节点0:否;1:是(默认为0)")
|
||||
private Integer resultNode;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.zhgd.xmgl.modules.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.zhgd.xmgl.modules.project.entity.ProgressPanoramaNodePlanChangeRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 任务变更记录
|
||||
* @author: pengj
|
||||
* @date: 2024-08-26
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProgressPanoramaNodePlanChangeRecordMapper extends BaseMapper<ProgressPanoramaNodePlanChangeRecord> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<?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="com.zhgd.xmgl.modules.project.mapper.ProgressPanoramaNodePlanChangeRecordMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,14 @@
|
||||
package com.zhgd.xmgl.modules.project.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.project.entity.ProgressPanoramaNodePlanChangeRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 任务变更记录
|
||||
* @author: pengj
|
||||
* @date: 2024-08-26
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IProgressPanoramaNodePlanChangeRecordService extends IService<ProgressPanoramaNodePlanChangeRecord> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.zhgd.xmgl.modules.project.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.project.entity.ProgressPanoramaNodePlanChangeRecord;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProgressPanoramaNodePlanChangeRecordMapper;
|
||||
import com.zhgd.xmgl.modules.project.service.IProgressPanoramaNodePlanChangeRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 任务变更记录
|
||||
* @author: pengj
|
||||
* @date: 2024-08-26
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProgressPanoramaNodePlanChangeRecordServiceImpl extends ServiceImpl<ProgressPanoramaNodePlanChangeRecordMapper, ProgressPanoramaNodePlanChangeRecord> implements IProgressPanoramaNodePlanChangeRecordService {
|
||||
|
||||
}
|
||||
@ -64,6 +64,9 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
|
||||
@Autowired
|
||||
private IProgressPanoramaNodePlanDraftService progressPanoramaNodePlanDraftService;
|
||||
|
||||
@Autowired
|
||||
private IProgressPanoramaNodePlanChangeRecordService progressPanoramaNodePlanChangeRecordService;
|
||||
|
||||
@Override
|
||||
public List<ProgressPanoramaNodePlanDto> selectProgressPanoramaNodePlanPageList(Map<String, Object> map) {
|
||||
String nodeName = MapUtils.getString(map, "nodeName");
|
||||
@ -126,7 +129,7 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
|
||||
.eq(ProgressPanoramaNodePlan::getParentId, progressPanoramaNodePlan.getParentId())
|
||||
.eq(ProgressPanoramaNodePlan::getProjectSn, progressPanoramaNodePlan.getProjectSn()));
|
||||
int code = count + 1;
|
||||
progressPanoramaNodePlan.setNodeCode(parent.getNodeCode() + "-" + code);
|
||||
progressPanoramaNodePlan.setNodeCode(parent.getNodeCode() + "." + code);
|
||||
}
|
||||
id = this.saveProgressPanoramaNodePlan(progressPanoramaNodePlan);
|
||||
} else {
|
||||
@ -173,7 +176,7 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
|
||||
.eq(ProgressPanoramaNodePlan::getParentId, progressPanoramaNodePlan.getParentId())
|
||||
.eq(ProgressPanoramaNodePlan::getProjectSn, progressPanoramaNodePlan.getProjectSn()));
|
||||
int code = count + 1;
|
||||
progressPanoramaNodePlan.setNodeCode(parent.getNodeCode() + "-" + code);
|
||||
progressPanoramaNodePlan.setNodeCode(parent.getNodeCode() + "." + code);
|
||||
}
|
||||
updateState(progressPanoramaNodePlan.getProjectSn());
|
||||
progressPanoramaNodePlanMapper.insert(progressPanoramaNodePlan);
|
||||
@ -413,15 +416,15 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
|
||||
ProgressPanoramaNodePlan nodePlan = this.getById(progressPanoramaNodePlan.getId());
|
||||
int count = progressPanoramaNodePlanHistoryService.count(Wrappers.<ProgressPanoramaNodePlanHistory>lambdaQuery()
|
||||
.eq(ProgressPanoramaNodePlanHistory::getProjectSn, nodePlan.getProjectSn()));
|
||||
ProgressPanoramaNodePlanDraft planDraft = new ProgressPanoramaNodePlanDraft();
|
||||
if (count > 0) {
|
||||
//记录修改项信息
|
||||
if (flag == 1) {
|
||||
ProgressPanoramaNodePlanDraft planDraft = new ProgressPanoramaNodePlanDraft();
|
||||
BeanUtils.copyProperties(nodePlan, planDraft);
|
||||
planDraft.setUpdateFlag(flag);
|
||||
progressPanoramaNodePlanDraftService.save(planDraft);
|
||||
} else if (flag == 2) {
|
||||
ProgressPanoramaNodePlanDraft planDraft = progressPanoramaNodePlanDraftService.getOne(Wrappers.<ProgressPanoramaNodePlanDraft>lambdaQuery()
|
||||
planDraft = progressPanoramaNodePlanDraftService.getOne(Wrappers.<ProgressPanoramaNodePlanDraft>lambdaQuery()
|
||||
.eq(ProgressPanoramaNodePlanDraft::getId, nodePlan.getId()));
|
||||
if (planDraft.getUpdateFlag() != null && planDraft.getUpdateFlag() == 1) {
|
||||
BeanUtils.copyProperties(nodePlan, planDraft);
|
||||
@ -432,7 +435,7 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
|
||||
}
|
||||
progressPanoramaNodePlanDraftService.updateById(planDraft);
|
||||
} else {
|
||||
ProgressPanoramaNodePlanDraft planDraft = progressPanoramaNodePlanDraftService.getOne(Wrappers.<ProgressPanoramaNodePlanDraft>lambdaQuery()
|
||||
planDraft = progressPanoramaNodePlanDraftService.getOne(Wrappers.<ProgressPanoramaNodePlanDraft>lambdaQuery()
|
||||
.eq(ProgressPanoramaNodePlanDraft::getId, nodePlan.getId()));
|
||||
if (planDraft.getUpdateFlag() != null && planDraft.getUpdateFlag() == 1) {
|
||||
progressPanoramaNodePlanDraftService.removeById(planDraft);
|
||||
@ -443,6 +446,11 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
|
||||
progressPanoramaNodePlanDraftService.update(wrapper);
|
||||
}
|
||||
}
|
||||
// 保存变更记录
|
||||
ProgressPanoramaNodePlanDraft updateInfo = progressPanoramaNodePlanDraftService.getById(planDraft.getId());
|
||||
ProgressPanoramaNodePlanChangeRecord record = new ProgressPanoramaNodePlanChangeRecord();
|
||||
BeanUtils.copyProperties(updateInfo, record);
|
||||
progressPanoramaNodePlanChangeRecordService.save(record);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ package com.zhgd.jeecg;
|
||||
*/
|
||||
|
||||
import com.zhgd.xmgl.task.DeleteDataTask;
|
||||
import com.zhgd.xmgl.task.JinqianmaoTask;
|
||||
//import com.zhgd.xmgl.task.JinqianmaoTask;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user