Commit a1924e46 authored by 徐俊's avatar 徐俊

xujun

parent 11f01e8a
......@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
......@@ -17,6 +18,8 @@ public class ProjectKPIStatisticDTO extends BaseDTO {
private String appUnitName;
private String projAttribute;
private String projDeadline;
private Date startDate;
private Date endDate;
/** 总预算数 */
@ApiModelProperty(value = "总预算数", position = 3)
private BigDecimal totalBudget;
......
......@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
......@@ -44,17 +45,21 @@ public class ComProjectKpitDetailServiceImpl extends BaseServiceImpl<ComProjectK
}
public void insertList(List<ComProjectKpitDetailDTO> list, String objectId) {
ComProjectKpitDetail model =new ComProjectKpitDetail();
model.setObjectId(objectId);
this.delete(model);
// ComProjectKpitDetail model =new ComProjectKpitDetail();
// model.setObjectId(objectId);
// this.delete(model);
if (null != list) {
List<ComProjectKpitDetail> iList = new ArrayList<>();
//List<ComProjectKpitDetail> iList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
ComProjectKpitDetail item = convert2Entity(list.get(i));
item.setObjectId(objectId);
iList.add(item);
if (item.getId().equals(item.getKpitId()))
this.insert(item);
else
this.update(item);
//iList.add(item);
}
this.insertBatch(iList);
//this.insertBatch(iList);
}
}
public void deleteByObjectId(String objectId){
......
......@@ -398,8 +398,11 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
kpiDTO.setYear1Goal(dto.getYear1Goal());
kpiDTO.setYear2Goal(dto.getYear2Goal());
kpiDTO.setYear3Goal(dto.getYear3Goal());
if (Objects.nonNull(dto.getStartDate()) && Objects.nonNull(dto.getEndDate()))
if (Objects.nonNull(dto.getStartDate()) && Objects.nonNull(dto.getEndDate())) {
kpiDTO.setStartDate(dto.getStartDate());
kpiDTO.setEndDate(dto.getEndDate());
kpiDTO.setProjDeadline(DateUtils.FormatDate(dto.getStartDate()) + "至" + DateUtils.FormatDate(dto.getEndDate()));
}
List<ComProjectBudgetDTO> budgetDTO = dto.getBudget();
if (null != budgetDTO) {
// 资金总额
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment