在ViewPager中的图片放大缩小事件与viewPager的滑动事件冲突了

我现在的状况是我在代码中写了一个图片的放大缩小,但是现在的情况是,在ViewPager中的图片要放大都放大,要是缩小都缩小,请问这个事情怎么解决呢?求助大神呢

6个回答

1.--create function 数字转日期

create or replace function FN_NUMBER_TO_DATE(timeInMillis in number) return date
is

Result date;

begin

Result := to_date('1970-01-01 00:00:00', 'yyyy-MM-dd hh24:mi:ss') +

timeInMillis / (24 * 60 * 60 * 1000);

return(Result);

end FN_NUMBER_TO_DATE;

11.--create function 取到几天以前的日期

create or replace function FN_DAYS_AGO(dest in date, days in number) return date is

Result date;

timeInMillis number;

begin

timeInMillis := FN_DATE_TO_NUMBER(dest) - days*24*60*60*1000;

Result := FN_NUMBER_TO_DATE(timeInMillis);

return(Result);

end FN_DAYS_AGO;

22.--create function 日期转数字

create or replace function FN_DATE_TO_NUMBER(inDate in date) return number is

Result number;

begin

Result := (inDate-to_date('1970-01-01', 'yyyy-MM-dd')) * 24*60*60*1000;

return(Result);

end FN_DATE_TO_NUMBER;

log4j.rootLogger=DEBUG, stdout, logfile
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%-5p]%d{yyyy-MM-ddHH:mm:ss,SSS} method:%l%n%m%n

(每天产生一个日志文件)

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender

设定日志文件的滚动周期 (每天)

log4j.appender.logfile.DateParent=yyyyMMdd

设定日志消息最终输入的文件地址

log4j.appender.logfile.File=D://ex-hujintong001\logs\myweb.log

设定日志信息的输出格式--(可以灵活的指定布局模式)

log4j.appender.logfile.layout=org.apache.log4j.PatternLayout

设定显示日志信息的格式

log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

--视图创建
create or replace view tmsdata.tms_teacher_course_desc_vw as
--视图授权
create public synonym tms_student_class_vw for tmsdata.tms_student_class_vw;
grant select on tmsdata.tms_student_class_vw to
tmsopr,tmscde,tmsjob,R_TMSDATA_DML,R_FRETSDATA_DML;
--视图添加注释
comment on column tmsdata.tms_student_class_vw.class_name is '培训班名称';

数据修改
--创建备份表
--execute dmlbak.create_bak_table_pkg.create_bak_table
('edstmsop','tmsdata','tms_reimburse_detail','tms_reimburse_detail_b');
execute dmlbak.create_bak_table_pkg.create_bak_table
('devsup01','tmsdata','tms_reimburse_detail','tms_reimburse_detail_b');
--验证是否创建成功
select 1 from dmlbak.tms_reimburse_detail_b;

--锁数据
select * from tms_reimburse_detail t where t.class_id = '00000000000001921958'
for update;
--1.备份数据
insert into dmlbak.tms_reimburse_detail_b
select t.rowid bak_rowid,t.*,null
from tms_reimburse_detail t where t.class_id = '00000000000001921958' ;
--2.修改数据
update tms_reimburse_detail t
set t.apply_status = '020001'
where t.series_id = '02'
and t.class_id = '00000000000001921958'
and t.apply_status = '020005'
and t.rowid in (select bak_rowid
 from dmlbak.tms_reimburse_detail_b
where date_dml_flag is null);
--3.加时间戳
update dmlbak.tms_reimburse_detail_b
set date_dml_flag = systimestamp
where date_dml_flag is null;

execute dmlbak.create_bak_table_pkg.pc_bktb_rename
('tms_reimburse_detail_b','tmsdata','tms_reimburse_detail','Q_NP282382');

--回滚脚本模板-DDL
--删表
declare
v_count number;
begin
select count(*)
into v_count
from user_all_tables t
where t.table_name = upper('tms_mln_person_course_match');
if v_count > 0 then
execute immediate 'drop table tms_mln_person_course_match';
delete from tms_tr_switch t where t.trigger_name like upper('tms_mln_person_course_match_%');
commit;
end if;
exception
when others then
null;
end;
/

--删字段
declare
v_count number;
begin
select count(*)
into v_count
from user_tab_columns t
where t.TABLE_NAME = upper('tms_archive_type')
and t.COLUMN_NAME = upper('is_mandatory_upload');
if v_count > 0 then
execute immediate 'alter table tmsdata.tms_archive_type drop column
is_mandatory_upload';
end if;
exception
when others then
null;
end;
/

--改字段名
declare
v_count number;
begin
select count(*)
into v_count
from user_tab_columns t
where t.TABLE_NAME = upper('tms_mln_person_course_match')
and t.COLUMN_NAME = upper('last_study_date');
if v_count > 0 then
execute immediate 'alter table tmsdata.tms_mln_person_course_match rename
column last_study_date to completed_date';
end if;
exception
when others then
null;
end;
/

--删序列
declare
v_count number;
begin
select count(*)
into v_count
from user_sequences t
where t.SEQUENCE_NAME = upper('tms_seq_video_room_order_id');
if v_count > 0 then
execute immediate 'drop sequence tmsdata.tms_seq_video_room_order_id';
execute immediate 'drop public synonym tms_seq_video_room_order_id';
end if;
exception
when others then
null;
end;
/

--删视图
declare
v_count number;
begin
select count(*)
into v_count
from user_views t
where t.VIEW_NAME = upper('tms_student_training_result_vw');
if v_count > 0 then
execute immediate 'drop view tmsdata.tms_student_training_result_vw';
execute immediate 'drop public synonym tms_student_training_result_vw';
end if;
exception
when others then
null;
end;
/

--删公共同义词
declare
v_count number;
begin
select count(*)
into v_count
from dba_synonyms t
where t.SYNONYM_NAME = upper('tms_interface_sync_monitor');
if v_count > 0 then
execute immediate 'drop public synonym tms_interface_sync_monitor';
end if;
exception
when others then
null;
end;
/
--drop public synonym
declare

begin
execute immediate 'drop public synonym tms_class_scan_code_info';
exception
when others then
null;
end;
/

--删字段
declare
v_count number;
begin
select count(*)
into v_count
from user_tab_columns t
where t.TABLE_NAME = upper('tms_archive_type')
and t.COLUMN_NAME = upper('is_mandatory_upload');
if v_count > 0 then
execute immediate 'alter table tmsdata.tms_archive_type drop column
is_mandatory_upload';
end if;
exception
when others then
null;
end;
/

declare
-- Local variables here
CURSOR C_JOB IS
SELECT * FROM USER_JOBS T WHERE T.WHAT LIKE '%tms_job_15;' and t.BROKEN='Y';
begin
-- Test statements here
for rec in c_job loop
dbms_job.run(rec.job);
end loop;
end;
/
alter table TMSDATA.TMSLIVE_TEST_PAPER_INFO add true_or_false_num number(3);

$("#parentSelectCheckTable tr:gt(0)").each(function(i, obj) {
flag2 = true;
var courseId = "";
var dispatchType = "";
var dispatchTypeDays = "";
var dispatchTypeHours = "";
var remindType = "";
var remindWeekStartDay = "";
var remindWeekEndDay = "";
var remindDayHour = "";
var remindLastDays = "";

var param = "";
courseId = $(obj).find("input[type=hidden][name=checkCourseCheckbox]").attr("courseId");
dispatchType = $(obj).find("input[type=radio][name=dispatchType"+courseId+"]:checked").val();
dispatchTypeDays = $(obj).find("input[type=text][name=dispatchTypeDays]").val();
dispatchTypeHours = $(obj).find("select[name=dispatchTypeHours]").val();
remindType = $(obj).find("input[type=radio][name=remindType"+courseId+"]:checked").val();

if(remindType == "0"){
remindDayHour = $(obj).find("select[name=remindDayHourSelect]").val();
remindLastDays = $(obj).find("input[type=text][name=remindDaysDay]").val();

param = "{'classType':'" + classType + "','courseId':'" + courseId + "','dispatchType':'" + dispatchType + "','dispatchTypeDays':'" + dispatchTypeDays
+ "','dispatchTypeHours':'" + dispatchTypeHours + "','remindType':'" + remindType + "','remindDayHour':'" + remindDayHour+ "','remindLastDays':'" + remindLastDays + "'}";

dataParamArray[dataParamArray.length] = param;
}else{
remindDayHour = $(obj).find("select[name=remindDayHourSelectWeek]").val();
remindWeekStartDay = $(obj).find("select[name=remindWeekStartDay]").val();
remindWeekEndDay = $(obj).find("select[name=remindWeekEndDay]").val();
if(remindWeekEndDay < remindWeekStartDay){
flag1 = true;
}

remindDayHour = $(obj).find("select[name=remindDayHourSelectWeek]").val();
remindLastDays = $(obj).find("input[type=text][name=remindDaysWeek]").val()*7;
param = "{'classType':'" + classType + "','courseId':'" + courseId + "','dispatchType':'" + dispatchType + "','dispatchTypeDays':'" + dispatchTypeDays
+ "','dispatchTypeHours':'" + dispatchTypeHours + "','remindType':'" + remindType + "','remindWeekStartDay':'" + remindWeekStartDay
+ "','remindWeekEndDay':'" + remindWeekEndDay+ "','remindDayHour':'" + remindDayHour+ "','remindLastDays':'" + remindLastDays+ "'}";
dataParamArray[dataParamArray.length] = param;
}

});
dataParam += "[" + dataParamArray.join(",") + "]";
$("#informationInfos").val(dataParam);

function selectPapers() {
classType = $("#classType").val();
paperType = $("#paperType").val();
selectedPapers = {};
$("#parentSelectCheckTable tr:gt(0)").each(function(i, obj) {
selectedPapers[($(obj).find("input[type=hidden][name=checkPaperCheckbox]").attr("paperNo"))]
= ($(obj).find("input[type=hidden][name=checkPaperCheckbox]").attr("paperName")+"|"+$(obj).find("input[type=hidden][name=checkPaperCheckbox]").attr("testTime"));

});
var url = "/tmslive.paper.search.screen?&temp=" + new Date().getTime();
var height = window.screen.availHeight * 0.85;
var width = window.screen.availWidth * 0.95;
var top = window.screen.availHeight * 0.06 / 2;
var left = window.screen.availWidth * 0.04 / 2;
window.open(url, '_blank', 'top=' + top + ',left=' + left + ',height=' + height + ',width='
+ width
+ ',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
}

$.ajax({
type : "POST",
url : "/tmslive.test.paper.modify.info.do",
dataType: "json",
contentType : "application/x-www-form-urlencoded;charset=utf-8",
data : paramData,
async : false,
success : function(data) {
alert(data.SERVICE_RESPONSE_RESULT);
closeWindow();
}
});

function flashQuestion(type) {
$("#parentSelectCheckTable"+ type +" tr:gt(0)").each(function(index, obj) {
$(obj).remove();
});

if(type == 0){
parentQuestionNum0 = 0;
}
if(type == 1){
parentQuestionNum1 = 0;
}
if(type == 2){
parentQuestionNum2 = 0;
}
for ( var questionNo in selectedQuestion) {
var score = selectedQuestion[questionNo].split("|")[1];
var questionInfo = selectedQuestion[questionNo].split("|")[0];
var checkboxTxt = ""+ questionInfo + "";
var objTxt = checkboxTxt;
var tdHtml = "

" + objTxt + "";
var isExists = false;
$("#parentSelectCheckTable"+ type +" td:gt(0)").each(function(index, obj) {
if (questionNo == $(obj).find("input[name=questionNo]").val()) {
isExists = true;
}
});
if(!isExists){
if(type == 0){
if (parentQuestionNum0 == 0 || parentQuestionNum0 % 3 == 0 ) {
var trHtml = "" + tdHtml + "";
$("#parentSelectCheckTable"+ type +" tr").last().after(trHtml);
parentQuestionNum0 = parentQuestionNum0 + 1;
} else {
$("#parentSelectCheckTable"+ type +" tr").last().append(tdHtml);
parentQuestionNum0 = parentQuestionNum0 + 1;
}
            }
           if(type == 1){
               if (parentQuestionNum1 == 0 || parentQuestionNum1 % 3 == 0 ) {
                   var trHtml = "<tr>" + tdHtml + "</tr>";
                   $("#parentSelectCheckTable"+ type +" tr").last().after(trHtml);
                   parentQuestionNum1 = parentQuestionNum1 + 1;
               } else {
                   $("#parentSelectCheckTable"+ type +" tr").last().append(tdHtml);
                   parentQuestionNum1 = parentQuestionNum1 + 1;
               }                   

            }
           if(type == 2){
               if (parentQuestionNum2 == 0 || parentQuestionNum2 % 3 == 0 ) {
                   var trHtml = "<tr>" + tdHtml + "</tr>";
                   $("#parentSelectCheckTable"+ type +" tr").last().after(trHtml);
                   parentQuestionNum2 = parentQuestionNum2 + 1;
               } else {
                   $("#parentSelectCheckTable"+ type +" tr").last().append(tdHtml);
                   parentQuestionNum2 = parentQuestionNum2 + 1;
               } 

            }
       }           
}
$("#questionTable").find("input[name=singleChoiceNum]").val(parentQuestionNum0);   
$("#questionTable").find("input[name=multipleChoiceNum]").val(parentQuestionNum1);
$("#questionTable").find("input[name=trueOrFalseNum]").val(parentQuestionNum2);
scores = 0;
$("#paperModify").find("input[name=questionNo]:checked").each(function(index, o) {
    scores += parseInt($(o).attr("score"));
  });    
$("#testScores").val(scores);

}

function selectedQuestionList(type) {
questionBankNo = $("#questionBankNo").val();
questionType = type;
selectedQuestion = {};
$("#parentSelectCheckTable"+ type +" td:gt(0)").each(function(i, obj) {
if ($(obj).find("input[name=questionNo]").attr("checked")) {
selectedQuestion[($(obj).find("input[name=questionNo]").val())]
= ($(obj).find("input[name=questionNo]").next().text()+"|"+$(obj).find("input[name=questionNo]").attr("score"));
}
})
var url = "/tmslive.test.paper.search.question.screen?&temp=" + new Date().getTime();
var height = window.screen.availHeight * 0.7;
var width = window.screen.availWidth * 0.9;
var top = window.screen.availHeight * 0.06 / 2;
var left = window.screen.availWidth * 0.04 / 2;
window.open(url, '_blank', 'top=' + top + ',left=' + left + ',height=' + height + ',width=' + width
+ ',toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no');
}

/**
* 增加同步监控信息
* @return
*/
private InterfaceSyncMonitorDTO addMonitor(String interfaceName, String content) {
InterfaceSyncMonitorDTO interfaceSyncMonitor = new InterfaceSyncMonitorDTO(interfaceName,
"SALES_RECRUIT", "TMSV2-CORE", content);
InterfaceSyncMonitor.addMonitor(interfaceSyncMonitor);
return interfaceSyncMonitor;
}

/**
 * 更新同步结果至监控表
 * @param string
 */
private void updateMonitor(InterfaceSyncMonitorDTO interfaceSyncMonitor, String syncResult,
        String resultMsg) {
    interfaceSyncMonitor.setSyncResult(syncResult);
    interfaceSyncMonitor.setResultMsg(resultMsg);
    InterfaceSyncMonitor.updateMonitor(interfaceSyncMonitor);
}

package com.paic.tms.common.api;

import com.paic.pafa.app.integration.dao.PafaDAOException;
import com.paic.pafa.app.lwc.core.util.DevLog;
import com.paic.tms.common.dto.InterfaceSyncMonitorDTO;
import com.paic.tms.common.integration.CommonDAO;
import com.paic.tms.common.util.BeanNames;
import com.paic.tms.common.util.CommonIbatisSqlId;
import com.paic.tms.common.util.ContextUtil;
import com.paic.tms.common.util.RandomNumGenerator;

/**

  • 接口同步监控
  • @author EX-SHIMINGCHUAN001 *
  • 2016年6月14日
    */
    public class InterfaceSyncMonitor {

    private InterfaceSyncMonitor() {
    }

    private static CommonDAO commonDAO;

    static {
    if (commonDAO == null) {
    commonDAO = (CommonDAO) ContextUtil
    .getContext("biz-context.xml,biz-context-common.xml").getBean(
    BeanNames.TMS_COMMON_DAO);
    }
    }

    /**

    • 增加同步监控信息
    • @param interfaceSyncMonitor 同步监控信息
    • @throws PafaDAOException [参数说明]
    • @return interfaceSyncMonitor 同步监控信息,添加了监控记录的主键ID,后面更新结果时会用到!!
    • @author EX-SHIMINGCHUAN001
    • 2017年4月7日 */ public static InterfaceSyncMonitorDTO addMonitor(InterfaceSyncMonitorDTO interfaceSyncMonitor) { String primaryKeyId = String.valueOf(RandomNumGenerator.getID20()); interfaceSyncMonitor.setPrimaryKeyId(primaryKeyId); try { commonDAO.addSomeInfoBySqlId(CommonIbatisSqlId.ADD_INTERFACE_SYNC_MONITOR, interfaceSyncMonitor); } catch (PafaDAOException e) { DevLog.error("插入接口调用信息异常!", e); } return interfaceSyncMonitor; }

    /**

    • 更新同步结果至监控表
    • @param interfaceSyncMonitor 同步结果信息
    • @throws PafaDAOException *
    • @author EX-SHIMINGCHUAN001
    • 2016年6月17日 */ public static void updateMonitor(InterfaceSyncMonitorDTO interfaceSyncMonitor) { try { commonDAO.modifySomeInfoBySqlId(CommonIbatisSqlId.UPDATE_INTERFACE_SYNC_MONITOR, interfaceSyncMonitor); } catch (PafaDAOException e) { DevLog.error("更新接口调用结果异常!接口记录ID:" + interfaceSyncMonitor.getPrimaryKeyId(), e); } } }

package com.paic.tms.common.dto;

/**

  • 接口同步监控DTO
  • @author EX-SHIMINGCHUAN001 *
  • 2016年6月14日
    */
    public class InterfaceSyncMonitorDTO extends TmsBaseDTO {

    private static final long serialVersionUID = 5460173750473004634L;

    // 接口名
    private String interfaceName;
    // 源系统名
    private String source;
    // 目标系统名
    private String target;
    // 同步报文内容
    private String content;
    // 线程信息(针对多线程的情况)
    private String threadInfo;
    // 同步结果:S-成功,F-失败,E-异常
    private String syncResult;
    // 同步结果信息
    private String resultMsg;
    //主键ID
    private String primaryKeyId;

    public InterfaceSyncMonitorDTO() {
    }

    /**

    • 添加监控时使用
    • @param interfaceName 接口名
    • @param source 源系统名
    • @param target 目标系统名
    • @param content 同步报文内容 */ //NOSONAR public InterfaceSyncMonitorDTO(String interfaceName, String source, String target, String content) { this.interfaceName = interfaceName; this.source = source; this.target = target; this.content = content; }

    /**

    • 添加监控时使用
    • @param interfaceName 接口名
    • @param source 源系统名
    • @param target 目标系统名
    • @param content 同步报文内容
    • @param threadInfo 线程信息(针对多线程的情况) */ //NOSONAR public InterfaceSyncMonitorDTO(String interfaceName, String source, String target, String content, String threadInfo) { this.interfaceName = interfaceName; this.source = source; this.target = target; this.content = content; this.threadInfo = threadInfo; }

    /**

    • 更新同步结果时使用
    • @param interfaceName 接口名
    • @param syncResult 同步结果:S-成功,F-失败,E-异常
    • @param resultMsg 同步结果信息 */ public InterfaceSyncMonitorDTO(String interfaceName, String syncResult, String resultMsg){ this.interfaceName = interfaceName; this.syncResult = syncResult; this.resultMsg = resultMsg; }

    public String getInterfaceName() {
    return interfaceName;
    }

    public void setInterfaceName(String interfaceName) {
    this.interfaceName = interfaceName;
    }

    public String getSource() {
    return source;
    }

    public void setSource(String source) {
    this.source = source;
    }

    public String getTarget() {
    return target;
    }

    public void setTarget(String target) {
    this.target = target;
    }

    public String getContent() {
    return content;
    }

    public void setContent(String content) {
    this.content = content;
    }

    public String getThreadInfo() {
    return threadInfo;
    }

    public void setThreadInfo(String threadInfo) {
    this.threadInfo = threadInfo;
    }

    public String getSyncResult() {
    return syncResult;
    }

    public void setSyncResult(String syncResult) {
    this.syncResult = syncResult;
    }

    public String getResultMsg() {
    return resultMsg;
    }

    public void setResultMsg(String resultMsg) {
    this.resultMsg = resultMsg;
    }

    public String getPrimaryKeyId() {
    return primaryKeyId;
    }

    public void setPrimaryKeyId(String primaryKeyId) {
    this.primaryKeyId = primaryKeyId;
    }

}

private List getPaperCaseRel(PaperDispathDTO paperDispathDTO) {
List paperDispathList = new ArrayList();

String informationInfos = paperDispathDTO.getInformationInfos();

if (StringUtils.isNotEmpty(informationInfos)) {
JSONArray array = JSONArray.parseArray(informationInfos);
Iterator it =array.iterator();
while(it.hasNext()){
PaperDispathDTO dispathDTO = new PaperDispathDTO();
dispathDTO.setCreatedBy(paperDispathDTO.getCreatedBy());
JSONObject obj = JSONObject.parseObject(it.next().toString());
generatePaperList(obj,dispathDTO,paperDispathList);

}
}
return paperDispathList;
}

function func_get_base_point(p_invite_id in varchar2,
p_invite_type in varchar2) return number is
--基础积分
v_base_point number(4) := 0;
v_inviter_2 varchar2(10);
v_inviter_15 varchar2(10);
v_teacher_15 varchar2(10);
v_teacher_2 varchar2(10);
v_invite_id varchar2(20);
v_invite_type varchar2(10);
--查询邀约人的机构信息
cursor cur_inviter_info(p_in_invite_id varchar2) is
select t1.branch_id branchId, t2.branch_level branchLevel
from tms_merit_teacher_invite t1, tms_branch_tree_info t2
WHERE t1.invite_id = p_in_invite_id
and t1.branch_id = t2.branch_id
and t2.series_id = '02';
p_cur_inviter_info cur_inviter_info%rowtype;

--查询被邀约讲师的机构信息
cursor cur_teacher_info(p_in_invite_id varchar2) is
select t3.branch_id branchId, t2.branch_level branchLevel
from tms_merit_teacher_invite t1,
tms_branch_tree_info t2,
tms_merit_teacher_information t3
WHERE t1.invite_id = p_in_invite_id
and t3.branch_id = t2.branch_id
and t1.merit_teacher_id = t3.merit_teacher_id
and t2.series_id = '02';
p_cur_teacher_info cur_teacher_info%rowtype;
begin
v_invite_id := p_invite_id;
v_invite_type := p_invite_type;

  if v_invite_id is null then
    return v_base_point;
  end if;
  for p_cur_inviter_info in cur_inviter_info(v_invite_id) loop
    if v_invite_type = '0' then
      if p_cur_inviter_info.branchLevel in ('1', '1.5','0') then
        v_base_point := 30;
      elsif p_cur_inviter_info.branchLevel >= 2 then
        v_inviter_2 := func_get_level_branch(p_cur_inviter_info.branchId,
                                                      '2');
        for p_cur_teacher_info in cur_teacher_info(v_invite_id) loop    
          if p_cur_teacher_info.branchLevel >= 2 then
            v_teacher_2 := func_get_level_branch(p_cur_teacher_info.branchId,'2');
            if v_inviter_2 = v_teacher_2 then
              v_base_point := 10;
            else
              v_base_point := 20;
            end if;
          elsif p_cur_teacher_info.branchLevel in ('1','0') then
            v_base_point := 10;
          else
            v_inviter_15 := func_get_level_branch(p_cur_inviter_info.branchId,
                                                           '1.5');
            if p_cur_teacher_info.branchId = v_inviter_15 then
              v_base_point := 10;
            else
              v_base_point := 20;
            end if;
          end if;
        end loop;     
      end if;
    else
      if p_cur_inviter_info.branchLevel in ('1','0') then
        v_base_point := 40;
      elsif p_cur_inviter_info.branchLevel in ('1.5') then
        v_base_point := 30;
        else 
         v_base_point := 20;  
      end if;
    end if;
  end loop;
  return v_base_point;
exception
  when others then
    v_base_point := 0;
    return v_base_point;
end func_get_base_point;

function func_get_level_branch(p_branch_id in varchar2,p_branch_level in varchar2) return number is
v_result varchar2(10) := 0;
begin
SELECT branch_id into v_result FROM
(SELECT t.branch_id
FROM tms_branch_tree_info t
where t.branch_level = p_branch_level
and t.is_valid = 'Y'
start with t.series_id = '02'
and t.branch_id = p_branch_id
connect by prior t.parent_branch_id = t.branch_id
and t.series_id = '02')
WHERE rownum = 1;

return v_result;
exception
when others then
v_result := null;
return v_result;
end func_get_level_branch;

procedure proc_produce_paper_student is
--查询出需要进行考试配送的培训班类型
cursor c_class_type is
select distinct t.class_type classType
from tmslive_test_paper_dis t;
--根据class_type 查询出所属的未结训的培训班中的学员
cursor c_student_info(v_class_type varchar2) is
SELECT t.studentNo,
t.paperNo,
t.classId,
t.dateStart,
t.dateEnd,
t.paperName,
t.testNum,
t.paperType,
t.deadLineTime,
t.dispatchTime,
t.paperDispatchId
FROM (SELECT aa.student_no studentNo,
dd.paper_no paperNo,
b.class_id classId,
b.date_start dateStart,
b.date_end dateEnd,
ff.paper_name paperName,
ff.test_num testNum,
dd.paper_type paperType,
(SELECT trunc(tt.date_start)
FROM TMSLIVE_CLASS_COURSE_INFO TT
WHERE TT.CLASS_ID = b.class_id
AND TRUNC(DATE_START) IN
(SELECT CASE
WHEN DECODE(DENSE_RANK() OVER(ORDER BY TRUNC(M.DATE_START)),DD.DISPATCH_TYPE_DAYS,1,0) = 1 THEN
TRUNC(M.DATE_START)
END FUTUREDATE
FROM TMSLIVE_CLASS_COURSE_INFO M
WHERE M.CLASS_ID = TT.CLASS_ID)
AND ROWNUM = 1) + dd.dispatch_type_hours / 24+dd.dispatch_type_mins/60/24 dispatchTime,
(SELECT trunc(tt.date_start)
FROM TMSLIVE_CLASS_COURSE_INFO TT
WHERE TT.CLASS_ID = b.class_id
AND TRUNC(DATE_START) IN
(SELECT CASE
WHEN DECODE(DENSE_RANK() OVER(ORDER BY TRUNC(M.DATE_START)),DD.DISPATCH_TYPE_DAYS,1,0) = 1 THEN
TRUNC(M.DATE_START)
END FUTUREDATE
FROM TMSLIVE_CLASS_COURSE_INFO M
WHERE M.CLASS_ID = TT.CLASS_ID)
AND ROWNUM = 1) +dd.exam_deadline_days-1 + dd.exam_deadline_hours / 24 +
dd.exam_deadline_mins / 24 / 60 deadLineTime,
dd.id_test_paper_dis paperDispatchId
FROM tmslive_class_student_info aa,
tmslive_class_info b,
tmslive_test_paper_dis dd,
tmslive_test_paper_info ff
WHERE b.class_type = v_class_type
and b.class_id = aa.class_id
and dd.class_type = b.class_type
and ff.paper_no = dd.paper_no
and b.class_status in ('02001', '02002')) t
WHERE t.dispatchTime <= sysdate+5/60/24
and t.dispatchTime is not null;
--根据class_type 实时查询出人卷匹配表中某个classType下不包含按照配送规则生成的人卷信息的数据(删掉)

cursor c_d_student_info(v_class_type varchar2) is
SELECT t.stu_no studentNo, t.paper_no paperNo, t.class_id classId, t.PAPER_DISPATCH_ID paperDispatchId
FROM tmslive_person_paper_detail t, tmslive_class_info b
WHERE b.class_id = t.class_id
and b.class_type = v_class_type
and not exists
(SELECT tt.studentNo, tt.paperNo, tt.classId, tt.paperDispatchId
FROM (SELECT aa.student_no studentNo,
dd.paper_no paperNo,
b.class_id classId,
(SELECT trunc(tt.date_start)
FROM TMSLIVE_CLASS_COURSE_INFO TT
WHERE TT.CLASS_ID = b.class_id
AND TRUNC(DATE_START) IN
(SELECT CASE
WHEN DECODE(DENSE_RANK() OVER(ORDER BY TRUNC(M.DATE_START)),DD.DISPATCH_TYPE_DAYS,1,0) = 1 THEN
TRUNC(M.DATE_START)
END FUTUREDATE
FROM TMSLIVE_CLASS_COURSE_INFO M
WHERE M.CLASS_ID = TT.CLASS_ID)
AND ROWNUM = 1) + dd.dispatch_type_hours / 24+dd.dispatch_type_mins/60/24 dispatchTime,
dd.id_test_paper_dis paperDispatchId
FROM tmslive_class_student_info aa,
tmslive_class_info b,
tmslive_test_paper_dis dd
WHERE b.class_type = v_class_type
and b.class_id = aa.class_id

and dd.class_type = b.class_type
and b.class_status in ('02001', '02002')) tt
WHERE tt.dispatchTime <= sysdate+5/60/24
and tt.dispatchTime is not null
and tt.studentNo = t.stu_no
and tt.paperNo = t.paper_no
and tt.classId = t.class_id
and tt.paperDispatchId = t.PAPER_DISPATCH_ID);

v_exam_start_date date;
v_exam_end_date date;
begin
for r_c_class_type in c_class_type loop
for r_c_d_student_info in c_d_student_info(r_c_class_type.classType) loop
delete from tmslive_person_paper_detail t
WHERE t.paper_no = r_c_d_student_info.paperNo
and t.stu_no = r_c_d_student_info.studentNo
and t.PAPER_DISPATCH_ID = r_c_d_student_info.paperDispatchId
and t.class_id = r_c_d_student_info.classId;
commit;
end loop;
end loop;

for rr_c_class_type in c_class_type loop
  for rr_c_student_info in c_student_info(rr_c_class_type.classType) loop
    if rr_c_student_info.dispatchTime >= rr_c_student_info.dateStart  then
       v_exam_start_date  := rr_c_student_info.dispatchTime;
    end if;
    if rr_c_student_info.dispatchTime < rr_c_student_info.dateStart  then
       v_exam_start_date  := rr_c_student_info.dateStart;
    end if;
    if rr_c_student_info.deadLineTime >= rr_c_student_info.dateEnd  then
       v_exam_end_date  := rr_c_student_info.dateEnd+1;
    end if;
    if rr_c_student_info.deadLineTime < rr_c_student_info.dateEnd  then
       v_exam_end_date  := rr_c_student_info.deadLineTime;
    end if;
    merge into tmslive_person_paper_detail tppd
    USING DUAL
    ON (tppd.stu_no = rr_c_student_info.studentNo and tppd.class_id = rr_c_student_info.classId 
    and tppd.paper_no = rr_c_student_info.paperNo and tppd.PAPER_DISPATCH_ID = rr_c_student_info.paperDispatchId)
    When matched then
      update set tppd.start_date = rr_c_student_info.dispatchTime,
                 tppd.exam_start_date = v_exam_start_date,
                 tppd.exam_end_date = v_exam_end_date
    When not matched then
      insert
        (stu_no,
         paper_no,
         paper_name,
         class_id,
         start_date,
         test_num,
         is_completed,
         exam_start_date,
         exam_end_date, 
         PAPER_DISPATCH_ID,                        
         test_paper_type)
      values
        (rr_c_student_info.studentNo,
         rr_c_student_info.paperNo,
         rr_c_student_info.paperName,
         rr_c_student_info.classId,
         rr_c_student_info.dispatchTime,
         rr_c_student_info.testNum,
         '0',
         v_exam_start_date,
         v_exam_end_date,
         rr_c_student_info.paperDispatchId,
         rr_c_student_info.paperType);
    commit;
  end loop;
end loop;

exception
when others then
rollback;
end proc_produce_paper_student;

procedure proc_sync_student_feedback is
begin
merge into tms_student_feedback feedback_info
using (select distinct CLASS_ID,
EMPNO,
REVIEW_TYPE,
REVIEW_ID,
REVIEW_NAME
from SALES_ETRAIN_CLASS_REVIEW
where DATE_UPDATED > sysdate - 11/60/24) class_info
on (feedback_info.CLASS_ID = class_info.CLASS_ID and feedback_info.student_no = class_info.EMPNO)
when not matched then
insert
(SERIES_ID, CLASS_ID, STUDENT_NO, FAVORITE_TYPE, FAVORITE_ID, FAVORITE_NAME)
values
('02', class_info.class_id, class_info.EMPNO, class_info.REVIEW_TYPE, class_info.REVIEW_ID, class_info.REVIEW_NAME);
commit;
end proc_sync_student_feedback;

function func_get_sequence(p_seq_name varchar2) return varchar2 is
v_sql varchar2(4000) ;
v_seq varchar2(20) ;
begin
v_seq := null ;

  v_sql := 'select '||p_seq_name||'.nextval from dual' ;      
  execute immediate(v_sql) into v_seq ;

  v_seq := (lpad(to_char(v_seq),20,'0'));
  return v_seq ;    

end ;

 --******************************************************************************
 --* 程序说明: 通过指定分割符分割字符串                                          
 --* 输入参数: p_source_str被分割字符串                                            
 --*           p_split_char分割符                                                  
 --*                                                                             
 --* 输出参数: str_array 字符串数组                                              
 --* 修改历史:                                                                   
 --*   日期       姓名             修改原因                                   
 --*   2012-08-13 ex-helichao001   新建                                          
 --******************************************************************************  

function string_to_spilt(p_source_str varchar2,
p_split_char varchar2) return tms_pub_sys_package.str_array is
--存放分割后的字符数组
result_array tms_pub_sys_package.str_array;
--临时存放字符串
v_temp_str varchar2(4000);

--分割符
v_split_char varchar2(4000);

--截取字符串位置索引
v_split_index integer := 0;

--临时字符串长度
v_temp_length integer := 0;

--存放截取后需要存储到返回数组值
v_sub_temp varchar2(4000);

begin

v_temp_str    := p_source_str;
v_split_char  := p_split_char;
v_temp_length := length(v_temp_str);  

if v_temp_length <= 0 then
  return result_array;
end if;

loop
  --获取第一次出现分割符下标位置
  v_split_index := instr(v_temp_str, v_split_char,1,1);

  --如果分割下标大于0,截取字符串。否则直接赋值返回
  if v_split_index > 0 then
    v_sub_temp := substr(v_temp_str, 1, v_split_index - 1);
    if v_sub_temp!= v_split_char then
     result_array(result_array.count) := v_sub_temp;
    end if;
  else
    if v_temp_str != v_split_char then
     result_array(result_array.count) := v_temp_str;
    end if;
    v_split_index := 0;
  end if;
  exit when v_split_index = 0;
  v_temp_str    := substr(v_temp_str, v_split_index + 1);
  v_split_index := instr(v_temp_str, v_split_char);
end loop;

return result_array;

end string_to_spilt;

<?xml version="1.0" encoding="GB2312" ?>
<!DOCTYPE beans PUBLIC "-//LWC//DTD BEAN//EN" "lwc-beans.dtd">

<!-- 报表EXECL导出配置 begin-->









reportExport



<!-- 报表EXECL导出配置 end-->

<!--主管辅导统计报表 -->
<bean name="/report.charge.intervention.statistics.screen"
    class="com.paic.tms.common.web.controller.TmsParameterizableViewController">
    <property name="viewName">
        <value>life.report.charge.intervention.statistics.view</value>
    </property> 
</bean>

package com.paic.tms.report.web.controller;

import java.io.PrintWriter;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;

import com.paic.pafa.app.dto.ServiceRequest;
import com.paic.pafa.app.dto.ServiceResponse;
import com.paic.pafa.app.web.exception.PafaWebException;
import com.paic.pafa.app.web.servlet.ModelAndView;
import com.paic.tms.common.exception.TmsAppErrorMessageBaseException;
import com.paic.tms.common.web.controller.TmsMultiActionController;
import com.paic.tms.common.web.util.WebContextNames;
import com.paic.tms.report.util.ReportExportKeyName;
import com.paic.tms.report.web.util.ReportExportServiceRequestID;

/**

  • 报表导出
  • @author EX-YEYIJIE001
    */
    public class ReportExportController extends TmsMultiActionController {

    public ModelAndView reportExport(HttpServletRequest request,
    HttpServletResponse response) throws Exception {

    ServiceRequest serviceRequest = getServiceRequest(request);
    serviceRequest.setRequestedServiceID(ReportExportServiceRequestID.REPORT_EXPORT_SERVICE_REQUEST_ID);
    Map param = bindMap(request);
    serviceRequest.setCurrentRequestObject(param);
    ServiceResponse serviceResponse=null;
    try{
        serviceResponse =  dispatchService(serviceRequest, WebContextNames.PAFA_AC);
    }catch(PafaWebException e){
        TmsAppErrorMessageBaseException ex = getBusinessMessageException(e);
        if(null!=ex){               
            response.setContentType("text/html; charset=GBK");
            PrintWriter out = response.getWriter();             
            out.println("<script>\n");              
            out.println("alert('"+ex.getMessage()+"');");
            out.println("</script>\n");
            return null;
        }
        throw new PafaWebException("ReportExportController is error",e);
    }
    Map model = serviceResponse.getModel();
    List list = (List)model.get(ReportExportKeyName.REPORT_EXPORT_RESULT);
    
    String contentType = "application/vnd.ms-excel; charset=gbk";
    String fileName = null;         
    String postfixStr = ".xls";
    if(StringUtils.isNotEmpty(request.getParameter("reportFilePostfix"))){
        postfixStr = request.getParameter("reportFilePostfix");
    }
    if(StringUtils.isNotEmpty(request.getParameter("excelExportName"))){
        fileName = request.getParameter("excelExportName")+postfixStr;
    }else{
        fileName = "export_data"+postfixStr;
    }
    exportFile(contentType,fileName,response,list);        
    
    return null;
    

    }

    /*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
    package com.paic.pafa.app.web.servlet.mvc.multiaction;

import com.paic.pafa.app.lwc.core.beans.factory.InitializingBean;
import com.paic.pafa.app.lwc.core.util.PathMatcher;
import java.util.Iterator;
import java.util.Properties;
import java.util.Set;

public class PropertiesMethodNameResolver extends AbstractUrlMethodNameResolver implements
InitializingBean {
private Properties mappings;

public void setMappings(Properties mappings) {
    this.mappings = mappings;
}

public void afterPropertiesSet() {
    if ((this.mappings == null) || (this.mappings.isEmpty()))
        throw new IllegalArgumentException("'mappings' property is required");
}

protected String getHandlerMethodNameForUrlPath(String urlPath) {
    String name = this.mappings.getProperty(urlPath);
    if (name != null) {
        return name;
    }
    for (Iterator it = this.mappings.keySet().iterator(); it.hasNext();) {
        String registeredPath = (String) it.next();
        if (PathMatcher.match(registeredPath, urlPath)) {
            return ((String) this.mappings.get(registeredPath));
        }
    }
    return null;
}

}

package com.paic.tmslive.report.biz.action;

import java.util.Map;

import com.paic.pafa.app.biz.service.BusinessServiceException;
import com.paic.pafa.app.dto.ServiceRequest;
import com.paic.pafa.app.dto.ServiceResponse;
import com.paic.tms.common.biz.action.TmsMultiMethodAction;
import com.paic.tms.common.util.KeyNames;
import com.paic.tms.common.util.TmsSeriesMappingUtils;
import com.paic.tmslive.report.biz.service.ReportExportService;

/**

  • @author EX-CHENXIANXI001
    *
    */
    public class ReportExportAction extends TmsMultiMethodAction {

    public ServiceResponse reportExport(ServiceRequest serviceRequest)
    throws BusinessServiceException {
    ReportExportService reportExportService = getReportExportService(serviceRequest
    .getParameter(KeyNames.SERIES)==null?"02":serviceRequest
    .getParameter(KeyNames.SERIES).toString());
    Map param = (Map) serviceRequest.getCurrentRequestObject();
    Map model = reportExportService.reportExport(param);
    ServiceResponse serviceReponse = new ServiceResponse();
    serviceReponse.setModel(model);
    return serviceReponse;
    }

    private ReportExportService getReportExportService(String series)
    throws BusinessServiceException {
    ReportExportService reportExportService = (ReportExportService) context
    .getBean(serviceName + pix
    + TmsSeriesMappingUtils.getSeriesMappingVaule(series));
    return reportExportService;
    }

}
}

package com.paic.tmslive.report.biz.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.paic.pafa.app.biz.service.BaseService;
import com.paic.pafa.app.biz.service.BusinessServiceException;
import com.paic.pafa.app.integration.dao.PafaDAOException;
import com.paic.pafa.app.lwc.service.persistence.dao.jdbc.UncategorizedSQLException;
import com.paic.tms.common.exception.TmsAppErrorMessageBaseException;
import com.paic.tms.common.util.CommonUtil;
import com.paic.tms.common.util.logger.TracerLogger;
import com.paic.tms.report.util.ReportExportKeyName;
import com.paic.tmslive.report.biz.service.ReportExportService;
import com.paic.tmslive.report.dto.ReportExportDTO;
import com.paic.tmslive.report.integration.dao.ReportExportDAO;

public class ReportExportServiceImpl extends BaseService implements ReportExportService {
private long rowMaxCount;

public void setRowMaxCount(long rowMaxCount) {
    this.rowMaxCount = rowMaxCount;
}

private ReportExportDAO reportExportDAO;

public void setReportExportDAO(ReportExportDAO reportExportDAO) {
    this.reportExportDAO = reportExportDAO;
}

@Override
@SuppressWarnings("unchecked")
public Map reportExport(Map param) throws BusinessServiceException {
    // TODO Auto-generated method stub
    TracerLogger.debug(CommonUtil.getUserID(), "ReportExportServiceImpl", "reportExport", "报表导出信息查询service");   
    Map model = new HashMap();
    List reportExportResult=null;
    try {
        ReportExportDTO reportExportDTO = reportExportDAO.findSQLConfigInfo(param);
        if("Y".equals(reportExportDTO.getProcFlag())){   //通过存储过程处理报表数据后放到临时表,然后从临时表里取数据 注:存储过程的返回值名称为:taskId
            param.put(ReportExportKeyName.SQL_MAP_ID, reportExportDTO.getSqlMapId());
            reportExportDAO.processReportData(param);

            //如果查询结果集大于ibatis配置最大数量需要分页获取

// resultCount = reportExportDAO.findReportExportDateForCount((String)param.get(ReportExportKeyName.TASK_ID));
//

// if(resultCount.longValue()>rowMaxCount){

// return getPagerModel(resultCount.longValue(),ReportExportKeyName.TASK_ID,param);
// }
try{
reportExportResult = reportExportDAO.findReportExportDate((String)param.get(ReportExportKeyName.TASK_ID));
}catch(PafaDAOException ex){
if(ex.getBaseException() instanceof UncategorizedSQLException){
throw new TmsAppErrorMessageBaseException("查询结果超过"+rowMaxCount+"行,请缩小查询条件范围!");
}

throw new BusinessServiceException(ex);
}
model.put(ReportExportKeyName.REPORT_EXPORT_RESULT, reportExportResult);
}else{ //通过SQL直接获取报表数据
param.put(ReportExportKeyName.SQL_MAP_ID, reportExportDTO.getSqlMapId());

            //如果查询结果集大于ibatis配置最大数量需要分页获取

// resultCount = reportExportDAO.findReportExportDateForCount(param);
// if(resultCount.longValue()>rowMaxCount){

// return getPagerModel(resultCount.longValue(),ReportExportKeyName.TASK_ID,param);
// }
try{
reportExportResult = reportExportDAO.findReportExportDate(param);
}catch(PafaDAOException ex){
if(ex.getBaseException() instanceof UncategorizedSQLException){
throw new TmsAppErrorMessageBaseException("查询结果超过最大数量的限制,请缩小查询条件范围!");
}

throw new BusinessServiceException(ex);

}
model.put(ReportExportKeyName.REPORT_EXPORT_RESULT, reportExportResult);
}
} catch (Exception ex) {
throw new BusinessServiceException(ex);
}
return model;
}

}

--*********************************************************
--实现功能:把报表数据添加至临时表中
--输入参数:
-- p_task_id : 报表序列号
-- p_line_id : 报表行数(排序使用)
-- p_text : 报表主要信息内容
-- p_message : 提示信息
--*********************************************************
procedure add_tms_req_tmp_data(p_task_id in varchar2,
p_line_id in number,
p_text in varchar2,
p_message in varchar2) is
begin
insert into TMS_REP_TMP
(TASK_ID, LINE, TEXT, MESSAGE)
values
(p_task_id, p_line_id, p_text, p_message);
end add_tms_req_tmp_data;

procedure duality_teacher_info_listing(p_branch_id in varchar2,
p_withSubRegion in varchar2,
p_teacher_type in varchar2,
p_teacher_rank in varchar2,
p_channel_type in varchar2,
p_date_start in varchar2,
p_date_end in varchar2,
p_class_time_start in varchar2,
p_class_time_end in varchar2,
p_score_start in varchar2,
p_score_end in varchar2,
p_class_score_start in varchar2,
p_class_score_end in varchar2,
p_is_valid in varchar2,
p_task_id out varchar2) is
--查询讲师基本信息
cursor cur_teacher_base_info(c_branch_id varchar2, c_withSubRegion varchar2, c_teacher_type varchar2, c_channel_type varchar2, c_is_valid varchar2) is
select tei.emp_name emp_name,
tei.empno empno,
(select tbti.branch_name
from tms_branch_tree_info tbti
where tbti.branch_level = '2'
start with tbti.branch_id = tti.branch_id
and tbti.series_id = tti.series_id
connect by prior tbti.parent_branch_id = tbti.branch_id
and tbti.series_id = tti.series_id) branch_name2,
(select tbti3.branch_name
from tms_branch_tree_info tbti3
where tbti3.branch_id = tti.branch_id
and tbti3.series_id = tti.series_id) branch_name3,
trci.description region_name,
decode(tei.channel_type,
'0201',
'营销',
'0207',
'区拓',
'个险') channel_type_desc,
tei.channel_type channel_type,
trci.region_code region_code,
round(months_between(sysdate, tei.date_hire) / 12, 1) || '年' hire_year,
tms_life_report_package.func_get_employee_rank(tei.empno,
tei.channel_type) emp_rank_desc,
tti.series_id series_id
from tms_teacher_information tti,
tms_employee_info tei,
tms_region_code_info trci,
tms_child_branch_synch tcbs
where tei.empno = tti.teacher_no
and tei.series_id = tti.series_id
and trci.region_code = tei.region_code
and trci.series_id = tei.series_id
and tti.branch_id = tcbs.child_branch_id
and tti.series_id = tcbs.series_id
and tti.teacher_type || '' = c_teacher_type
and tti.is_valid = c_is_valid
and trci.market_type in ('03', '04')
and tei.channel_type || '' = nvl(c_channel_type, tei.channel_type)
and tcbs.parent_branch_id =
decode(c_withSubRegion,
'1',
tcbs.parent_branch_id,
tcbs.child_branch_id)
and tcbs.series_id = '02'
and tcbs.parent_branch_id = c_branch_id;
r_teacher_base_info cur_teacher_base_info%rowtype;

--查询讲师职级
cursor cur_teacher_rank_info(c_teacher_no varchar2, c_series_id varchar2) is
  select trt.description rank_desc, trt.rank rank
    from tms_teacher_rank_info ttri, tms_rank_type trt
   where trt.rank = ttri.rank
     and trt.teacher_type = ttri.teacher_type
     and trt.series_id = ttri.series_id
     and ttri.teacher_no = c_teacher_no
     and ttri.series_id = c_series_id
   order by ttri.date_start desc;
r_teacher_rank_info cur_teacher_rank_info%rowtype;

-- 讲师的课时
cursor cur_teacher_course_hour(c_series_id varchar2, c_teacher_no varchar2, c_date_start varchar2, c_date_end varchar2) is
  select nvl(sum((tcci.date_end - tcci.date_start) * 24), 0) course_hour
    from tms_class_course_info tcci
   where tcci.series_Id = c_series_id
     and tcci.teacher_no = c_teacher_no
     and tcci.date_start >= to_date(c_date_start, 'yyyy-mm-dd')
     and tcci.date_start < (to_date(c_date_end, 'yyyy-mm-dd') + 1);

--讲师授课积分
cursor cur_teacher_course_score(c_series_id varchar2, c_teacher_no varchar2, c_score_type varchar2, c_date_start varchar2, c_date_end varchar2) is
  select nvl(sum(ttsd.score), 0) course_score
    from tms_teacher_score_detail ttsd
   where ttsd.series_id = c_series_id
     and ttsd.teacher_no = c_teacher_no
     and ttsd.score_type = c_score_type
     and ttsd.date_score >= to_date(c_date_start, 'yyyy-mm-dd')
     and ttsd.date_score < (to_date(c_date_end, 'yyyy-mm-dd') + 1);

--讲师嘉奖积分
cursor cur_teacher_score_adjust(c_series_id varchar2, c_teacher_no varchar2, c_date_start varchar2, c_date_end varchar2) is
  select nvl(sum(ttsa.score), 0) score_adjust
    from tms_teacher_score_adjust ttsa
   where ttsa.series_id = c_series_id
     and ttsa.teacher_no = c_teacher_no
     and ttsa.date_adjust >= to_date(c_date_start, 'yyyy-mm-dd')
     and ttsa.date_adjust < (to_date(c_date_end, 'yyyy-mm-dd') + 1);

v_teacher_course_hores     number(20, 4);
v_teacher_course_scores    number(20, 4);
v_teacher_no_course_scores number(20, 4);
v_score_rate               number(20, 4);
v_text                     tms_rep_tmp.text%type;
v_task_id                  tms_rep_tmp.task_id%type;

v_branch_id         tms_branch_tree_info.branch_id%type;
v_withSubRegion     varchar2(2);
v_teacher_type      tms_teacher_type.teacher_type%type;
v_teacher_rank      tms_rank_type.rank%type;
v_channel_type      tms_channel_type.channel_type%type;
v_date_start        varchar2(20);
v_date_end          varchar2(20);
v_class_time_start  varchar2(50);
v_class_time_end    varchar2(50);
v_score_start       varchar2(20);
v_score_end         varchar2(20);
v_class_score_start varchar2(50);
v_class_score_end   varchar2(50);
v_is_valid          varchar2(2);
v_commit_num        number(8);

begin
v_text := '工号' || chr(9) || '姓名' || chr(9) || '二级机构' || chr(9) ||
'三级机构' || chr(9) || '网点名称' || chr(9) || '模式' || chr(9) ||
'区域码' || chr(9) || '讲师职级' || chr(9) || '业务职级' || chr(9) || '司龄' ||
chr(9) || '课时' || chr(9) || '积分' || chr(9) || '授课积分' ||
chr(9) || '非授课积分' || chr(9) || '授课积分占比';

v_task_id := tms_pub_sys_package.func_get_sequence('tms_seq_task_id');
p_task_id := v_task_id;
tms_life_report_package.add_tms_req_tmp_data(v_task_id,
                                             -1,
                                             v_text,
                                             null);

v_branch_id         := p_branch_id;
v_withSubRegion     := p_withSubRegion;
v_teacher_type      := p_teacher_type;
v_teacher_rank      := p_teacher_rank;
v_channel_type      := p_channel_type;
v_date_start        := p_date_start;
v_date_end          := p_date_end;
v_class_time_start  := p_class_time_start;
v_class_time_end    := p_class_time_end;
v_score_start       := p_score_start;
v_score_end         := p_score_end;
v_class_score_start := p_class_score_start;
v_class_score_end   := p_class_score_end;
v_is_valid          := p_is_valid;
v_commit_num        := 0;
open cur_teacher_base_info(v_branch_id,
                           v_withSubRegion,
                           v_teacher_type,
                           v_channel_type,
                           v_is_valid);
loop
  fetch cur_teacher_base_info
    into r_teacher_base_info;
  exit when cur_teacher_base_info%notfound;

  open cur_teacher_rank_info(r_teacher_base_info.empno,
                             r_teacher_base_info.series_id);
  fetch cur_teacher_rank_info
    into r_teacher_rank_info;
  close cur_teacher_rank_info;

  if v_teacher_rank is null or
     v_teacher_rank = r_teacher_rank_info.rank then
    --讲师授课课时
    open cur_teacher_course_hour(r_teacher_base_info.series_id,
                                 r_teacher_base_info.empno,
                                 v_date_start,
                                 v_date_end);
    fetch cur_teacher_course_hour
      into v_teacher_course_hores;
    close cur_teacher_course_hour;

    --讲师授课积分
    open cur_teacher_course_score(r_teacher_base_info.series_id,
                                  r_teacher_base_info.empno,
                                  '02001',
                                  v_date_start,
                                  v_date_end);
    fetch cur_teacher_course_score
      into v_teacher_course_scores;
    close cur_teacher_course_score;

    --讲师嘉奖积分
    open cur_teacher_score_adjust(r_teacher_base_info.series_id,
                                  r_teacher_base_info.empno,
                                  v_date_start,
                                  v_date_end);
    fetch cur_teacher_score_adjust
      into v_teacher_no_course_scores;
    close cur_teacher_score_adjust;

    select decode((v_teacher_course_scores + v_teacher_no_course_scores),
                  0,
                  0,
                  round(v_teacher_course_scores /
                        (v_teacher_course_scores +
                        v_teacher_no_course_scores),
                        4) * 100)
      into v_score_rate
      from dual;

    if (v_class_time_start is null or
       (v_class_time_start <= v_teacher_course_hores and
       v_teacher_course_hores <= v_class_time_end)) and
       (v_score_start is null or
       (v_score_start <=
       (v_teacher_course_scores + v_teacher_no_course_scores) and
       (v_teacher_course_scores + v_teacher_no_course_scores) <=
       v_score_end)) and (v_class_score_start is null or
       (v_class_score_start <= v_score_rate and
       v_score_rate <= v_class_score_end)) then

      v_text := r_teacher_base_info.empno || chr(9) ||
                r_teacher_base_info.emp_name || chr(9) ||
                r_teacher_base_info.branch_name2 || chr(9) ||
                r_teacher_base_info.branch_name3 || chr(9) ||
                r_teacher_base_info.region_name || chr(9) ||
                r_teacher_base_info.channel_type_desc || chr(9) || '[' ||
                r_teacher_base_info.region_code || ']' || chr(9) ||
                r_teacher_rank_info.rank_desc || chr(9) ||
                r_teacher_base_info.emp_rank_desc || chr(9) ||
                r_teacher_base_info.hire_year || chr(9) ||
                v_teacher_course_hores || chr(9) ||
                (v_teacher_course_scores + v_teacher_no_course_scores) ||
                chr(9) || v_teacher_course_scores || chr(9) ||
                v_teacher_no_course_scores || chr(9) || v_score_rate || '%';
      tms_life_report_package.add_tms_req_tmp_data(v_task_id,
                                                   v_commit_num,
                                                   v_text,
                                                   null);
      v_text       := '';
      v_commit_num := v_commit_num + 1;
    end if;
  end if;
end loop;
close cur_teacher_base_info;

end duality_teacher_info_listing;

<%@ include file="../../../common/common.jsp" %>

























 ·当前位置:报表中心>> 培训班类报表
>> 主管辅导统计表





onclick="branchCheck('021002120000')"/>
是否含下属机构

查询日期:



所属系列:
descColumnNmae="description" fieldName="channelType" fieldId="channelType"
whereClause="channel_type != '0200'" style="background-color: #FFFFFF;" type="select"/>













width="100%" height="100%" marginwidth=″0″ marginheight=″0″
frameborder="0" scrolling="no" space="0" vspace="0"/>




<br> window.onload=function(){<br> Calendar.setup({<br> inputField : &quot;dateStart&quot;,<br> ifFormat : &quot;%Y-%m-%d&quot;,<br> showsTime : true,<br> button : &quot;f_start_trigger&quot;,<br> singleClick : true,<br> step : 1<br> });</p> <pre><code> Calendar.setup({ inputField : &quot;dateEnd&quot;, ifFormat : &quot;%Y-%m-%d&quot;, showsTime : true, button : &quot;f_end_trigger&quot;, singleClick : true, step : 1 }); } //下载 function exportChargeIntervention(){ if(!formValidate(&quot;chargeInterventionReport&quot;)) return; if($(&quot;#channelType&quot;).val() == null || $(&quot;#channelType&quot;).val() == &quot;&quot;){ alert(&quot;请选择所属系列!&quot;); return; } var dateStart = $(&quot;#dateStart&quot;).val(); var dateEnd = $(&quot;#dateEnd&quot;).val(); if(addMonths(new Date(Date.parse(dateStart.replace(&quot;-&quot;,&quot;/&quot;))),12,&quot;-&quot;)&lt;dateEnd){ alert(&quot;查询时间段不能超过1年,请重新选择结束日期!&quot;); $(&quot;#dateEnd&quot;).focus(); return; } var eventElement = event.srcElement; eventElement.disabled=true; $(&quot;#chargeInterventionReport&quot;).attr(&quot;target&quot;,&quot;iframe1&quot;); $(&quot;#chargeInterventionReport&quot;).submit(); eventElement.disabled=false; } &lt;/script&gt; </code></pre> <p></html></p>

form name="chargeInterventionReport" target="_blank" id="chargeInterventionReport" method="post" action='<c:url value="/report.export.data.do"/

input type="hidden" id="exportId" name="exportId" value="2017061901"

bean name="/report.export.data.do" class="com.paic.tms.report.web.controller.ReportExportController"
property name="methodNameResolver"
ref bean="ReportExportControllerMethodNameResolver" /
/property>

/bean>
bean id="ReportExportControllerMethodNameResolver" class="com.paic.pafa.app.web.servlet.mvc.multiaction.PropertiesMethodNameResolver"
property name="mappings"
props
prop key="/report.export.data.do">reportExport</prop
/props
/property
/bean


select '片区' || chr(9) ||
'二级机构' || chr(9) ||
'三级机构' || chr(9) ||
'营业部/组' || chr(9) ||
'步步高结训人数' || chr(9) ||
'完成辅导人数(9个单元全部完成)' || chr(9) ||
'主管一对一辅导九单元执行率'

from dual
union all
select firstBranchName || chr(9) ||
secondBranchName || chr(9) ||
threeBranchName || chr(9) ||
fourBranchName || chr(9) ||
BBGTrainFinishedNum || chr(9) ||
interventionFinishedNum || chr(9) ||
interventionExecutionRate

from (with T_ORG AS
(select tcbs.child_branch_id branch_id, tcbs.series_id
from tms_child_branch_synch tcbs,tms_branch_tree_info tbti
where tcbs.parent_branch_id = #branchId#
and tcbs.series_id = '02'
and tbti.series_id = tcbs.series_id
and tcbs.child_branch_id = tbti.branch_id
<![CDATA[
and tbti.branch_level < '5'
]]>


and tcbs.parent_branch_id = tcbs.child_branch_id

),
T_CLASS AS
(select tcsd.student_no, tcbs.branch_id
from tms_class_student_detail tcsd,
tms_class_information tci,
T_ORG tcbs
where tci.branch_id = tcbs.branch_id
and tci.class_type in (SELECT t.class_type
FROM tms_item_class_type_mapping t
WHERE t.item_type = '020005')
and tcsd.exam_result = '02002'
and tci.series_id = '02'
and tci.channel_type = #channelType#
and tci.class_id = tcsd.class_id
and tci.series_id = tcsd.series_id
<![CDATA[
and tci.date_finish >= to_date(#dateStart#, 'yyyy-mm-dd')
and tci.date_finish <= to_date(#dateEnd#,'yyyy-mm-dd')
]]>
union all
select tcsi.student_no, tcbs.branch_id
from tmslive_class_student_info tcsi,
tmslive_class_info tlci,
tmslive_class_detail tcd,
tmslive_plan_reported_info tpri,
T_ORG tcbs
where tpri.branch_id = tcbs.branch_id
and tlci.class_id = tcd.class_id

and tcd.plan_reported_id = tpri.plan_reported_id
and tcd.teacher_no = tcsi.assistant_no
and tlci.class_type in (SELECT t.class_type
FROM tms_item_class_type_mapping t
WHERE t.item_type = '020005')
and tcsi.exam_result = '02002'
and tlci.channel_type = #channelType#
and tlci.class_id = tcsi.class_id
<![CDATA[
and tlci.date_finish >= to_date(#dateStart#,'yyyy-mm-dd')
and tlci.date_finish <= to_date(#dateEnd#,'yyyy-mm-dd')),
]]>

t_emp AS
(select TPI.ID_NO, TC.branch_id
from T_CLASS TC, tms_personnel_info tpi
where TC.student_no = tpi.empno
union
select tei.ID_NO, TC.branch_id
from T_CLASS TC, tms_employee_info tei
where TC.student_no = tei.empno),
T_RTF AS
(select temp.branch_id, count(temp.ID_NO) cnt
from t_emp temp, RECRUIT_TUTOR_FLOW rtf
where rtf.idno = temp.id_no
and rtf.unit_one = '2'
and rtf.unit_two = '2'
and rtf.unit_three = '2'
and rtf.unit_four = '2'
and rtf.unit_five = '2'
and rtf.unit_six = '2'
and rtf.unit_seven = '2'
and rtf.unit_eight = '2'
and rtf.unit_nine = '2'
and rtf.delete_flag = 'N'
group by temp.branch_id),
T_STUDENT AS
(select branch_id, count(distinct id_no) cnt from t_emp group by branch_id)
select nvl((select t.branch_name
from tms_branch_tree_info t, tms_child_branch_synch cbs
where t.branch_id = cbs.parent_branch_id
and t.series_id = cbs.series_id
and cbs.child_branch_id = t0.branch_id
and cbs.series_id = t0.series_id
and t.branch_level = '1.5'),
(select t.branch_name
from tms_branch_tree_info t
where t.branch_id = t0.branch_id
and t.series_id = '02')||'总部') firstBranchName,
(select t.branch_name
from tms_branch_tree_info t, tms_child_branch_synch cbs
where t.branch_id = cbs.parent_branch_id
and t.series_id = cbs.series_id
and cbs.child_branch_id = t0.branch_id
and cbs.series_id = t0.series_id
and t.branch_level = '2') secondBranchName,
(select t.branch_name
from tms_branch_tree_info t, tms_child_branch_synch cbs
where t.branch_id = cbs.parent_branch_id
and t.series_id = cbs.series_id
and cbs.child_branch_id = t0.branch_id
and cbs.series_id = t0.series_id
and t.branch_level = '3') threeBranchName,
(select t.branch_name
from tms_branch_tree_info t, tms_child_branch_synch cbs
where t.branch_id = cbs.parent_branch_id
and t.series_id = cbs.series_id
and cbs.child_branch_id = t0.branch_id
and cbs.series_id = t0.series_id
and t.branch_level = '4') fourBranchName,
nvl(t1.cnt, 0) BBGTrainFinishedNum,
nvl(t2.cnt, 0) interventionFinishedNum,
round(nvl(nvl(t2.cnt, 0)*100 / nullif(t1.cnt, 0), 0),2) || '%' interventionExecutionRate
FROM T_ORG t0, T_STUDENT t1, T_RTF t2, tms_branch_order t3
where t0.branch_id = t1.branch_id(+)
and t0.branch_id = t2.branch_id(+)
and t0.branch_id = t3.branch_id
and t0.series_id = t3.series_id
order by t3.order_no
)

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
控制ViewPager滑动问题
-
viewpager嵌套viewpager父vp禁止左右滑动
-
Fragment中嵌套ViewPager,ViewPager中有好几个Fragment实现滑动
-
android中Viewpager中嵌套子viewpager问题
-
Fragment+ViewPager滑动里面Fragment出现空白
-
怎么实现点击ViewPager滑动图标的广告连接到指定网址
-
用viewpager实现的自动滑动广告栏,怎么实现用户在滑动的时候关闭自动滑动功能
-
ListView 与ViewPager的嵌套问题
-
android viewpager禁止滑动
-
ViewPager中使用Fragment时的点击事件问题
-
viewPager滑动浏览一组大图,滑动倒数第二张时请求新数据追加数据
-
ViewPager嵌套ListView,viewpager无法滑动
-
Android图片双击放大缩小可平移,单击响应Onclick事件屏蔽怎么办?
-
安卓viewpager中页面字体怎么设置
-
viewpager中的fragment之间跳转传值问题?
-
android viewpager 放大以后,子控件不能随之放大,撑满整个布局
-
android 做一个每个item都类似viewpager可以多张图片滑动的列表
-
如何在fragment中套viewpager
-
scrollview嵌套viewpager viewpager无法自适应高度
-
Linux文件操作高频使用命令
文章目录0.新建操作:1.查看操作2.删除操作3.复制操作4.移动操作:5.重命名操作:6.解压压缩操作 0.新建操作: mkdir abc #新建一个文件夹 touch abc.sh #新建一个文件 1.查看操作 查看目录: ll #显示目录文件详细信息 查看文件内容: cat|head|tail命令 cat abc.txt #查看abc的内容 head -5 abc.txt #...
程序员实用工具网站
目录 1、搜索引擎 2、PPT 3、图片操作 4、文件共享 5、应届生招聘 6、程序员面试题库 7、办公、开发软件 8、高清图片、视频素材网站 9、项目开源 10、算法 11、在线工具宝典大全 程序员开发需要具备良好的信息检索能力,为了备忘(收藏夹真是满了),将开发过程中常用的网站进行整理。 1、搜索引擎 1.1、秘迹搜索 一款无敌有良心、无敌安全的搜索引擎,不会收...
史上最详细的IDEA优雅整合Maven+SSM框架(详细思路+附带源码)
网上很多整合SSM博客文章并不能让初探ssm的同学思路完全的清晰,可以试着关掉整合教程,摇两下头骨,哈一大口气,就在万事具备的时候,开整,这个时候你可能思路全无 ~中招了咩~ ,还有一些同学依旧在使用eclipse或者Myeclipse开发,我想对这些朋友说IDEA 的编译速度很快,人生苦短,来不及解释了,直接上手idea吧。这篇文章每一步搭建过程都测试过了,应该不会有什么差错。本文章还有个比较优秀的特点,就是idea的使用,基本上关于idea的操作都算是比较详细的,所以不用太担心不会撸idea!最后,本文
我的 Input框 不可能这么可爱
作者:陈大鱼头 github: KRISACHAN &lt;input /&gt; 标签是我们日常开发中非常常见的替换元素了,但是最近在刷 whattwg 跟 MDN 的时候发现 跟 &lt;input /&gt; 有很多相关的属性,选择器都没怎么用过,所以就开篇文章来整理一下一些比较有趣或者实用的知识点。 本篇文章默认大家已经知道 &lt;input /&gt; 标签的基本用法,不会做过...
我花了一夜用数据结构给女朋友写个H5走迷宫游戏
起因 又到深夜了,我按照以往在csdn和公众号写着数据结构!这占用了我大量的时间!我的超越妹妹严重缺乏陪伴而 怨气满满! 而女朋友时常埋怨,认为数据结构这么抽象难懂的东西没啥作用,常会问道:天天写这玩意,有啥作用。而我答道:能干事情多了,比如写个迷宫小游戏啥的! 当我码完字准备睡觉时:写不好别睡觉! 分析 如果用数据结构与算法造出东西来呢? ...
如何优雅的爬妹子网
from urllib import request import os from user_agents import ua_list import time import random import re import requests from lxml import etree class MeiziSpider(): def init(self): self.url = ‘https:/...
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私...
对计算机专业来说学历真的重要吗?
我本科学校是渣渣二本,研究生学校是985,现在毕业五年,校招笔试、面试,社招面试参加了两年了,就我个人的经历来说下这个问题。 这篇文章很长,但绝对是精华,相信我,读完以后,你会知道学历不好的解决方案,记得帮我点赞哦。 先说结论,无论赞不赞同,它本质就是这样:对于技术类工作而言,学历五年以内非常重要,但有办法弥补。五年以后,不重要。 目录: 张雪峰讲述的事实 我看到的事实 为什么会这样 ...
nginx学习,看这一篇就够了:下载、安装。使用:正向代理、反向代理、负载均衡。常用命令和配置文件
文章目录前言一、nginx简介1. 什么是 nginx 和可以做什么事情2.Nginx 作为 web 服务器3. 正向代理4. 反向代理5. 动静分离6.动静分离二、Nginx 的安装三、 Nginx 的常用命令和配置文件四、 Nginx 配置实例 1 反向代理五、 Nginx 配置实例 2 负载均衡六、 Nginx 配置实例 3 动静分离七、 Nginx 的高可用集群 前言 一、nginx简介...
Mysql经典面试题及答案
需要数据库表 1.学生表 Student(SID,Sname,Sage,Ssex) --SID 学生编号,Sname 学生姓名,Sage 出生年月,Ssex 学生性别 2.课程表 Course(CID,Cname,TID) --CID --课程编号,Cname 课程名称,TID 教师编号 3.教师表 Teacher(TID,Tname) --TID 教师编号,Tname 教师姓名 4.成绩表 SC...
静态代理、动态代理、Spring AOP面向切面编程
目录 静态代理 列:实现静态代理 代理接口User.java 目标对象 实际业务逻辑实现方法UserImpl.java 代理类UserProxy.java 测试 动态代理 列: 实现动态代理 创建po对象 创建dao 创建代理类MyProxy.java 测试 Spring Aop 面向切面编程 列:aop练习 User.java UserDao.java My...
经典sql语句 行专列 统计部门男女人数 统计员工入职时常 根据出生日期计算年龄
1,SELECT ,COUNT() FROM dept d LEFT JOIN emp e ON d.deptno=e.deptno WHERE e.sal&lt;4000 GROUP BY d.deptno 查询部门工资低于4000的人数 2, 表数据 create table tb(姓名 varchar(10),课程 varchar(10),分数 int) insert into tb val...
讨论JAVA和QT之争
这是两种以跨平台为特色的开发方式。Qt更多被认为是一种框架,但是Qt中有新增一些C++所没有的语法,所以也可以认为是一种编程语言。Java被认为是一种编程语言,但是很多人并不知道JAVA的编程语言其实是Java SE,而他们所知的Java EE其实不是编程语言,反而是一种框架。 Qt和Java到底怎么选?没有任何明确需求的前提下,我认为尽可能使用Java,因为Java能够解决Qt不能解决的问题,...
java学习路线导航【教学视频+博客+书籍整理】
在博主认为,学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,博主将为各位保驾护航,各位赶紧冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 Java基础教学视频 Java零基础教程视频(适合Java 0基础,Java初学入门)【推荐】 JavaSE进阶入门项目实战视频教程_动力节点【推荐】 毕向东Java基础视频教程...
TCP三次握手原理
TCP协议\TCP三次握手
python 程序员进阶之路:从新手到高手的100个模块
在知乎和CSDN的圈子里,经常看到、听到一些 python 初学者说,学完基础语法后,不知道该学什么,学了也不知道怎么用,一脸的茫然。近日,CSDN的公众号推送了一篇博客,题目叫做《迷思:Python 学到什么程度可以面试工作?》,真实反映了 python 程序员在成长过程中的一些困惑。
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch, ...
Thread中的start和run方法的区别
面试必问,面试必问,面试必问!别问我为什么知道~~ 总结 run()只是Thread类的一个普通方法,调用run()并不会新建一个子线程,仍在主线程执行任务。 调用start()会新建一个子线程并执行run()的内容。调用start()会有两个线程,一个是当前正在调用start()的主线程;另一个是JVM创建的子线程,用来执行run()的内容。 实践 实践出真知~~首先写下测试代码: publ...
漫话:什么是 https ?这应该是全网把 https 讲的最好的一篇文章了
今天这篇文章,讲通过对话的形式,让你由浅入深着知道,为什么 Https 是安全的。 一、对称加密 一禅:在每次发送真实数据之前,服务器先生成一把密钥,然后先把密钥传输给客户端。之后服务器给客户端发送真实数据的时候,会用这把密钥对数据进行加密,客户端收到加密数据之后,用刚才收到的密钥进行解密。如图: 当然,如果客户端要给服务器发送数据,也是采用这把密钥来加密,这里为了方便,我采用单方向...
HTML CSS整理笔记
常见字体单位: 1.em 移动端常用的字体尺寸单位,说白em就相当于“倍”,比如设置当前的div的字体大小为1.5em,则当前的div的字体大小为:当前div继承的字体大小*1.5。 但当div进行嵌套时,em始终按当前div继承的字体大小来缩放。 2.rem r是root的意思,即相对于根节点html的font-size进行缩放,当有嵌套关系时,嵌套关系的元素的字体大小始终按照根节点的字体大小...
带你学系列之MySQL LIKE 子句
MySQL LIKE 子句 我们知道在 MySQL 中使用 SQL SELECT 命令来读取数据, 同时我们可以在 SELECT 语句中使用 WHERE 子句来获取指定的记录。 WHERE 子句中可以使用等号 = 来设定获取数据的条件,如 "runoob_author = 'RUNOOB.COM'"。 但是有时候我们需要获取 runoob_author 字段含有 "COM" 字符的所有记录,...
史上最全的mysql基础教程
启动与停止 启动mysql服务 sudo /usr/local/mysql/support-files/mysql.server start 停止mysql服务 sudo /usr/local/mysql/support-files/mysql.server stop 重启mysql服务 sudo /usr/local/mysql/support-files/mysql.server resta...
为什么你学不会递归?告别递归,谈谈我的经验
可能很多人在大一的时候,就已经接触了递归了,不过,我敢保证很多人初学者刚开始接触递归的时候,是一脸懵逼的,我当初也是,给我的感觉就是,递归太神奇了! 可能也有一大部分人知道递归,也能看的懂递归,但在实际做题过程中,却不知道怎么使用,有时候还容易被递归给搞晕。也有好几个人来问我有没有快速掌握递归的捷径啊。说实话,哪来那么多捷径啊,不过,我还是想写一篇文章,谈谈我的一些经验,或许,能够给你带来一些帮助...
大学四年,分享看过的优质书籍
数据结构与算法是我在大学里第一次接触到的,当时学了很多其他安卓、网页之类的,一开始就感觉纳闷,数据结构和算法学这个有啥用,再加上上的是一所野鸡大学,老师讲的也是模模糊糊,平时做项目、练习也几乎不用数据结构,所以考试应付应付就过了,也没太在意。 到了大三的时候,面临考研和就业了,突然看到学长考研的数据结构题和面试网站的要求,突然意识到数据结构和算法的重要性,真的很重要,重要的话说三遍,真的很重要,...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
史上最全正则表达式语法,文末附常用表达式!
废话少说,直接开始学习! 一、元字符 元字符是构造正则表达式的一种基本元素。 . :匹配除换行符以外的任意字符 w:匹配字母或数字或下划线或汉字 s:匹配任意的空白符 d:匹配数字 b:匹配单词的开始或结束 ^:匹配字符串的开始 $:匹配字符串的结束 匹配有abc开头的字符串:abc或者^abc 匹配8位数字的QQ号码:^dddddddd$ 匹配1开头11位数字的手机号码...
JavaWeb--解析Servlet
什么是Servlet? Servlet(Server Applet),全称是Java Servlet。Servlet技术是Sun公司提供一种实现动态网页的解决方案,它是基于Java编程语言的Web服务器端编程技术,主要用于在Web服务器端获得客户端的访问请求信息和动态生成对客户端的响应信息。一个Servlet程序就是一个实现了特殊接口的Java类,它由支持Servlet的Web服务器(具有Ser...
一文搞懂什么是TCP/IP协议
什么是TCP/IP协议? 计算机与网络设备之间如果要相互通信,双方就必须基于相同的方法.比如如何探测到通信目标.由哪一边先发起通信,使用哪种语言进行通信,怎样结束通信等规则都需要事先确定.不同的硬件,操作系统之间的通信,所有这一切都需要一种规则.而我们就将这种规则称为协议 (protocol). 也就是说,TCP/IP 是互联网相关各类协议族的总称。 TCP/IP 的分层管理 TCP/IP协...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
哪些 Java 知识不需要再学了
张无忌在学太极拳的时候,他爹的师父张三丰告诫他一定要把之前所学习的武功全部忘掉,忘得越多就会学得越快。 同样的,自学 Java 的时候一定要先知道哪些 Java 知识不需要再学了,毕竟技术的更新迭代就好像火箭一样快,Java 的一些知识点早已经过时了。如果不懂得断舍离,那学起来就不免太痛苦了。 1)AWT 和 Swing 真不知道为什么,有些书籍还在介绍 AWT 和 Swing,这就好像不知道大清...
相关热词 c#实现简单的文件管理器 c# where c# 取文件夹路径 c# 对比 当天 c#输入double值 c# fir 滤波器 c# 和站 队列 c#控制某个usb口开关 c# txt 去空格 c# list 批量修改
立即提问