Merge branch 'beetlsql3-dev' of http://118.31.7.2:3000/tianzeOrg/tianze-pro into beetlsql3-dev

# Conflicts:
#	web/src/main/java/com/ibeetl/jlw/enums/SubsystemName.java
#	web/src/main/java/com/ibeetl/jlw/util/SubsystemUserUtil.java
beetlsql3-dev
whb 8 months ago
commit fed9610fac

@ -91,4 +91,7 @@ public interface CoreUserDao extends BaseMapper<CoreUser> {
Map<String,Object>getUserInfoByUsername(String username);
List<Map<String,Object>>getUserInfosByUsername();
Map<String, Object> getSonSystemUserInfoByUserName(String username);
}

@ -418,7 +418,13 @@ public class CoreUserService extends CoreBaseService<CoreUser> {
return coreUserDao.getUserInfoByUsername(username);
}
public Map<String, Object> getSonSystemUserInfoByUserName(String username) {
return coreUserDao.getSonSystemUserInfoByUserName(username);
}
public List<Map<String, Object>> getUserInfosByUsername() {
return coreUserDao.getUserInfosByUsername();
}
}

@ -312,3 +312,35 @@ left join university_system us on t.university_system_id = us.university_system_
left join university_system us1 on sc.university_system_id = us1.university_system_id
left join core_user_role cur on cu.ID = cur.USER_ID
where cur.ROLE_ID in (192, 194)
getSonSystemUserInfoByUserName
===
select cu.CODE as username,
cu.PASSWORD as password,
IF(s.student_name IS NULL, t.teacher_name, s.student_name) as name,
cu.old_id as userId,
if(cur.ROLE_ID = 192, 4, 3) as roleId,
uc.universities_colleges_id as schoolId,
uc.universities_colleges_name as schoolName,
sc.class_id as classId,
sc.class_name as className,
IF(s.student_mobile IS NULL, t.teacher_mobile, s.student_mobile) as phone,
IF(uf.old_id is null, uf1.old_id, uf.old_id) as collegeId,
IF(uf.university_faculty_name is null, uf1.university_faculty_name, uf.university_faculty_name) as collegeName,
IF(us.old_id is null, us1.old_id, us.old_id) as majorId,
IF(us.university_system_name is null, us1.university_system_name, us.university_system_name) as majorName,
s.old_id as studentId,
t.old_id as teacherId
from core_user cu
join universities_colleges uc on cu.ORG_ID = uc.org_id
left join student s on cu.ID = s.user_id
left join teacher t on cu.ID = t.user_id
left join school_class sc on s.class_id = sc.class_id
left join university_faculty uf on t.university_faculty_id = uf.university_faculty_id
left join university_faculty uf1 on sc.university_faculty_id = uf1.university_faculty_id
left join university_system us on t.university_system_id = us.university_system_id
left join university_system us1 on sc.university_system_id = us1.university_system_id
left join core_user_role cur on cu.ID = cur.USER_ID
where cu.CODE = #username#
and cur.ROLE_ID in (192, 194)

@ -113,7 +113,8 @@ public class InterceptorConfig implements WebMvcConfigurer, InitializingBean {
"/wx",
"/test/**",
"/account/**",
"/api/resourcesApplication/logicPicture.json"
"/api/resourcesApplication/logicPicture.json",
"/api/resourcesApplication/getPageList.do"
// "/upload/**"
)
.excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**").order(1);

@ -123,6 +123,8 @@ public interface StudentDao extends BaseMapper<Student>{
List<Map<String,Object>> findAllBySchoolId(Long schoolId);
List<Map<String, Object>> findAllSonSystemAllBySchoolId(Long schoolId);
List<Student> getStudentByStudentNoAndOrgId(String studentNo,Long orgId);
List<Student>getValuesByOrgId(Long orgId);
@ -142,4 +144,5 @@ public interface StudentDao extends BaseMapper<Student>{
List<Student> getNoAssetStudent();
Map<String,Object> getMapByStudentIdForForeign(Long studentId);
}

@ -66,4 +66,6 @@ public interface TeacherDao extends BaseMapper<Teacher>{
Teacher getByTeacherSn(String teacherSn);
void deleteById1(Long teacherId);
List<Map<String, Object>> findAllByUniversitiesCollegesId(Long universitiesCollegesId);
}

@ -73,7 +73,4 @@ public interface UniversitiesCollegesJurisdictionCurriculumResourcesDao extends
*/
List<UniversitiesCollegesJurisdictionCurriculumResources> getAuthorizedCourse(Long orgId, String courseLabelIdPlural);
}

@ -55,4 +55,6 @@ public interface UniversitiesCollegesJurisdictionExperimentalSystemDao extends B
List<UniversitiesCollegesJurisdictionExperimentalSystem>forexSimulationTradingAuthorizationSchoolDataInterface();
List<String> getAllApplicationIdBySchoolId(Long schoolId);
List<Long> getTypeIdListBySchoolId(Long universitiesCollegesId);
}

@ -1767,6 +1767,20 @@ public class StudentService extends CoreBaseService<Student> {
return dataList;
}
public List<Map<String, Object>> findAllSonSystemBySchoolId(Long schoolId) {
List<Map<String, Object>> mapList = studentDao.findAllSonSystemAllBySchoolId(schoolId);
List<Map<String, Object>> dataList = new ArrayList<>();
//将内部元素弄成驼峰
for (Map<String, Object> map : mapList) {
Map<String, Object> data = new HashMap<>();
data.put("studentNo", map.get("studentno"));
data.put("name", map.get("name"));
data.put("classId", map.get("classid"));
dataList.add(data);
}
return dataList;
}
public List<String> findStudentNoByClassId(Long classId) {
return studentDao.findStudentNoByClassId(classId);
}

@ -932,4 +932,16 @@ public class TeacherService extends CoreBaseService<Teacher> {
public void deleteById1(Long teacherId){
sqlManager.deleteById(Teacher.class, teacherId);
}
public List<Map<String, Object>> findAllByUniversitiesCollegesId(Long universitiesCollegesId) {
List<Map<String, Object>> mapList = teacherDao.findAllByUniversitiesCollegesId(universitiesCollegesId);
List<Map<String, Object>> dataList = new ArrayList<>();
for (Map<String, Object> map : mapList) {
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("teacherNo", map.get("teacherno"));
dataMap.put("name", map.get("name"));
dataList.add(dataMap);
}
return dataList;
}
}

@ -307,4 +307,5 @@ public class UniversitiesCollegesJurisdictionCurriculumResourcesService extends
}
return theoryCourseList;
}
}

@ -6,6 +6,7 @@ import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.ibeetl.admin.core.dao.CoreUserDao;
import com.ibeetl.admin.core.service.CoreBaseService;
import com.ibeetl.admin.core.service.CorePlatformService;
import com.ibeetl.admin.core.service.CoreUserService;
@ -57,6 +58,8 @@ public class UniversitiesCollegesJurisdictionExperimentalSystemService extends C
private StudentService studentService;
@Autowired
private CoreUserService coreUserService;
@Autowired
private TeacherService teacherService;
public PageQuery<UniversitiesCollegesJurisdictionExperimentalSystem>queryByCondition(PageQuery query){
PageQuery ret = universitiesCollegesJurisdictionExperimentalSystemDao.queryByCondition(query);
@ -101,10 +104,14 @@ public class UniversitiesCollegesJurisdictionExperimentalSystemService extends C
ToolUtils.deleteNullList(usList);
if(null != usList && usList.size()>0){
//删掉旧的
this.deleteByUniversitiesCollegesId(universitiesCollegesId);
deleteByUniversitiesCollegesId(universitiesCollegesId);
}
List<UniversitiesCollegesJurisdictionExperimentalSystem> universitiesCollegesJurisdictionExperimentalSystemList = new ArrayList<>();
// List<Long> typeIdList=universitiesCollegesJurisdictionExperimentalSystemDao.getTypeIdListBySchoolId(universitiesCollegesId);
for(int i=0;i<usList.size();i++){
// if(typeIdList.contains(usList.get(i).getTypeId())){
// continue;
// }
UniversitiesCollegesJurisdictionExperimentalSystem pojo = new UniversitiesCollegesJurisdictionExperimentalSystem();
pojo.setUniversitiesCollegesId(universitiesCollegesId);
pojo.setType(usList.get(i).getType());
@ -119,28 +126,52 @@ public class UniversitiesCollegesJurisdictionExperimentalSystemService extends C
pojo.setOrgId(uc.getOrgId());
universitiesCollegesJurisdictionExperimentalSystemList.add(pojo);
}
if(universitiesCollegesJurisdictionExperimentalSystemList.size()>0){
this.insertBatch(universitiesCollegesJurisdictionExperimentalSystemList);
//子系统添加用户数据
List<Map<String,Object>> students = studentService.findAllBySchoolId(universitiesCollegesId);
List<Map<String, Object>> students = studentService.findAllSonSystemBySchoolId(universitiesCollegesId);
List<String> applications = getAllApplicationIdBySchoolId(universitiesCollegesId);
if(null != students && students.size()>0){
List<ZYUserInfo> userInfos = new ArrayList<>();
for(Map<String,Object> student : students){
Map<String, Object> map = coreUserService.getUserInfoByUsername(String.valueOf(student.get("studentNo")));
Map<String, Object> map = coreUserService.getSonSystemUserInfoByUserName(String.valueOf(student.get("studentNo")));
map.put("collegeid",universitiesCollegesId);
ZYUserInfo info = new ZYUserInfo(map);
userInfos.add(info);
}
List<String> applications = getAllApplicationIdBySchoolId(universitiesCollegesId);
try {
SubsystemUserUtil.subsystemUserCreate(userInfos,applications);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
//应用授权后开通资金账户权限
studentAccountAssetAllocationService.updateApplicationAuthority(uc.getOrgId());
}
List<ZYUserInfo> userInfos=new ArrayList<>();
List<Map<String, Object>> teacherList=teacherService.findAllByUniversitiesCollegesId(universitiesCollegesId);
for (int i = 0; i < teacherList.size(); i++) {
Map<String, Object> userInfoByUsername = coreUserService.getUserInfoByUsername(String.valueOf(teacherList.get(i).get("name")));
if (userInfoByUsername==null){
continue;
}
ZYUserInfo info = new
ZYUserInfo(
coreUserService.getUserInfoByUsername(String.valueOf(teacherList.get(i).get("name"))));
userInfos.add(info);
}
try {
SubsystemUserUtil.subsystemUserCreate(userInfos,applications);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
// return null;
// 应用授权后开通资金账户权限
if(uc.getOrgId()!=254L){
studentAccountAssetAllocationService.updateApplicationAuthority(uc.getOrgId());
}
}
List<UniversitiesCollegesJurisdictionCurriculumResourcesQuery> urList = new ArrayList<>();
try {
urList = JSON.parseArray(uQuery.getUniversitiesCollegesJurisdictionCurriculumResourcesListJson(), UniversitiesCollegesJurisdictionCurriculumResourcesQuery.class);

@ -27,6 +27,7 @@ import org.springframework.stereotype.Service;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@ -122,6 +123,7 @@ public class WebPlatformService {
* @param user
*/
public Object getUserInfoFromSessionByIdentity(@NotNull(message = "登录用户不能为空!") CoreUser user) {
// return httpRequestLocal.getSessionValue(T_STUDENT);
switch (EnumUtil.fromString(MenuEnums.class, user.getJobType1())) {
case JT_S_01: {
return httpRequestLocal.getSessionValue(T_ADMIN);

@ -1,6 +1,18 @@
package com.ibeetl.jlw.util;
import cn.hutool.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
@ -92,4 +104,46 @@ public class HttpUtil {
return null;
}
// 发送POST请求
public static JSONObject sendPost(String url, String paramStr, String contentType, String token) throws IOException {
try {
JSONObject ret = new JSONObject();
HttpPost method = new HttpPost(url);
StringEntity entity = new StringEntity(paramStr, "utf-8");
entity.setContentEncoding("UTF-8");
if (StringUtils.isEmpty(contentType))
entity.setContentType("application/json");
else
entity.setContentType(contentType);
if (StringUtils.isNotEmpty(token)) {
method.setHeader("Authorization", "Bearer " + token);
}
method.setEntity(entity);
int timeout = 60000;
RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(timeout)
.setConnectTimeout(timeout)
.build();
method.setConfig(requestConfig);
HttpClient client = HttpClients.createDefault();
HttpResponse resp = client.execute(method);
int statusCode = resp.getStatusLine().getStatusCode();
if (statusCode != HttpStatus.SC_OK) {
return null;
}
String respString = EntityUtils.toString(resp.getEntity(), "UTF-8");
ret.set("statusCode",statusCode);
if(StringUtils.isNotEmpty(respString)){
ret.set("respString",respString);
}
return ret;
}catch (Exception e) {
e.printStackTrace();
}
return null;
}
}

@ -2302,7 +2302,7 @@ public class StudentController extends BaseController {
write(response, filename, "Sheet1", header.values(), convertData(header.keySet(), maps));
}
@PostMapping(MODEL + "/add.json")
@PostMapping("/jlw/student/add.json")
@Function("student.add")
@ResponseBody
@ApiOperation("添加")

@ -2223,7 +2223,11 @@ pagedListStudentInfoByClassId
findAllBySchoolId
===
select student.student_sn as studentNo,student.student_name as name,school_class.old_class_id as classId from student join universities_colleges uc on student.org_id = uc.org_id join school_class on student.class_id =school_class.class_id where old_school_id = #schoolId#
select student.student_sn as studentNo,student.student_name as name,school_class.old_class_id as classId from student join universities_colleges uc on student.org_id = uc.org_id join school_class on student.class_id =school_class.class_id where uc.old_school_id = #schoolId#
findAllSonSystemAllBySchoolId
===
select student.student_sn as studentNo,student.student_name as name,school_class.class_id as classId from student join universities_colleges uc on student.org_id = uc.org_id join school_class on student.class_id =school_class.class_id where uc.universities_colleges_id = #schoolId#
getStudentByStudentNoAndOrgId
===

@ -565,6 +565,11 @@ findAllTeacherBySchoolId
select teacher_job_number as teacherNo,teacher_name as name from teacher join universities_colleges on teacher.universities_colleges_id=
universities_colleges.universities_colleges_id where old_school_id =#schoolId#
findAllByUniversitiesCollegesId
===
select teacher_job_number as teacherNo,teacher_name as name from teacher join universities_colleges on teacher.universities_colleges_id=
universities_colleges.universities_colleges_id where teacher.universities_colleges_id=#universitiesCollegesId#
getByTeacherJobNameAndOrgId
===

@ -275,3 +275,7 @@ getAllApplicationIdBySchoolId
select ra.application_second_level_relation
from universities_colleges_jurisdiction_experimental_system ues join resources_application ra on ues.type_id = ra.resources_application_id
where universities_colleges_id =#schoolId#;
getTypeIdListBySchoolId
===
SELECT type_id from universities_colleges_jurisdiction_experimental_system WHERE universities_colleges_id=#universitiesCollegesId#

@ -186,16 +186,29 @@ layui.use(['add','form'], function(){
// }
// 从老智云,获取到的最新的数据 2023.03.07 index.html中也有一份
// var levelRelationMap = {
// 1:{name:"国内外宏观经济运行与金融监管平台",child:[{name:"中央银行、财政部、其他政府机构"},{name:"证监会、银保监会、行业协会"},{name:"国外经济、国外政局"}]},
// 2:{name:"金融产品设计",child:[{name:"风险管理"},{name:"征信评级"},{name:"估值定价"},{name:"期权建模"},{name:"仿真预测"},{name:"资产证券化"}]},
// 3:{name:"金融产品发行市场",child:[{name:"承销/挂牌"},{name:"并购重组"},{name:"私募"},{name:"PE/VC"}]},
// 4:{name:"金融产品流通市场",child:[{name:"证券交易"},{name:"融资融券"},{name:"数据资讯"},{name:"研究咨询"},{name:"登记清算"},{name:"财富管理"}]},
// 5:{name:"金融市场参与主体",child:[{name:"经纪/做市商"},{name:"证券/期货/基金/信托/资管公司"},{name:"商业银行/政策性银行/信用合作社机构"},{name:"保险公司"},{name:"P2P网络借贷公司"},
// {name:"众筹公司"},{name:"第三方支付公司"},{name:"征信评级机构"},{name:"供应链金融服务公司"},{name:"金融科技服务公司"}]},
// 6:{name:"大数据技术",child:[{name:"大数据采集"},{name:"大数据储存"},{name:"大数据分析挖掘"},{name:"大数据可视化"}]},
// 7:{name:"人工智能技术",child:[{name:"智能数据"},{name:"人工智能技术"},{name:"智能营销"},{name:"智能交易"},{name:"智能投研"},{name:"智能支付"},{name:"智能风控"},{name:"智能投顾"}]},
// 8:{name:"云计算技术",child:[{name:"云主机"},{name:"云储存"},{name:"云数据库"},{name:"容器服务"},{name:"金融SaaS应用"},{name:"公有云"},{name:"私有云"}]},
// 9:{name:"区块链技术",child:[{name:"区块链技术"},{name:"数字资产"},{name:"区块链发票"},{name:"数字人民币"},{name:"数字票据"},{name:"供应链金融"},{name:"支付清算"},{name:"......"}]}
// }
var levelRelationMap = {
1:{name:"国内外宏观经济运行与金融监管平台",child:[{name:"中央银行、财政部、其他政府机构"},{name:"证监会、银保监会、行业协会"},{name:"国外经济、国外政局"}]},
2:{name:"金融产品设计",child:[{name:"风险管理"},{name:"征信评级"},{name:"估值定价"},{name:"期权建模"},{name:"仿真预测"},{name:"资产证券化"}]},
3:{name:"金融产品发行市场",child:[{name:"承销/挂牌"},{name:"并购重组"},{name:"私募"},{name:"PE/VC"}]},
4:{name:"金融产品流通市场",child:[{name:"证券交易"},{name:"融资融券"},{name:"数据资讯"},{name:"研究咨询"},{name:"登记清算"},{name:"财富管理"}]},
5:{name:"金融市场参与主体",child:[{name:"证券/期货/基金/信托/资管公司"},{name:"外汇"},{name:"商业银行/政策性银行/信用合作社机构"},{name:"保险公司"},{name:"P2P网络借贷公司"}, {name:"众筹公司"},{name:"第三方支付公司"},{name:"征信评级机构"},{name:"供应链金融服务公司"},{name:"金融科技服务公司"}]},
6:{name:"大数据技术",child:[{name:"大数据采集"},{name:"大数据储存"},{name:"大数据分析挖掘"},{name:"大数据可视化"}]},
7:{name:"人工智能技术",child:[{name:"智能数据"},{name:"人工智能技术"},{name:"智能营销"},{name:"智能交易"},{name:"智能投研"},{name:"智能支付"},{name:"智能风控"},{name:"智能投顾"}]},
6:{name:"大数据技术",child:[{name:"文本挖掘"},{name:"大数据基础"},{name:"分析挖掘"},{name:"可视化BI"},{name:"大数据ETL"},{name:"金融大数据"},{name:"商务大数据"},{name:"用户画像"}]},
7:{name:"人工智能技术",child:[{name:"机器学习"},{name:"AI基础"},{name:"数字营销"},{name:"智能交易"},{name:"AIGC大模型"},{name:"数字贸易"},{name:"智能风控"},{name:"智能投顾"}]},
8:{name:"云计算技术",child:[{name:"云主机"},{name:"云储存"},{name:"云数据库"},{name:"容器服务"},{name:"金融SaaS应用"},{name:"公有云"},{name:"私有云"}]},
9:{name:"区块链技术",child:[{name:"区块链技术"},{name:"数字资产"},{name:"区块链发票"},{name:"数字人民币"},{name:"数字票据"},{name:"供应链金融"},{name:"支付清算"},{name:"......"}]}
9:{name:"区块链技术",child:[{name:"区块链技术"},{name:"数字资产"},{name:"数字发票"},{name:"数字人民币"},{name:"数字票据"},{name:"供应链金融"},{name:"支付清算"},{name:"......"}]}
}
$.each(levelRelationMap,function (key,value){

@ -35,7 +35,7 @@
<div class="layui-btn-group">
<!-- <layui:accessButton function="schoolClass.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>-->
<layui:accessButton function="schoolClass.add" action="add"><i class="layui-icon">&#xe61f;</i>新增</layui:accessButton>
<layui:accessButton function="schoolClass.query" action="import" class="layui-btn-warm"><i class="iconfont">&#xebc9;</i>导入</layui:accessButton>
<!-- <layui:accessButton function="schoolClass.query" style="display:none" action="import" class="layui-btn-warm"><i class="iconfont">&#xebc9;</i>导入</layui:accessButton>-->
<layui:accessButton function="schoolClass.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>
</div>

Loading…
Cancel
Save