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
core_user.old_id AS userId,
core_user.NAME AS NAME,
student.student_name AS NAME,
core_role.NAME AS roleName,
core_user.CODE as username,
4 as roleId,

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

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

@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
@ -36,57 +37,59 @@ import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
@RestController
@Validated
@Api(tags = {"资产账户管理 学生资产账户 接口"})
public class StudentAccountAssetAllocationController{
public class StudentAccountAssetAllocationController {
private final Log log = LogFactory.getLog(this.getClass());
private static final String MODEL = "/jlw/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")
@ApiOperation("激活该校的所有学生用户的股票/期货账户")
public JsonResult<String> allOpenAccount(Long orgId,@SCoreUser CoreUser coreUser) {
if(null == coreUser){
public JsonResult<String> allOpenAccount(Long orgId, @SCoreUser CoreUser coreUser) {
if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作");
}else{
} else {
studentAccountAssetAllocationService.allOpenAccount(orgId);
return JsonResult.success("操作成功");
return JsonResult.success("操作成功");
}
}
@PostMapping(API + "/allOpenAccount.do")
@ApiOperation("转账")
public JsonResult<String> transferAccounts(Long toAccountsApplicationId, Long outAccountsApplicationId, BigDecimal money,Long studentId, @SCoreUser CoreUser coreUser) {
if(null == coreUser){
public JsonResult<String> transferAccounts(Long toAccountsApplicationId, Long outAccountsApplicationId, BigDecimal money, Long studentId, @SCoreUser CoreUser coreUser) {
if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作");
}else{
return studentAccountAssetAllocationService.transferAccounts(toAccountsApplicationId, outAccountsApplicationId ,money , studentId,coreUser);
} else {
return studentAccountAssetAllocationService.transferAccounts(toAccountsApplicationId, outAccountsApplicationId, money, studentId, coreUser);
}
}
@GetMapping(API + "/getCapitalAccount.do")
@ApiOperation("获取转账账户")
public JsonResult<List<StudentAccountAssetAllocation>> getCapitalAccount(Long studentId, @SCoreUser CoreUser coreUser) {
if(null == coreUser){
if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作");
}else{
} else {
return JsonResult.success(studentAccountAssetAllocationService.getCapitalAccount(studentId));
}
}
@PostMapping(API + "/getPageList.do")
@ApiOperation("分页列表")
public JsonResult<PageQuery> getPageList(StudentAccountAssetAllocationQuery condition,@SCoreUser CoreUser coreUser){
if(null == coreUser){
public JsonResult<PageQuery> getPageList(StudentAccountAssetAllocationQuery condition, @SCoreUser CoreUser coreUser) {
if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作");
}else{
} else {
PageQuery page = condition.getPageQuery();
studentAccountAssetAllocationService.queryByConditionQuery(page);
return JsonResult.success(page);
@ -96,32 +99,41 @@ public class StudentAccountAssetAllocationController{
@GetMapping(API + "/getInfo.do")
@ApiOperation("获取数据")
public JsonResult<StudentAccountAssetAllocation>getInfo(StudentAccountAssetAllocationQuery param,@SCoreUser CoreUser coreUser) {
if(null == coreUser){
public JsonResult<StudentAccountAssetAllocation> getInfo(StudentAccountAssetAllocationQuery param, @SCoreUser CoreUser coreUser) {
if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作");
}else{
} else {
StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.getInfo(param);
return JsonResult.success(studentAccountAssetAllocation);
return JsonResult.success(studentAccountAssetAllocation);
}
}
@GetMapping(API + "/getList.do")
@ApiOperation("列表")
public JsonResult<List<StudentAccountAssetAllocation>>getList(StudentAccountAssetAllocationQuery param,@SCoreUser CoreUser coreUser) {
if(null == coreUser){
public JsonResult<List<StudentAccountAssetAllocation>> getList(StudentAccountAssetAllocationQuery param, @SCoreUser CoreUser coreUser) {
if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作");
}else{
List<StudentAccountAssetAllocation>list = studentAccountAssetAllocationService.getValuesByQuery(param);
return JsonResult.success(list);
} else {
List<StudentAccountAssetAllocation> list = studentAccountAssetAllocationService.getValuesByQuery(param);
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
* @param applicationToken token
* @param param
*
* @param applicationToken token
* @param param
* @return
*/
@PostMapping(API + "/externalApi/updateByApplicationToken.do")
@ -136,22 +148,24 @@ public class StudentAccountAssetAllocationController{
/**
*
* token
* @param applicationToken token
* @param param
*
* @param applicationToken token
* @param param
* @return
*/
@PostMapping(API + "/externalApi/getByApplicationToken.do")
@ResponseBody
@ApiOperation("通过token获取资金账户信息")
public JsonResult<List<StudentAccountAssetAllocation>> getByApplicationToken(@RequestParam("applicationToken") String applicationToken,
@RequestBody StudentAccountAssetAllocationQuery param) {
@RequestBody StudentAccountAssetAllocationQuery param) {
return JsonResult.success(studentAccountAssetAllocationService.getByApplicationToken(applicationToken, param));
}
/**
*
* token
* @param applicationToken token
*
* @param applicationToken token
* @return
*/
@PostMapping(API + "/externalApi/getApplicationBindCourseInfo.do")
@ -168,7 +182,7 @@ public class StudentAccountAssetAllocationController{
@Function("studentAccountAssetAllocation.query")
@ApiOperation("后台系统管理界面")
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());
return view;
}
@ -188,10 +202,10 @@ public class StudentAccountAssetAllocationController{
@ApiOperation("后台系统管理界面-添加")
public ModelAndView add(Long id) {
ModelAndView view = new ModelAndView("/jlw/studentAccountAssetAllocation/add.html");
if(null != id){
if (null != id) {
StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.queryById(id);
view.addObject("studentAccountAssetAllocation", studentAccountAssetAllocation);
}else {
} else {
view.addObject("studentAccountAssetAllocation", new StudentAccountAssetAllocation());
}
return view;
@ -202,7 +216,7 @@ public class StudentAccountAssetAllocationController{
@PostMapping(MODEL + "/list.json")
@Function("studentAccountAssetAllocation.query")
@ApiOperation("分页列表")
public JsonResult<PageQuery> list(StudentAccountAssetAllocationQuery condition){
public JsonResult<PageQuery> list(StudentAccountAssetAllocationQuery condition) {
PageQuery page = condition.getPageQuery();
studentAccountAssetAllocationService.queryByCondition(page);
return JsonResult.success(page);
@ -211,17 +225,17 @@ public class StudentAccountAssetAllocationController{
@PostMapping(MODEL + "/addAll.json")
@Function("studentAccountAssetAllocation.add")
@ApiOperation("批量添加")
public JsonResult addAll(StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery,@SCoreUser CoreUser coreUser){
if(null == coreUser){
public JsonResult addAll(StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, @SCoreUser CoreUser coreUser) {
if (null == coreUser) {
return JsonResult.failMessage("请登录后再操作");
}else{
studentAccountAssetAllocationQuery.setUserId(coreUser.getId());
studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId());
} else {
studentAccountAssetAllocationQuery.setUserId(coreUser.getId());
studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId());
String msg = studentAccountAssetAllocationService.addAll(studentAccountAssetAllocationQuery);
if (StringUtils.isBlank(msg)) {
return JsonResult.success();
} else {
return JsonResult.failMessage("新增失败,"+msg);
return JsonResult.failMessage("新增失败," + msg);
}
}
}
@ -229,13 +243,13 @@ public class StudentAccountAssetAllocationController{
@PostMapping(MODEL + "/add.json")
@Function("studentAccountAssetAllocation.add")
@ApiOperation("添加")
public JsonResult add(@Validated(ValidateConfig.ADD.class) StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, BindingResult result,@SCoreUser CoreUser coreUser){
if(result.hasErrors()){
public JsonResult add(@Validated(ValidateConfig.ADD.class) StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, BindingResult result, @SCoreUser CoreUser coreUser) {
if (result.hasErrors()) {
return JsonResult.failMessage(result);
}else{
} else {
studentAccountAssetAllocationQuery.setUserId(coreUser.getId());
studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId());
studentAccountAssetAllocationQuery.setUserId(coreUser.getId());
studentAccountAssetAllocationQuery.setOrgId(coreUser.getOrgId());
return studentAccountAssetAllocationService.add(studentAccountAssetAllocationQuery);
}
}
@ -244,17 +258,17 @@ public class StudentAccountAssetAllocationController{
@Function("studentAccountAssetAllocation.edit")
@ApiOperation("编辑")
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) StudentAccountAssetAllocationQuery studentAccountAssetAllocationQuery, BindingResult result) {
if(result.hasErrors()){
if (result.hasErrors()) {
return JsonResult.failMessage(result);
}else {
} else {
Assert.notNull(getUser(), "请登录后再操作");
studentAccountAssetAllocationQuery.setUserId(null);
studentAccountAssetAllocationQuery.setOrgId(null);
studentAccountAssetAllocationQuery.setUserId(null);
studentAccountAssetAllocationQuery.setOrgId(null);
String msg = studentAccountAssetAllocationService.edit(studentAccountAssetAllocationQuery);
if (StringUtils.isBlank(msg)) {
return JsonResult.success();
} else {
return JsonResult.failMessage("更新失败,"+msg);
return JsonResult.failMessage("更新失败," + msg);
}
}
}
@ -263,17 +277,17 @@ public class StudentAccountAssetAllocationController{
@GetMapping(MODEL + "/view.json")
@Function("studentAccountAssetAllocation.query")
@ApiOperation("根据ID获取数据")
public JsonResult<StudentAccountAssetAllocation>queryInfo(Long id) {
StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.queryById( id);
return JsonResult.success(studentAccountAssetAllocation);
public JsonResult<StudentAccountAssetAllocation> queryInfo(Long id) {
StudentAccountAssetAllocation studentAccountAssetAllocation = studentAccountAssetAllocationService.queryById(id);
return JsonResult.success(studentAccountAssetAllocation);
}
@GetMapping(MODEL + "/getValues.json")
@Function("studentAccountAssetAllocation.query")
@ApiOperation("列表")
public JsonResult<List<StudentAccountAssetAllocation>>getValues(StudentAccountAssetAllocationQuery param) {
List<StudentAccountAssetAllocation>list = studentAccountAssetAllocationService.getValuesByQuery(param);
return JsonResult.success(list);
public JsonResult<List<StudentAccountAssetAllocation>> getValues(StudentAccountAssetAllocationQuery param) {
List<StudentAccountAssetAllocation> list = studentAccountAssetAllocationService.getValuesByQuery(param);
return JsonResult.success(list);
}

@ -7,6 +7,8 @@ import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
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.service.CorePlatformService;
import com.ibeetl.admin.core.service.CoreUserService;
@ -24,6 +26,7 @@ import io.swagger.annotations.ApiOperation;
import org.apache.regexp.RE;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -80,6 +83,9 @@ public class TestController {
private final static String USER = "sa";
private final static String PASSWORD = "sztzjy@2017";
@Autowired
CoreDictDao coreDictDao;
// 打开数据库连接
public static Connection openConn() throws SQLException {
try {
@ -517,7 +523,7 @@ public class TestController {
" JOIN EduMajors maj ON stu.MajorId = maj.Id " +
" JOIN EduSchools sch ON stu.SchoolId = sch.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);
ResultSet resultSet = ps.executeQuery();
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