Commit eed7b175 authored by tanyang's avatar tanyang

修复措施费bug

parent 06587a01
...@@ -19,5 +19,9 @@ public interface CbCostMeasureActualMapper extends BaseMapper<CbCostMeasureActua ...@@ -19,5 +19,9 @@ public interface CbCostMeasureActualMapper extends BaseMapper<CbCostMeasureActua
List<CbCostMeasureActualVo> getMonthActualCostList(@Param("projectId") Long projectId,@Param("month") String month); List<CbCostMeasureActualVo> getMonthActualCostList(@Param("projectId") Long projectId,@Param("month") String month);
// List<CbCostMeasureActualVo> getMonthActualCostListByLevel(@Param("level") Integer level,@Param("projectId") Long projectId,@Param("month") String month);
BigDecimal selectSumData(CbCostMeasureActualSaveBo bo); BigDecimal selectSumData(CbCostMeasureActualSaveBo bo);
BigDecimal selectMonthProjectVolumeByLevel(@Param("level") Integer level,@Param("projectId") Long projectId,@Param("month") String month);
} }
\ No newline at end of file
...@@ -4,4 +4,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,4 +4,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.CbProjectExpenseSummary; import com.dsk.cscec.domain.CbProjectExpenseSummary;
public interface CbProjectExpenseSummaryMapper extends BaseMapper<CbProjectExpenseSummary> { public interface CbProjectExpenseSummaryMapper extends BaseMapper<CbProjectExpenseSummary> {
} }
\ No newline at end of file
...@@ -6,6 +6,7 @@ import com.dsk.cscec.domain.CbCostMeasureActual; ...@@ -6,6 +6,7 @@ import com.dsk.cscec.domain.CbCostMeasureActual;
import com.dsk.cscec.domain.bo.CbCostMeasureActualBo; import com.dsk.cscec.domain.bo.CbCostMeasureActualBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo; import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo; import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -23,5 +24,7 @@ public interface ICbCostMeasureActualService extends IService<CbCostMeasureActua ...@@ -23,5 +24,7 @@ public interface ICbCostMeasureActualService extends IService<CbCostMeasureActua
List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month); List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month);
BigDecimal selectSumData(CbCostMeasureActualSaveBo bo); BigDecimal selectSumData(CbCostMeasureActualSaveBo bo);
BigDecimal selectMonthProjectVolumeByLevel(Integer level, Long projectId, String month);
} }
...@@ -245,6 +245,12 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C ...@@ -245,6 +245,12 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
saveList.add(cbCostMeasureActual); saveList.add(cbCostMeasureActual);
} }
cbCostMeasureActualService.saveOrUpdateBatch(saveList); cbCostMeasureActualService.saveOrUpdateBatch(saveList);
CbCostMeasureActual cbCostMeasureActual = saveList.get(0);
//todo 查询最新的二级费用合计, 用于更新一级费用项
// cbCostMeasureActualService.selectMonthProjectVolumeByLevel(1,cbCostMeasureActual.GET);
//更新
} }
@Override @Override
......
...@@ -29,4 +29,9 @@ public class ICbCostMeasureActualServiceImpl extends ServiceImpl<CbCostMeasureAc ...@@ -29,4 +29,9 @@ public class ICbCostMeasureActualServiceImpl extends ServiceImpl<CbCostMeasureAc
public BigDecimal selectSumData(CbCostMeasureActualSaveBo bo) { public BigDecimal selectSumData(CbCostMeasureActualSaveBo bo) {
return baseMapper.selectSumData(bo); return baseMapper.selectSumData(bo);
} }
@Override
public BigDecimal selectMonthProjectVolumeByLevel(Integer level, Long projectId, String month) {
return baseMapper.selectMonthProjectVolumeByLevel(level,projectId,month);
}
} }
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
</select> </select>
<select id="getMonthActualCostList" resultType="com.dsk.cscec.domain.vo.CbCostMeasureActualVo"> <select id="getMonthActualCostList" resultType="com.dsk.cscec.domain.vo.CbCostMeasureActualVo">
SELECT t1.item_content, t.cost_effective SELECT t1.item_content, t.project_volume
FROM cb_cost_measure_actual t FROM cb_cost_measure_actual t
inner JOIN cb_cost_measure t1 ON t1.id=t.plan_measure_id inner JOIN cb_cost_measure t1 ON t1.id=t.plan_measure_id
WHERE WHERE
...@@ -190,4 +190,14 @@ ...@@ -190,4 +190,14 @@
SELECT SUM(t.project_volume) measureTotal FROM cb_cost_measure_actual t WHERE t.plan_measure_id=#{planMeasureId} SELECT SUM(t.project_volume) measureTotal FROM cb_cost_measure_actual t WHERE t.plan_measure_id=#{planMeasureId}
and t.month &lt;#{month} and t.month &lt;#{month}
</select> </select>
<select id="selectMonthProjectVolumeByLevel" resultType="java.math.BigDecimal">
SELECT SUM(t.project_volume)
FROM cb_cost_measure_actual t
inner JOIN cb_cost_measure t1 ON t1.id=t.plan_measure_id
WHERE
t1.project_id=#{projectId}
AND t1.level=#{level}
AND t.`month`=#{month}
</select>
</mapper> </mapper>
\ No newline at end of file
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