2-(E-teller)关于添加流程辅助记录

本文介绍了一个刑事案件从报案到立案过程中的关键步骤,包括更新案件状态、记录操作历史及案件流程等,确保案件处理流程准确无误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 //更新主表记录的案件状态为”2-已立案“
        casemain.setStatus("2");
        flag = getCommonManager().update(casemain);
        if (!flag)
        {
            setError("刑事案件主表的案件状态出错,新增立案阶段信息失败!");
            getCommonManager().delete(casepenal);
            return;
        }
       
        if(penalrecord == null){
            penalrecord = new DunCasePenalraiserecord();
            penalrecord.setCaseid(casemain.getCaseid());
            getCommonManager().insert(penalrecord);
        }
        //更新报案记录表记录的案件状态为”2-已立案“
        penalrecord.setAcceptunit(this.getAcceptunit());
        penalrecord.setRaiseday(Function.dateToString(this.getRaiseday()));
        penalrecord.setIntereststopday(Function.dateToString(this.getIntereststopday()));
        penalrecord.setRaiseuserid(this.getRaiseuserid());
        penalrecord.setStatus("2");
        getCommonManager().update(penalrecord);
       
        //更新以前的操作记录
  Map flowcondition = new HashMap();
  DunCaseFlowrecord[]  recordresult = new DunCaseFlowrecord[0];
  flowcondition.put(TableFields.DUN_CASE_FLOWRECORD[0],casemain.getCaseid());
  //查出状态为"状态中"的记录
  flowcondition.put(TableFields.DUN_CASE_FLOWRECORD[1],"0");
  try {
            recordresult = (DunCaseFlowrecord[])getCommonManager().list(DunCaseFlowrecord.class,flowcondition)
                           .toArray(new DunCaseFlowrecord[0]);
            if(recordresult.length>0){
                //改为"已转入下一状态"
                recordresult[0].setStatus("1");
                this.getCommonManager().update(recordresult[0]);
            } 
        } catch (DaoException e) {
            e.printStackTrace();
        }
       
        //添加新案件流程记录
        flowrecord = new DunCaseFlowrecord();
       
        long recordid = getCommonManager().getSequenceNextVal(
                getSystemConfigValue(AgreeTapestry.SYSP_DATABASE_TYPE),
                SequenceNameConstants.SEQUENCE_NAME_SYS_CASEFLOWRECORDID);
  if (recordid <= 0)
  {
      setError("获取Sequence值失败!["
              + SequenceNameConstants.SEQUENCE_NAME_SYS_CASEFLOWRECORDID
              + "]");
      return;
  }
  flowrecord.setRecid(String.valueOf(recordid));
  flowrecord.setCaseid(casemain.getCaseid());
  flowrecord.setCasetype("1");
  flowrecord.setOpday(Function.getcurdate());
  flowrecord.setOpuserid(this.getAgreeVisit().getUserId());
  flowrecord.setOptime(Function.getcurtime());
  //状态流转
  flowrecord.setOptype("2");
  flowrecord.setStartday(Function.getcurdate());
  //状态中
  flowrecord.setStatus("0");
  //案件状态转化完后的结果 2-"已立案"
  flowrecord.setOpobject("2");
  flowrecord.setRemark("案件转入已立案状态!");
  this.getCommonManager().insert(flowrecord);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值