提交 5f345587 authored 作者: 张龙发's avatar 张龙发

规划计划时间轴代码修改

上级 d3c70ef5
package com.elephant.framework.galaxy.aroad.module.zhjc.entity;
import lombok.Data;
import java.util.List;
@Data
public class ZhjcGhjhTimeline {
private String oneDate;
private String oneXmName;
private String oneJslx;
private String oneJsxz;
private List<ZhjcGhjhTimelineTwo> TwoData;
private String threeDate;
private Double threeZsnZy;
private Double threeZsnS;
private Double threeBnZy;
private Double threeBnS;
private String fourDate;
private String fourTbDate;
private Double fourTz;
}
package com.elephant.framework.galaxy.aroad.module.zhjc.entity;
import lombok.Data;
@Data
public class ZhjcGhjhTimelineTwo {
private String xmjdHy;
private String date;
}
...@@ -2,6 +2,7 @@ package com.elephant.framework.galaxy.aroad.module.zhjc.mapper; ...@@ -2,6 +2,7 @@ package com.elephant.framework.galaxy.aroad.module.zhjc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcGhjh; import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcGhjh;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcGhjhTzzh;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -19,6 +20,18 @@ import java.util.List; ...@@ -19,6 +20,18 @@ import java.util.List;
*/ */
public interface ZhjcGhjhMapper extends BaseMapper<ZhjcGhjh> { public interface ZhjcGhjhMapper extends BaseMapper<ZhjcGhjh> {
/**
* 获取第四阶段填报时间
* @return
*/
List<ZhjcGhjhTzzh> getFourDataTbsj(@Param("xmid") String xmid);
/**
* 获取第四阶段累计完成投资
* @return
*/
Double getFourDataWctzMonth(@Param("xmid") String xmid);
/** /**
* 获取项目跟踪列表本年数据资金 * 获取项目跟踪列表本年数据资金
* @return * @return
......
...@@ -22,7 +22,7 @@ public interface ZhjcGhjhService extends IService<ZhjcGhjh> { ...@@ -22,7 +22,7 @@ public interface ZhjcGhjhService extends IService<ZhjcGhjh> {
/** /**
* 根据项目编码查询项目数据 * 根据项目编码查询项目数据
*/ */
List<ZhjcGhjh> getZhjcGhjhByXmbm(String xmbm); ZhjcGhjhTimeline getZhjcGhjhByXmbm(String xmbm);
/** /**
* 获取项目跟踪页面数据 * 获取项目跟踪页面数据
......
...@@ -44,8 +44,38 @@ public class ZhjcGhjhServiceImpl extends ServiceImpl<ZhjcGhjhMapper, ZhjcGhjh> i ...@@ -44,8 +44,38 @@ public class ZhjcGhjhServiceImpl extends ServiceImpl<ZhjcGhjhMapper, ZhjcGhjh> i
/** /**
* 根据项目编码查询项目数据 * 根据项目编码查询项目数据
*/ */
public List<ZhjcGhjh> getZhjcGhjhByXmbm(String xmbm) { public ZhjcGhjhTimeline getZhjcGhjhByXmbm(String xmbm) {
return zhjcGhjhMapper.selectList(Wrappers.<ZhjcGhjh>query().lambda().eq(ZhjcGhjh::getXmbm,xmbm).orderByAsc(ZhjcGhjh::getXmjd)); ZhjcGhjhTimeline zhjcGhjhTimeline = new ZhjcGhjhTimeline();
List<ZhjcGhjh> zhjcGhjhs = zhjcGhjhMapper.selectList(Wrappers.<ZhjcGhjh>query().lambda().eq(ZhjcGhjh::getXmbm,xmbm));
List<ZhjcGhjhTimelineTwo> TwoDatas = new ArrayList<>();
for(ZhjcGhjh zhjcGhjh : zhjcGhjhs) {
if("10".equals(zhjcGhjh.getXmjd())) {
zhjcGhjhTimeline.setOneDate(zhjcGhjh.getCreatetime());
zhjcGhjhTimeline.setOneJslx(zhjcGhjh.getXmlx());
zhjcGhjhTimeline.setOneJsxz(zhjcGhjh.getJsxz());
zhjcGhjhTimeline.setOneXmName(zhjcGhjh.getXmmc());
}else if("30".equals(zhjcGhjh.getXmjd())) {
String year = Calendar.getInstance().get(Calendar.YEAR)+"";
zhjcGhjhTimeline.setThreeBnS(zhjcGhjhMapper.getTableBnZJData(zhjcGhjh.getXmid(),"S",year));
zhjcGhjhTimeline.setThreeBnZy(zhjcGhjhMapper.getTableBnZJData(zhjcGhjh.getXmid(),"Z",year));
zhjcGhjhTimeline.setThreeDate(zhjcGhjh.getCreatetime());
zhjcGhjhTimeline.setThreeZsnS(zhjcGhjhMapper.getTableZsnZJData(zhjcGhjh.getXmid(),"S",year));
zhjcGhjhTimeline.setThreeZsnZy(zhjcGhjhMapper.getTableZsnZJData(zhjcGhjh.getXmid(),"Z",year));
}else if("40".equals(zhjcGhjh.getXmjd())) {
zhjcGhjhTimeline.setFourDate(zhjcGhjh.getCreatetime());
zhjcGhjhTimeline.setFourTbDate(zhjcGhjhMapper.getFourDataTbsj(zhjcGhjh.getXmid()).get(0).getTbsj());
zhjcGhjhTimeline.setFourTz(zhjcGhjhMapper.getFourDataWctzMonth(zhjcGhjh.getXmid()));
}else if(zhjcGhjh.getXmjd()!=null && zhjcGhjh.getXmjd().startsWith("2")) {
ZhjcGhjhTimelineTwo zhjcGhjhTimelineTwo = new ZhjcGhjhTimelineTwo();
zhjcGhjhTimelineTwo.setDate(zhjcGhjh.getCreatetime());
zhjcGhjhTimelineTwo.setXmjdHy(zhjcGhjh.getXmjdhy());
TwoDatas.add(zhjcGhjhTimelineTwo);
}
}
zhjcGhjhTimeline.setTwoData(TwoDatas);
return zhjcGhjhTimeline;
} }
......
...@@ -36,12 +36,23 @@ ...@@ -36,12 +36,23 @@
<!-- <result property="jhnf" column="jhnf"/>--> <!-- <result property="jhnf" column="jhnf"/>-->
<!-- </collection>--> <!-- </collection>-->
<!-- </resultMap>--> <!-- </resultMap>-->
<select id="getFourDataWctzMonth" resultType="java.lang.Double">
select sum(WCTZMonth) from t_zhjc_ghjh_tzzh where xmid=#{xmid}
</select>
<select id="getFourDataTbsj" resultType="com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcGhjhTzzh">
select * from t_zhjc_ghjh_tzzh where xmid=#{xmid} ORDER BY tbsj desc
</select>
<select id="queryLxGhjh" resultType="HashMap"> <select id="queryLxGhjh" resultType="HashMap">
select * from t_zhjc_ghjh where xmbm in (SELECT xmbm FROM `t_szgl_ghjh_gcxm` where gcxm_id = #{gcxmId}) select * from t_zhjc_ghjh where xmbm in (SELECT xmbm FROM `t_szgl_ghjh_gcxm` where gcxm_id = #{gcxmId})
</select> </select>
<select id="getTableBnZJData">
<select id="getTableBnZJData" resultType="java.lang.Double">
select sum(YXDTZ) from t_zhjc_ghjh_tzzh where xmid in (select xmid from t_zhjc_ghjh where xmbm in (select xmbm from t_zhjc_ghjh select sum(YXDTZ) from t_zhjc_ghjh_tzzh where xmid in (select xmid from t_zhjc_ghjh where xmbm in (select xmbm from t_zhjc_ghjh
where xmid=#{xmid})) where xmid=#{xmid}))
and xmjd='30'
and tzly=#{tzly} and tzly=#{tzly}
and tznf=#{tznf} and tznf=#{tznf}
</select> </select>
...@@ -49,6 +60,7 @@ ...@@ -49,6 +60,7 @@
<select id="getTableZsnZJData" resultType="java.lang.Double"> <select id="getTableZsnZJData" resultType="java.lang.Double">
select sum(YXDTZ) from t_zhjc_ghjh_tzzh where xmid in (select xmid from t_zhjc_ghjh where xmbm in (select xmbm from t_zhjc_ghjh select sum(YXDTZ) from t_zhjc_ghjh_tzzh where xmid in (select xmid from t_zhjc_ghjh where xmbm in (select xmbm from t_zhjc_ghjh
where xmid=#{xmid})) where xmid=#{xmid}))
and xmjd='30'
and tzly=#{tzly} and tzly=#{tzly}
and tznf &lt; #{tznf} and tznf &lt; #{tznf}
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论