jiazx0107@163.com
2023-05-26 6f4a366cad9109ddc338fd13c9d43ca2ce516f6b
igds-inout/src/main/java/com/ld/igds/m/service/HCreditService.java
@@ -1,7 +1,7 @@
package com.ld.igds.m.service;
import com.bstek.bdf2.core.orm.hibernate.HibernateDao;
import com.ld.igds.models.Credit;
import com.ld.igds.models.InoutCredit;
import com.ld.igds.util.ContextUtil;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.Session;
@@ -17,8 +17,8 @@
@Component
public class HCreditService extends HibernateDao {
   public List<Credit> listCredit(Map<String, Object> param) {
      String hql = " from " + Credit.class.getName() + " where companyId=:companyId and deptId =:deptId ";
   public List<InoutCredit> listCredit(Map<String, Object> param) {
      String hql = " from " + InoutCredit.class.getName() + " where companyId=:companyId and deptId =:deptId ";
      Map<String, Object> args = new HashMap<String, Object>();
      args.put("companyId", ContextUtil.getCompanyId());
@@ -42,7 +42,7 @@
      return this.query(hql,args);
   }
   public String saveCredit(Credit data) {
   public String saveCredit(InoutCredit data) {
      Session session = this.getSessionFactory().openSession();
      try {
         if(StringUtils.isEmpty(data.getCompanyId())){
@@ -62,7 +62,7 @@
      return null;
   }
   public String delCredit(Credit data) {
   public String delCredit(InoutCredit data) {
      Session session = this.getSessionFactory().openSession();
      try {
         if(null == data.getCompanyId()) data.setCompanyId(ContextUtil.getCompanyId());