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

beetlsql3-dev
whb 10 months ago
commit 17dd8276b9

@ -67,7 +67,7 @@ getStudentByNoOfNet
=== ===
SELECT SELECT
core_user.old_id AS userId, core_user.old_id AS userId,
core_user.NAME AS NAME, student.student_name AS NAME,
core_role.NAME AS roleName, core_role.NAME AS roleName,
core_user.CODE as username, core_user.CODE as username,
4 as roleId, 4 as roleId,

@ -210,7 +210,7 @@ public class SchoolClassService extends CoreBaseService<SchoolClass> {
insertSchoolClass.setAddTime(new Date()); insertSchoolClass.setAddTime(new Date());
insertSchoolClass.setOrgId(orgId); insertSchoolClass.setOrgId(orgId);
insertSchoolClass.setUserId(userId); insertSchoolClass.setUserId(userId);
Integer icibtClassId = BXApiUtil.createBxClass(schoolClass.getClassName(), universitiesColleges.getIcibtSchoolId()); Integer icibtClassId = BXApiUtil.createBxClass(insertSchoolClass.getClassName(), universitiesColleges.getIcibtSchoolId());
insertSchoolClass.setIcibtClassId(icibtClassId); insertSchoolClass.setIcibtClassId(icibtClassId);
insert(insertSchoolClass); insert(insertSchoolClass);
SchoolClass s = new SchoolClass(); SchoolClass s = new SchoolClass();

@ -131,6 +131,9 @@ public class ApiStudentService {
if (allocation.getName().getText().equals("现金账户")) { if (allocation.getName().getText().equals("现金账户")) {
continue; continue;
} }
if(allocation.getApplicationId()==null||allocation.getApplicationId()==6){
continue;
}
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (allocation.getName().getText().equals("银行账户")) { if (allocation.getName().getText().equals("银行账户")) {
map.put("name", allocation.getName().getText()); map.put("name", allocation.getName().getText());

@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser; import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
@ -36,26 +37,28 @@ import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
@RestController @RestController
@Validated @Validated
@Api(tags = {"资产账户管理 学生资产账户 接口"}) @Api(tags = {"资产账户管理 学生资产账户 接口"})
public class StudentAccountAssetAllocationController{ public class StudentAccountAssetAllocationController {
private final Log log = LogFactory.getLog(this.getClass()); private final Log log = LogFactory.getLog(this.getClass());
private static final String MODEL = "/jlw/studentAccountAssetAllocation"; private static final String MODEL = "/jlw/studentAccountAssetAllocation";
private static final String API = "/api/studentAccountAssetAllocation"; private static final String API = "/api/studentAccountAssetAllocation";
@Autowired private StudentAccountAssetAllocationService studentAccountAssetAllocationService; @Autowired
private StudentAccountAssetAllocationService studentAccountAssetAllocationService;
@Autowired FileService fileService; @Autowired
FileService fileService;
/* 前端接口 */ /* 前端接口 */
@GetMapping(API + "/allOpenAccount.do") @GetMapping(API + "/allOpenAccount.do")
@ApiOperation("激活该校的所有学生用户的股票/期货账户") @ApiOperation("激活该校的所有学生用户的股票/期货账户")
public JsonResult<String> allOpenAccount(Long orgId,@SCoreUser CoreUser coreUser) { public JsonResult<String> allOpenAccount(Long orgId, @SCoreUser CoreUser coreUser) {
if(null == coreUser){ if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
}else{ } else {
studentAccountAssetAllocationService.allOpenAccount(orgId); studentAccountAssetAllocationService.allOpenAccount(orgId);
return JsonResult.success("操作成功"); return JsonResult.success("操作成功");
} }
@ -63,30 +66,30 @@ public class StudentAccountAssetAllocationController{
@PostMapping(API + "/allOpenAccount.do") @PostMapping(API + "/allOpenAccount.do")
@ApiOperation("转账") @ApiOperation("转账")
public JsonResult<String> transferAccounts(Long toAccountsApplicationId, Long outAccountsApplicationId, BigDecimal money,Long studentId, @SCoreUser CoreUser coreUser) { public JsonResult<String> transferAccounts(Long toAccountsApplicationId, Long outAccountsApplicationId, BigDecimal money, Long studentId, @SCoreUser CoreUser coreUser) {
if(null == coreUser){ if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
}else{ } else {
return studentAccountAssetAllocationService.transferAccounts(toAccountsApplicationId, outAccountsApplicationId ,money , studentId,coreUser); return studentAccountAssetAllocationService.transferAccounts(toAccountsApplicationId, outAccountsApplicationId, money, studentId, coreUser);
} }
} }
@GetMapping(API + "/getCapitalAccount.do") @GetMapping(API + "/getCapitalAccount.do")
@ApiOperation("获取转账账户") @ApiOperation("获取转账账户")
public JsonResult<List<StudentAccountAssetAllocation>> getCapitalAccount(Long studentId, @SCoreUser CoreUser coreUser) { public JsonResult<List<StudentAccountAssetAllocation>> getCapitalAccount(Long studentId, @SCoreUser CoreUser coreUser) {
if(null == coreUser){ if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
}else{ } else {
return JsonResult.success(studentAccountAssetAllocationService.getCapitalAccount(studentId)); return JsonResult.success(studentAccountAssetAllocationService.getCapitalAccount(studentId));
} }
} }
@PostMapping(API + "/getPageList.do") @PostMapping(API + "/getPageList.do")
@ApiOperation("分页列表") @ApiOperation("分页列表")
public JsonResult<PageQuery> getPageList(StudentAccountAssetAllocationQuery condition,@SCoreUser CoreUser coreUser){ public JsonResult<PageQuery> getPageList(StudentAccountAssetAllocationQuery condition, @SCoreUser CoreUser coreUser) {
if(null == coreUser){ if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
}else{ } else {
PageQuery page = condition.getPageQuery(); PageQuery page = condition.getPageQuery();
studentAccountAssetAllocationService.queryByConditionQuery(page); studentAccountAssetAllocationService.queryByConditionQuery(page);
return JsonResult.success(page); return JsonResult.success(page);
@ -96,10 +99,10 @@ public class StudentAccountAssetAllocationController{
@GetMapping(API + "/getInfo.do") @GetMapping(API + "/getInfo.do")
@ApiOperation("获取数据") @ApiOperation("获取数据")
public JsonResult<StudentAccountAssetAllocation>getInfo(StudentAccountAssetAllocationQuery param,@SCoreUser CoreUser coreUser) { public JsonResult<StudentAccountAssetAllocation> getInfo(StudentAccountAssetAllocationQuery param, @SCoreUser CoreUser coreUser) {
if(null == coreUser){ if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
}else{ } else {
StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.getInfo(param); StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.getInfo(param);
return JsonResult.success(studentAccountAssetAllocation); return JsonResult.success(studentAccountAssetAllocation);
} }
@ -108,18 +111,27 @@ public class StudentAccountAssetAllocationController{
@GetMapping(API + "/getList.do") @GetMapping(API + "/getList.do")
@ApiOperation("列表") @ApiOperation("列表")
public JsonResult<List<StudentAccountAssetAllocation>>getList(StudentAccountAssetAllocationQuery param,@SCoreUser CoreUser coreUser) { public JsonResult<List<StudentAccountAssetAllocation>> getList(StudentAccountAssetAllocationQuery param, @SCoreUser CoreUser coreUser) {
if(null == coreUser){ if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
}else{ } else {
List<StudentAccountAssetAllocation>list = studentAccountAssetAllocationService.getValuesByQuery(param); List<StudentAccountAssetAllocation> list = studentAccountAssetAllocationService.getValuesByQuery(param);
return JsonResult.success(list); List<StudentAccountAssetAllocation> result = new ArrayList<>();
if (list != null && list.size() > 0) {
for (StudentAccountAssetAllocation item : list) {
if (item.getApplicationId() == null || item.getApplicationId() == 6)
continue;
result.add(item);
}
}
return JsonResult.success(result);
} }
} }
/** /**
* *
* token * token
*
* @param applicationToken token * @param applicationToken token
* @param param * @param param
* @return * @return
@ -136,6 +148,7 @@ public class StudentAccountAssetAllocationController{
/** /**
* *
* token * token
*
* @param applicationToken token * @param applicationToken token
* @param param * @param param
* @return * @return
@ -151,6 +164,7 @@ public class StudentAccountAssetAllocationController{
/** /**
* *
* token * token
*
* @param applicationToken token * @param applicationToken token
* @return * @return
*/ */
@ -168,7 +182,7 @@ public class StudentAccountAssetAllocationController{
@Function("studentAccountAssetAllocation.query") @Function("studentAccountAssetAllocation.query")
@ApiOperation("后台系统管理界面") @ApiOperation("后台系统管理界面")
public ModelAndView index() { public ModelAndView index() {
ModelAndView view = new ModelAndView("/jlw/studentAccountAssetAllocation/index.html") ; ModelAndView view = new ModelAndView("/jlw/studentAccountAssetAllocation/index.html");
view.addObject("search", StudentAccountAssetAllocationQuery.class.getName()); view.addObject("search", StudentAccountAssetAllocationQuery.class.getName());
return view; return view;
} }
@ -188,10 +202,10 @@ public class StudentAccountAssetAllocationController{
@ApiOperation("后台系统管理界面-添加") @ApiOperation("后台系统管理界面-添加")
public ModelAndView add(Long id) { public ModelAndView add(Long id) {
ModelAndView view = new ModelAndView("/jlw/studentAccountAssetAllocation/add.html"); ModelAndView view = new ModelAndView("/jlw/studentAccountAssetAllocation/add.html");
if(null != id){ if (null != id) {
StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.queryById(id); StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.queryById(id);
view.addObject("studentAccountAssetAllocation", studentAccountAssetAllocation); view.addObject("studentAccountAssetAllocation", studentAccountAssetAllocation);
}else { } else {
view.addObject("studentAccountAssetAllocation", new StudentAccountAssetAllocation()); view.addObject("studentAccountAssetAllocation", new StudentAccountAssetAllocation());
} }
return view; return view;
@ -202,7 +216,7 @@ public class StudentAccountAssetAllocationController{
@PostMapping(MODEL + "/list.json") @PostMapping(MODEL + "/list.json")
@Function("studentAccountAssetAllocation.query") @Function("studentAccountAssetAllocation.query")
@ApiOperation("分页列表") @ApiOperation("分页列表")
public JsonResult<PageQuery> list(StudentAccountAssetAllocationQuery condition){ public JsonResult<PageQuery> list(StudentAccountAssetAllocationQuery condition) {
PageQuery page = condition.getPageQuery(); PageQuery page = condition.getPageQuery();
studentAccountAssetAllocationService.queryByCondition(page); studentAccountAssetAllocationService.queryByCondition(page);
return JsonResult.success(page); return JsonResult.success(page);
@ -211,17 +225,17 @@ public class StudentAccountAssetAllocationController{
@PostMapping(MODEL + "/addAll.json") @PostMapping(MODEL + "/addAll.json")
@Function("studentAccountAssetAllocation.add") @Function("studentAccountAssetAllocation.add")
@ApiOperation("批量添加") @ApiOperation("批量添加")
public JsonResult addAll(StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery,@SCoreUser CoreUser coreUser){ public JsonResult addAll(StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, @SCoreUser CoreUser coreUser) {
if(null == coreUser){ if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
}else{ } else {
studentAccountAssetAllocationQuery.setUserId(coreUser.getId()); studentAccountAssetAllocationQuery.setUserId(coreUser.getId());
studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId()); studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId());
String msg = studentAccountAssetAllocationService.addAll(studentAccountAssetAllocationQuery); String msg = studentAccountAssetAllocationService.addAll(studentAccountAssetAllocationQuery);
if (StringUtils.isBlank(msg)) { if (StringUtils.isBlank(msg)) {
return JsonResult.success(); return JsonResult.success();
} else { } else {
return JsonResult.failMessage("新增失败,"+msg); return JsonResult.failMessage("新增失败," + msg);
} }
} }
} }
@ -229,10 +243,10 @@ public class StudentAccountAssetAllocationController{
@PostMapping(MODEL + "/add.json") @PostMapping(MODEL + "/add.json")
@Function("studentAccountAssetAllocation.add") @Function("studentAccountAssetAllocation.add")
@ApiOperation("添加") @ApiOperation("添加")
public JsonResult add(@Validated(ValidateConfig.ADD.class) StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, BindingResult result,@SCoreUser CoreUser coreUser){ public JsonResult add(@Validated(ValidateConfig.ADD.class) StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, BindingResult result, @SCoreUser CoreUser coreUser) {
if(result.hasErrors()){ if (result.hasErrors()) {
return JsonResult.failMessage(result); return JsonResult.failMessage(result);
}else{ } else {
studentAccountAssetAllocationQuery.setUserId(coreUser.getId()); studentAccountAssetAllocationQuery.setUserId(coreUser.getId());
studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId()); studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId());
@ -244,9 +258,9 @@ public class StudentAccountAssetAllocationController{
@Function("studentAccountAssetAllocation.edit") @Function("studentAccountAssetAllocation.edit")
@ApiOperation("编辑") @ApiOperation("编辑")
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, BindingResult result) { public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, BindingResult result) {
if(result.hasErrors()){ if (result.hasErrors()) {
return JsonResult.failMessage(result); return JsonResult.failMessage(result);
}else { } else {
Assert.notNull(getUser(), "请登录后再操作"); Assert.notNull(getUser(), "请登录后再操作");
studentAccountAssetAllocationQuery.setUserId(null); studentAccountAssetAllocationQuery.setUserId(null);
studentAccountAssetAllocationQuery.setOrgId(null); studentAccountAssetAllocationQuery.setOrgId(null);
@ -254,7 +268,7 @@ public class StudentAccountAssetAllocationController{
if (StringUtils.isBlank(msg)) { if (StringUtils.isBlank(msg)) {
return JsonResult.success(); return JsonResult.success();
} else { } else {
return JsonResult.failMessage("更新失败,"+msg); return JsonResult.failMessage("更新失败," + msg);
} }
} }
} }
@ -263,16 +277,16 @@ public class StudentAccountAssetAllocationController{
@GetMapping(MODEL + "/view.json") @GetMapping(MODEL + "/view.json")
@Function("studentAccountAssetAllocation.query") @Function("studentAccountAssetAllocation.query")
@ApiOperation("根据ID获取数据") @ApiOperation("根据ID获取数据")
public JsonResult<StudentAccountAssetAllocation>queryInfo(Long id) { public JsonResult<StudentAccountAssetAllocation> queryInfo(Long id) {
StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.queryById( id); StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.queryById(id);
return JsonResult.success(studentAccountAssetAllocation); return JsonResult.success(studentAccountAssetAllocation);
} }
@GetMapping(MODEL + "/getValues.json") @GetMapping(MODEL + "/getValues.json")
@Function("studentAccountAssetAllocation.query") @Function("studentAccountAssetAllocation.query")
@ApiOperation("列表") @ApiOperation("列表")
public JsonResult<List<StudentAccountAssetAllocation>>getValues(StudentAccountAssetAllocationQuery param) { public JsonResult<List<StudentAccountAssetAllocation>> getValues(StudentAccountAssetAllocationQuery param) {
List<StudentAccountAssetAllocation>list = studentAccountAssetAllocationService.getValuesByQuery(param); List<StudentAccountAssetAllocation> list = studentAccountAssetAllocationService.getValuesByQuery(param);
return JsonResult.success(list); return JsonResult.success(list);
} }

@ -7,6 +7,8 @@ import com.google.gson.Gson;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.ibeetl.admin.core.dao.CoreDictDao;
import com.ibeetl.admin.core.entity.CoreDict;
import com.ibeetl.admin.core.entity.CoreUser; import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.service.CorePlatformService; import com.ibeetl.admin.core.service.CorePlatformService;
import com.ibeetl.admin.core.service.CoreUserService; import com.ibeetl.admin.core.service.CoreUserService;
@ -24,6 +26,7 @@ import io.swagger.annotations.ApiOperation;
import org.apache.regexp.RE; import org.apache.regexp.RE;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -80,6 +83,9 @@ public class TestController {
private final static String USER = "sa"; private final static String USER = "sa";
private final static String PASSWORD = "sztzjy@2017"; private final static String PASSWORD = "sztzjy@2017";
@Autowired
CoreDictDao coreDictDao;
// 打开数据库连接 // 打开数据库连接
public static Connection openConn() throws SQLException { public static Connection openConn() throws SQLException {
try { try {
@ -517,7 +523,7 @@ public class TestController {
" JOIN EduMajors maj ON stu.MajorId = maj.Id " + " JOIN EduMajors maj ON stu.MajorId = maj.Id " +
" JOIN EduSchools sch ON stu.SchoolId = sch.Id " + " JOIN EduSchools sch ON stu.SchoolId = sch.Id " +
" JOIN EduClasses cla ON stu.ClassId = cla.Id" + " JOIN EduClasses cla ON stu.ClassId = cla.Id" +
" join EduUsers us on stu.StudentNo = us.UserName where stu.isdeleted=0 "; " join EduUsers us on stu.StudentNo = us.UserName where stu.isdeleted=0 and cla.id = 1274";
ps = conn.prepareStatement(sql); ps = conn.prepareStatement(sql);
ResultSet resultSet = ps.executeQuery(); ResultSet resultSet = ps.executeQuery();
int i = 0; int i = 0;
@ -1674,4 +1680,11 @@ public class TestController {
} }
} }
} }
@ApiOperation("异常测试")
@GetMapping("errorTest")
public void errorTest() {
List<CoreDict> aLlListByTable = coreDictDao.findALlListByTable("student_id", "student_name", "", "student", new String[]{"student_status=1"});
int a = 0;
}
} }
Loading…
Cancel
Save