--862203 机构 --031829 部门 select * from department_info di where di.channel_type='02'; select * from rn_dept_servicer rd ,department_info di where rd.dept_no=di.dept_no and di.channel_type='02' ; --满足条件的个险续收人员 select si.dept_no,si.emp_no,ro.market_flag, ro.bank_flag,ro.agent_flag,di.branch_code from staff_info si,department_info di,renewal_staff_info_other ro where si.dept_no=di.dept_no and si.emp_no=ro.emp_no and di.channel_type='07' and si.is_valid='Y' and ro.market_flag='Y' and di.branch_code = '861100'; --满足条件的部门 select * from department_info di where di.is_valid='Y' and di.branch_code='866404'; --满足条件的银代续收人员 select si.dept_no,si.emp_no,ro.market_flag, ro.bank_flag,ro.agent_flag from staff_info si,department_info di,renewal_staff_info_other ro where si.dept_no=di.dept_no and si.emp_no=ro.emp_no and di.channel_type='07' and si.is_valid='Y' and ro.bank_flag='Y'; --满足条件的银行网点 select * from department_info di where di.is_valid='Y' and di.channel_type='02' and di.branch_code='866404' and di.dept_no='0256601011001011'; select * from gras_dept_servicer; select * from gras_bank_emp ; 区域分单: 1:获取channelType时需要判断长度是否为1,如果为1,前面需要加上0 2:区域人员匹配设置,查询部门sql需要关联下属机构 记忆分单: 1:List<JSONObject> memoryList = assignService.selectByList(policyList); 此时应该返回的是List<String>,后面遍历时类型错误会报错 营销服务部分单 1:sql错误;没有关联下属机构,获取不到四级机构 branchInfoService.selectBranchByCodeAndLevel(branchCode,MyConstant.BRANCH_LEVEL_04); 2:查询营销服务部服务人员sql都要加上is_Valid=Y 部门分单: 1:查询部门服务人员sql都要加上is_Valid=Y 银行网点分单: 1:po_channel_type去错值了,应该取渠道值而不是渠道名称 2:查询银行网点服务人员sql都要加上is_Valid=Y