修改进度、产值

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不能为空")
private Long parentId;
/**
* 子项目id
*/
@NotNull(message = "子项目id不能为空")
private Long projectId;
/**
* 方阵id
*/
@NotNull(message = "方阵id不能为空")
private Long matrixId;
/**
@ -63,7 +68,6 @@ public class PgsProgressCategoryCreateReq implements Serializable {
/**
* 关联结构(1子项目 2方阵)
*/
@NotBlank(message = "关联结构不能为空")
private String relevancyStructure;
/**

View File

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

View File

@ -271,6 +271,11 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
throw new ServiceException("超过最大层级", HttpStatus.BAD_REQUEST);
}
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) {

View File

@ -6,40 +6,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="purchaseValueAA" resultType="org.dromara.out.domain.BusProcurement">
<!-- SELECT-->
<!-- b.name,-->
<!-- b.specification,-->
<!-- b.unit,-->
<!-- (SELECT SUM(accepted_quantity) FROM mat_material_receive_item WHERE project_id = #{projectId} and name = b.name and specification = b.specification) as acceptedQuantity,-->
<!-- a.unit_price,-->
<!-- DATE_FORMAT(b.create_time,'%Y-%m') as yf-->
<!-- FROM-->
<!-- bus_bidding_limit_list as a-->
<!-- RIGHT JOIN mat_material_receive_item as b on b.`name` = a.`name` and b.specification = a.specification-->
<!-- WHERE-->
<!-- b.project_id = #{projectId}-->
<!-- <if test="planMonth != null and planMonth!=''">-->
<!-- and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth}-->
<!-- </if>-->
<!-- GROUP BY yf,b.name,b.specification-->
SELECT
a.NAME,
a.specification,
a.unit,
a.unit_price as unitPrice,
DATE_FORMAT( a.create_time, '%Y-%m' ) AS yf
FROM
bus_bidding_limit_list AS a
<where>
a.project_id = #{projectId}
<if test="planMonth != null and planMonth!='' ">
and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth}
</if>
</where>
GROUP BY
yf,
a.NAME,
a.specification
<!-- SELECT-->
<!-- b.name,-->
<!-- b.specification,-->
<!-- b.unit,-->
<!-- (SELECT SUM(accepted_quantity) FROM mat_material_receive_item WHERE project_id = #{projectId} and name = b.name and specification = b.specification) as acceptedQuantity,-->
<!-- a.unit_price,-->
<!-- DATE_FORMAT(b.create_time,'%Y-%m') as yf-->
<!-- FROM-->
<!-- bus_bidding_limit_list as a-->
<!-- RIGHT JOIN mat_material_receive_item as b on b.`name` = a.`name` and b.specification = a.specification-->
<!-- WHERE-->
<!-- b.project_id = #{projectId}-->
<!-- <if test="planMonth != null and planMonth!=''">-->
<!-- and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth}-->
<!-- </if>-->
<!-- GROUP BY yf,b.name,b.specification-->
SELECT
a.NAME,
a.specification,
a.unit,
a.unit_price as unitPrice,
DATE_FORMAT( a.create_time, '%Y-%m' ) AS yf
FROM
bus_bidding_limit_list AS a
where
a.project_id = #{projectId}
<if test="planMonth != null and planMonth!='' ">
and DATE_FORMAT(a.create_time,'%Y-%m') = #{planMonth}
</if>
GROUP BY
yf,
a.NAME,
a.specification
</select>
<select id="purchaseValueBB" resultType="org.dromara.out.domain.BusProcurement">