public static void SelectPunchRemedyLog(PunchRemedyLogBean Bean, ref StringBuilder sb, bool isReset = false) { if (isReset) { sb.Clear(); } sb.AppendLine("SELECT CompID , EmpID , EmpName , PunchDate , CONVERT(CHAR(5),PunchTime) as PunchTime , PunchRemedySeq , DeptID , DeptName , OrganID , OrganName , PunchConfirmSeq , RemedyPunchFlag , DutyDate , DutyTime , MAFT10_FLAG , AbnormalFlag , AbnormalReasonID , AbnormalReasonCN , AbnormalDesc , BatchFlag , PORemedyStatus , RejectReason , RejectReasonCN , ValidDateTime , ValidCompID , ValidID , ValidName , RemedyReasonID , RemedyReasonCN , RemedyPunchTime , Remedy_MAFT10_FLAG , Remedy_AbnormalFlag , Remedy_AbnormalReasonID , Remedy_AbnormalReasonCN , Remedy_AbnormalDesc , LastChgComp , LastChgID , LastChgDate FROM PunchRemedyLog"); //sb.AppendLine("SELECT CompID , EmpID , EmpName , PunchDate , CONVERT(CHAR(5),PunchTime) as PunchTime , PunchRemedySeq , DeptID , DeptName , OrganID , OrganName , PunchConfirmSeq , RemedyPunchFlag , DutyDate , DutyTime , MAFT10_FLAG , AbnormalFlag , AbnormalReasonID , AbnormalReasonCN , AbnormalDesc , BatchFlag , PORemedyStatus , RejectReason , RejectReasonCN , ValidDateTime , CONVERT(CHAR(5),ValidTime) as ValidTime , ValidCompID , ValidID , ValidName , RemedyReasonID , RemedyReasonCN , RemedyPunchTime , Remedy_MAFT10_FLAG , Remedy_AbnormalFlag , Remedy_AbnormalReasonID , Remedy_AbnormalReasonCN , Remedy_AbnormalDesc , LastChgComp , LastChgID , LastChgDate FROM PunchRemedyLog"); sb.AppendLine(" Where 1=1 "); if (!string.IsNullOrEmpty(Bean.EmpID)) { sb.AppendLine(" and EmpID=").AppendFormat("@EmpID", Bean.EmpID); } if (!string.IsNullOrEmpty(Bean.RemedyPunchFlag)) { sb.AppendLine(" and RemedyPunchFlag=").AppendFormat("@RemedyPunchFlag", Bean.RemedyPunchFlag); } if (!string.IsNullOrEmpty(Bean.PORemedyStatus)) { sb.AppendLine(" and PORemedyStatus=").AppendFormat("@PORemedyStatus", Bean.PORemedyStatus); } if (!string.IsNullOrEmpty(Bean.RemedyReasonID)) { sb.AppendLine(" and RemedyReasonID=").AppendFormat("@RemedyReasonID", Bean.RemedyReasonID); } if (!string.IsNullOrEmpty(Bean.StartPunchDate)) { sb.AppendLine(" and PunchDate>=").AppendFormat("@StartPunchDate", Bean.StartPunchDate); } if (!string.IsNullOrEmpty(Bean.EndPunchDate)) { sb.AppendLine(" and PunchDate<=").AppendFormat("@EndPunchDate", Bean.EndPunchDate); } }
public static void SelectPunchConfirm(PunchRemedyLogBean Bean, ref StringBuilder sb, bool isReset = false) { if (isReset) { sb.Clear(); } sb.AppendLine("SELECT CompID , EmpID , EmpName , DutyDate , DutyTime , PunchDate , CONVERT(CHAR(5),PunchTime) as PunchTime , PunchConfirmSeq , DeptID , DeptName , OrganID , OrganName , FlowOrganID , FlowOrganName , Sex , PunchFlag , WorkTypeID , WorkType , MAFT10_FLAG , ConfirmStatus , AbnormalType , ConfirmPunchFlag , PunchSeq , PunchRemedySeq , RemedyReasonID , RemedyReasonCN , RemedyPunchTime , AbnormalFlag , AbnormalReasonID , AbnormalReasonCN , AbnormalDesc , Remedy_AbnormalFlag , Remedy_AbnormalReasonID , Remedy_AbnormalReasonCN , Remedy_AbnormalDesc , Source , APPContent , LastChgComp , LastChgID , LastChgDate FROM PunchConfirm"); sb.AppendLine(" Where 1=1 "); if (!string.IsNullOrEmpty(Bean.EmpID)) { sb.AppendLine(" and EmpID=").AppendFormat("@EmpID", Bean.EmpID); } if (!string.IsNullOrEmpty(Bean.RemedyPunchFlag)) { sb.AppendLine(" and RemedyPunchFlag=").AppendFormat("@RemedyPunchFlag", Bean.RemedyPunchFlag); } if (!string.IsNullOrEmpty(Bean.PORemedyStatus)) { sb.AppendLine(" and PORemedyStatus=").AppendFormat("@PORemedyStatus", Bean.PORemedyStatus); } if (!string.IsNullOrEmpty(Bean.RemedyReasonID)) { sb.AppendLine(" and RemedyReasonID=").AppendFormat("@RemedyReasonID", Bean.RemedyReasonID); } if (!string.IsNullOrEmpty(Bean.StartPunchDate)) { sb.AppendLine(" and PunchDate>=").AppendFormat("@StartPunchDate", Bean.StartPunchDate); } if (!string.IsNullOrEmpty(Bean.EndPunchDate)) { sb.AppendLine(" and PunchDate<=").AppendFormat("@EndPunchDate", Bean.EndPunchDate); } }