|
|
|
@ -1,43 +1,25 @@
|
|
|
|
|
package com.ibeetl.jlw.service;
|
|
|
|
|
|
|
|
|
|
import java.io.*;
|
|
|
|
|
import java.text.DateFormat;
|
|
|
|
|
import java.text.DecimalFormat;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
|
|
import cn.jlw.util.ToolUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
|
import com.ibeetl.admin.core.util.TimeTool;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreBaseService;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonReturnCode;
|
|
|
|
|
import com.ibeetl.jlw.dao.StudentAccountTradingRecordSheetDao;
|
|
|
|
|
import com.ibeetl.jlw.entity.StudentAccountTradingRecordSheet;
|
|
|
|
|
import com.ibeetl.jlw.web.query.StudentAccountTradingRecordSheetQuery;
|
|
|
|
|
import com.ibeetl.jlw.entity.FileEntity;
|
|
|
|
|
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreBaseService;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Cell;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
|
import org.beetl.sql.core.SqlId;
|
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
|
|
import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 资产账户转账记录 Service
|
|
|
|
@ -47,34 +29,35 @@ import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
|
|
|
|
|
@Service
|
|
|
|
|
@Transactional
|
|
|
|
|
@Validated
|
|
|
|
|
public class StudentAccountTradingRecordSheetService extends CoreBaseService<StudentAccountTradingRecordSheet>{
|
|
|
|
|
public class StudentAccountTradingRecordSheetService extends CoreBaseService<StudentAccountTradingRecordSheet> {
|
|
|
|
|
|
|
|
|
|
@Autowired private StudentAccountTradingRecordSheetDao studentAccountTradingRecordSheetDao;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentAccountTradingRecordSheetDao studentAccountTradingRecordSheetDao;
|
|
|
|
|
|
|
|
|
|
public PageQuery<StudentAccountTradingRecordSheet>queryByCondition(PageQuery query){
|
|
|
|
|
public PageQuery<StudentAccountTradingRecordSheet> queryByCondition(PageQuery query) {
|
|
|
|
|
PageQuery ret = studentAccountTradingRecordSheetDao.queryByCondition(query);
|
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public PageQuery<StudentAccountTradingRecordSheet>queryByConditionQuery(PageQuery query){
|
|
|
|
|
public PageQuery<StudentAccountTradingRecordSheet> queryByConditionQuery(PageQuery query) {
|
|
|
|
|
PageQuery ret = studentAccountTradingRecordSheetDao.queryByConditionQuery(query);
|
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deleteByList(List list){
|
|
|
|
|
public void deleteByList(List list) {
|
|
|
|
|
String ids = "";
|
|
|
|
|
ToolUtils.deleteNullList(list);
|
|
|
|
|
for(int i=0;null != list && i<list.size();i++){
|
|
|
|
|
ids += list.get(i).toString()+(i==list.size()-1?"":",");
|
|
|
|
|
for (int i = 0; null != list && i < list.size(); i++) {
|
|
|
|
|
ids += list.get(i).toString() + (i == list.size() - 1 ? "" : ",");
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotBlank(ids)){
|
|
|
|
|
if (StringUtils.isNotBlank(ids)) {
|
|
|
|
|
studentAccountTradingRecordSheetDao.deleteStudentAccountTradingRecordSheetByIds(ids);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deleteStudentAccountTradingRecordSheet(String ids){
|
|
|
|
|
public void deleteStudentAccountTradingRecordSheet(String ids) {
|
|
|
|
|
try {
|
|
|
|
|
studentAccountTradingRecordSheetDao.deleteStudentAccountTradingRecordSheetByIds(ids);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -82,7 +65,7 @@ public class StudentAccountTradingRecordSheetService extends CoreBaseService<Stu
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String addAll(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery){
|
|
|
|
|
public String addAll(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery) {
|
|
|
|
|
String msg = "";
|
|
|
|
|
List<StudentAccountTradingRecordSheet> studentAccountTradingRecordSheetList = new ArrayList<>();
|
|
|
|
|
try {
|
|
|
|
@ -90,11 +73,12 @@ public class StudentAccountTradingRecordSheetService extends CoreBaseService<Stu
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
try {
|
|
|
|
|
studentAccountTradingRecordSheetList.add(JSONObject.parseObject(studentAccountTradingRecordSheetQuery.getStudentAccountTradingRecordSheetJsonStr(), StudentAccountTradingRecordSheet.class));
|
|
|
|
|
} catch (Exception e1) {}
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ToolUtils.deleteNullList(studentAccountTradingRecordSheetList);
|
|
|
|
|
if(null != studentAccountTradingRecordSheetList && studentAccountTradingRecordSheetList.size()>0){
|
|
|
|
|
for(int i=0;i<studentAccountTradingRecordSheetList.size();i++){
|
|
|
|
|
if (null != studentAccountTradingRecordSheetList && studentAccountTradingRecordSheetList.size() > 0) {
|
|
|
|
|
for (int i = 0; i < studentAccountTradingRecordSheetList.size(); i++) {
|
|
|
|
|
StudentAccountTradingRecordSheet studentAccountTradingRecordSheet = studentAccountTradingRecordSheetList.get(i);
|
|
|
|
|
studentAccountTradingRecordSheet.setOrgId(studentAccountTradingRecordSheetQuery.getOrgId());
|
|
|
|
|
}
|
|
|
|
@ -103,7 +87,7 @@ public class StudentAccountTradingRecordSheetService extends CoreBaseService<Stu
|
|
|
|
|
return msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JsonResult add(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery){
|
|
|
|
|
public JsonResult add(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery) {
|
|
|
|
|
String msg = "";
|
|
|
|
|
StudentAccountTradingRecordSheet studentAccountTradingRecordSheet = studentAccountTradingRecordSheetQuery.pojo();
|
|
|
|
|
studentAccountTradingRecordSheetDao.insert(studentAccountTradingRecordSheet);
|
|
|
|
@ -115,54 +99,54 @@ public class StudentAccountTradingRecordSheetService extends CoreBaseService<Stu
|
|
|
|
|
return jsonResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String edit(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery){
|
|
|
|
|
public String edit(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery) {
|
|
|
|
|
String msg = "";
|
|
|
|
|
StudentAccountTradingRecordSheet studentAccountTradingRecordSheet = studentAccountTradingRecordSheetQuery.pojo();
|
|
|
|
|
studentAccountTradingRecordSheetDao.updateTemplateById(studentAccountTradingRecordSheet);
|
|
|
|
|
return msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String updateGivenByIds(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery){
|
|
|
|
|
public String updateGivenByIds(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery) {
|
|
|
|
|
String msg = "";
|
|
|
|
|
if(StringUtils.isNotBlank(studentAccountTradingRecordSheetQuery.get_given())){
|
|
|
|
|
if (StringUtils.isNotBlank(studentAccountTradingRecordSheetQuery.get_given())) {
|
|
|
|
|
boolean flag = studentAccountTradingRecordSheetDao.updateGivenByIds(studentAccountTradingRecordSheetQuery) > 0;
|
|
|
|
|
if(!flag){
|
|
|
|
|
if (!flag) {
|
|
|
|
|
msg = "更新指定参数失败";
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
msg = "指定参数为空";
|
|
|
|
|
}
|
|
|
|
|
return msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<StudentAccountTradingRecordSheet> getValues (Object paras){
|
|
|
|
|
public List<StudentAccountTradingRecordSheet> getValues(Object paras) {
|
|
|
|
|
return sqlManager.select(SqlId.of("jlw.studentAccountTradingRecordSheet.getStudentAccountTradingRecordSheetValues"), StudentAccountTradingRecordSheet.class, paras);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<StudentAccountTradingRecordSheet> getValuesByQuery (StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery){
|
|
|
|
|
public List<StudentAccountTradingRecordSheet> getValuesByQuery(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery) {
|
|
|
|
|
return studentAccountTradingRecordSheetDao.getValuesByQuery(studentAccountTradingRecordSheetQuery);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<StudentAccountTradingRecordSheet> getValuesByQueryNotWithPermission (StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery){
|
|
|
|
|
public List<StudentAccountTradingRecordSheet> getValuesByQueryNotWithPermission(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery) {
|
|
|
|
|
return studentAccountTradingRecordSheetDao.getValuesByQueryNotWithPermission(studentAccountTradingRecordSheetQuery);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StudentAccountTradingRecordSheet getInfo (Long id){
|
|
|
|
|
public StudentAccountTradingRecordSheet getInfo(Long id) {
|
|
|
|
|
StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery = new StudentAccountTradingRecordSheetQuery();
|
|
|
|
|
studentAccountTradingRecordSheetQuery.setId(id);
|
|
|
|
|
List<StudentAccountTradingRecordSheet> list = studentAccountTradingRecordSheetDao.getValuesByQuery(studentAccountTradingRecordSheetQuery);
|
|
|
|
|
if(null != list && list.size()>0){
|
|
|
|
|
if (null != list && list.size() > 0) {
|
|
|
|
|
return list.get(0);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StudentAccountTradingRecordSheet getInfo (StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery){
|
|
|
|
|
public StudentAccountTradingRecordSheet getInfo(StudentAccountTradingRecordSheetQuery studentAccountTradingRecordSheetQuery) {
|
|
|
|
|
List<StudentAccountTradingRecordSheet> list = studentAccountTradingRecordSheetDao.getValuesByQuery(studentAccountTradingRecordSheetQuery);
|
|
|
|
|
if(null != list && list.size()>0){
|
|
|
|
|
if (null != list && list.size() > 0) {
|
|
|
|
|
return list.get(0);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|