@@ -570,16 +571,7 @@ export default {
this.$api.weather.getCityInfo().then(d => {
this.cityInfo = d.data?.city || [];
});
- this.projectBuildNode = testData.projectBuildNode;
- let itemWidth = this.$dpi() == "1K" ? 200 : this.$dpi() == "2K" ? 300 : 500;
- this.maxWidth = itemWidth * this.projectBuildNode.length;
- let n = 0;
- for (let i = 0; i < this.projectBuildNode.length; i++) {
- if (this.projectBuildNode[i].finish == "进行中") {
- n = i;
- }
- }
- this.minWidth = n * itemWidth + 100;
+
},
methods: {
showDetailDlg() {
@@ -622,6 +614,26 @@ export default {
}
});
this.loadAttendanceData();
+ this.loadMilestoneData();
+ },
+ loadMilestoneData() {
+ this.$api.detail.milestoneList({
+ pageNum: 1,
+ pageSize: 100,
+ comId: this.prjInfo.comId,
+ projectId: this.prjInfo.id
+ }).then(d => {
+ this.projectBuildNode = d;
+ let itemWidth = this.$dpi() == "1K" ? 200 : this.$dpi() == "2K" ? 300 : 500;
+ this.maxWidth = itemWidth * this.projectBuildNode.length;
+ let n = 0;
+ for (let i = 0; i < this.projectBuildNode.length; i++) {
+ if (this.projectBuildNode[i].finish == "进行中") {
+ n = i;
+ }
+ }
+ this.minWidth = n * itemWidth + 100;
+ })
},
loadAttendanceData() {
let ajax = this.$api.detail.groupByCraftType;
@@ -632,7 +644,7 @@ export default {
if (this.attendanceNav == 1) {
ajax = this.$api.detail.groupByCraftTypeByAttendance;
//posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD");
- posData.createTime ='2024-10-13';
+ posData.createTime = '2024-10-13';
}
ajax(posData).then(d => {
this.attendanceData = (d.data || []).map(it => {
@@ -973,12 +985,14 @@ export default {
}
}
}
+
.attendance-info-title {
* {
font-size: 24px;
}
}
+
.attendance-tag {
* {
font-size: 24px;
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProMilestone.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProMilestone.java
new file mode 100644
index 00000000..a02e1320
--- /dev/null
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProMilestone.java
@@ -0,0 +1,218 @@
+package com.yanzhu.manage.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.yanzhu.common.core.annotation.Excel;
+import com.yanzhu.common.core.web.domain.BaseEntity;
+import java.util.Date;
+
+/**
+ * 项目里程碑对象 pro_milestone
+ *
+ * @author yanzhu
+ * @date 2024-12-16
+ */
+public class ProMilestone extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+ /** 公司ID */
+ @Excel(name = "公司ID")
+ private Long comid;
+
+ /** 项目ID */
+ @Excel(name = "项目ID")
+ private Long projectId;
+
+ /** $column.columnComment */
+ private Long id;
+
+ /** 节点名称 */
+ @Excel(name = "节点名称")
+ private String nodeName;
+
+ /** 计划开始日期 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "计划开始日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date scheduledStart;
+
+ /** 计划结束日期 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "计划结束日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date scheduledEnd;
+
+ /** 实际开始日期 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "实际开始日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date actualStart;
+
+ /** 实际结束日期 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "实际结束日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date actualEnd;
+
+ /** 工期 */
+ @Excel(name = "工期")
+ private Long days;
+
+ /** 说明 */
+ @Excel(name = "说明")
+ private String explainInfo;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private Long isDel;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String state;
+
+ private String compName;
+
+ private String projectName;
+
+
+ public Long getComid() {
+ return comid;
+ }
+
+ public void setComid(Long comid) {
+ this.comid = comid;
+ }
+
+ public Long getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(Long projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getCompName() {
+ return compName;
+ }
+
+ public void setCompName(String compName) {
+ this.compName = compName;
+ }
+
+ public String getProjectName() {
+ return projectName;
+ }
+
+ public void setProjectName(String projectName) {
+ this.projectName = projectName;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+ public void setNodeName(String nodeName)
+ {
+ this.nodeName = nodeName;
+ }
+
+ public String getNodeName()
+ {
+ return nodeName;
+ }
+ public void setScheduledStart(Date scheduledStart)
+ {
+ this.scheduledStart = scheduledStart;
+ }
+
+ public Date getScheduledStart()
+ {
+ return scheduledStart;
+ }
+ public void setScheduledEnd(Date scheduledEnd)
+ {
+ this.scheduledEnd = scheduledEnd;
+ }
+
+ public Date getScheduledEnd()
+ {
+ return scheduledEnd;
+ }
+ public void setActualStart(Date actualStart)
+ {
+ this.actualStart = actualStart;
+ }
+
+ public Date getActualStart()
+ {
+ return actualStart;
+ }
+ public void setActualEnd(Date actualEnd)
+ {
+ this.actualEnd = actualEnd;
+ }
+
+ public Date getActualEnd()
+ {
+ return actualEnd;
+ }
+ public void setDays(Long days)
+ {
+ this.days = days;
+ }
+
+ public Long getDays()
+ {
+ return days;
+ }
+
+ public String getExplainInfo() {
+ return explainInfo;
+ }
+
+ public void setExplainInfo(String explainInfo) {
+ this.explainInfo = explainInfo;
+ }
+
+ public void setIsDel(Long isDel)
+ {
+ this.isDel = isDel;
+ }
+
+ public Long getIsDel()
+ {
+ return isDel;
+ }
+ public void setState(String state)
+ {
+ this.state = state;
+ }
+
+ public String getState()
+ {
+ return state;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("nodeName", getNodeName())
+ .append("scheduledStart", getScheduledStart())
+ .append("scheduledEnd", getScheduledEnd())
+ .append("actualStart", getActualStart())
+ .append("actualEnd", getActualEnd())
+ .append("days", getDays())
+ .append("explain", getExplainInfo())
+ .append("isDel", getIsDel())
+ .append("remark", getRemark())
+ .append("state", getState())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProMilestoneMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProMilestoneMapper.java
new file mode 100644
index 00000000..2448add9
--- /dev/null
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProMilestoneMapper.java
@@ -0,0 +1,61 @@
+package com.yanzhu.manage.mapper;
+
+import java.util.List;
+import com.yanzhu.manage.domain.ProMilestone;
+
+/**
+ * 项目里程碑Mapper接口
+ *
+ * @author yanzhu
+ * @date 2024-12-16
+ */
+public interface ProMilestoneMapper
+{
+ /**
+ * 查询项目里程碑
+ *
+ * @param id 项目里程碑主键
+ * @return 项目里程碑
+ */
+ public ProMilestone selectProMilestoneById(Long id);
+
+ /**
+ * 查询项目里程碑列表
+ *
+ * @param proMilestone 项目里程碑
+ * @return 项目里程碑集合
+ */
+ public List
selectProMilestoneList(ProMilestone proMilestone);
+
+ /**
+ * 新增项目里程碑
+ *
+ * @param proMilestone 项目里程碑
+ * @return 结果
+ */
+ public int insertProMilestone(ProMilestone proMilestone);
+
+ /**
+ * 修改项目里程碑
+ *
+ * @param proMilestone 项目里程碑
+ * @return 结果
+ */
+ public int updateProMilestone(ProMilestone proMilestone);
+
+ /**
+ * 删除项目里程碑
+ *
+ * @param id 项目里程碑主键
+ * @return 结果
+ */
+ public int deleteProMilestoneById(Long id);
+
+ /**
+ * 批量删除项目里程碑
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteProMilestoneByIds(Long[] ids);
+}
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProMilestoneMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProMilestoneMapper.xml
new file mode 100644
index 00000000..92b918eb
--- /dev/null
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProMilestoneMapper.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select pm.id, pm.comid, pm.project_id,pm.node_name, pm.scheduled_start, pm.scheduled_end, pm.actual_start
+ , pm.actual_end, pm.days, pm.explain_info,
+ pm.is_del, pm.remark, pm.state, pm.create_by, pm.create_time, pm.update_by, pm.update_time,dp.`dept_name` comp_name,pi.`project_name`
+ from pro_milestone pm
+ LEFT JOIN sys_dept dp ON pm.`comid`=dp.`dept_id`
+ LEFT JOIN pro_project_info pi ON pm.`project_id`=pi.`id`
+
+
+
+
+
+
+
+ insert into pro_milestone
+
+ comid,
+ project_id,
+ node_name,
+ scheduled_start,
+ scheduled_end,
+ actual_start,
+ actual_end,
+ days,
+ explain_info,
+ is_del,
+ remark,
+ state,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+
+
+ #{comid},
+ #{projectId},
+ #{nodeName},
+ #{scheduledStart},
+ #{scheduledEnd},
+ #{actualStart},
+ #{actualEnd},
+ #{days},
+ #{explainInfo},
+ #{isDel},
+ #{remark},
+ #{state},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+
+
+
+
+ update pro_milestone
+
+ comid = #{comid},
+ project_id = #{projectId},
+ node_name = #{nodeName},
+ scheduled_start = #{scheduledStart},
+ scheduled_end = #{scheduledEnd},
+ actual_start = #{actualStart},
+ actual_end = #{actualEnd},
+ days = #{days},
+ explain_info = #{explainInfo},
+ is_del = #{isDel},
+ remark = #{remark},
+ state = #{state},
+ create_by = #{createBy},
+ create_time = #{createTime},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+
+ where id = #{id}
+
+
+
+ delete from pro_milestone where id = #{id}
+
+
+
+ delete from pro_milestone where id in
+
+ #{id}
+
+
+
\ No newline at end of file
diff --git a/yanzhu-modules/yanzhu-manage/libs/aspose-words-15.8.0-jdk16.jar b/yanzhu-modules/yanzhu-manage/libs/aspose-words-15.8.0-jdk16.jar
new file mode 100644
index 00000000..c0e699fc
Binary files /dev/null and b/yanzhu-modules/yanzhu-manage/libs/aspose-words-15.8.0-jdk16.jar differ
diff --git a/yanzhu-modules/yanzhu-manage/libs/iTextAsian-1.0.0.jar b/yanzhu-modules/yanzhu-manage/libs/iTextAsian-1.0.0.jar
new file mode 100644
index 00000000..3267e58e
Binary files /dev/null and b/yanzhu-modules/yanzhu-manage/libs/iTextAsian-1.0.0.jar differ
diff --git a/yanzhu-modules/yanzhu-manage/pom.xml b/yanzhu-modules/yanzhu-manage/pom.xml
index 90d705ca..77dfbf89 100644
--- a/yanzhu-modules/yanzhu-manage/pom.xml
+++ b/yanzhu-modules/yanzhu-manage/pom.xml
@@ -105,7 +105,9 @@
com.lowagie
iTextAsian
- 1.0
+ 1.0.0
+ system
+ ${pom.basedir}\libs\iTextAsian-1.0.0.jar
@@ -123,6 +125,9 @@
com.aspose
aspose-words
+ 15.8.0
+ system
+ ${pom.basedir}\libs\aspose-words-15.8.0-jdk16.jar
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProMilestoneController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProMilestoneController.java
new file mode 100644
index 00000000..2d5b0cd7
--- /dev/null
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProMilestoneController.java
@@ -0,0 +1,116 @@
+package com.yanzhu.manage.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import com.yanzhu.common.core.utils.poi.ExcelUtil;
+import com.yanzhu.common.core.web.controller.BaseController;
+import com.yanzhu.common.core.web.domain.AjaxResult;
+import com.yanzhu.common.core.web.page.TableDataInfo;
+import com.yanzhu.common.log.annotation.Log;
+import com.yanzhu.common.log.enums.BusinessType;
+import com.yanzhu.common.security.annotation.RequiresPermissions;
+import com.yanzhu.manage.domain.ProMilestone;
+import com.yanzhu.manage.service.IProMilestoneService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+/**
+ * 项目里程碑Controller
+ *
+ * @author yanzhu
+ * @date 2024-12-16
+ */
+@RestController
+@RequestMapping("/milestone")
+public class ProMilestoneController extends BaseController
+{
+ @Autowired
+ private IProMilestoneService proMilestoneService;
+
+ /**
+ * 查询项目里程碑列表
+ */
+ @RequiresPermissions("manage:milestone:list")
+ @GetMapping("/list")
+ public TableDataInfo list(ProMilestone proMilestone)
+ {
+ startPage();
+ List list = proMilestoneService.selectProMilestoneList(proMilestone);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出项目里程碑列表
+ */
+ @RequiresPermissions("manage:milestone:export")
+ @Log(title = "项目里程碑", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ProMilestone proMilestone)
+ {
+ List list = proMilestoneService.selectProMilestoneList(proMilestone);
+ ExcelUtil util = new ExcelUtil(ProMilestone.class);
+ util.exportExcel(response, list, "项目里程碑数据");
+ }
+
+ /**
+ * 获取项目里程碑详细信息
+ */
+ @RequiresPermissions("manage:milestone:query")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(proMilestoneService.selectProMilestoneById(id));
+ }
+
+ /**
+ * 新增项目里程碑
+ */
+ @RequiresPermissions("manage:milestone:add")
+ @Log(title = "项目里程碑", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ProMilestone proMilestone)
+ {
+ return toAjax(proMilestoneService.insertProMilestone(proMilestone));
+ }
+
+
+ /**
+ * 新增项目里程碑
+ */
+ @RequiresPermissions("manage:milestone:add")
+ @Log(title = "项目里程碑", businessType = BusinessType.INSERT)
+ @PostMapping("/addBatch")
+ public AjaxResult addBatch(@RequestBody List proMilestones)
+ {
+ return toAjax(proMilestoneService.addBatch(proMilestones));
+ }
+
+
+ /**
+ * 修改项目里程碑
+ */
+ @RequiresPermissions("manage:milestone:edit")
+ @Log(title = "项目里程碑", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ProMilestone proMilestone)
+ {
+ return toAjax(proMilestoneService.updateProMilestone(proMilestone));
+ }
+
+ /**
+ * 删除项目里程碑
+ */
+ @RequiresPermissions("manage:milestone:remove")
+ @Log(title = "项目里程碑", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(proMilestoneService.deleteProMilestoneByIds(ids));
+ }
+}
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProMilestoneService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProMilestoneService.java
new file mode 100644
index 00000000..d1d94fe8
--- /dev/null
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProMilestoneService.java
@@ -0,0 +1,68 @@
+package com.yanzhu.manage.service;
+
+import java.util.List;
+import com.yanzhu.manage.domain.ProMilestone;
+
+/**
+ * 项目里程碑Service接口
+ *
+ * @author yanzhu
+ * @date 2024-12-16
+ */
+public interface IProMilestoneService
+{
+ /**
+ * 查询项目里程碑
+ *
+ * @param id 项目里程碑主键
+ * @return 项目里程碑
+ */
+ public ProMilestone selectProMilestoneById(Long id);
+
+ /**
+ * 查询项目里程碑列表
+ *
+ * @param proMilestone 项目里程碑
+ * @return 项目里程碑集合
+ */
+ public List selectProMilestoneList(ProMilestone proMilestone);
+
+ /**
+ * 新增项目里程碑
+ *
+ * @param proMilestone 项目里程碑
+ * @return 结果
+ */
+ public int insertProMilestone(ProMilestone proMilestone);
+
+ /**
+ * 修改项目里程碑
+ *
+ * @param proMilestone 项目里程碑
+ * @return 结果
+ */
+ public int updateProMilestone(ProMilestone proMilestone);
+
+ /**
+ * 批量删除项目里程碑
+ *
+ * @param ids 需要删除的项目里程碑主键集合
+ * @return 结果
+ */
+ public int deleteProMilestoneByIds(Long[] ids);
+
+ /**
+ * 删除项目里程碑信息
+ *
+ * @param id 项目里程碑主键
+ * @return 结果
+ */
+ public int deleteProMilestoneById(Long id);
+
+ /**
+ * 指处理
+ * @param proMilestones
+ * @return
+ */
+ int addBatch(List proMilestones);
+}
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProMilestoneServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProMilestoneServiceImpl.java
new file mode 100644
index 00000000..0a23c6c0
--- /dev/null
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProMilestoneServiceImpl.java
@@ -0,0 +1,155 @@
+package com.yanzhu.manage.service.impl;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import com.yanzhu.common.core.context.SecurityContextHolder;
+import com.yanzhu.common.core.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yanzhu.manage.mapper.ProMilestoneMapper;
+import com.yanzhu.manage.domain.ProMilestone;
+import com.yanzhu.manage.service.IProMilestoneService;
+
+/**
+ * 项目里程碑Service业务层处理
+ *
+ * @author yanzhu
+ * @date 2024-12-16
+ */
+@Service
+public class ProMilestoneServiceImpl implements IProMilestoneService
+{
+ @Autowired
+ private ProMilestoneMapper proMilestoneMapper;
+
+ /**
+ * 查询项目里程碑
+ *
+ * @param id 项目里程碑主键
+ * @return 项目里程碑
+ */
+ @Override
+ public ProMilestone selectProMilestoneById(Long id)
+ {
+ return proMilestoneMapper.selectProMilestoneById(id);
+ }
+
+ /**
+ * 查询项目里程碑列表
+ *
+ * @param proMilestone 项目里程碑
+ * @return 项目里程碑
+ */
+ @Override
+ public List selectProMilestoneList(ProMilestone proMilestone)
+ {
+ return proMilestoneMapper.selectProMilestoneList(proMilestone);
+ }
+
+ /**
+ * 新增项目里程碑
+ *
+ * @param proMilestone 项目里程碑
+ * @return 结果
+ */
+ @Override
+ public int insertProMilestone(ProMilestone proMilestone)
+ {
+ proMilestone.setCreateBy(SecurityContextHolder.getUserName());
+ proMilestone.setCreateTime(DateUtils.getNowDate());
+ return proMilestoneMapper.insertProMilestone(proMilestone);
+ }
+
+ /**
+ * 修改项目里程碑
+ *
+ * @param proMilestone 项目里程碑
+ * @return 结果
+ */
+ @Override
+ public int updateProMilestone(ProMilestone proMilestone)
+ {
+ proMilestone.setUpdateBy(SecurityContextHolder.getUserName());
+ proMilestone.setUpdateTime(DateUtils.getNowDate());
+ return proMilestoneMapper.updateProMilestone(proMilestone);
+ }
+
+ /**
+ * 批量删除项目里程碑
+ *
+ * @param ids 需要删除的项目里程碑主键
+ * @return 结果
+ */
+ @Override
+ public int deleteProMilestoneByIds(Long[] ids)
+ {
+ return proMilestoneMapper.deleteProMilestoneByIds(ids);
+ }
+
+ /**
+ * 删除项目里程碑信息
+ *
+ * @param id 项目里程碑主键
+ * @return 结果
+ */
+ @Override
+ public int deleteProMilestoneById(Long id)
+ {
+ return proMilestoneMapper.deleteProMilestoneById(id);
+ }
+
+ @Override
+ public int addBatch(List proMilestones) {
+ if(proMilestones==null||proMilestones.size()==0){
+ return 0;
+ }
+ ProMilestone where=new ProMilestone();
+ where.setComid(proMilestones.get(0).getComid());
+ where.setProjectId(proMilestones.get(0).getProjectId());
+ List oldList=selectProMilestoneList(where);
+ List updateIds=new ArrayList<>();
+ for(ProMilestone it:proMilestones){
+ if(it.getScheduledStart()!=null && it.getScheduledEnd()!=null){
+ Date date2=it.getScheduledEnd();
+ Date date1=it.getScheduledStart();
+ long daysBetween = DateUtils.isSameDay(date1, date2) ? 0 : 1 + (date2.getTime() - date1.getTime()) / (1000 * 60 * 60 * 24);
+ it.setDays(daysBetween);
+ }else{
+ it.setDays(null);
+ }
+ ProMilestone old=findInOldList(oldList,it,updateIds);
+ if(old==null){ //增加
+ insertProMilestone(it);
+ }else{//修改
+ old.setDays(it.getDays());
+ old.setScheduledEnd(it.getScheduledEnd());
+ old.setScheduledStart(it.getScheduledStart());
+ old.setActualEnd(it.getActualEnd());
+ old.setActualStart(it.getActualStart());
+ old.setExplainInfo(it.getExplainInfo());
+ proMilestoneMapper.updateProMilestone(old);
+ updateIds.add(old.getId());
+ }
+ }
+ for (ProMilestone old : oldList){
+ if(!updateIds.contains(old.getId())){
+ deleteProMilestoneById(old.getId());
+ }
+ }
+ return proMilestones.size();
+ }
+
+ private ProMilestone findInOldList(List oldList, ProMilestone it,List updateIds) {
+ for (ProMilestone old : oldList) {
+ if(old.getNodeName().equals(it.getNodeName())){
+ if(!updateIds.contains(old.getId())){
+ return old;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/yanzhu-ui-vue3/src/api/manage/milestone.js b/yanzhu-ui-vue3/src/api/manage/milestone.js
new file mode 100644
index 00000000..017b6b79
--- /dev/null
+++ b/yanzhu-ui-vue3/src/api/manage/milestone.js
@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 查询项目里程碑列表
+export function listMilestone(query) {
+ return request({
+ url: '/manage/milestone/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询项目里程碑详细
+export function getMilestone(id) {
+ return request({
+ url: '/manage/milestone/' + id,
+ method: 'get'
+ })
+}
+
+// 新增项目里程碑
+export function addMilestone(data) {
+ return request({
+ url: '/manage/milestone',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改项目里程碑
+export function updateMilestone(data) {
+ return request({
+ url: '/manage/milestone',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除项目里程碑
+export function delMilestone(id) {
+ return request({
+ url: '/manage/milestone/' + id,
+ method: 'delete'
+ })
+}
+
+export function addBatch(datas){
+ return request({
+ url: '/manage/milestone/addBatch',
+ method: 'post',
+ data: datas
+ })
+}
\ No newline at end of file
diff --git a/yanzhu-ui-vue3/src/views/manage/greenCarbonData/index.vue b/yanzhu-ui-vue3/src/views/manage/greenCarbonData/index.vue
index 084f82e4..840c4d0d 100644
--- a/yanzhu-ui-vue3/src/views/manage/greenCarbonData/index.vue
+++ b/yanzhu-ui-vue3/src/views/manage/greenCarbonData/index.vue
@@ -1,12 +1,12 @@
-
+
-
+
+
+
+
+
+
+ 新增一行
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.days }}天
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+ 请选择项目!
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-vue3/src/views/manage/milestone/index2.vue b/yanzhu-ui-vue3/src/views/manage/milestone/index2.vue
new file mode 100644
index 00000000..8ea5dd91
--- /dev/null
+++ b/yanzhu-ui-vue3/src/views/manage/milestone/index2.vue
@@ -0,0 +1,376 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.scheduledStart, '{y}-{m}-{d}') }}
+
+
+
+
+ {{ parseTime(scope.row.scheduledEnd, '{y}-{m}-{d}') }}
+
+
+
+
+ {{ parseTime(scope.row.actualStart, '{y}-{m}-{d}') }}
+
+
+
+
+ {{ parseTime(scope.row.actualEnd, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+