@@ -75,4 +75,6 @@ public interface ZsyzSbbzbMapper
List<ZsyzSbbzb> selectZsyzSbbzbListDc(ZsyzSbbzb zsyzSbbzb);
List<ZsyzSbbzb> ldpsList(ZsyzSbbzb zsyzSbbzb);
+
+ int ldpsListCount();
}
@@ -170,7 +170,10 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
map.put("sk", sk);
//todo 问题项目 批示 数据放到redis 中缓存, 1小时更新一次
map.put("wt", 0);
- map.put("ps", 0);
+ //统计批示项目数量
+ int ps = zsyzSbbzbMapper.ldpsListCount();
+ map.put("ps", ps);
map.put("all", all);
redisCache.setCacheObject(INDEX, map,1, TimeUnit.HOURS);
@@ -393,6 +393,13 @@
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
+ <select id="ldpsListCount" resultType="java.lang.Integer">
+ select count(1) from (select s.id
+ from zsyz_sbbzb s
+ left join zsyz_shyj j on s.id = j.xm_id
+ left join zsyz_ldps l on l.source_id = j.id
+ where s.is_del = 'N' and l.psnr is not null group by s.id ) a
+ </select>
<insert id="insertZsyzSbbzb" parameterType="ZsyzSbbzb" useGeneratedKeys="true" keyProperty="id">
insert into zsyz_sbbzb