企业剩余天数

This commit is contained in:
guoshengxiong 2024-06-21 10:36:49 +08:00
parent 54012cc383
commit 1f263fd275
5 changed files with 17 additions and 0 deletions

View File

@ -9,6 +9,8 @@ public class CountTaskProgressVo {
private Double projectTotalProgress;
@ApiModelProperty("承包商总进度%")
private Double enterpriseTotalProgress;
@ApiModelProperty("承包商剩余天数")
private Integer enterpriseSurplusDayNum;
@ApiModelProperty("项目总天数")
private Integer projectTotalDayNum;
@ApiModelProperty("项目剩余天数")

View File

@ -42,4 +42,5 @@ public interface XzTaskProgressMapper extends BaseMapper<XzTaskProgress> {
CountTaskProgressVo getMaxMinProgress(HashMap<String, Object> paramMap);
List<XzTaskProgress> statsByEnterprise(Map<String, Object> paramMap);
}

View File

@ -1,11 +1,13 @@
package com.zhgd.xmgl.modules.xz.mapper;
import com.alibaba.fastjson.JSONObject;
import com.zhgd.xmgl.modules.xz.entity.vo.CountEnterpriseVo;
import org.apache.ibatis.annotations.Mapper;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressTotal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -21,4 +23,5 @@ public interface XzTaskProgressTotalMapper extends BaseMapper<XzTaskProgressTota
void updateNotCurrent(XzTaskProgressTotal xzTaskProgressTotal);
List<CountEnterpriseVo> countEnterprise(@Param("param") Map<String, Object> param);
}

View File

@ -180,6 +180,12 @@
AND (p.enterprise_id = #{supplierEnterpriseId} OR p.enterprise_id IN ( SELECT t.id FROM project_enterprise t
WHERE find_in_set(#{supplierEnterpriseId}, ancestors) ))
</if>
<if test="enterpriseId != null and enterpriseId != ''">
AND (p.enterprise_id = #{enterpriseId} OR p.enterprise_id IN ( SELECT t.enterprise_id FROM
project_enterprise t
WHERE find_in_set((select id from project_enterprise where project_sn=#{projectSn} and enterprise_id =
#{enterpriseId}), ancestors) ))
</if>
</select>
<select id="statsByEnterprise" resultType="com.zhgd.xmgl.modules.xz.entity.XzTaskProgress">

View File

@ -92,6 +92,8 @@ public class XzTaskProgressServiceImpl extends ServiceImpl<XzTaskProgressMapper,
@Autowired
XzMilestoneMapper xzMilestoneMapper;
@Autowired
XzTaskProgressMapper xzTaskProgressMapper;
@Autowired
private QualityRegionMapper qualityRegionMapper;
@Autowired
private XzSupplierQualificationApplyServiceImpl xzSupplierQualificationApplyService;
@ -570,6 +572,9 @@ public class XzTaskProgressServiceImpl extends ServiceImpl<XzTaskProgressMapper,
} else {
vo.setEnterpriseTotalProgress(0D);
}
CountTaskProgressVo surplusDayNum = xzTaskProgressMapper.getMaxMinProgress(paramMap);
vo.setEnterpriseSurplusDayNum(surplusDayNum.getProjectSurplusDayNum());
paramMap.put("enterpriseId", null);
CountTaskProgressVo vo1 = baseMapper.getMaxMinProgress(paramMap);
vo.setProjectTotalDayNum(vo1.getProjectTotalDayNum());
vo.setProjectSurplusDayNum(vo1.getProjectSurplusDayNum());