CZT
2023-11-27 c206acfaedc69c390fb67daa81bc686f58a212ef
igds-inout/src/main/java/com/ld/igds/m/service/HPlanManageService.java
@@ -179,15 +179,36 @@
    public List<InoutPlan> getPlanId(InoutPlan plan) {
        String hql = " from " + InoutPlan.class.getName()
                + " where companyId =:companyId and deptId =:deptId and year =:year";
                + " where companyId =:companyId and year =:year";
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("companyId", plan.getCompanyId());
        args.put("deptId", plan.getDeptId());
        args.put("year", plan.getYear());
        hql += " order by createTime desc";
        return this.query(hql, args);
    }
    public void pagePlanDetail(Page<InoutPlanDetail> page, Map<String, Object> param)
            throws Exception {
        String hql = " from " + InoutPlanDetail.class.getName()
                + " where 1=1 ";
        Map<String, Object> args = new HashMap<String, Object>();
        if (null != param) {
            String str = (String) param.get("key");
            if (StringUtils.isNotEmpty(str)) {
                hql += " and year like :year ";
                args.put("year", "%" + str + "%");
            }
        }
        String count = "select count(*) " + hql;
        hql += " order by updateTime desc";
        this.pagingQuery(page, hql, count, args);
    }
}