Level : WORDPRESS BOOK LINKEDIN PATENT Send Mail 동냥하기 hajunho.com

129

살며 생각하며, / / 2020. 3. 26. 15:56
반응형




@interface statisticsTotalChecking : NSObject {}
@property   (nonatomic, strong) NSString    *cl_all;
@property   (nonatomic, strong) NSString    *cl_r;
@property   (nonatomic, strong) NSString    *cl_y;
@property   (nonatomic, strong) NSString    *cl_g;
@end


@implementation statisticsTotalChecking
@end


SqlUtils *db = [[SqlUtils alloc] init];
    
    object->listOf = [[NSMutableArray alloc] initWithCapacity:0];
    [db c828ListOfStatistics:object->listOf withDongCd:@"" ctyp:@""];
        
    object->nsm = [[NSMutableArray alloc] initWithCapacity:0];
    [db c828ListOfStatisticsTotal:object->nsm withDongCd:@"" ctyp:@""];
    statisticsTotalChecking *stc8 = [object->nsm objectAtIndex:0];
    NSLog(@"cl_all = %@",  stc8.cl_all);
    NSLog(@"cl_r = %@",  stc8.cl_r);
    NSLog(@"cl_y = %@", stc8.cl_y);
    NSLog(@"cl_g = %@", stc8.cl_g);


//      int total = 0;
//      int e = 0;
//      int b = 0;
//      int d = 0;
//
//      for(int i=0; i<[mList4calculatingStat count];i++) {
//          DFCT_LIST *data = [mList4calculatingStat objectAtIndex:i];
//          if (YES == [data.cd_hndl_stat isEqualToString:@"E"]) {
//              //            [img setTitle:@"처리" forState:UIControlStateDisabled];
//              e++;
//          }
//          else if (YES == [data.cd_hndl_stat isEqualToString:@"B"]) {
//              //            [img setTitle:@"접수" forState:UIControlStateDisabled];
//              b++;
//          }
//          else {
//              //            [img setTitle:@"완료" forState:UIControlStateDisabled];
//              d++;
//          }
//      }
//
//      total = e + b + d;
    


  SqlUtils *db = [[SqlUtils alloc] init];
    
    maxho = [[db hjhHoshMaxValue:mDongCd] intValue];
    

  if ([mListDong count] > 0) {
        DDTBT_DONG *data = [mListDong objectAtIndex:0];
        [db selectFlorrrr:mListFlor withDongCd:mDongCd isAll:mIsAll];
        [mTableViewFlor reloadData];
    }

- (NSInteger) selectCountOfMaxFloor:(NSString *)dongCd;


// 하자 상태별 건수
//    [self setDfctCount];

- (void) setDfctCount {

        // 하자 상태별 건수
//        [self setDfctCount];


    //    NSInteger cntE = 0;
    //    NSInteger cntX = 0;
    
    //    SqlUtils *db = [[SqlUtils alloc] init];
    //    cntE = [db selectDfctCount:@"E"];
    //    cntX = [db selectDfctCount:@"X"];
    //    cntX += [db selectDfctCount:@"B"];
    //
    //    [mlblStat+stics setText:[NSString stringWithFormat:@" 전체 : 0건| 접수 : 0건 | 처리 : 0건 | 완료 : 0건"]];
}

//        CGRect transformedBounds = CGRectApplyAffineTransform(mainPanel.bounds, mainPanel.transform);
    ////    mainPanel.layer.anchorPoint = CGPointMake(0.5, 0.5);
    //    mainPanel.layer.position = CGPointMake(200,200);
    ////                                           _scrollview.bounds.size.width, _scrollview.bounds.size.height);
//        [_scrollview setContentSize:transformedBounds.size];
        


//    [self->_scrollview setContentSize:CGSizeMake(1000*recognizer.scale, 1000*recognizer.scale)];
//    CGPoint pointToScaleTo = CGPointMake(0, 0); //Just enter the coordinates you
                                                //want to scale your view towards
//    CGFloat viewWidth = mainPanel.bounds.size.width;
//    CGFloat viewHeight = mainPanel.bounds.size.height;

//    CGFloat scaleFactorX = recognizer.scale;
//    CGFloat scaleFactorY = recognizer.scale;

//    CGAffineTransform scaleTransform = CGAffineTransformMakeScale(scaleFactorX, scaleFactorY);

//    [UIView animateWithDuration:0.1f delay:0.0f options:0 animations:^{
//        //I divide the x and y coordinates by the view width and height
//        //because the anchor point coordinates are normalized to the range
//        //0.0-1.0.


//        //Now that the anchor point has been changed, apply the scale transform
//        self.mainPanel.transform = scaleTransform;
//
//    } completion:^(BOOL finished) {}];

//    [self.mainPanel removeFromSuperview];
//    [self->_scrollview addSubview:self.mainPanel];
    
//    CGFloat s = recognizer.scale;
//    CGAffineTransform tr = CGAffineTransformScale(mainPanel.transform, s, s);
//
//    CGFloat h = mainPanel.frame.size.height;
//    CGFloat w = mainPanel.frame.size.width;
//
//    [UIView animateWithDuration:0.5 delay:0 options:0 animations:^{
//        self.mainPanel.transform = tr;
//        self.mainPanel.center = CGPointMake(w*s , h*s );
//        int temp = 1==1;
//        if([temp is])
//    } completion:^(BOOL finished) {}];
//

//    
//    NSInteger   id_mbil;
//    
//    
//    
//    NSString    *mode;
//    NSInteger   id_dfct;
//    NSString    *cd_site;
//    NSString    *cd_hndl_stat;
//    NSString    *cd_rcpt_phs;
//    NSString    *yn_re_rcpt;
//    NSInteger   notm_re_rcpt;
//    NSString    *dt_rcpt;
//    NSString    *id_rcpt_prsn;
//    NSString    *cd_dong;
//    NSString    *nohs;
//    NSString    *cd_loc_clsf;
//    NSString    *yn_hosh_comn;
//    NSInteger   id_loc;
//    NSInteger   id_rgon;
//    NSInteger   id_dfct_ctyp;
//    NSInteger   id_dfct_type;
//    NSInteger   id_dfct_caus;
//    NSInteger   id_dfct_cl;
//    NSString    *dfct_cnts;
//    NSString    *id_wrk_fmer_pic_atch_file;
//    NSString    *id_wrk_aftr_pic_atch_file;
//    NSString    *yn_re_clsf_rqst;
//    NSString    *id_cplt_prsn;
//    NSString    *dt_cplt;
//    NSInteger   notm_vrf_chk;
//    NSString    *dnt_rgst;
//    NSString    *id_rgst;
//    NSString    *dnt_chg;
//    NSString    *id_chg;
//    NSString    *cd_re_rcpt_resn;
//    NSString    *nm_re_rcpt_resn;
//    NSString    *yn_svr_trsm;
//    
//    NSMutableArray  *atchListFmer;
//    NSMutableArray  *atchListAftr;
//    
//    
//    //평형정보 추가하자
//    //조회용으로만...
//    NSString    *cd_tppg;
//    //공종명,원인명,구분명
//    NSString    *nm_dfct_ctyp;
//    NSString    *nm_dfct_caus;
//    NSString    *nm_dfct_cl;
//    
//    NSString    *nm_loc;
//    NSString    *nm_rgon;
//    NSString    *nm_dfct_type;
//    
//    NSString    *nm_dong;
//    
//    
//    NSInteger   search001;
//    NSInteger   search002;
//    NSInteger   search003;
//    NSString   *cd_cpny;
//    NSString    *nm_cpny;
//    
//    //nipt
//    NSString    *seq_nipt;
//    
//    
//    //    NSString    *nm_nipt;
//    //    NSString    *cnst_vrf_rqst;
//    //    NSString    *dnt_vrf_rqst;
//    //    NSString    *yn_vrf_cplt;
//    //    NSString    *dnt_vrf_cplt;
//    //    NSString    *cnts_req_vrf;

PRAGMA foreign_keys = off;

BEGIN;

ALTER TABLE "DDTBT_DFCT" RENAME TO "_DDTBT_DFCT_old";

CREATE TABLE "DDTBT_DFCT" (
   "id_mbil" number PRIMARY KEY ASC
 , "mode" varchar(2)
 , "id_dfct" number
 , "cd_site" vharchar(6)
 , "cd_hndl_stat" varchar(20)
 , "cd_rcpt_phs" varchar(20)
 , "yn_re_rcpt" varchar(1)
 , "notm_re_rcpt" varchar(6)
 , "dt_rcpt" varchar(8)
 , "id_rcpt_prsn" varchar(20)
 , "cd_dong" varchar(4)
 , "nohs" varchar(5)
 , "cd_loc_clsf" varchar(20)
 , "yn_hosh_comn" varchar(1)
 , "id_loc" number
 , "id_rgon" number
 , "id_dfct_ctyp" number
 , "id_dfct_type" number
 , "id_dfct_caus" number
 , "id_dfct_cl" number
 , "dfct_cnts" varchar(200)
 , "id_wrk_fmer_pic_atch_file" varchar(50)
 , "id_wrk_aftr_pic_atch_file" varchar(50)
 , "yn_re_clsf_rqst" varchar(1)
 , "id_cplt_prsn" varchar(20)
 , "dt_cplt" varchar(8)
 , "notm_vrf_chk" number
 , "dnt_rgst" varchar(8)
 , "id_rgst" varchar(10)
 , "dnt_chg" varchar(8)
 , "id_chg" varchar(10)
 , "cd_re_rcpt_resn" varchar(20)
 , "nm_re_rcpt_resn" varchar(200)
 , "yn_svr_trsm" varchar(1)
 , "search001" number
 , "search002" number
 , "search003" number
 , "cd_cpny" varchar(10)
 , "seq_nipt" varchar(10)
 , "yn_cmpx_ctyp" varchar(1)
 , "id_flwg_ctyp" number
 , "cnts_dfct_mgt" varchar(1000)
 , "cd_stat_prev" varchar(2)
 , "ds_hname" varchar(300)
);

INSERT INTO "DDTBT_DFCT" (
   "id_mbil"
 , "mode"
 , "id_dfct"
 , "cd_site"
 , "cd_hndl_stat"
 , "cd_rcpt_phs"
 , "yn_re_rcpt"
 , "notm_re_rcpt"
 , "dt_rcpt"
 , "id_rcpt_prsn"
 , "cd_dong"
 , "nohs"
 , "cd_loc_clsf"
 , "yn_hosh_comn"
 , "id_loc"
 , "id_rgon"
 , "id_dfct_ctyp"
 , "id_dfct_type"
 , "id_dfct_caus"
 , "id_dfct_cl"
 , "dfct_cnts"
 , "id_wrk_fmer_pic_atch_file"
 , "id_wrk_aftr_pic_atch_file"
 , "yn_re_clsf_rqst"
 , "id_cplt_prsn"
 , "dt_cplt"
 , "notm_vrf_chk"
 , "dnt_rgst"
 , "id_rgst"
 , "dnt_chg"
 , "id_chg"
 , "cd_re_rcpt_resn"
 , "nm_re_rcpt_resn"
 , "yn_svr_trsm"
 , "search001"
 , "search002"
 , "search003"
 , "cd_cpny"
 , "seq_nipt"
 , "yn_cmpx_ctyp"
 , "id_flwg_ctyp"
 , "cnts_dfct_mgt"
 , "cd_stat_prev"
)
SELECT
   "id_mbil"
 , "mode"
 , "id_dfct"
 , "cd_site"
 , "cd_hndl_stat"
 , "cd_rcpt_phs"
 , "yn_re_rcpt"
 , "notm_re_rcpt"
 , "dt_rcpt"
 , "id_rcpt_prsn"
 , "cd_dong"
 , "nohs"
 , "cd_loc_clsf"
 , "yn_hosh_comn"
 , "id_loc"
 , "id_rgon"
 , "id_dfct_ctyp"
 , "id_dfct_type"
 , "id_dfct_caus"
 , "id_dfct_cl"
 , "dfct_cnts"
 , "id_wrk_fmer_pic_atch_file"
 , "id_wrk_aftr_pic_atch_file"
 , "yn_re_clsf_rqst"
 , "id_cplt_prsn"
 , "dt_cplt"
 , "notm_vrf_chk"
 , "dnt_rgst"
 , "id_rgst"
 , "dnt_chg"
 , "id_chg"
 , "cd_re_rcpt_resn"
 , "nm_re_rcpt_resn"
 , "yn_svr_trsm"
 , "search001"
 , "search002"
 , "search003"
 , "cd_cpny"
 , "seq_nipt"
 , "yn_cmpx_ctyp"
 , "id_flwg_ctyp"
 , "cnts_dfct_mgt"
 , "cd_stat_prev"
FROM "_DDTBT_DFCT_old";

DROP TABLE "_DDTBT_DFCT_old";

COMMIT;

PRAGMA foreign_keys = ON;
try catch  모두 제
      @try {

                } @catch (NSException *exception) {
                } @finally {
                }

                if(sqlite3_column_text(compiledStatement, 27))

@try {
} @catch (NSException *exception) {
                    NSLog(@"There's no cd_cpny");
                    //                     sqlite3_finalize(compiledStatement);
                    //                    sqlite3_close(database);
                } @finally {
                }
                


                NSLog(@"edtgSelectDfct data.nm_dfct_ctyp %@", data.nm_dfct_ctyp);
                
          @try {
                              NSLog(@"ds_hname = %@", data.ds_hname);
                                       } @catch (NSException *exception) {
                                       } @finally {
                                       }
//            UITextField *resn = [alertView textFieldAtIndex:0];
    //            nm = resn.text;
    //
    //            /*
    //            NSString *sss = [cd stringByAppendingString:nm];
    //            [GlobalVar alertMsgOKWithTitle:@"mBASS" message:sss];
    //            return;
    //            */
    //
    //            SqlUtils *db = [[SqlUtils alloc] init];
    //            NSMutableArray *arr = [NSMutableArray arrayWithCapacity:0];
    //
    //            // 재접수정보 저장
    //            for (int i=0; i<[mList count]; i++) {
    //                DFCT_LIST *data = [mList objectAtIndex:i];
    //
    //                if (YES == data.isCheck && YES == [data.cd_hndl_stat isEqualToString:@"E"]) {
    //                    // 체크된거만 재접수 사유 저장
    //                    data.cd_hndl_stat = @"B";
    //
    //                    //[db updateDfct:data.id_mbil reRcptResnCd:cd nm:nm];
    //
    //                    [arr addObject:data];
    //                }
    //
    //                data.isCheck = NO;
    //            }
    //
    //            [db updateDfctArr:arr reRcptResnCd:cd nm:nm];
    //
    //            [mChkAll setSelected:NO];
    //            [self checkAllList:NO];
    //
    //            [mTableView reloadData];
    //        }
    //    }

반응형

'살며 생각하며,' 카테고리의 다른 글

131  (0) 2020.03.28
130  (0) 2020.03.27
128  (0) 2020.03.24
127  (0) 2020.03.23
126  (0) 2020.03.23
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기