Exemple #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);
   }
 }
Exemple #2
0
 // 获取发布日期(YYYY-MM-DD)
 public String getFbrq() {
   try {
     return SysDateUtil.getYyyyMmdd(this.fbrq);
   } catch (Exception e) {
     return this.fbrq;
   }
 }
Exemple #3
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());
 }