Example #1
0
 @Override
 public void saveSqmjxxb(Sqmjxxb entity, SessionBean sessionBean) {
   entity.setId(UUID.create());
   setSaveProperties(entity, sessionBean);
   sqmjxxbDao.saveSqmjxxb(entity);
   this.ryRylxfsxxbService.saveLxdh(entity.getRyid(), entity.getLxdh(), sessionBean);
 }
 @Override
 public void save(RyZyjwryxxb entity, SessionBean sessionBean) {
   entity.setId(UUID.create()); // 生成主键
   BaseService.setSaveProperties(entity, sessionBean);
   if (queryCount(entity) == 0) {
     this.ryZyjwryxxbDao.save(entity, sessionBean);
   }
 }
Example #3
0
 /** 人防信息添加 */
 @SuppressWarnings({"unchecked", "static-access"})
 @Override
 public void insertRfxx(AqffRfxxb entity, SessionBean sessionBean) {
   setSaveProperties(entity, sessionBean);
   entity.setRfid(entity.getId());
   rfxxbDao.insertRfxx(entity);
   List<Aqffrfryxxb> list = new ArrayList<Aqffrfryxxb>();
   JSONArray jcxmxJsonArray = JSONArray.fromObject(entity.getRyAll());
   List<Aqffrfryxxb> listForIU = new ArrayList<Aqffrfryxxb>();
   listForIU = (List<Aqffrfryxxb>) jcxmxJsonArray.toCollection(jcxmxJsonArray, Aqffrfryxxb.class);
   for (int i = 0; i < listForIU.size(); i++) {
     Aqffrfryxxb rfry = listForIU.get(i);
     rfry.setRfid(entity.getId());
     if (null != rfry.getId() && rfry.getId() != "" && !"".equals(rfry.getId())) {
       setUpdateProperties(rfry, sessionBean);
       rfxxbDao.updateRfcyxx(rfry);
     } else {
       rfry.setId(UUID.create());
       setSaveProperties(rfry, sessionBean);
       rfxxbDao.saveRfcyxx(rfry);
     }
   }
   if (null != entity.getRydelete() || entity.getRydelete().equals("")) {
     JSONArray deleteJsonArray = JSONArray.fromObject(entity.getRydelete());
     list = null;
     list = (List<Aqffrfryxxb>) deleteJsonArray.toCollection(deleteJsonArray, Aqffrfryxxb.class);
     for (int i = 0; i < list.size(); i++) {
       Aqffrfryxxb rfry = list.get(i);
       if (!"null".equals(rfry) && null != rfry) {
         rfry.setRfid(entity.getId());
         setUpdateProperties(rfry, sessionBean);
         rfxxbDao.deleteRfcyxx(rfry);
       }
     }
   }
 }
Example #4
0
 /** 人防成员信息添加 */
 @Override
 public void saveRfcyxx(Aqffrfryxxb entity, SessionBean sessionBean) {
   entity.setId(UUID.create());
   setSaveProperties(entity, sessionBean);
   rfxxbDao.saveRfcyxx(entity);
 }