public void removeSWMtpactionhead(IFWUserInfo userInfo, String[] IDList, double mweight) {
   try {
     for (int i = 0; i < IDList.length; i++) {
       Tpactionline tpactionlineparams = new Tpactionline();
       tpactionlineparams.setMheadguid(IDList[i]);
       tpactionlineparams.setMdtype(HConstants.A);
       tpactionlineparams.setMweight(mweight);
       List<Tpactionline> listDtype =
           tpactionlineBusiness.findTpactionlineByHeadguid(userInfo, tpactionlineparams);
       int typevaluecount = listDtype.size();
       if (typevaluecount > 0) {
         throw new BusinessException("该派车单有实际派车且整车净重大于零不可删除!");
       }
       // 通过headid查看全部派车单主表
       Tpactionline tpactionline = new Tpactionline();
       tpactionline.setMheadguid(IDList[i]);
       tpactionline.setMweight(mweight);
       List<Tpactionline> listline =
           tpactionlineBusiness.findTplineByHeadguid(userInfo, tpactionline);
       int count = listline.size();
       for (int j = 0; j < count; j++) {
         tpactionlineBusiness.removeTpactionline(userInfo, listline.get(j).getMguid());
       }
       removeTpactionhead(userInfo, IDList[i]);
     }
   } catch (Exception e) {
     throw new BuilderException(e.getMessage());
   }
 }
 /**
  * 添加派车单主表
  *
  * @param Tpactionhead
  * @return 0
  */
 @Override
 public void saveTpactionhead(
     IFWUserInfo userInfo,
     Tpactionhead tpactionhead,
     Tpactionline tpactionline,
     SerialnumInfo serialnumInfo) {
   if (tpactionhead != null) {
     if (serialnumInfo != null) {
       serialnumBusiness.updateSerialnum(userInfo, serialnumInfo);
     }
     tpactionhead.setMcreatedate(PublicMethod.now());
     tpactionhead.setMactdate(PublicMethod.now());
     tpactionhead.setMcreateempID(userInfo.getUserID());
     tpactionhead.setMmodifydate(PublicMethod.now());
     tpactionhead.setMmodifyempID(userInfo.getUserID());
     tpactionhead.setMdtype(HConstants.P);
     tpactionheadMapper.insert(tpactionhead);
   }
   if (tpactionline != null) {
     String macttypeID = tpactionline.getMacttypeID();
     Tptrplanline trplanline =
         tptrplanlineBusiness.getTptrplanlineByID(userInfo, tpactionline.getMsguid());
     double prplanqty = 0.00;
     if (trplanline != null) {
       prplanqty = trplanline.getMexecqty();
     }
     if (HConstants.PLAN.equals(macttypeID)) {
       Tptrplanline updateLine = new Tptrplanline();
       updateLine.setMexecqty(tpactionline.getMplanqty() + prplanqty);
       updateLine.setMguid(tpactionline.getMsguid());
       updateLine.setMexecstate(HConstants.ONE);
       tptrplanlineBusiness.updateTptrplaneStatus(userInfo, updateLine);
     }
     tpactionline.setMdtype(HConstants.P);
     tpactionline.setMcreatedate(PublicMethod.now());
     tpactionline.setMcreateempID(userInfo.getUserID());
     tpactionline.setMmodifydate(PublicMethod.now());
     tpactionline.setMmodifyempID(userInfo.getUserID());
     tpactionlineMapper.insert(tpactionline);
   }
 }