예제 #1
0
 @Override
 public Object mapRow(ResultSet rs, int arg1) throws SQLException {
   OperInfo oper = new OperInfo();
   oper.setMid(rs.getString("mid"));
   oper.setOperId(rs.getInt("oper_id"));
   oper.setOperPass(rs.getString("oper_pass"));
   oper.setOperEmail(rs.getString("oper_email"));
   oper.setOperName(rs.getString("oper_name"));
   oper.setOperTel(rs.getString("oper_tel"));
   oper.setState(rs.getInt("state"));
   oper.setLoginIn(rs.getString("logined"));
   oper.setMtype(rs.getInt("mtype"));
   return oper;
 }
 /**
  * запуск изменения оборотных ведомостей
  *
  * @param economicOper ХО
  * @param isOperRemoving признак удаления ХО, необходимо установить в <code>true</code> если ХО
  *     удаляется
  */
 public static void execute(final EconomicOper economicOper, final boolean isOperRemoving) {
   OperInfo oper = new OperInfo();
   oper.keepDate = new Timestamp(economicOper.getKeepDate().getTime());
   oper.fromId = economicOper.getFrom() != null ? economicOper.getFrom().getId() : null;
   oper.toId = economicOper.getTo() != null ? economicOper.getTo().getId() : null;
   oper.baseDocType =
       economicOper.getBaseDocType() != null ? economicOper.getBaseDocType().getUpCode() : null;
   oper.baseDocNumber = economicOper.getBaseDocNumber();
   oper.baseDocDate =
       economicOper.getBaseDocDate() != null
           ? new Timestamp(economicOper.getBaseDocDate().getTime())
           : null;
   oper.confirmDocType =
       economicOper.getConfirmDocType() != null
           ? economicOper.getConfirmDocType().getUpCode()
           : null;
   oper.confirmDocNumber = economicOper.getConfirmDocNumber();
   oper.confirmDocDate =
       economicOper.getConfirmDocDate() != null
           ? new Timestamp(economicOper.getConfirmDocDate().getTime())
           : null;
   oper.contractType =
       economicOper.getContractType() != null ? economicOper.getContractType().getUpCode() : null;
   oper.contractNumber = economicOper.getContractNumber();
   oper.contractDate =
       economicOper.getContractDate() != null
           ? new Timestamp(economicOper.getContractDate().getTime())
           : null;
   oper.specMark =
       economicOper.getSpecMark() != null ? economicOper.getSpecMark().getUpCode() : null;
   updateTurnover(economicOper.getId(), oper, isOperRemoving);
 }