TBExchangeAccountServiceI.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package cn.com.lzt.exchangeaccount.service;
  2. import cn.com.lzt.exchangeaccount.entity.TBExchangeAccountEntity;
  3. import org.jeecgframework.core.common.service.CommonService;
  4. import java.io.Serializable;
  5. import java.util.Date;
  6. import java.util.List;
  7. public interface TBExchangeAccountServiceI extends CommonService{
  8. public void delete(TBExchangeAccountEntity entity) throws Exception;
  9. public Serializable save(TBExchangeAccountEntity entity) throws Exception;
  10. public void saveOrUpdate(TBExchangeAccountEntity entity) throws Exception;
  11. /**
  12. * 变更余额
  13. * @param userId 用户id
  14. * @param year 年份
  15. * @param useTime 使用时间 在调休扣减时,判断能否使用去年账户
  16. * @param hour 加班时间
  17. * @param remark 备注
  18. * @param sourceType 来源类型
  19. * @param sourceId 来源id
  20. * @param yearMonth 工资结算月份 只在sourceType 为 buttonRemove 和buttonRemoveLastYear 时有用
  21. * @return 剩余
  22. */
  23. double changeBalance(String userId,String year,Date useTime ,double hour,String remark,TBExchangeAccountEntity.sourceType sourceType,String sourceId,String yearMonth);
  24. /**
  25. * 获得调休账户余额
  26. * @param userId
  27. * @param year 使用账户年份
  28. * @param useTime 使用时间
  29. * @return
  30. */
  31. double getBalance(String userId,String year,Date useTime);
  32. //清空去年所有账户余额
  33. boolean clearLastYearAccount(String yearMonth);
  34. //通过id清空账户
  35. boolean clearAccountByIds(List<String> ids, String yearMonth);
  36. /**
  37. *清空特定账户余额
  38. * @param userId 用户id
  39. * @param year 年
  40. * @param yearMonth 工资结算月份
  41. * @return
  42. */
  43. boolean clearAccount(String userId, String year,String yearMonth);
  44. /**
  45. * 根据date返回账户年度,如果date为null则按当前时间计算
  46. * @param date
  47. * @return
  48. */
  49. String getYear(Date date);
  50. }