修改进度、产值

This commit is contained in:
lcj
2025-08-30 03:25:03 +08:00
parent 8a29ffdd2e
commit a07792c8e3
4 changed files with 46 additions and 40 deletions

View File

@ -24,10 +24,15 @@ public class PgsProgressCategoryCreateReq implements Serializable {
@NotNull(message = "父类别id不能为空") @NotNull(message = "父类别id不能为空")
private Long parentId; private Long parentId;
/**
* 子项目id
*/
@NotNull(message = "子项目id不能为空")
private Long projectId;
/** /**
* 方阵id * 方阵id
*/ */
@NotNull(message = "方阵id不能为空")
private Long matrixId; private Long matrixId;
/** /**
@ -63,7 +68,6 @@ public class PgsProgressCategoryCreateReq implements Serializable {
/** /**
* 关联结构(1子项目 2方阵) * 关联结构(1子项目 2方阵)
*/ */
@NotBlank(message = "关联结构不能为空")
private String relevancyStructure; private String relevancyStructure;
/** /**

View File

@ -1,12 +1,11 @@
package org.dromara.progress.domain.vo.progressplandetail; package org.dromara.progress.domain.vo.progressplandetail;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.time.LocalDate;
/** /**
* @author lilemy * @author lilemy
@ -25,8 +24,7 @@ public class PgsProgressPlanDetailNumVo {
/** /**
* 计划时间 * 计划时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd") private LocalDate date;
private Date date;
/** /**
* 计划数量/百分比 * 计划数量/百分比

View File

@ -271,6 +271,11 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
throw new ServiceException("超过最大层级", HttpStatus.BAD_REQUEST); throw new ServiceException("超过最大层级", HttpStatus.BAD_REQUEST);
} }
progressCategory.setAncestors(ancestors + StringUtils.SEPARATOR + progressCategory.getParentId()); progressCategory.setAncestors(ancestors + StringUtils.SEPARATOR + progressCategory.getParentId());
progressCategory.setRelevancyStructure(parent.getRelevancyStructure());
if (PgsRelevancyStructureEnum.MATRIX.getValue().equals(parent.getRelevancyStructure())) {
progressCategory.setMatrixName(parent.getMatrixName());
progressCategory.setMatrixId(parent.getMatrixId());
}
} }
// 计算产值 // 计算产值
if (ownerPrice != null && total != null && ownerPrice.compareTo(BigDecimal.ZERO) >= 0 && total.compareTo(BigDecimal.ZERO) >= 0) { if (ownerPrice != null && total != null && ownerPrice.compareTo(BigDecimal.ZERO) >= 0 && total.compareTo(BigDecimal.ZERO) >= 0) {

View File

@ -30,12 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
DATE_FORMAT( a.create_time, '%Y-%m' ) AS yf DATE_FORMAT( a.create_time, '%Y-%m' ) AS yf
FROM FROM
bus_bidding_limit_list AS a bus_bidding_limit_list AS a
<where> where
a.project_id = #{projectId} a.project_id = #{projectId}
<if test="planMonth != null and planMonth!='' "> <if test="planMonth != null and planMonth!='' ">
and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth} and DATE_FORMAT(a.create_time,'%Y-%m') = #{planMonth}
</if> </if>
</where>
GROUP BY GROUP BY
yf, yf,
a.NAME, a.NAME,