示例#1
0
 @Override
 public void saveDomain(BaseBusinessDomain busDomain, UserDomain user) throws Exception {
   BgMpjDomain domain = (BgMpjDomain) busDomain;
   BgMpjDomain bgDomain = null;
   BgMpj bo = new BgMpj();
   if (StringUtils.isNotBlank(domain.getBgDjxh())) {
     bgDomain = (BgMpjDomain) this.getDomainByKey(domain);
   }
   if (bgDomain != null) {
     bgDomain.setXm(domain.getXm());
     bgDomain.setGs(domain.getGs());
     bgDomain.setZw(domain.getZw());
     bgDomain.setDz(domain.getDz());
     bgDomain.setDh(domain.getDh());
     bgDomain.setSj(domain.getSj());
     bgDomain.setCz(domain.getCz());
     bgDomain.setWz(domain.getWz());
     bgDomain.setYb(domain.getYb());
     bgDomain.setDy(domain.getDy());
     bgDomain.setXgrCzyDjxh(user.getCzyDjxh());
     bgDomain.setXgrq(SysDateUtil.getCurrentDate());
     BeanUtils.copyProperties(bo, bgDomain);
     businessSqlMapClientTemplate.update("updateBgMpjByKey", bo);
   } else {
     domain.setYxbz("Y");
     domain.setCjrq(SysDateUtil.getCurrentDate());
     domain.setXgrq(SysDateUtil.getCurrentDate());
     domain.setCzyDjxh(user.getCzyDjxh());
     domain.setCjrCzyDjxh(user.getCzyDjxh());
     domain.setXgrCzyDjxh(user.getCzyDjxh());
     BeanUtils.copyProperties(bo, domain);
     businessSqlMapClientTemplate.insert("insertBgMpj", bo);
   }
 }
示例#2
0
  @Override
  protected void doMyInitMx(BaseBusinessDomain baseBusinessDomain, UserDomain userDomain)
      throws Exception {
    CwYsyfSrdjDomain domain = (CwYsyfSrdjDomain) baseBusinessDomain;
    dao.initDomainMx(domain);

    domain.setJbrCzyDjxh(userDomain.getCzyDjxh());

    domain.setSsJgbm(userDomain.getGsbm());
  }
示例#3
0
 public List<BaseBusinessDomain> selectAll(BaseBusinessDomain busDomain, UserDomain user)
     throws Exception {
   BgMpjDomain domain = (BgMpjDomain) busDomain;
   PageDomain page = domain.getPage();
   Map<String, String> map = new HashMap<String, String>();
   int start = page.getStart();
   int pagSize = page.getPageSize();
   map.put(XtglConstants.ORDER_STR, page.getOrderStr());
   if (domain.getGs() != null && !"".equals(domain.getGs())) {
     String gs = SysEncodeUtil.UTF82ISO(domain.getGs());
     map.put("gs", "%" + gs + "%");
   }
   if (domain.getXm() != null && !"".equals(domain.getXm())) {
     String xm = SysEncodeUtil.UTF82ISO(domain.getXm());
     map.put("xm", "%" + xm + "%");
   }
   if (domain.getDz() != null && !"".equals(domain.getDz())) {
     String dz = SysEncodeUtil.UTF82ISO(domain.getDz());
     map.put("dz", "%" + dz + "%");
   }
   map.put("czyDjxh", user.getCzyDjxh());
   int count =
       ((Integer) (businessSqlMapClientTemplate.queryForObject("getBgMpjRowCount", map)))
           .intValue();
   page.setTotalRecords(count);
   List<BaseBusinessDomain> dataList =
       businessSqlMapClientTemplate.queryForList("selectBgMpjPage", map, start, pagSize);
   return dataList;
 }
示例#4
0
 @Override
 protected void doMyDownload(BaseBusinessDomain baseBusinessDomain, UserDomain userDomain)
     throws Exception {
   CwYsyfSrdjDomain domain = (CwYsyfSrdjDomain) baseBusinessDomain;
   domain.setZgsbm(userDomain.getZgsbm());
   List<BaseBusinessDomain> dataList = dao.downloadList(domain);
   domain.setDataList(dataList);
 }
示例#5
0
 @Override
 protected void doMyInit(BaseBusinessDomain baseBusinessDomain, UserDomain userDomain)
     throws Exception {
   CwYsyfSrdjDomain domain = (CwYsyfSrdjDomain) baseBusinessDomain;
   // 在此添加初始化相应代码
   domain.setYfjsfDmList(dao.getLbList());
   domain.setSsJgbm(userDomain.getGsbm());
 }
示例#6
0
  // @Transactional(readOnly = true, propagation = Propagation.REQUIRED)
  public void plDj(BaseBusinessDomain baseBusinessDomain, UserDomain userDomain) throws Exception {
    CwYsyfSrdjDomain domain = (CwYsyfSrdjDomain) baseBusinessDomain;
    List<String> ysyfDjxhs = domain.getYsyfDjxhs();
    if (null == ysyfDjxhs || ysyfDjxhs.isEmpty()) return;

    // 删除结算-开票申请-对帐清单
    for (String xh : ysyfDjxhs) {

      CwYsyfSrdjDomain srdjDmain = (CwYsyfSrdjDomain) dao.getYsyfSrdj(xh);
      CwYsyfSrdjDomain srdjDom = new CwYsyfSrdjDomain();

      srdjDom.setYsyfDjxh(srdjDmain.getYsyfDjxh());
      srdjDom.setYfjsfDm(srdjDmain.getYfjsfDm());
      srdjDom.setYfjsfDjxh(srdjDmain.getYfjsfDjxh());
      if (StringUtils.isNotEmpty(srdjDmain.getYfjsfDjmc())) {
        srdjDom.setFkfmc(srdjDmain.getYfjsfDjmc());
      } else {
        srdjDom.setFkfmc(srdjDmain.getYfjsfMc());
      }
      //			String yhCshDjxh = cshDao.getYhCshDjxhWhenXj(userDomain.getGsbm());
      //			if(StringUtils.isBlank(yhCshDjxh)){
      //				throw new DiyServiceException("请先在货币资产初始化中维护现金资产!");
      //			}
      srdjDom.setYhCshDjxh(domain.getYhCshDjxh());
      srdjDom.setRq(domain.getRq());
      srdjDom.setZcflDm(domain.getZcflDm());
      if ("12".equals(domain.getZcflDm())) {
        srdjDom.setZffsDm("2");
      } else if ("11".equals(domain.getZcflDm())) {
        srdjDom.setZffsDm("1");
      } else {
        srdjDom.setZffsDm("3");
      }
      srdjDom.setJe(srdjDmain.getWsfJe());
      srdjDom.setJbrCzyDjxh(userDomain.getCzyDjxh());
      srdjDom.setDjJgbm(userDomain.getBmbm());
      srdjDom.setSsJgbm(userDomain.getGsbm());
      srdjDom.setBz("批量登记产生!");
      dao.saveDomain(srdjDom, userDomain);
      dao.callPHyglCwglSrdjHxcl(srdjDom.getSrDjxh(), "0");
    }
  }
示例#7
0
 @Override
 protected void doMyInit(BaseBusinessDomain baseBusinessDomain, UserDomain userDomain)
     throws Exception {
   JcFcQkTjDomain domain = (JcFcQkTjDomain) baseBusinessDomain;
   domain.setSjJgbm(userDomain.getGsbm());
   Calendar cal = Calendar.getInstance();
   cal.set(cal.DAY_OF_YEAR, 1);
   SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
   domain.setRqq(sim.format(cal.getTime()));
   domain.setRqz(SysDateUtil.getCurrentDate());
 }
示例#8
0
 public List<BaseBusinessDomain> downloadList(
     BaseBusinessDomain baseBusinessDomain, UserDomain user) throws Exception {
   BgMpjDomain domain = (BgMpjDomain) baseBusinessDomain;
   Map<String, String> map = new HashMap<String, String>();
   if (domain.getGs() != null && !"".equals(domain.getGs())) {
     String gs = SysEncodeUtil.UTF82ISO(domain.getGs());
     map.put("gs", "%" + gs + "%");
   }
   if (domain.getXm() != null && !"".equals(domain.getXm())) {
     String xm = SysEncodeUtil.UTF82ISO(domain.getXm());
     map.put("xm", "%" + xm + "%");
   }
   if (domain.getDz() != null && !"".equals(domain.getDz())) {
     String dz = SysEncodeUtil.UTF82ISO(domain.getDz());
     map.put("dz", "%" + dz + "%");
   }
   map.put("czyDjxh", user.getCzyDjxh());
   // 检索数据
   List<BaseBusinessDomain> dataList =
       businessSqlMapClientTemplate.queryForList("selectBgMpjAll", map);
   return dataList;
 }